From 4631bbc87cd9b9bdd7afb5e6f97bd147c4f0171b Mon Sep 17 00:00:00 2001 From: camreeves Date: Thu, 12 Dec 2024 04:33:24 +0000 Subject: [PATCH] build(concierge): CI build from f96712b73 --- concierge/assets/maps/copenhagen/level_04.svg | 208 +- concierge/assets/maps/hong_kong/level_33.svg | 2 +- concierge/assets/maps/miami/level_10.svg | 323 +- .../assets/maps/minneapolis/level_23.svg | 2 +- concierge/assets/maps/nairobi/level_02.svg | 110 +- concierge/assets/maps/wroclaw/level_05.svg | 10037 +++++++++++++++- concierge/assets/maps/wroclaw/level_06.svg | 4484 ++++++- concierge/main-es2015.js | 8 +- concierge/main-es2015.js.map | 2 +- concierge/main-es5.js | 8 +- concierge/main-es5.js.map | 2 +- 11 files changed, 14818 insertions(+), 368 deletions(-) diff --git a/concierge/assets/maps/copenhagen/level_04.svg b/concierge/assets/maps/copenhagen/level_04.svg index 44d75d570..d88bf4175 100644 --- a/concierge/assets/maps/copenhagen/level_04.svg +++ b/concierge/assets/maps/copenhagen/level_04.svg @@ -79,11 +79,11 @@ - + - + - + - + - + - + - - + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -234,11 +235,11 @@ l0,0c-3.5,0.5-6,3.6-5.6,7.1l0.3,3.6c0.2,2.7,2.5,4.7,5.1,4.5c0.1,0,0.2,0,0.3,0l0,0L170.8,731z"/> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -606,11 +607,11 @@ c-3.5,0-6.3,2.7-6.5,6.2l-0.1,3.6c-0.2,2.7,1.9,4.9,4.5,5.1c0.1,0,0.2,0,0.3,0l0,0L1387.6,266z"/> - + - + - - - - - - - - - - - @@ -904,46 +863,45 @@ C436.9,648.5,435.8,648.8,434.5,648.8z M435.7,646.3c0.3-0.3,0.5-0.7,0.5-1.4s-0.2-1.1-0.5-1.3c-0.3-0.3-0.8-0.4-1.4-0.4h-2.4v3.6 h2.4C434.9,646.7,435.3,646.5,435.7,646.3z"/> - - + + + c0.3,0.5,0.6,1.1,0.7,1.8c0.1,0.4,0.1,1,0.1,1.8H474c0,0.9,0.3,1.5,0.8,1.9c0.3,0.2,0.7,0.3,1.2,0.3s0.9-0.1,1.2-0.4 + c0.2-0.1,0.3-0.4,0.4-0.6L479.8,650.5L479.8,650.5z M477.5,647.8c0-0.6-0.2-1.1-0.6-1.4c-0.3-0.3-0.8-0.5-1.3-0.5s-1,0.2-1.3,0.5 + s-0.5,0.8-0.6,1.4H477.5z"/> - + c0.4-0.4,1-0.5,1.7-0.5h0.1c0,0,0.1,0,0.2,0v2.4c-0.1,0-0.3,0-0.4,0C486.1,646.3,486,646.3,486,646.3z"/> + - - + + c0.3,0.5,0.6,1.1,0.7,1.8c0.1,0.4,0.1,1,0.1,1.8h-6.1c0,0.9,0.3,1.5,0.8,1.9c0.3,0.2,0.7,0.3,1.2,0.3s0.9-0.1,1.2-0.4 + c0.2-0.1,0.3-0.4,0.4-0.6L480.7,667.3L480.7,667.3z M478.4,664.6c0-0.6-0.2-1.1-0.6-1.4c-0.3-0.3-0.8-0.5-1.3-0.5s-1,0.2-1.3,0.5 + s-0.5,0.8-0.6,1.4H478.4z"/> \ No newline at end of file + \ No newline at end of file diff --git a/concierge/assets/maps/miami/level_10.svg b/concierge/assets/maps/miami/level_10.svg index 53b86ad28..e6f1cb370 100644 --- a/concierge/assets/maps/miami/level_10.svg +++ b/concierge/assets/maps/miami/level_10.svg @@ -584,66 +584,6 @@ c0.4,0,0.7-0.1,1-0.3s0.5-0.6,0.5-1.1v-0.6c-0.1,0.1-0.2,0.1-0.3,0.2c-0.1,0-0.3,0.1-0.4,0.1l-0.4,0.1c-0.3,0.1-0.6,0.1-0.7,0.2 c-0.3,0.1-0.4,0.4-0.4,0.7C1124.4,727.2,1124.5,727.4,1124.6,727.6z"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + s-0.8-1.4-0.8-2.4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.5,1.2c0,0.6-0.2,1.2-0.7,1.6s-1.2,0.6-2.2,0.6s-1.8-0.2-2.3-0.6s-0.7-1-0.7-1.7h1.7c0,0.3,0.1,0.5,0.2,0.6 + c0.2,0.2,0.6,0.3,1.2,0.3c0.3,0,0.6,0,0.8-0.1s0.3-0.2,0.3-0.4c0-0.2-0.1-0.3-0.2-0.4c-0.2-0.1-0.8-0.3-1.8-0.5 + c-0.7-0.2-1.3-0.4-1.6-0.7c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.6,0.2-1.1,0.7-1.6s1.1-0.6,2-0.6C1199.2,472,1199.8,472.1,1200.3,472.4z" + /> + c0.3,0.3,0.5,0.7,0.5,1.2c0,0.6-0.2,1.2-0.7,1.6s-1.2,0.6-2.2,0.6s-1.8-0.2-2.3-0.6s-0.7-1-0.7-1.7h1.7c0,0.3,0.1,0.5,0.2,0.6 + c0.2,0.2,0.6,0.3,1.2,0.3c0.3,0,0.6,0,0.8-0.1s0.3-0.2,0.3-0.4c0-0.2-0.1-0.3-0.2-0.4c-0.2-0.1-0.8-0.3-1.8-0.5 + c-0.7-0.2-1.3-0.4-1.6-0.7c-0.3-0.3-0.5-0.7-0.5-1.2c0-0.6,0.2-1.1,0.7-1.6s1.1-0.6,2-0.6C1206,472,1206.6,472.1,1207.2,472.4z"/> - - + + c0.3-0.4,0.5-0.7,0.7-0.9c0.3-0.3,0.7-0.4,1.2-0.4h0.1h0.1v1.7C1247.8,473.7,1247.7,473.7,1247.5,473.7 + C1247.5,473.7,1247.5,473.7,1247.5,473.7z"/> - + - + s-0.4,0.7-0.4,1.3v3.5h-1.7v-8.8h1.7v3.1c0.2-0.4,0.5-0.6,0.9-0.8s0.7-0.2,1-0.2c0.4,0,0.8,0.1,1.1,0.2c0.3,0.1,0.6,0.4,0.8,0.6 + c0.2,0.2,0.3,0.5,0.3,0.8S1210.2,486.5,1210.2,487.1z"/> + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/concierge/assets/maps/minneapolis/level_23.svg b/concierge/assets/maps/minneapolis/level_23.svg index a79bb6470..b2e64dddd 100644 --- a/concierge/assets/maps/minneapolis/level_23.svg +++ b/concierge/assets/maps/minneapolis/level_23.svg @@ -1 +1 @@ - \ No newline at end of file +Shred BinPrintMail/PackagesReceptionCoatClosetBeverageBarFireExtinguisherSnack barCafeWellnessRoomFirstAidShred BinPrintFireExtinguisherPrintShred BinOpen Seating23092309 A2309 BEAFocus2307Focus2306Focus2304ExitFrontDeskFocus2314ExitFocus2323Focus2324Focus2325Open SeatingOffice2320Pantry2321Focus2357Server23542322 B2322 AEAOpen Seating23282331 B2331 AEAOffice2349Focus2350Focus2351Focus2352Open Seating2334Focus2345Focus23392336 B2336 AEAOpen Seating2336FireExtinguisherFocus2361Focus2362Focus2391Focus2390Focus2389Focus2388Focus2384Focus2381Focus23822374 B2374 AEAPrintShred Bin2374 D2374 CEAFocus2372Focus2371Focus2370Office2369Office2368Office2366Office2364Office2363Open Seating2373Ope Seating2355Ope Seating2356Men’sRestroomWomen’sRestroomElevatorElevatorElevatorElevatorElevatorStairsStairsRestroomServiceElevatorElevatorLobbyStorage2315 \ No newline at end of file diff --git a/concierge/assets/maps/nairobi/level_02.svg b/concierge/assets/maps/nairobi/level_02.svg index bf577dcb4..52ef61e05 100644 --- a/concierge/assets/maps/nairobi/level_02.svg +++ b/concierge/assets/maps/nairobi/level_02.svg @@ -2776,9 +2776,9 @@ + c-0.7-0.8-1.1-1.9-1.1-3.2c0-1.5,0.3-2.7,1-3.5c0.7-0.9,1.6-1.3,2.8-1.3c0.5,0,1,0.1,1.4,0.4c0.4,0.2,0.8,0.6,1,1v-4.2h2.4 + L1282.4,63.9L1282.4,63.9z M1276.2,71.5c0,0.8,0.2,1.5,0.5,1.9c0.3,0.5,0.8,0.7,1.5,0.7s1.1-0.2,1.5-0.7c0.3-0.5,0.5-1.1,0.5-1.9 + c0-1.1-0.3-1.8-0.8-2.3c-0.3-0.3-0.7-0.4-1.2-0.4c-0.7,0-1.2,0.3-1.5,0.8C1276.3,70.1,1276.2,70.7,1276.2,71.5z"/> + c-0.7-0.8-1.1-1.9-1.1-3.2c0-1.5,0.3-2.7,1-3.5c0.7-0.9,1.6-1.3,2.8-1.3c0.5,0,1,0.1,1.4,0.4c0.4,0.2,0.8,0.6,1,1V84h2.4 + L1292.5,83.8L1292.5,83.8z M1286.3,91.3c0,0.8,0.2,1.5,0.5,1.9c0.3,0.5,0.8,0.7,1.5,0.7s1.1-0.2,1.5-0.7c0.3-0.5,0.5-1.1,0.5-1.9 + c0-1.1-0.3-1.8-0.8-2.3c-0.3-0.3-0.7-0.4-1.2-0.4c-0.7,0-1.2,0.3-1.5,0.8C1286.4,89.9,1286.3,90.5,1286.3,91.3z"/> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/concierge/assets/maps/wroclaw/level_05.svg b/concierge/assets/maps/wroclaw/level_05.svg index 21426d91a..3a330b508 100644 --- a/concierge/assets/maps/wroclaw/level_05.svg +++ b/concierge/assets/maps/wroclaw/level_05.svg @@ -1 +1,10036 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/concierge/assets/maps/wroclaw/level_06.svg b/concierge/assets/maps/wroclaw/level_06.svg index 689b124ea..0f052de38 100644 --- a/concierge/assets/maps/wroclaw/level_06.svg +++ b/concierge/assets/maps/wroclaw/level_06.svg @@ -1 +1,4483 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/concierge/main-es2015.js b/concierge/main-es2015.js index 50bf9adcf..d744c4ad0 100644 --- a/concierge/main-es2015.js +++ b/concierge/main-es2015.js @@ -10407,15 +10407,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable */ exports.VERSION = { "dirty": false, - "raw": "dacd45ad9", - "hash": "dacd45ad9", + "raw": "f96712b73", + "hash": "f96712b73", "distance": null, "tag": null, "semver": null, - "suffix": "dacd45ad9", + "suffix": "f96712b73", "semverString": null, "version": "0.0.0", - "time": 1733434456096 + "time": 1733977368186 }; /* tslint:enable */ diff --git a/concierge/main-es2015.js.map b/concierge/main-es2015.js.map index 9a825bc55..8a5283eac 100644 --- a/concierge/main-es2015.js.map +++ b/concierge/main-es2015.js.map @@ -1 +1 @@ -{"version":3,"sources":["/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/angular-animations.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/animations.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/cdk-drop-list-scroll-container.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/general.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/image.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/numbers-only.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/replace.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.reducer.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/buildings/src/lib/buildings.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/api.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/app.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base-api.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking-filter.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.data.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.selectors.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/room-results/room-results.viewmodel.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking-state.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.types.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookings.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookingsPaginated.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/space.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-categories.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-category.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-item.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-items.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-menu.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-notes.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-order.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/close-modal-dialog-service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/collapse-accordion-service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/data-common.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/hotkeys.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/building.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/level.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/paginated.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/recurrence/recurrence.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/report.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/reports.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/service-manager.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/settings.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/spaces.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/users.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/validation.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/lib/date-tz.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/version.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/legacy-overlays.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/hover-class.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/legacy-ui.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.model.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.selectors.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/effects.testing.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/rooms/src/lib/rooms.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/localstorage.wrapper.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/storage.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/alert-banner/alert-banner.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/auto-complete-chip-select-item.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/groupHeader.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/base-template.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/dropdown-trigger-for.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/collapse-header/collapse-header.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-date-picker/date-tz-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-duration-field/date-tz-duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-time-field/date-tz-time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/duration-field/duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/error-message/error-message.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/calendar-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/chevron-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/close/close-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/informational-image/informational-image.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/label/label.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/legend-dropdown/legend-dropdown.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/mck-date-picker/mck-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal-button-row/modal-button-row.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal/modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/filter.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/sanitise.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/radio-select/radio-select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select-option/select-option.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/selected-chip-count/selected-chip-count.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/spacer/spacer.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/switch-group/switch-group.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/time-field/time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/toggle/toggle.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.enums.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/types.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/ui.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/utils/time.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.reducer.ts","./$_lazy_route_resource lazy namespace object","./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/bookings/booking-modal/booking-modal.component.ts","./src/app/bookings/booking-modal/booking-modal.component.html","./src/app/bookings/booking-modal/catering/catering.component.ts","./src/app/bookings/booking-modal/catering/catering.component.html","./src/app/bookings/booking-modal/catering/order-details/category/category.component.ts","./src/app/bookings/booking-modal/catering/order-details/category/category.component.html","./src/app/bookings/booking-modal/catering/order-details/order-details.component.ts","./src/app/bookings/booking-modal/catering/order-details/order-details.component.html","./src/app/bookings/booking-modal/catering/order-list/item/item.component.ts","./src/app/bookings/booking-modal/catering/order-list/item/item.component.html","./src/app/bookings/booking-modal/catering/order-list/order-list.component.ts","./src/app/bookings/booking-modal/catering/order-list/order-list.component.html","./src/app/bookings/booking-modal/find-space/filters/filters.component.ts","./src/app/bookings/booking-modal/find-space/filters/filters.component.html","./src/app/bookings/booking-modal/find-space/find-space.component.ts","./src/app/bookings/booking-modal/find-space/find-space.component.html","./src/app/bookings/booking-modal/find-space/item/item.component.ts","./src/app/bookings/booking-modal/find-space/item/item.component.html","./src/app/bookings/booking-modal/form/form.component.ts","./src/app/bookings/booking-modal/form/form.component.html","./src/app/bookings/bookings.module.ts","./src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.ts","./src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.html","./src/app/calendar/calendar.module.ts","./src/app/calendar/day-view/approvals-view/approvals-view.component.ts","./src/app/calendar/day-view/approvals-view/approvals-view.component.html","./src/app/calendar/day-view/approvals-view/event/event.component.ts","./src/app/calendar/day-view/approvals-view/event/event.component.html","./src/app/calendar/day-view/day-view.component.ts","./src/app/calendar/day-view/day-view.component.html","./src/app/calendar/day-view/day-view.module.ts","./src/app/calendar/day-view/space/event/event.component.ts","./src/app/calendar/day-view/space/event/event.component.html","./src/app/calendar/day-view/space/space.component.ts","./src/app/calendar/day-view/space/space.component.html","./src/app/calendar/day-view/timeline/timeline.component.ts","./src/app/calendar/day-view/timeline/timeline.component.html","./src/app/calendar/meeting-details-modal/catering/catering.component.ts","./src/app/calendar/meeting-details-modal/catering/catering.component.html","./src/app/calendar/meeting-details-modal/details/details.component.ts","./src/app/calendar/meeting-details-modal/details/details.component.html","./src/app/calendar/meeting-details-modal/meeting-details-modal.component.ts","./src/app/calendar/meeting-details-modal/meeting-details-modal.component.html","./src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.ts","./src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.html","./src/app/calendar/meeting-details-modal/private-details/private-details.component.ts","./src/app/calendar/meeting-details-modal/private-details/private-details.component.html","./src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.ts","./src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.html","./src/app/calendar/meeting-details-modal/requirements/requirements.component.ts","./src/app/calendar/meeting-details-modal/requirements/requirements.component.html","./src/app/calendar/week-view/day-display/day-display.component.ts","./src/app/calendar/week-view/day-display/day-display.component.html","./src/app/calendar/week-view/day-display/item/item.component.ts","./src/app/calendar/week-view/day-display/item/item.component.html","./src/app/calendar/week-view/timeline/timeline.component.ts","./src/app/calendar/week-view/timeline/timeline.component.html","./src/app/calendar/week-view/week-view.component.ts","./src/app/calendar/week-view/week-view.component.html","./src/app/calendar/week-view/week-view.module.ts","./src/app/catering/catering.component.ts","./src/app/catering/catering.component.html","./src/app/catering/catering.module.ts","./src/app/catering/catering.storage.ts","./src/app/catering/menu/item-list/item-list.component.ts","./src/app/catering/menu/item-list/item-list.component.html","./src/app/catering/menu/item/item.component.ts","./src/app/catering/menu/item/item.component.html","./src/app/catering/menu/menu.component.ts","./src/app/catering/menu/menu.component.html","./src/app/catering/orders/item/item.component.ts","./src/app/catering/orders/item/item.component.html","./src/app/catering/orders/orders.component.ts","./src/app/catering/orders/orders.component.html","./src/app/catering/overlays/category-modal/category-modal.component.ts","./src/app/catering/overlays/category-modal/category-modal.component.html","./src/app/catering/overlays/group-modal/group-modal.component.ts","./src/app/catering/overlays/group-modal/group-modal.component.html","./src/app/catering/overlays/item-modal/item-modal.component.ts","./src/app/catering/overlays/item-modal/item-modal.component.html","./src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.ts","./src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.html","./src/app/catering/overlays/order-details-modal/items/items.component.ts","./src/app/catering/overlays/order-details-modal/items/items.component.html","./src/app/catering/overlays/order-details-modal/messages/messages.component.ts","./src/app/catering/overlays/order-details-modal/messages/messages.component.html","./src/app/catering/overlays/order-details-modal/order-details-modal.component.ts","./src/app/catering/overlays/order-details-modal/order-details-modal.component.html","./src/app/components/access-denied/access-denied.component.ts","./src/app/components/access-denied/access-denied.component.html","./src/app/components/sidebar/sidebar.component.ts","./src/app/components/sidebar/sidebar.component.html","./src/app/components/topbar-header/topbar-header.component.ts","./src/app/components/topbar-header/topbar-header.component.html","./src/app/login/login.component.ts","./src/app/login/login.component.html","./src/app/reports/report-display/report-display.component.ts","./src/app/reports/report-display/report-display.component.html","./src/app/reports/report-table/report-table.component.ts","./src/app/reports/report-table/report-table.component.html","./src/app/reports/reports.component.ts","./src/app/reports/reports.component.html","./src/app/reports/reports.module.ts","./src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.ts","./src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.html","./src/app/room-admin/manage-photos/manage-photos.component.ts","./src/app/room-admin/manage-photos/manage-photos.component.html","./src/app/room-admin/room-admin-routing.module.ts","./src/app/room-admin/room-admin.component.ts","./src/app/room-admin/room-admin.component.html","./src/app/room-admin/room-admin.module.ts","./src/app/room-admin/room-details/room-details-wrapper.component.ts","./src/app/room-admin/room-details/room-details.component.ts","./src/app/room-admin/room-details/room-details.component.html","./src/app/room-admin/rooms-table/rooms-table-datasource.ts","./src/app/room-admin/rooms-table/rooms-table.component.ts","./src/app/room-admin/rooms-table/rooms-table.component.html","./src/app/room-admin/services/index.ts","./src/app/room-admin/services/read-local-pic.service.ts","./src/app/room-admin/services/resize.service.ts","./src/app/room-admin/services/room-admin.service.ts","./src/app/room-admin/util/file-drag-n-drop.directive.ts","./src/app/room-admin/util/room-admin-utility.ts","./src/app/shared/shared.module.ts","./src/app/shell/shell.component.ts","./src/app/shell/shell.component.html","./src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.ts","./src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.html","./src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.ts","./src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.html","./src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.ts","./src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.html","./src/app/visitors/timeline/item/item.component.ts","./src/app/visitors/timeline/item/item.component.html","./src/app/visitors/timeline/timeline.component.ts","./src/app/visitors/timeline/timeline.component.html","./src/app/visitors/timeline/visitor/visitor.component.ts","./src/app/visitors/timeline/visitor/visitor.component.html","./src/app/visitors/visitors.component.ts","./src/app/visitors/visitors.component.html","./src/app/visitors/visitors.module.ts","./src/environments/environment.ts","./src/environments/settings.ts","./src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wIAAwC;AACxC,0IAAwC;;;;;;;;;;;;;;;ACDxC,kJAAiF;AAEpE,kCAA0B,GA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EAAE,KAAK;QACjB,WAAW,EAAE,KAAK;KACrB;IACD,GAAG;IACH,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,WAAW;CACxB,CAAC;;;;;;;;;;;;;;;AC7JF,0HAA+C;AAI/C,iHAAyD;;;AAEzD,IAAI,yBAAW,CAAC,UAAU,EAAE;IAC1B,qBAAc,EAAE,CAAC;CAClB;AAED,qCAAwB,gBAAgB,+BAAW;KAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","file":"main-es2015.js","sourcesContent":["export * from './lib/animations.module';\nexport * from './lib/angular-animations'\n","import { trigger, transition, style, animate, state } from '@angular/animations';\n\nexport const ANIMATION_SHOW_ENTER_LEAVE = trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(300, style({ opacity: 1, height: '*' }))\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(300, style({ opacity: 0, height: 0 }))\n ])\n]);\n\nexport const ANIMATION_SHOW_CONTRACT_EXPAND = trigger('show', [\n state('show', style({ opacity: 1, height: '*' })),\n state('hide', style({ opacity: 0, height: 0 })),\n transition('show <=> hide', animate('200ms ease-in'))\n]);\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class AnimationsModule {}\n","export * from './lib/base.module';\nexport * from './lib/types.utilities';\nexport * from './lib/general.utilities';\nexport * from './lib/base.class';\nexport * from './lib/base.directive';\nexport * from './lib/date.utils'\nexport * from './lib/date.spec-helpers'\nexport * from './lib/replace.pipe'\nexport * from './lib/cdk-drop-list-scroll-container.directive'\nexport * from './lib/image.directive';\n","import { Subscription, BehaviorSubject } from \"rxjs\";\n\nexport class BaseClass {\n /** Store for named timers */\n protected _timers: { [name: string]: number } = {};\n /** Store for named intervals */\n protected _intervals: { [name: string]: number } = {};\n /** Store for named subscription unsub callbacks */\n protected _subscriptions: { [name: string]: (Subscription | (() => void)) } = {};\n /** Subject which stores the initialised state of the object */\n protected readonly _initialised = new BehaviorSubject(false);\n\n /** Observable of the initialised state of the object */\n public get initialised(): BehaviorSubject {\n return this._initialised;\n }\n /** Whether the object has been initialised */\n public get is_initialised(): boolean {\n return this._initialised.getValue();\n }\n\n protected destroy() {\n for (const key in this._timers) {\n if (this._timers.hasOwnProperty(key)) {\n this.clearTimeout(key);\n }\n }\n for (const key in this._intervals) {\n if (this._intervals.hasOwnProperty(key)) {\n this.clearInterval(key);\n }\n }\n for (const key in this._subscriptions) {\n if (this._subscriptions.hasOwnProperty(key)) {\n this.unsub(key);\n }\n }\n }\n\n /**\n * Creates a named timer\n * @param name Name of the timer\n * @param fn Callback function for the timer\n * @param delay Callback delay\n */\n protected timeout(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearTimeout(name);\n this._timers[name] = setTimeout(() => {\n fn();\n this._timers[name] = null;\n }, delay);\n } else {\n throw new Error(\n name ? 'Cannot create named timeout without a name' : 'Cannot create a timeout without a callback'\n );\n }\n }\n\n /**\n * Clears the named timer\n * @param name Timer name\n */\n protected clearTimeout(name: string) {\n if (this._timers[name]) {\n clearTimeout(this._timers[name]);\n this._timers[name] = null;\n }\n }\n\n /**\n * Creates a named interval\n * @param name Name of the interval\n * @param fn Callback function for the interval\n * @param delay Callback delay\n */\n protected interval(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearInterval(name);\n this._intervals[name] = setInterval(() => fn(), delay);\n } else {\n throw new Error(\n name ? 'Cannot create named interval without a name' : 'Cannot create a interval without a callback'\n );\n }\n }\n\n /**\n * Clears the named interval\n * @param name Timer name\n */\n protected clearInterval(name: string) {\n if (this._intervals[name]) {\n clearInterval(this._intervals[name]);\n this._intervals[name] = null;\n }\n }\n\n /**\n * Store named subscription\n * @param name Name of the subscription\n * @param unsub Unsubscribe callback or Subscription object\n */\n protected subscription(name: string, unsub: Subscription | (() => void)) {\n this.unsub(name);\n this._subscriptions[name] = unsub\n }\n\n /**\n * Call unsubscribe callback with the given name\n * @param name\n */\n protected unsub(name: string) {\n if (this._subscriptions && this._subscriptions[name]) {\n this._subscriptions[name] instanceof Subscription\n ? (this._subscriptions[name] as Subscription).unsubscribe()\n : (this._subscriptions[name] as any)();\n this._subscriptions[name] = null;\n }\n }\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\n\n@Directive({\n selector: 'a-very-basic-component-base-that-should-not-be-used'\n})\nexport class BaseDirective extends BaseClass implements OnDestroy {\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NumbersOnlyDirective } from './numbers-only.directive';\n\n@NgModule({\n imports: [CommonModule,],\n declarations: [\n NumbersOnlyDirective\n ],\n exports: [\n NumbersOnlyDirective\n ]\n})\nexport class BaseModule {\n}\n","import {\n Directive,\n Input,\n Renderer2,\n SimpleChanges,\n OnChanges,\n ContentChildren,\n QueryList,\n AfterContentInit\n} from '@angular/core';\nimport { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport { BaseDirective } from './base.directive';\n\nexport enum ScrollDirection {\n NONE,\n X,\n Y,\n BOTH\n}\n\n@Directive({\n selector: '[cdkDropList][scrollContainer]'\n})\nexport class CdkDropListScrollContainer extends BaseDirective\n implements OnChanges, AfterContentInit {\n /** Direction of scroll to determine updating the position of the drop list */\n @Input() direction: ScrollDirection = ScrollDirection.X;\n /** Name of the scroll container for the list */\n @Input() scrollContainer: string;\n /** Scroll container element */\n public element: HTMLElement;\n /** Last scroll position */\n public last_scroll: { x: number; y: number } = { x: 0, y: 0 };\n\n /** Draggable children elements */\n @ContentChildren(CdkDrag) private items: QueryList;\n\n constructor(private _cdkDropList: CdkDropList, private _renderer: Renderer2) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.scrollContainer && this.scrollContainer) {\n this.element = this._cdkDropList.element.nativeElement.closest(\n this.scrollContainer\n ) as HTMLElement;\n }\n }\n\n public ngAfterContentInit(): void {\n this.subscription(\n 'drag_items',\n this.items.changes.subscribe((items: QueryList) => {\n const list = items.toArray();\n list.forEach((i, index) => {\n this.subscription(\n `list-item-${index}`,\n this._renderer.listen(i.element.nativeElement, 'mousedown', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'mouseup', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n this.subscription(\n `list-item-touch-${index}`,\n this._renderer.listen(i.element.nativeElement, 'touchstart', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'touchend', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n });\n })\n );\n }\n\n /** Start listing for scroll events on the container */\n public onDrag() {\n if (this.element) {\n this.subscription(\n 'scroll',\n this._renderer.listen(this.element, 'scroll', () => this.updateListPosition())\n );\n }\n }\n\n /** Stop listening for scroll events on the container */\n public onDrop() {\n this.unsub('scroll');\n }\n\n /**\n * Forcefully update the position data of the drop list\n */\n private updateListPosition() {\n this.timeout(\n 'update_positions',\n () => {\n const scroll = { x: this.element.scrollLeft, y: this.element.scrollTop };\n if (\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.Y) &&\n scroll.y !== this.last_scroll.y) ||\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.X) &&\n scroll.x !== this.last_scroll.x)\n ) {\n (this._cdkDropList._dropListRef as any)._cacheOwnPosition();\n (this._cdkDropList._dropListRef as any)._siblings.forEach(i =>\n i.isReceiving() ? i._cacheOwnPosition() : null\n );\n }\n this.last_scroll = scroll;\n },\n 50\n );\n }\n}\n","import MockDate from 'mockdate';\n\n/**\n * August 13, 2020 at 7:22:12 UTC\n */\nconst initialTime = 1597346532 * 1000;\n\nexport const mockDate = (timeOverride = initialTime) => MockDate.set(new Date(timeOverride));\n\nexport const resetDate = () => MockDate.reset();\n","import { DateNow, DateTZ } from '@mckinsey-converge/date-tz'\nimport { DateTime } from 'luxon';\nimport * as dayjs from 'dayjs';\nimport {\n dayJsHoursMinutes,\n dayJsTimeFormatString,\n} from './general.utilities';\n\n/**\n * Allows you to split up durations into a group.\n */\nexport interface DurationGroup {\n /**\n * Step amount to generate between start and max.\n */\n step: number;\n /**\n * Where to start in minutes.\n */\n start: number;\n /**\n * Where to end in minutes.\n */\n max: number;\n}\n\n/**\n * Find the multiple of `stepMinute` which is closest to the 'minutes' property of the given date.\n * @param date - Any Lexon date.\n * @param stepMinute - The number of minutes between one timeslot and the next. Integer value\n * 1 to 59, inclusive.\n */\n// R--- depreciate this one\nexport const closestToTimeSlot = (date: DateTime, stepMinute: number, start: number = 0) : DateTime => {\n return date.set({ millisecond: 0, second: 0, minute: Math.ceil(date.minute / stepMinute) * stepMinute })\n .plus({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\nexport const closestToTimeSlotTz = (dateTz: DateTZ, stepMinute: number, start: number = 0) : DateTZ => {\n return dateTz.setValue({ millisecond: 0, second: 0, minute: Math.ceil(dateTz.minutes / stepMinute) * stepMinute })\n .addValue({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as hrs, or minutes as mins\n */\nexport function durationHumanized(duration: number, short: boolean = false): string {\n if (!duration || duration < 0) {\n return '';\n }\n const h = Math.floor(duration / 60);\n let d = `${h >= 1 ? h + (short ? ' hr' : ' hour' + (h === 1 ? '' : 's')) : ''}`;\n if (duration % 60 !== 0) {\n if (d) {\n d += short ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${m >= 1 ? m + (short ? ' min' : ' minute' + (m === 1 ? '' : 's')) : ''}`;\n }\n return d;\n}\n\nexport const weekDayMonthYearFormat = (date: DateTZ): string => date.formatDate('ccc dd MMM yyyy');\n\n/**\n * Tries to extract best-fit input\n * @return undefined if not valid. otherwise if good\n */\nexport const extractDateFromInput = (input: string,\n checkHour,\n startDate: dayjs.Dayjs): dayjs.Dayjs | undefined => {\n // check if input has am/pm or normal 24 hour time.\n // let date = dayjs(input, 'HH:mm');\n // let date = dayjs(input, 'h:mma');\n let date = dayjs(input, dayJsTimeFormatString());\n if (!date.isValid()) {\n // patch if time is in format xx:x to assume you meant xx:x0\n let cleanedInput = input;\n const times = input.split(':');\n if(!input){\n return undefined\n }\n if (times.length === 2) {\n if (times[1].length === 1) {\n cleanedInput = `${times[0]}:${times[1]}0`;\n }\n }\n // may be other input, lets try next value (without am/pm)\n date = dayjs(cleanedInput, dayJsHoursMinutes());\n // might be just purely an hour\n if (!date.isValid() && checkHour) {\n date = dayjs(input, 'H');\n }\n }\n // We expect input times to be in the future. If now is in the afternoon, this\n // simple block will ensure the returned date is also in the afternoon.\n //\n // NB: dayjs parses times as morning by default.\n if (date.isValid()) {\n // Move to the selected start date\n date = date.month(startDate.month()).date(startDate.date()).year(startDate.year());\n if (startDate.hour() > date.hour() && date.date() === startDate.date()) {\n date = date.set('hour', date.hour() + 12);\n }\n }\n\n return date.isValid() ? date : undefined;\n};\n\n\n/**\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 3. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n * @param step The step between time slots.\n * @param input The input text.\n */\nexport const nearestStepToInput = (\n step: number,\n input: string,\n currentStartDate: number,\n start: number = 0\n): string => {\n let date = extractDateFromInput(input, false, dayjs(currentStartDate));\n if (date) {\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, step, start);\n return closestDate.toFormat(dayJsHoursMinutes());\n } else {\n return input;\n }\n};\n/**\n * Similiar to {@link nearestStepToInput} instead:\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds which duration group is closest to the currentStartDate. If not found\n * return vanilla text.\n * 3. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 4. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n */\nexport const nearestDurationToInput = (durationGroups: DurationGroup[],\n currentStartDate: number,\n value: string): string => {\n\n let date = extractDateFromInput(value, false, dayjs(currentStartDate));\n\n if (!date) {\n // Check if the input is a duration \n const duration = parseInt(value);\n if (typeof (duration) === 'number' && value.indexOf(':') === -1 && duration > 12) {\n date = dayjs(currentStartDate).add(duration, 'm');\n }\n }\n\n if (date) {\n const minutes = date.diff(currentStartDate, 'minute');\n const closestDurationGroup = durationGroups.find(d => {\n return (minutes <= d.max);\n });\n if (closestDurationGroup) {\n const offset = [closestDurationGroup].reduce((previousValue, currentValue) => {\n return previousValue + currentValue.start;\n }, 0);\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, closestDurationGroup.step, 0);\n return closestDate.toFormat(dayJsHoursMinutes());\n }\n }\n\n return value;\n};\n\nexport const resetSecondsOnTimestamp = (timestamp: number) => {\n return DateTime.fromMillis(timestamp).set({ second: 0, millisecond: 0 }).toMillis();\n}\n\nexport const formatDateWithSuffix = (date: string): string => {\n const dateObj = new Date(date);\n const day = dateObj.getDate();\n const month = dateObj.toLocaleString(\"default\", { month: \"short\" });\n const year = dateObj.getFullYear();\n return `${day}${nthNumber(day)} ${month} ${year}`; //this.event.date_string;\n}\n\nconst nthNumber = (number) => {\n return number > 0\n ? [\"th\", \"st\", \"nd\", \"rd\"][\n (number > 3 && number < 21) || number % 10 > 3 ? 0 : number % 10\n ]\n : \"\";\n};\n\nexport const getListOfDateFormat = () => {\n return [\t\n 'MMMM dd y', \t//March 07 2023\n 'MMM dd, y',\t//Mar 07 2023\n 'MMMM dd',\t\t//March 07\n 'MMM dd', \t\t//Mar 07\n 'MM dd', \t\t//03 07\n\n 'MM-dd-yy',\t\t//03-07-23\n 'MM-dd-yyyy',\t//03-07-2023\n 'MMMM-dd-yyyy', //March-07-2023\n 'MMMM-dd-yy',\t//March-07-23\n\n 'MMMM-dd',\t\t//March-07\n 'MMM-dd',\t\t//Mar-07\n \n 'MMM-dd-y',\t\t//Mar-07-2023\n\n 'MM/dd',\t\t//03/07\n 'MM/dd/yy',\t\t//03/07/23\n 'MM/dd/yyyy',\t//03/07/2023\n \n 'dd/MM',\t\t//07/03\n 'dd/MM/yy',\t\t//07/03/23\n 'dd/MM/yyyy',\t//07/03/2023\n \n 'dd-MMMM',\t\t//07-March\n 'dd MMMM',\t\t//07 March\n 'dd-MMM',\t\t//07-Mar\n 'dd MMM',\t\t//07 Mar\n\n 'dd-MM-y',\t\t//07-03-23\n 'dd MMMM yy',\t//07 March 23\n \n 'dd/MMM/y',\t //07/Mar/2023\n 'dd/MMMM/y', //07/March/2023\n 'dd/MMM/yy', //07/Mar/23\n 'dd/MMMM/yy', //07/March/23\n \n\n 'dd-MMMM-yy',\t//07-March-23\n 'dd-MMM-yy',\t//07-Mar-23\n 'dd-MM-yy',\t\t//07-03-23\n 'MMMM-dd-yy',\t//March-07-23\n 'MMM-dd-yy',\t//Mar-07-23\n\n 'MMMM dd yy',\t//March 07 23\n 'MMM dd, yy',\t//Mar 07 23\n 'MM dd, yy',\t//03 07 23\n\n 'dd MMMM y',\t//07 March 2023\n 'dd MMM, y',\t//07 Mar 2023\n 'dd MM, yy',\t//07 03, 23\n 'dd-MMM-y',\t//07-Mar-2023\n\n 'h:mm a', // 3:30 pm\n 'h:mma' // 3:30 pm\n\n ];\n}","import { HashMap, Point } from './types.utilities';\n\nimport * as dayjs from 'dayjs';\nimport * as utc from 'dayjs/plugin/utc';\nimport * as timezone from 'dayjs/plugin/timezone';\nimport * as isToday from 'dayjs/plugin/isToday';\nimport * as weekday from 'dayjs/plugin/weekday';\nimport * as customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n// TODO: this is not the best place to import this timezone addition\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isToday);\ndayjs.extend(weekday);\ndayjs.extend(customParseFormat);\n\n/** Available console output streams. */\nexport type ConsoleStream = 'debug' | 'warn' | 'log' | 'error' | 'info';\n\n/**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\nexport function log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false,\n app_name: string = 'STAFF'\n) {\n if ((window as any).debug || force) {\n const colors: string[] = [\n 'color: #E91E63',\n 'color: #3F51B5',\n 'color: default',\n ];\n if (args) {\n console[stream](\n `%c[${app_name}]%c[${type}] %c${msg}`,\n ...colors,\n args\n );\n } else {\n console[stream](`%c[${app_name}]%c[${type}] %c${msg}`, ...colors);\n }\n }\n}\n\n/**\n * Get item from the nested object\n * @param keys List of sub-keys to search for\n * @param map Object to search\n */\n export function getItemWithKeys(keys: string[], map: HashMap) {\n const key = keys[0];\n if (map && key in map) {\n return keys.length > 1\n ? getItemWithKeys(keys.slice(1), map[key] || {})\n : map[key];\n }\n return null;\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the platform is a mobile device.\n */\nexport function isMobileDevice(): boolean {\n const r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;\n return !!navigator.userAgent.match(r);\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Mobile Safari.\n */\nexport function isMobileSafari(): boolean {\n const agent = navigator.userAgent;\n return !!(\n agent.match(/iPhone|iPad|iPod/) &&\n agent.match(/AppleWebKit/) &&\n !agent.match('CriOS')\n );\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Android Chrome.\n */\nexport function isAndroidChrome(): boolean {\n const agent = navigator.userAgent;\n return !!(agent.match(/Android/) && agent.match(/Chrome/));\n}\n\n/**\n * Generate string representation of a number with zeros padding the length\n * @param value Number to pad with zeros\n * @param length Length of the resulting string\n */\nexport function padZero(value: number, length: number): string {\n let str = value.toString();\n while (str.length < length) {\n str = '0' + str;\n }\n return str;\n}\n\n/**\n * Remove duplicates from the given array\n * @param array List of items to remove duplicates from\n * @param key Key on array objects to compare for uniqueness\n */\nexport function unique(array: T[], key: keyof T | undefined = undefined) {\n return array.filter(\n (el, pos, arr) =>\n el &&\n arr.indexOf(\n key\n ? arr.find((i) => i && i[key] === el[key])\n : arr.find((i) => i === el)\n ) === pos\n );\n}\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as h\n */\nexport function humaniseDuration(durationInput: number, size: string = 'long') {\n const duration = Math.floor(durationInput);\n if (!duration || duration < 0) {\n return '';\n }\n let singular = false;\n let format = { hours: ' hour', minutes: ' minute' };\n switch (size) {\n case 'medium':\n format = { hours: 'hr', minutes: 'min' };\n break;\n case 'short':\n format = { hours: 'h', minutes: 'm' };\n singular = true;\n break;\n }\n const h = Math.floor(duration / 60);\n let d = `${\n h >= 1\n ? h +\n (singular ? format.hours : format.hours + (h === 1 ? '' : 's'))\n : ''\n }`;\n if (duration % 60 !== 0) {\n if (d) {\n d += singular ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${\n m >= 1\n ? m +\n (singular\n ? format.minutes\n : format.minutes + (m === 1 ? '' : 's'))\n : ''\n }`;\n }\n return d;\n}\n\n/**\n * Get a filtered list of items\n * @param filter Value to filter on\n * @param items List of results to filter\n * @param fields Fields to check for matches on each item\n */\nexport function filterList(\n filter: string,\n items?: T[],\n fields: string[] = ['id']\n): T[] {\n let results: any[];\n // Tokenise filter string\n const filters = (filter || '').toLowerCase().split(' ');\n const list = {};\n for (const f of filters) {\n /* istanbul ignore else */\n if (f) {\n /* istanbul ignore else */\n if (!list[f]) {\n list[f] = 0;\n }\n list[f]++;\n }\n }\n // Group similar tokens\n const parts = [];\n for (const f in list) {\n /* istanbul ignore else */\n if (list.hasOwnProperty(f)) {\n parts.push({ word: f, count: list[f], regex: new RegExp(f, 'gi') });\n }\n }\n parts.sort(\n (a, b) => b.word.length - a.word.length || a.word.localeCompare(b.word)\n );\n const item_list = JSON.parse(JSON.stringify(items || []));\n /* istanbul ignore else */\n if (filter) {\n results = item_list.filter((item) => {\n let match_count = 0;\n item.match_index = 65535;\n item.match = '';\n const field_list = {};\n // Initialise field match variables\n for (const f of fields) {\n field_list[f] = {\n value: (item[f] || '').toLowerCase(),\n index: 65536,\n matched: 0,\n };\n }\n // Search for matches with the tokenised filter string\n for (const i of parts) {\n /* istanbul ignore else */\n if (i.word) {\n // Check fields for matches\n for (const f of fields) {\n const field = field_list[f];\n const index = field.value.indexOf(i.word);\n field.index = index < field.index ? index : field.index;\n field.matches = (\n field.value.match(i.regex) || []\n ).length;\n field.value = field.value.replace(i.regex, ' ');\n }\n // Update token match count\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.matches >= i.count) {\n match_count++;\n // Update field matches\n let changed = 0;\n const tokens = (\n item[`match_${f}`] ||\n item[f] ||\n ''\n ).split(' ');\n for (const k of tokens) {\n /* istanbul ignore else */\n if (changed >= i.count) {\n break;\n }\n /* istanbul ignore else */\n if (\n k.toLowerCase().indexOf(i.word) >= 0 &&\n k.indexOf('`') < 0\n ) {\n tokens[tokens.indexOf(k)] = k.replace(\n i.regex,\n '`$&`'\n );\n changed++;\n }\n }\n item[`match_${f}`] = tokens.join(' ');\n break;\n }\n }\n }\n }\n // Get field with the most relevent match\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.index < item.match_index && field.index >= 0) {\n item.match_index = field.index;\n item.match = f;\n }\n }\n return (\n item.match_index >= 0 &&\n item.match &&\n match_count >= parts.length\n );\n });\n } else {\n results = item_list;\n }\n // Sort by order of relevence then name\n results.sort((a, b) => {\n const diff = a.match_index - b.match_index;\n return diff === 0 ? a.name.localeCompare(b.name) : diff;\n });\n return results;\n}\n\n/**\n * Convert a match string from `filterList` to renderable HTML\n * @param str Match string to change\n */\nexport function matchToHighlight(str: string): string {\n /* istanbul ignore else */\n if (str) {\n str = str.replace(\n /\\`[a-zA-Z0-9\\@\\.\\_]*\\`/g,\n '$&'\n );\n str = str.replace(/\\`/g, '');\n }\n return str;\n}\n\n/**\n * Convert time string to ms from UTC epoch for today\n * @param time Time string in the format `HH:mm`\n */\nexport function timeToDate(time: string): number {\n const parts = time.split(':');\n const date = DateNow(new Date())\n .setValue({\n hour: +parts[0],\n minute: +parts[1],\n })\n .startOfValue('minute');\n return date.ms;\n}\n\n/**\n * Generate a random number\n * @param ceil Biggest value to generate not inclusive\n * @param floor Smallest value to generate. Defaults to 0\n */\nexport function randomInt(ceil: number, floor: number = 0) {\n return Math.floor(Math.random() * (ceil - floor)) + floor;\n}\n\n/**\n * Get time format string for locale\n * @param isLowerCaseAmPm - if true, we use lowercase for am/pm.\n */\nexport function timeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const hoursMinutes = (): string => (is24HourTime() ? 'HH:mm' : 'h:mma');\n\nexport function dayJsTimeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const dayJsHoursMinutes = (): string =>\n is24HourTime() ? 'HH:mm' : 'h:mm';\n\n/**\n * Converts a timeZone name into a date object.\n * @param timeZoneName - name of timezone\n */\nexport const timezoneNameToDate = (\n timeZoneName: string | undefined\n): DateTZ | undefined => {\n let zone: DateTZ | undefined;\n if (timeZoneName) {\n try {\n zone = DateNow(new Date()).toZone(timeZoneName);\n } catch (e) {\n // invalid timezone. Suppress logs here.\n // console.error(e);\n }\n }\n return zone;\n};\n\nexport const timezoneDisplay = (date: DateTZ) =>\n !!date ? `${date.formatDate('ZZZZ')}` : '';\nexport const gmtOffsetDisplay = (date: DateTZ) =>\n !!date ? `(GMT${date.formatDate('ZZ')})` : '';\n\n/**\n * Returns a full time with timezone.\n * @param date\n */\nexport function timeWithZoneFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${timezoneDisplay(date)}`;\n}\n\nexport function timeWithGmtOffsetFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(date)}`;\n}\n\n/**\n * Returns a full start end range.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}`;\n}\n\n/**\n * Returns a full start end range with timezone.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeWithZoneFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(startDateTz)}`;\n}\n\n/**\n * Returns a full date with weekday day month year.\n * @param date\n * @param comma optional boolean to display a comma after the month\n */\nexport function dateLocalFormatString(date: DateTZ, comma?: boolean): string {\n if (comma) {\n return date.formatLocalDate('cccc d MMMM, yyyy');\n }\n return date.formatLocalDate('cccc d MMMM yyyy');\n}\n\nexport function dateBuildingFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('cccc d MMMM, yyyy');\n }\n return date.formatDate('cccc d MMMM yyyy');\n}\n\nexport function shorterLocalDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatLocalDate('ccc d MMM, yyyy');\n }\n return date.formatLocalDate('ccc d MMM yyyy');\n}\n\nexport function shorterBuildingDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('ccc d MMM, yyyy');\n }\n return date.formatDate('ccc d MMM yyyy');\n}\n\n/** Whether locale string is displayed in 24 hour time */\nexport function is24HourTime(): boolean {\n const date = new Date();\n const localeString = date\n .toLocaleTimeString(\n document.querySelector('html').getAttribute('lang') ||\n navigator.language\n )\n .toLowerCase();\n return localeString.indexOf('am') < 0 && localeString.indexOf('pm') < 0;\n}\n\n/* istanbul ignore next */\n/**\n * Downloads a file to the users computer with the given filename and contents\n * @param filename Name of the file to download\n * @param contents Contents of the file to download\n */\nexport function downloadFile(filename: string, contents: string) {\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' +\n encodeURIComponent('\\uFEFF' + contents)\n );\n element.setAttribute('download', filename);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\n/**\n * Parse raw CSV data into a JSON object\n * @param csv CSV data to parse\n */\nexport function csvToJson(csv: string) {\n const lines = csv.split('\\n');\n let fields = lines.splice(0, 1)[0].split(',');\n fields = fields.map((v) => v.replace('\\r', ''));\n const list: any[] = [];\n for (const line of lines) {\n let parts = line.split(',');\n parts = parts.map((v) => v.replace('\\r', ''));\n /* istanbul ignore else */\n if (parts.length >= fields.length) {\n const item: any = {};\n for (let i = 0; i <= parts.length; i++) {\n let part = null;\n part = parts[i];\n /* istanbul ignore else */\n if (part !== undefined) {\n item[(fields[i] || '').split(' ').join('_').toLowerCase()] =\n part;\n }\n }\n list.push(item);\n }\n }\n\n return list;\n}\n\n/**\n * Convert javascript array to CSV string\n * @param json Javascript array to convert\n */\nexport function jsonToCsv(json: HashMap[]) {\n /* istanbul ignore else */\n if (json instanceof Array && json.length > 0) {\n const keys = Object.keys(json[0]);\n const valid_keys = keys.filter((key) => json[0].hasOwnProperty(key));\n return `${valid_keys.join(',')}\\n${json\n .map((item) =>\n valid_keys\n .map((key) => {\n return typeof item[key] !== 'boolean'\n ? `\"${item[key] || ''}\"`\n : item[key];\n })\n .join(',')\n )\n .join('\\n')}`;\n }\n return '';\n}\n\n/* istanbul ignore next */\n/**\n * detect IE\n * returns version of IE or false, if browser is not Internet Explorer\n */\nexport function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n/**\n * Grab point details from mouse or touch event\n * @param event Event to grab details from\n */\nexport function eventToPoint(event: MouseEvent | TouchEvent): Point {\n if (!event) {\n return { x: -1, y: -1 };\n }\n if (event instanceof MouseEvent) {\n return { x: event.clientX, y: event.clientY };\n } else {\n return event.touches && event.touches.length > 0\n ? { x: event.touches[0].clientX, y: event.touches[0].clientY }\n : { x: -1, y: -1 };\n }\n}\n\n/* istanbul ignore next */\n/**\n * Flatten nested array\n * @param an_array Array to flatten\n */\nexport function flatten(an_array: T[]) {\n const stack = [...an_array];\n const res = [];\n while (stack.length) {\n // pop value from stack\n const next = stack.pop();\n if (Array.isArray(next)) {\n // push back array items, won't modify the original input\n stack.push(...next);\n } else {\n res.push(next);\n }\n }\n // reverse to restore input order\n return res.reverse();\n}\n\nconst seed = xmur3('PlaceOS');\nconst rand = sfc32(0x9e3779b9, 0x243f6a88, 0xb7e15162, seed());\n\nexport function predictableRandomInt(ceil: number = 100, floor: number = 0) {\n return Math.floor(rand() * (ceil - floor)) + floor;\n}\n\n// https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript\nfunction xmur3(str) {\n for (var i = 0, h = 1779033703 ^ str.length; i < str.length; i++)\n (h = Math.imul(h ^ str.charCodeAt(i), 3432918353)),\n (h = (h << 13) | (h >>> 19));\n return function () {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n}\n\nfunction sfc32(a, b, c, d) {\n return function () {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n var t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n\nexport function isLessThanBreakpoint(breakpoint: number): boolean {\n if (window) {\n return window.innerWidth < breakpoint;\n }\n return false;\n}\n\nexport function toTitleCase(str: string): string {\n return typeof str === 'string'\n ? str\n .toLowerCase()\n .split(' ')\n .map(function (word) {\n return word.replace(word[0], word[0].toUpperCase());\n })\n .join(' ')\n : '';\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\nimport { SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n@Directive({\n selector: 'a-very-basic-component-image-that-should-not-be-used'\n})\nexport class ImageDirective extends BaseClass implements OnDestroy {\n public foundImages?: SpaceImageObject[];\n public loadImages?: BehaviorSubject\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import {\n Directive,\n ElementRef,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=number], input[numbersOnly]'\n})\nexport class NumbersOnlyDirective {\n\n constructor(private _el: ElementRef) {\n }\n\n @HostListener('input', ['$event']) onInputChange(event) {\n const initalValue = this._el.nativeElement.value;\n this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');\n if (initalValue !== this._el.nativeElement.value) {\n event.stopPropagation();\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'replace'\n})\nexport class ReplacePipe implements PipeTransform {\n\n transform(value: string, from: string = '_', to: string = ' '): string {\n return (value|| '').split(from).join(to);\n }\n}\n","export * from './lib/bookings.module';\nexport * from './lib/bookings.actions'\nexport * from './lib/bookings.reducer'\nexport * from './lib/bookings.types'\nexport * from './lib/bookings.utils'\n","\nimport { IBookingQueryOptions, PaginatedBooking } from '@mckinsey-converge/data-common';\nimport { \n createLoadingAction\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n MyBookingsState,\n MyBookingsStoreState,\n} from './bookings.types';\nimport {\n createAction,\n props\n} from '@ngrx/store';\n\nexport const bookingStateSelector = (state: MyBookingsStoreState) => state.bookings;\n\nexport const loadBookingsWithQuery = createAction('[Bookings] Load Bookings with query', props());\n\nexport const loadHomepageBookingsResults = createLoadingAction('HomepageBookings', 'homepage');\n\nexport const loadUpcomingBookingsResults = createLoadingAction('UpcomingBookings', 'upcoming');\n\nexport const loadPastBookingsResults = createLoadingAction('PastBookings', 'past');\n\nexport const loadCancelledBookingsResults = createLoadingAction('CancelledBookings', 'cancelled');\n\nexport const loadBookingByIdResults = createLoadingAction('BookingById', 'bookingById');\n\nexport const clearBookingByIdResults = createAction('[BookingById] Clear Booking Data');\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType\n} from '@ngrx/effects';\nimport {\n IBookingQueryOptions,\n BookingsPaginatedService\n} from '../../../data-common/src/lib/bookings';\nimport {\n createLoadingEffect,\n LoadingAction\n} from '@mckinsey-converge/loading';\nimport {\n loadHomepageBookingsResults,\n loadPastBookingsResults,\n loadUpcomingBookingsResults,\n loadCancelledBookingsResults,\n loadBookingsWithQuery,\n loadBookingByIdResults\n} from './bookings.actions';\nimport { mergeMap } from 'rxjs/operators';\nimport {\n\n} from './bookings.utils';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Injectable()\nexport class BookingsEffects {\n constructor(private actions: Actions,\n private bookingService: BookingsPaginatedService) {\n }\n\n @Effect()\n public afterBookingsRequestResultsLoadOthersEffect = this.actions.pipe(\n ofType(loadBookingsWithQuery),\n mergeMap((action: LoadingAction) => {\n const date = new DateTZ({date: action.from})\n const yourBookingsRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.subtractValue({ minutes: 5 }).seconds}`,\n },\n include_rooms: true\n };\n const upcomingRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.seconds}`,\n },\n include_rooms: true\n };\n const pastRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n end_epoch: `<${date.seconds}`,\n },\n include_rooms: true\n };\n const cancelledRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: true,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n },\n include_rooms: true\n };\n const byIdRequest = {\n email: action.email,\n id: action.id,\n pagination: true,\n limit: 1,\n include_rooms: true\n };\n\n const effects = [];\n switch(action.target) {\n case 'upcoming':\n effects.push(loadUpcomingBookingsResults.request(upcomingRequest));\n break;\n case 'past':\n effects.push(loadPastBookingsResults.request(pastRequest));\n break;\n case 'cancelled':\n effects.push(loadCancelledBookingsResults.request(cancelledRequest));\n break;\n case 'bookingById':\n effects.push(loadBookingByIdResults.request(byIdRequest));\n break\n case 'homepage':\n effects.push(loadHomepageBookingsResults.request(yourBookingsRequest));\n // effects.push(loadPastBookingsResults.request(pastRequest));\n break\n default:\n }\n return effects;\n })\n );\n\n @Effect()\n public loadHomepageBookingsResultsEffect = createLoadingEffect(this.actions, loadHomepageBookingsResults,\n (action) => this.bookingService.userBookings(action, `homepage-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadUpcomingBookingsResultsEffect = createLoadingEffect(this.actions, loadUpcomingBookingsResults,\n (action) => this.bookingService.userBookings(action, `upcoming-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n \n @Effect()\n public loadPastBookingsResultsEffect = createLoadingEffect(this.actions, loadPastBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `past-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadCancelledBookingsResultsEffect = createLoadingEffect(this.actions, loadCancelledBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `cancelled-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadBookingByIdResultsEffect = createLoadingEffect(this.actions, loadBookingByIdResults,\n (action) => \n this.bookingService.userBookings(action, `bookingById-${action.id}`));\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { bookingsReducer } from './bookings.reducer';\nimport { BookingsEffects } from './bookings.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n EffectsModule.forFeature([BookingsEffects]),\n StoreModule.forFeature('bookings', bookingsReducer)\n ]\n})\nexport class BookingsModule {\n}\n","import { LoadingModel } from '@mckinsey-converge/loading';\nimport {\n createReducer,\n on\n} from '@ngrx/store';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n clearBookingByIdResults,\n} from './bookings.actions';\nimport { MyBookingsState } from './bookings.types';\n \nimport { \n BookingFormState,\n clearBookingFormData,\n clearRoomFilters,\n openBookingSurvey,\n storeBookingFormData,\n storeRoomFilters\n} from '@mckinsey-converge/data-common';\n\n\nexport const initialBookingsState: MyBookingsState = {\n query: LoadingModel.empty(),\n homepage: LoadingModel.empty(),\n upcoming: LoadingModel.empty(),\n past: LoadingModel.empty(),\n cancelled: LoadingModel.empty(),\n bookingById: LoadingModel.empty(),\n};\n\nexport const bookingsReducer = createReducer(initialBookingsState,\n on(clearBookingByIdResults, (state: MyBookingsState) => ({\n ...state,\n bookingById: LoadingModel.empty(),\n }) as MyBookingsState),\n ...loadHomepageBookingsResults.ons,\n ...loadUpcomingBookingsResults.ons,\n ...loadPastBookingsResults.ons,\n ...loadCancelledBookingsResults.ons,\n ...loadBookingByIdResults.ons,\n );\n\n\n\n export const initialBookingFormState: BookingFormState = {\n activeFormFilters: []\n };\n \n export const bookingFormReducer = createReducer(initialBookingFormState,\n on(storeBookingFormData, (state: BookingFormState, action) => {\n return {\n ...state,\n activeForm: {\n ...state.activeForm,\n ...action.payload\n }\n } as BookingFormState;\n }),\n on(clearBookingFormData, state => ({\n ...state,\n activeForm: undefined\n }) as BookingFormState),\n on(openBookingSurvey, state => ({\n ...state,\n bookingCompleted: new Date()\n }) as BookingFormState),\n on(storeRoomFilters, (state: BookingFormState, action) => {\n return {\n ...state,\n activeFormFilters: action.payload\n } as BookingFormState;\n }),\n on(clearRoomFilters, (state: BookingFormState) => ({\n ...state,\n activeFormFilters: initialBookingFormState.activeFormFilters\n }) as BookingFormState)\n );\n \n","import { Booking } from '@mckinsey-converge/data-common';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport const mapBookingToSelectOption = (booking?: Booking): SelectOption => booking ? ({\n value: booking.id,\n display: booking.name\n}) : undefined;\n","import { \n createLoadingAction,\n} from '../../../loading/src/lib/loading.actions';\nimport {\n Building,\n BuildingCity,\n} from '../../../data-common/src/lib/organisation/building.class';\nimport {\n BuildingLevel,\n} from '../../../data-common/src/lib/organisation/level.class'\nimport {\n Organisation,\n} from '../../../data-common/src/lib/organisation/organisation.class'\nimport { createSelector } from '@ngrx/store';\nimport {\n BuildingState,\n BuildingStoreState\n} from './buildings.types';\n\nexport const loadBuildings = createLoadingAction('Buildings', 'data');\n\nexport const buildingStateSelector = (state: BuildingStoreState) => state.buildings;\n\nexport const selectLoadBuildingsSuccess = createSelector(buildingStateSelector, loadBuildings.selectors.optionalSuccess);\n\n/**\n * Groups buildings by city\n */\nexport const selectBuildingOptionsGroupedByCity = createSelector(loadBuildings.selectors.optionalSuccess, (success) => {\n if (success) {\n const mapped = new Map();\n success.forEach(s => {\n const found = Array.from(mapped.keys()).find(c => c.name === s.city);\n let list = found ? mapped.get(found) : undefined;\n if (!list) {\n list = [];\n mapped.set({\n name: s.city,\n timezone: s.timezone\n }, list);\n }\n list.push(s);\n });\n return mapped;\n }\n return new Map();\n});\n\nexport const selectLevelByZoneId = createSelector(selectLoadBuildingsSuccess,\n (buildings, param: string) => {\n if (buildings) {\n return buildings.map(b => b.levels.find((l: BuildingLevel) => l.id === param))\n ?.[0] ?? undefined;\n }\n return undefined;\n });\n","export * from './lib/data-common.module';\nexport * from './lib/booking';\nexport * from './lib/bookings';\nexport * from './lib/catering';\nexport * from './lib/location';\nexport * from './lib/organisation';\nexport * from './lib/spaces';\nexport * from './lib/users';\nexport * from './lib/app.service';\nexport * from './lib/hotkeys.service';\nexport * from './lib/base.service';\nexport * from './lib/base-api.class';\nexport * from './lib/reports'\nexport * from './lib/service-manager.class';\nexport * from './lib/settings.service';\nexport * from './lib/spec-helpers';\nexport * from './lib/settings.interfaces';\nexport * from './lib/validation.utilities';\nexport * from './lib/status.interfaces';\nexport * from './lib/recurrence/recurrence.utils';\nexport * from './lib/close-modal-dialog-service';\nexport * from './lib/validation.utilities';\nexport * from './lib/collapse-accordion-service';","import { HashMap } from '@mckinsey-converge/base';\n\n/**\n * Convert map into a query string\n * @param map Key value pairs to convert\n */\nexport function toQueryString(map: HashMap) {\n let str = '';\n if (map) {\n for (const key in map) {\n if (map.hasOwnProperty(key) && map[key] !== undefined && map[key] !== null) {\n str += `${(str ? '&' : '')}${key}=${map[key]}`;\n }\n }\n }\n return str;\n}\n","import {\n ApplicationRef,\n Injectable,\n NgZone,\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { take, first } from 'rxjs/operators';\n\nimport { ComposerService } from '@placeos/composer';\nimport { PlaceOSOptions } from '@placeos/ts-client';\nimport { HeapIoService } from '@acaprojects/ngx-heap-io';\n\nimport {\n BehaviorSubject,\n Observable,\n Subject\n} from 'rxjs';\n\nimport {\n ApplicationLoadingState,\n BaseClass,\n ConsoleStream,\n log\n} from '@mckinsey-converge/base';\nimport { SettingsService } from './settings.service';\n\nimport { HotkeysService } from './hotkeys.service';\nimport {\n ApplicationIcon,\n ComposerSettings\n} from './settings.interfaces';\nimport { EnvironmentService } from '../../../environment/src/lib/environment.service'; // '@mckinsey-converge/environment';\nimport {\n Store\n} from '@ngrx/store';\nimport { selectCurrentUser } from '../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../user/src/lib/user.types';\nimport { Booking } from './bookings';\nimport { filter } from 'rxjs/operators';\nimport { SnackBarService } from '../../../ui/src/lib/custom-snackbar-component/custom-snackbar-component.service';\n\ndeclare global {\n interface Window {\n application: ApplicationService;\n mock: {\n enabled: boolean;\n backend: any;\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApplicationService extends BaseClass {\n /** Map of state variables for Service */\n protected _subjects: {\n [key: string]: BehaviorSubject | Subject;\n } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n _kioskFormFilter: boolean;\n\n constructor(\n public store: Store,\n public analytics: HeapIoService,\n private _app_ref: ApplicationRef,\n private _zone: NgZone,\n private _title: Title,\n private _settings: SettingsService,\n private _hotkeys: HotkeysService,\n private _composer: ComposerService,\n private _snackbar: MatSnackBar,\n private _environment: EnvironmentService,\n private snack: SnackBarService\n\n ) {\n super();\n this.set('system', null);\n this.set('title', 'Home');\n this.set('loading', {});\n this.set('CONCIERGE.day_view.viewing', null);\n this.set('undo', new BehaviorSubject<{\n action: 'series' | 'booking',\n booking: Booking\n } | null>(null));\n\n this.set('APP.breakdown', false);\n\n this._app_ref.isStable.pipe(first(_ => _)).subscribe(() => {\n this._zone.run(() => {\n this.log('APP', `Application has stablised.`);\n this.waitForSettings();\n });\n });\n }\n\n public set kioskFormFilter(isIt: boolean) {\n this._kioskFormFilter = isIt;\n }\n\n public get kioskFormFilter():boolean {\n return this._kioskFormFilter \n }\n\n /** Analytics service */\n public get Analytics() {\n return {};\n }\n\n /** Hotkeys service */\n public get Hotkeys() {\n return this._hotkeys;\n }\n\n /**\n * Get a setting from the settings service\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n return this._settings.get(key);\n }\n\n /**\n * Title of the page\n */\n public set title(value: string) {\n const title_suffix = this.setting('app.title');\n this.set('title', value);\n this._title.setTitle(`${value ? value + ' | ' : ''}${title_suffix}`);\n }\n\n /**\n * Title of the page\n */\n public get title(): string {\n return this._title.getTitle();\n }\n\n /** Root API Endpoint */\n public get endpoint() {\n return `/api/staff/`;\n }\n\n /** Root API Endpoint for engine */\n public get engine_endpoint() {\n return this._composer.auth.api_endpoint + '/';\n }\n\n /** Whether settings has been loaded */\n public get has_settings(): boolean {\n return this._settings.is_initialised;\n }\n\n /**\n * Create notification popup\n * @param type CSS Class to add to the notification\n * @param message Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n * @param icon Icon to render to the left of the notification message\n */\n public notify(\n type: string,\n message: string,\n action: string = 'OK',\n on_action?: () => void,\n icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'info'\n }\n ): void {\n this.openSnack(message, type);\n // const snackbar_ref = this._snackbar.open(message, action, {\n // panelClass: [type],\n // duration: 5000\n // });\n // this.subscription(\n // 'snackbar_close',\n // snackbar_ref.afterDismissed().subscribe(() => {\n // this.unsub('snackbar_close');\n // this.unsub('notify');\n // })\n // );\n // if (action) {\n // on_action = on_action || (() => snackbar_ref.dismiss());\n // this.subscription(\n // 'notify',\n // snackbar_ref.onAction().subscribe(() => on_action())\n // );\n // }\n }\n\n public openSnack(message, type) {\n this.snack.openSnackBar(message, type, 5000);\n }\n \n /**\n * Create success notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifySuccess(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'done'\n };\n this.notify('success', msg, action, on_action, icon);\n }\n\n /**\n * Create error notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyError(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'error'\n };\n this.notify('error', msg, action, on_action, icon);\n }\n\n /**\n * Create warning notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyWarn(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'warning'\n };\n this.notify('warn', msg, action, on_action, icon);\n }\n\n /**\n * Create info notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyInfo(msg: string, action?: string, on_action?: () => void): void {\n this.notify('info', msg, action, on_action);\n }\n\n /**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\n public log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false\n ): void {\n log(type, msg, args, stream, force);\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n return this._subjects[name] && this._subjects[name] instanceof BehaviorSubject\n ? (this._subjects[name] as BehaviorSubject).getValue()\n : null;\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n public set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /** Wait for settings to be initialised before setting up the application */\n private waitForSettings() {\n // Wait until the settings have loaded before initialising\n this._settings.initialised.pipe(first(_ => _)).subscribe(() => this.init());\n }\n\n /**\n * Initialise application services\n */\n private init(): void {\n this.setupComposer();\n this.subscription('currentUser', this.store.select(selectCurrentUser)\n .pipe( filter(user => user !== undefined) )\n .pipe(take(1))\n .subscribe((user: any) => {\n // Once we know we have the user loaded.\n this.setupAnalytics(user?.fmno);\n })\n );\n this._composer.initialised.pipe(first(_ => _)).subscribe(() => {\n this._initialised.next(true);\n });\n // Add service to window if in debug mode\n if (window.debug) {\n window.application = this;\n }\n }\n\n /**\n * Initialise the composer library comms\n */\n private setupComposer(): void {\n this.log('SYSTEM', 'Setup up composer...');\n const loading: ApplicationLoadingState = this.get('loading');\n loading.composer = {\n message: 'Initialising service connection',\n state: 'loading'\n };\n this.set('loading', loading);\n // Get application settings\n const settings: ComposerSettings = this._settings.get('composer') || {};\n const protocol = settings.protocol || location.protocol;\n const host = settings.domain || location.hostname;\n const port = settings.port || location.port;\n const url = settings.use_domain ? `${protocol}//${host}:${port}` : location.origin;\n const route = host.includes('localhost') && port === '4200' ? '' : settings.route || '';\n const mock =\n this._settings.get('mock') ||\n location.href.includes('mock=true') ||\n localStorage.getItem('mock') === 'true';\n // Generate configuration object\n const config: PlaceOSOptions = {\n scope: 'public',\n host: `${host}:${port}`,\n auth_uri: `${url}/auth/oauth/authorize`,\n token_uri: `${url}/auth/token`,\n redirect_uri: `${location.origin}${route}/oauth-resp.html`,\n handle_login: !settings.local_login,\n mock\n };\n this._composer.setup(config);\n loading.composer = {\n message: 'Initialising service connection',\n state: 'complete'\n };\n this.set('loading', loading);\n }\n\n private setupAnalytics(fmno: string) {\n this.log('HEAP', `Loading heap ${this._environment?.heap_io_id}`);\n // Default Heap app ID via the default setting\n const heapIo = this._settings.get('app.heap_io');\n if (this._environment?.heap_io_id) {\n // Apply Heap app ID via the environmental setting\n heapIo.app_id = this._environment.heap_io_id;\n }\n if (heapIo) {\n this.analytics.load(heapIo);\n if (fmno) {\n this.analytics.identify(fmno);\n }\n } else {\n this.log('HEAP', `Heap could not be found for the current frontend ${this._settings.frontend}`);\n }\n }\n\n}\n","import { Subject } from 'rxjs';\n\nimport {\n BaseClass,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n ServiceLike,\n ServiceManager\n} from './service-manager.class';\n\nexport type ApiEventType = 'value_change' | 'item_saved' | 'reset' | 'other';\n\nexport interface ApiEvent {\n type: ApiEventType;\n metadata: T;\n}\n\n\nexport class BaseDataClass extends BaseClass {\n /** Subject for emitting events on the object */\n protected readonly event_subject = new Subject();\n /** Observable for events on this object */\n public readonly events = this.event_subject.asObservable();\n /** Unique Identifier of the object */\n public readonly id: string;\n /** Human readable name of the object */\n public readonly name: string;\n /** Email address associated with the object */\n public readonly email: string;\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(BaseDataClass);\n }\n\n constructor(raw_data: HashMap) {\n super();\n this.id = raw_data.id || raw_data.zone_id || raw_data.email || '';\n this.name = raw_data.name || '';\n this.email = `${raw_data.email || ''}`.toLowerCase();\n }\n\n /**\n * Save pending changes to server\n */\n public save(): Promise {\n if (this._service) {\n const form = this.toJSON();\n return new Promise((resolve, reject) => {\n const promise = this.id\n ? this._service.update(this.id, form)\n : this._service.add(form);\n promise.then(\n (d) => {\n this.event_subject.next({ type: 'item_saved', metadata: d });\n resolve(d);\n },\n (_) => reject(_)\n );\n });\n } else {\n Promise.reject('No service to process request');\n }\n }\n\n /**\n * Delete this item from the server\n */\n public delete(): Promise {\n if (this.id) {\n return this._service.delete(this.id);\n }\n }\n\n /**\n * Run task for this item on the service\n * @param task_name Name of the task\n * @param parameters Parameters to pass to the task request\n */\n public runTask(task_name: string, parameters: HashMap): Promise {\n if (this.id) {\n return this._service.task(this.id, task_name, parameters);\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: BaseDataClass): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._service;\n delete obj._changes;\n delete obj.event_subject;\n delete obj.events;\n // Remove parent private members\n delete obj._timers;\n delete obj._intervals;\n delete obj._subscriptions;\n delete obj._server_names;\n delete obj._initialised;\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substring(1)] || key.substring(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): BaseDataClass {\n return new BaseDataClass(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): BaseDataClass {\n return new BaseDataClass({ ...this, id: null, email: null });\n }\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseDataClass } from './base-api.class';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class BaseAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = typeof query_params.cache !== 'boolean' ? query_params.cache || 1000 : 1000;\n typeof query_params.cache !== 'boolean' && delete query_params.cache;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n // Bring back once implemented in the API\n // if (this.settingsService.concierge) {\n // query = query + '&check_access=true';\n // }\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: T[] | HashMap[] = [];\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n result =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryObsr(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );;\n }\n\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse | HashMap[]{\n let result: IEngineResponse | HashMap[] =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n return result;\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryRoomsForQR(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url);\n }\n \n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public \n task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * V-2\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public taskObsr( \n id: string, \n task_name: string, \n form_data: HashMap = {}, \n method: 'post' | 'get' = 'post' ):Observable{\n const query = toQueryString(this.injectConcierge(form_data));\n let engine = false;\n let cache = 1000;\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n\n const request = method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n \n return request;\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param id url id with respect to update api\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public updateObsr(id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n \n return this.http.put(url, body)\n .pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) \n ),\n catchError((error: any, result?: T) => {\n console.log(error);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n return of(error as T);\n })\n );\n\n }\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${apiSubRoute}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n\n const token = sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\n const headers = new HttpHeaders({\n 'Authorization': `Bearer ${token}`,\n });\n \n const requestOptions = { headers: headers };\n\n // return this.httpClient.post(url, body, {\n // ...requestOptions \n // });\n\n return this.http.post(url, body);\n\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { Building } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { User } from '../users';\nimport { Space } from '../spaces';\nimport { SpaceBookingRuleOptions } from '../spaces/space.class';\nimport {\n BookingFormData,\n} from './booking.form.data';\nimport { statusFromBookings } from '../bookings/booking.utilities';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { SpaceStatus } from '../bookings/space.types';\nimport { SpaceFeatures } from '../spaces/space.class';\nimport { HashMap } from 'libs/base/src/lib/types.utilities';\n\nexport const spaceExtraFeatureToDisplayName = (feature: SpaceFeatures) => {\n switch (feature) {\n case SpaceFeatures.VideoConference:\n return 'Video conference (VC)';\n case SpaceFeatures.ConferencePhone:\n return 'Conference phone';\n case SpaceFeatures.WirelessContentSharing:\n return 'Wireless content sharing';\n case SpaceFeatures.FlipChart:\n return 'Flip chart';\n case SpaceFeatures.Glassboard:\n return 'Glassboard';\n case SpaceFeatures.ElectronicWhiteboard:\n return 'Whiteboard';\n case SpaceFeatures.ConferenceRoom:\n return 'Conference';\n case SpaceFeatures.TeamRoom:\n return 'Team';\n case SpaceFeatures.PartnerOffice:\n return 'Partner';\n case SpaceFeatures.PhoneBooth:\n return 'Phone booth';\n case SpaceFeatures.NaturalLight:\n return 'Room with window only (natural light)';\n case SpaceFeatures.BoardRoom:\n return 'Boardroom room style';\n case SpaceFeatures.CocktailRoom:\n return 'Cocktail room style';\n case SpaceFeatures.TheatreRoom:\n return 'Theatre room style';\n case SpaceFeatures.WorkshopRoom:\n return 'Workshop room style';\n case SpaceFeatures.UShapeRoom:\n return 'U Shape room style';\n case SpaceFeatures.Miscellaneous:\n return 'Miscellaneous room style'\n case SpaceFeatures.Catering:\n return 'Rooms with catering';\n // TODO: add any special display handling here.\n default:\n return feature;\n }\n};\n\n\nexport const instantBookOption: SelectOption = {\n value: 'instant-book',\n display: 'Listing you can book without waiting for a host approval',\n shortDisplay: 'Instant book'\n};\nexport const instantBookOptions: SelectOption[] = [\n instantBookOption\n];\n\nexport const mapSpaceFeaturesToSelectOption = (f: SpaceFeatures): SelectOption => {\n const display = spaceExtraFeatureToDisplayName(f);\n return ({\n value: f,\n display,\n // Useful for long text, like that of the instant-book\n // option.\n //\n // We do not expect this option object to be modified\n // at any further point before it appears on screen -\n // although that may change in future releases.\n shortDisplay: display\n });\n};\n\nexport const roomEquipmentRequiredOptions: SelectOption[] = [\n SpaceFeatures.VideoConference,\n SpaceFeatures.ConferencePhone,\n SpaceFeatures.WirelessContentSharing,\n SpaceFeatures.FlipChart,\n SpaceFeatures.Glassboard,\n SpaceFeatures.ElectronicWhiteboard\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const internalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.PartnerOffice,\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom,\n SpaceFeatures.PhoneBooth\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const externalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomDetailsRequired: SelectOption[] = [\n SpaceFeatures.NaturalLight,\n SpaceFeatures.BoardRoom,\n SpaceFeatures.CocktailRoom,\n SpaceFeatures.TheatreRoom,\n SpaceFeatures.WorkshopRoom,\n SpaceFeatures.UShapeRoom,\n SpaceFeatures.Miscellaneous\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomCateringAvailable: SelectOption[] = [\n SpaceFeatures.Catering,\n].map(mapSpaceFeaturesToSelectOption);\n\n/**\n * Defines the reason by which spaces are filtered out / missing.\n */\nexport enum SpaceFilterReason {\n /**\n * Spaces were shown and not all filtered out.\n */\n None = 'None',\n\n /**\n * If room filters are applied to the set of rooms,\n * and rooms are available if not applied by filtering.\n */\n Filters = 'Filters',\n\n /**\n * We check office rules first to determine if its been filtered.\n */\n OfficeRules = 'OfficeRules',\n\n /**\n * Fallback as the end case if no results are found.\n */\n DateTime = 'DateTime',\n\n /**\n * In case there are no results for a buiding but there are other office buidings in the same city.\n */\n AlternateBuildingsFound = 'AlternateBuildingsFound',\n\n /**\n * If room is non-bookable in the system\n */\n NonBookable = 'NonBookable'\n}\n\nexport interface FilteredSpaces {\n spaces: Space[] | undefined;\n reason: SpaceFilterReason;\n statusMap: HashMap;\n specificReason?: SpaceFilterReason;\n}\n\n/**\n * Filter spaces by filters locally. TBD in the future for real API pagination.\n *\n * @param formFilters - the set of filters to apply on the list of spaces.\n * @param spaces - the list of spaces to filter\n * @param activeForm - the landing page set of filters.\n * @param buildings - the list of buildings loaded, used to retrieve building-specific booking rules.\n * @param currentUser - the current user\n */\nexport const filterSpacesByAppliedFilters = (\n formFilters: SelectOption[],\n spaces: Space[] | undefined, // the resultshere are raw JSON Spaces, not an array of the Space class\n activeForm: BookingFormData,\n buildings: Building[] = [],\n currentUser: User | undefined,\n isStaffMap: boolean = false): FilteredSpaces => {\n const instantBook: boolean = formFilters.some(f => f.value === instantBookOption.value);\n const onlyCatering: boolean = formFilters.some(f => f.value === SpaceFeatures.Catering);\n // Drop incompatible spaces. If no filters were given, just return the array unchanged.\n const featureFilters = formFilters.filter(filter => ![instantBookOption.value, SpaceFeatures.Catering].includes(filter.value));\n const formFiltersEmpty = featureFilters.length === 0;\n\n // R--- refactor activeForm? Only after forms can handle dateTz\n // Blocked by date time input refactor\n const options: SpaceBookingRuleOptions = {\n duration: activeForm.duration,\n host: currentUser,\n dateTz: activeForm.dateTz,\n };\n let rulesCount = 0;\n let ruleReason = '';\n let excludedByFiltersCount = 0;\n const statusMap: HashMap = {};\n // console.group();\n const filteredSpaces = spaces?.map(space => space instanceof Space ? space : new Space(space)).filter(raw_space => {\n const space = new Space(raw_space); // Construct the full fledged space\n const building = buildings.find(b => space.zones.includes(b.id));\n const rules = rulesForSpace({\n time: options?.dateTz?.ms,\n duration: options.duration,\n user: options.host,\n rules: building?.booking_rules,\n space\n });\n ruleReason = rules.reason;\n let valid = !rules.hide;\n if (!valid) {\n rulesCount++;\n return false;\n }\n\n\n // Check for all the form filters ( except 'catering' )\n let hasAllFeatures: boolean;\n const internalRoomTypeFilters = [\n 'conference',\n 'meeting_room',\n 'partner',\n 'phone_booth',\n 'team_room',\n ];\n\n if (featureFilters.length === 0) {\n hasAllFeatures = true;\n } else if(featureFilters.every(f => internalRoomTypeFilters.includes(f.value))) { // If all featureFilters(selected filters) are present in internalRoomTypeFilters, make the filtering inclusive(return on first true) \n hasAllFeatures = featureFilters.some(f => space.featuresArray.includes(f.value));\n } else { // If any featureFilters(selected filters) are not present in internalRoomTypeFilters, make the filtering exclusive(return on first false)\n hasAllFeatures = featureFilters.every(f => space.featuresArray.includes(f.value));\n }\n\n const canBook = instantBook ? space.bookable : true;\n const matchesType = activeForm?.bookingType?.value === 'allRooms'\n ? true\n : space?.internal_or_external?.length\n ? space.internal_or_external === activeForm?.bookingType?.value\n : true;\n valid = valid && matchesType && (formFiltersEmpty || hasAllFeatures) && canBook;\n let hasCatering = building?.has_catering;\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n // need the room catering to override.\n if (onlyCatering && !hasCatering) {\n valid = false;\n // console.log('Excluded by Catering');\n }\n\n // count this space if the only reason it can't be shown is because one of the filters excluded it\n if (!hasAllFeatures) {\n valid = false;\n // console.log('Excluded by Status');\n }\n\n const status = statusFromBookings(\n space.bookings.length ? space.bookings.map(b => new Booking(b)) : space.settings.bookings.map(b => new Booking(b)),\n space.bookable && !rules.hide,\n !rules.auto_approve,\n activeForm.dateTz,\n space\n );\n\n // only compute room availability here right now if instant book option is chosen and room still valid.\n if (instantBook && valid) {\n valid = status.status === SpaceStatus.Available;\n if (!valid) console.group('Excluded by Status');\n \n }\n\n\n /** \n * If there are rooms that are recurring but not available at all during the queried times, we filter them out from the results displayed on the page.\n * The \"Available\" status indicates whether a room can be booked during the queried times.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\n if(activeForm.is_recurrent && !space.availableOccurrences && !isStaffMap) {\n valid = false;\n }\n /** */\n\n // cache space status\n if (valid) {\n if(activeForm.is_recurrent && space.availableOccurrences && space.availableOccurrences<= space.totalOccurrences) {\n // space is available and requested for recurrence booking and few occurences are available to book then let the space select/bookable from map with limited availability\n statusMap[space.id] = !rules.auto_approve ? SpaceStatus.Requestable : SpaceStatus.Available;\n }else\n {\n statusMap[space.id] = status.status;\n }\n \n } else {\n excludedByFiltersCount++;\n }\n // console.log('Valid:', valid);\n return valid;\n });\n\n const buildingsInSameCity = buildings.filter(\n (_) =>activeForm?.location!==undefined && activeForm?.location?.length && _.city === activeForm?.location[0]?.meta?.building?.city\n ) || [];\n const alternateBuildings = buildingsInSameCity.filter(building =>\n !activeForm.location.some(locationItem =>\n locationItem.meta?.building?.id === building.id\n )\n );\n\n // console.groupEnd();\n let reason, specificReason = SpaceFilterReason.None;\n // console.log('Spaces:', filteredSpaces?.length, excludedByFiltersCount, rulesCount, ruleReason)\n if (filteredSpaces?.length === 0) {\n if (excludedByFiltersCount > 0 && (!formFiltersEmpty || onlyCatering)) {\n reason = SpaceFilterReason.Filters;\n } else if (rulesCount > 0) {\n reason = SpaceFilterReason.OfficeRules;\n } else if(alternateBuildings){\n reason = SpaceFilterReason.AlternateBuildingsFound;\n }\n else {\n reason = SpaceFilterReason.DateTime;\n }\n\n if (ruleReason === SpaceFilterReason.OfficeRules) {\n specificReason = SpaceFilterReason.OfficeRules;\n }\n }\n\n return { spaces: filteredSpaces, reason, statusMap, specificReason };\n};\n","import { BookingFormData } from './booking.form.data';\nimport {\n createAction,\n props\n} from '@ngrx/store';\nimport { Payload } from '../../../../loading/src/lib/loading.actions';;\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\n\nexport const storeBookingFormData = createAction('[BookingForm] Store Form Data',\n props>>());\n\nexport const clearBookingFormData = createAction('[BookingForm] Clear Form Data');\n\nexport const storeRoomFilters = createAction('[BookingForm] Store Room Filters',\n props[]>>());\n\nexport const clearRoomFilters = createAction('[BookingForm] Clear Room Filters');\n\nexport const openBookingSurvey = createAction('[BookingSurvey] Open Survey Modal');\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { RoomQueryOptions } from '../../../../rooms/src/lib/rooms.types';\nimport { User } from '../users/user.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { Building } from '../organisation';\n\nexport const DEFAULT_BOOKING_DURATION = 30;\n\nexport const internalBookingTypeOption = {\n value: 'internal',\n display: 'Internal',\n};\n\nexport const allBookingTypeOption = {\n value: 'allRooms',\n display: 'All Rooms',\n};\n\nexport const bookingTypeOptions: SelectOption[] = [\n internalBookingTypeOption,\n {\n value: 'external',\n display: 'External',\n }\n];\n\nexport const defaultRoomSizeOption = {\n value: '2',\n display: '3-9 People',\n};\n\nexport const roomSizeOptions: SelectOption[] = [\n {\n value: '1',\n display: '1-2 People',\n },\n defaultRoomSizeOption,\n {\n value: '3',\n display: '10+ People',\n }\n];\n\nexport const roomSizeOptionsKiosk: SelectOption[] = [\n ...roomSizeOptions,\n {\n value: '4',\n display: 'All Rooms',\n },\n];\n\nexport const roomCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 1;\n case '2':\n return 3;\n case '3':\n return 10;\n case '4':\n return null;\n }\n};\n\nexport const roomMaxCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 2;\n case '2':\n return 9;\n default:\n return null;\n }\n};\n\nexport interface BookingFormData {\n // R--- off the rails, define these \"any's\"\n id?: string;\n location: SelectOption[];\n dateTz: DateTZ;\n /**\n * Duration, in minutes.\n */\n duration: number;\n bookingType: SelectOption;\n roomSize: SelectOption;\n selectedRoom?: any;\n organiser?: SelectOption;\n title?: string;\n attendees?: any[];\n code?: string;\n notes?: string;\n head_count?: number;\n creator?: User;\n company?: any[];\n //Recurrence fields\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array;\n recurrence_exceptions?: Array; //SHOULD BE DATETZ\n recurrence_days?: Array;\n timezone?: string;\n offset?: number;\n buildings?: Building[];\n is_recurrent?: boolean;\n is_multiroom?: boolean;\n merged?: boolean;\n action?: string; // helping to set staff app recurring action flag for edit/clone in the active form\n ignore?: string; // helping while editing - recurring series rooms search api call\n bookable?: boolean; // set while editing - recurring series rooms search api call\n occurrence_edits?: string[];\n opt_out?:boolean;\n nextBusinessDay?: boolean; // set property if user room selection from next business day section on result page\n outlook_opt_out?:boolean;\n expanded_section_ids?: string[]; // set property if user room selection from next business day section on result page\n resultLoaded?: number; // set property if user room selection from any section on result page after clicking load more button\n}\n\n/**\n * Converts form data into API query parameters.\n */\nexport const roomFormDataToQuery = (\n data: BookingFormData\n): RoomQueryOptions => {\n // remove all buildings chip from query\n const filteredLocationIds = data?.location\n .filter((l) => l.groupChild)\n .map((l) => l.value)\n .join(',');\n return {\n dateTz: data?.dateTz,\n duration: data?.duration,\n locations: filteredLocationIds,\n capacity: roomCapacityToValue(data?.roomSize?.value),\n capacity_max: roomMaxCapacityToValue(data?.roomSize?.value),\n\n is_recurrent: data?.is_recurrent,\n is_multiroom: data?.is_multiroom,\n merged: data?.merged,\n recurrence_period: data?.recurrence_period,\n recurrence_interval: data?.recurrence_interval,\n recurrence_endTz: data?.recurrence_endTz,\n recurrence_count: data?.recurrence_count,\n recurrence_starts: data?.recurrence_starts,\n recurrence_exceptions: data?.recurrence_exceptions, //SHOULD BE DATETZ\n recurrence_days: data?.recurrence_days,\n timezone: data?.timezone,\n offset: data?.offset,\n buildings: data?.buildings,\n bookable: data?.bookable,\n ignore: data?.ignore\n };\n};\n","import { BookingFormState } from './booking.form.types';\nimport {\n DEFAULT_BOOKING_DURATION,\n defaultRoomSizeOption,\n internalBookingTypeOption\n} from './booking.form.data';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nconst now = DateNow(new Date())\n\nexport const defaultTestBookingForm = (): BookingFormState => ({\n activeForm: {\n dateTz: now,\n duration: 2 * DEFAULT_BOOKING_DURATION,\n location: [],\n bookingType: internalBookingTypeOption,\n roomSize: defaultRoomSizeOption\n },\n activeFormFilters: []\n});\n","import { createSelector } from '@ngrx/store';\nimport {\n RoomStoreState\n} from '../../../../rooms/src/lib/rooms.types';\nimport {\n loadLaterThatDayResults,\n loadNextDayResults,\n loadRoomsForResults,\n roomStateSelector,\n loadByIdResults,\n loadDiffSizeResults,\n loadRoomsForResultsMap\n} from '../../../../rooms/src/lib/rooms.actions';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n bookingStateSelector\n} from '../../../../bookings/src/lib/bookings.actions';\nimport { Building } from '../organisation/building.class';\nimport { BuildingStoreState } from '../../../../buildings/src/lib/buildings.types';\nimport { selectLoadBuildingsSuccess } from '../../../../buildings/src/lib/buildings.actions';\nimport { Space } from '../spaces/space.class';\nimport { User } from '../users/user.class';\nimport { selectCurrentUser } from '../../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../../user/src/lib/user.types';\nimport { LoadingModel } from '../../../../loading/src/lib/loading.model';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\nimport {\n SpaceFilterReason,\n filterSpacesByAppliedFilters,\n FilteredSpaces\n} from './booking-filter.utils';\nimport {\n BookingFormData,\n internalBookingTypeOption,\n} from './booking.form.data';\nimport {\n BookingFormState,\n BookingStoreState,\n} from './booking.form.types';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\n\n\nexport const selectBookingFormsData =\n (state: BookingStoreState | RoomStoreState | BuildingStoreState | UserStoreState) =>\n (state as any).bookingForm as BookingFormState;\n\nexport const selectActiveForm = createSelector(selectBookingFormsData, state => {\n // Recreate because serialized form dateTz doesn't have DateTZ class methods\n if (!state.activeForm?.dateTz) {\n return state.activeForm\n }\n const { date, is_local_tz, building_tz} = state.activeForm?.dateTz;\n const endTzDate = state.activeForm?.recurrence_endTz?.date;\n const recurrence_endTz = endTzDate ? {\n recurrence_endTz : new DateTZ({ date: endTzDate.valueOf(), is_local_tz, building_tz })\n } : {};\n\n const recurrence_starts = state.activeForm?.recurrence_starts\n\t\t\t? {\n\t\t\t\t\trecurrence_starts: state.activeForm?.recurrence_starts.map( el =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// at final step of booking creation process recurrence_start becomes Array which need to be Array\n\t\t\t\t\t\t\t// To Do: Refactor - apps/staff/src/app/booking/booking-create/booking-form-base.component.ts lno: 186\n\t\t\t\t\t\t\treturn new DateTZ({ date: typeof el === 'number' ? el * 1000 : el.date.valueOf(), is_local_tz, building_tz })\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\n const recEditingSearchPayload = (state.activeForm.action === SeriesAction.EDIT && state.activeForm.is_recurrent)\n\t\t\t?\n\t\t {\n\t\t\t\tid: state.activeForm.id,\n\t\t\t\tignore: state.activeForm.ignore,\n\t\t\t\tbookable: state.activeForm.bookable\n\t\t\t}\n\t\t\t: {};\n\n\n\n\n return {\n ...state.activeForm,\n dateTz: new DateTZ({ date: date.valueOf(), is_local_tz, building_tz }),\n ...recurrence_endTz,\n ...recurrence_starts,\n\t\t\t\t...recEditingSearchPayload\n }\n});\n\nexport const selectBookingType = createSelector(selectActiveForm,\n (form) => form?.bookingType);\n\nexport const selectBookingLocations = createSelector(selectActiveForm,\n (form) => (form?.location || []).filter(f => !f.groupHeader));\n\nexport const selectIsInternal = createSelector(selectBookingType,\n (type) => type?.value === internalBookingTypeOption.value);\n\nexport const selectFormFilters = createSelector(selectBookingFormsData,\n (state) => state.activeFormFilters || []);\n\nconst selectRoomResultsFromState = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.model);\n\nconst selectRoomResultsFromState_map = createSelector(roomStateSelector,\n loadRoomsForResultsMap.selectors.model);\n\nconst selectLaterThatDayResultsFromState = createSelector(roomStateSelector,\n loadLaterThatDayResults.selectors.model);\nconst selectNextDayResultsFromState = createSelector(roomStateSelector,\n loadNextDayResults.selectors.model);\nconst selectByIdResultsFromState = createSelector(roomStateSelector,\n loadByIdResults.selectors.model);\nconst selectDiffSizeResultsFromState = createSelector(roomStateSelector,\n loadDiffSizeResults.selectors.model);\n\nexport const selectHomepageBookingsResultsFromState = createSelector(bookingStateSelector,\n loadHomepageBookingsResults.selectors.model);\nexport const selectUpcomingBookingsResultsFromState = createSelector(bookingStateSelector,\n loadUpcomingBookingsResults.selectors.model);\nexport const selectPastBookingsResultsFromState = createSelector(bookingStateSelector,\n loadPastBookingsResults.selectors.model);\nexport const selectCancelledBookingsResultsFromState = createSelector(bookingStateSelector,\n loadCancelledBookingsResults.selectors.model);\nexport const selectBookingByIdResultsFromState = createSelector(bookingStateSelector,\n loadBookingByIdResults.selectors.model);\n\n/**\n * Wraps {@link filterSpacesByAppliedFilters} with {@link LoadingModel} interop.\n * This will only filter data if there is data to filter, and returns a success {@link LoadingModel}.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\nconst filterSpacesByAppliedFiltersIfSuccess = (\n results: LoadingModel,\n formFilters: SelectOption[],\n activeForm: BookingFormData,\n buildings: Building[] | undefined,\n currentUser: User | undefined,\n isStaffMap: boolean = false): LoadingModel => {\n const data = results.optionalSuccess;\n\n // don't filter model if no success found\n return !activeForm ? results.mutate({\n spaces: data, // the result here is a raw JSON Space, not the Space class\n reason: SpaceFilterReason.None,\n statusMap: {}\n }) : results.mutate(\n filterSpacesByAppliedFilters(formFilters, data, activeForm, buildings || activeForm.buildings, currentUser, isStaffMap));\n};\n\nexport const selectFilteredResults = createSelector(selectRoomResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectMapFilteredResults = createSelector(selectRoomResultsFromState_map,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser, isStaffMap) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser, true));\n\nexport const selectFilteredLaterDayResults = createSelector(selectLaterThatDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectFilteredNextDayResults = createSelector(selectNextDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n\nexport const selectFilteredByIdResults = createSelector(selectByIdResultsFromState,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser));\n\nexport const selectFilteredDiffSizeResults = createSelector(selectDiffSizeResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n/**\n * Maps selected options by loaded buildings.\n */\nexport const selectSelectedBuildingOptions = createSelector(\n selectBookingLocations,\n selectLoadBuildingsSuccess,\n (locations, buildings) => (locations\n .map(l => buildings?.find(b => b.id === l.value))\n .filter(f => !!f) as Building[])\n);\n\n","import { Building, BuildingCity } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { BuildingLevel } from '../organisation/level.class';\nimport { Space } from '../spaces/space.class';\nimport { SpacesService } from '../spaces/spaces.service';\nimport {\n timezoneDisplay,\n timezoneNameToDate,\n unique,\n ImageDirective,\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * If more than 3 are selected, we truncate location display.\n */\nconst MAX_ABBREV_LOCATIONS = 3;\n\nexport const mapBuildingToSelectOption = (\n city: string,\n building: Building\n): SelectOption => ({\n display: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n dropdownOverride: `${building.code}-${building.name}, ${building.address}`,\n value: building.id,\n groupId: city,\n groupChild: true,\n shortDisplay: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n meta: { building, city },\n});\n\nexport const mapCityToAllSelectOption = (\n city: BuildingCity\n): SelectOption => ({\n display: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n value: city.name,\n groupHeader: true,\n groupId: city.name,\n shortDisplay: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n meta: { city },\n});\n\n/**\n * Flattens a map of {@link BuildingCity} to {@link Building} array into a list of {@link SelectOption}.\n * @param grouped The grouping\n */\nexport const flattenDisplayOffices = (\n grouped: Map\n) => {\n const options: SelectOption[] = [];\n grouped.forEach((value, key) => {\n options.push(mapCityToAllSelectOption(key));\n value.forEach((b) =>\n options.push(mapBuildingToSelectOption(key.name, b))\n );\n });\n return options;\n};\n\n/**\n * This method will either add or remove a selected option from the selectedOptions list based on\n * these conditions:\n * 1. If the option EXISTS in the list AND is a groupHeader, de-select all of its children.\n * 2. If the option EXISTS in the list AND is a groupChild, remove it and its associated header from the list.\n * 3. If the option does NOT EXIST in the list AND is a groupHeader, select all other children.\n * 4. If the option does NOT EXIST in the list AND is a groupChild, add it to the list.\n *\n * Special note regarding item 4:\n * 4a. If that selection completes the children selection, select its associated header as well.\n */\nexport const toggleSelectedByGroup = (\n options: SelectOption[],\n selectedOptions: SelectOption[],\n option: SelectOption\n) => {\n if (selectedOptions.find((s) => s.value === option.value)) {\n return selectedOptions.filter((s) => {\n let filter = s.value !== option.value;\n // if group header, also remove any option that is the child of it.\n if (option.groupHeader) {\n filter =\n filter &&\n (!s.groupChild ||\n (s.groupChild && s.groupId !== option.groupId));\n } else if (option.groupChild) {\n // if child removing, remove the associated header.\n filter =\n filter &&\n (!s.groupHeader ||\n (s.groupHeader && s.groupId !== option.groupId));\n }\n return filter;\n });\n }\n // option does NOT EXIST\n // if adding header, add the other children to the selected list, ensuring no dupes.\n if (option.groupHeader) {\n const toSelect = options.filter(\n (v) =>\n v.groupChild &&\n v.groupId === option.value &&\n !selectedOptions.find((selected) => selected.value === v.value)\n );\n return [...selectedOptions, option, ...toSelect];\n }\n // add group child, add the group header if all satisfied\n const newGroup = [...selectedOptions, option];\n\n // check if we have selected all children from options by filtering down by city and checking if\n // they're in the selected options list.\n const remainingChildrenInGroup = options.filter(\n (o) =>\n o.groupChild &&\n o.groupId === option.groupId &&\n !newGroup.find((ng) => ng.value === o.value)\n );\n // if we dont have remaining children, add the group\n if (remainingChildrenInGroup.length === 0) {\n return [\n ...newGroup,\n options.find((o) => o.groupHeader && o.groupId === option.groupId),\n ];\n }\n return newGroup;\n};\n\n/**\n * If the list of locations are larger than {@link MAX_ABBREV_LOCATIONS}, then truncate\n * and display the remaining count.\n */\nexport const truncateLocationList = (\n locations: readonly SelectOption[]\n): string => {\n // comma separate the locations\n let truncatedLocations = [...locations];\n const shouldTruncate = locations.length > MAX_ABBREV_LOCATIONS;\n if (shouldTruncate) {\n truncatedLocations = truncatedLocations.splice(0, MAX_ABBREV_LOCATIONS);\n }\n let display = truncatedLocations\n .map((l) => l.shortDisplay || l.display)\n .join(', ');\n if (shouldTruncate) {\n display += `...(${locations.length})`;\n }\n return display;\n};\n\nexport const mapBuildingLevelToOption = (\n level?: BuildingLevel\n): SelectOption =>\n level\n ? {\n value: level.id,\n display: level.name,\n }\n : undefined;\n\n/**\n * Returns all levels included with the building, deduped.\n * @param buildings\n */\nexport const flattenBuildingsWithLevels = (buildings: Building[]) => {\n const flattenedLevels = unique(\n buildings.reduce((next: BuildingLevel[], building: Building) => {\n next.push(...building.levels);\n return next;\n }, []),\n 'id'\n );\n return {\n flattenedLevels,\n buildings,\n };\n};\n\n/** Gets route to image placeholder if room image isn't found */\n\nexport const placeholderRoute = (num: number): string => {\n let index: number;\n if (num <= 3) {\n index = num;\n } else if (num % 3 === 0) {\n index = 3;\n } else {\n index = 1;\n }\n return `assets/img/rooms/placeholder-${index}.png`;\n};\n\n/**\n * Method takes the rootFolderURL and fileSlug to create an array of three images\n * that should exist. If a room image exists, it replaces the placehoder image.\n */\nexport const setupRoomImages = (\n componentReference: ImageDirective,\n image_positions: number[],\n rootFolderURL: string,\n fileSlug: string,\n imagesLoaded: boolean = false\n): void => {\n let foundImages: any[] = image_positions.map((i) =>\n i ? { path: placeholderRoute(i) } : false\n );\n image_positions.forEach((n) => {\n const desiredImageName = `${rootFolderURL}${fileSlug}-part-${n}.png`;\n const desiredImage = location.pathname.includes('concierge') ? `${location.origin}/staff/${desiredImageName}` : desiredImageName;\n if (!imagesLoaded) {\n const tester = new Image();\n tester.onload = () => {\n // Will never run on unit test\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = [...foundImages.slice()];\n componentReference?.loadImages && componentReference?.loadImages.next([...foundImages.slice()]);\n };\n tester.src = desiredImage;\n }\n\n // Force valid image output on unit test\n if (imagesLoaded) {\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = foundImages.slice();\n }\n });\n};\n\nexport const bookingStatusDetails = (booking: Booking) => {\n const now = DateNow(new Date());\n let image = '';\n let text = '';\n let title = '';\n\n if (booking?.status) {\n const status = now > booking.endDateTz ? 'expired' : booking.status;\n switch (status) {\n case 'unavailable':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Unavailable';\n text = 'Unavailable';\n break;\n case 'declined':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'cancelled':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'expired':\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n case 'tentative':\n image = 'assets/icon/booking_pending.svg';\n title = 'Requested';\n text = 'Pending';\n break;\n case 'accepted':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n case 'approved':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n default:\n // TODO\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n }\n }\n return { text, title, image };\n};\n\nexport const roomHasCateringHours = (building: Building, space: Space) => {\n let hasCatering = building\n ? building.has_catering && building.catering_hours\n : false;\n // Room catering status as false overrides building status\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n return hasCatering;\n};\n\nexport const cateringAllowed = (booking: Booking, building: Building) => {\n const status = bookingStatusDetails(booking);\n const disallowedStatus = ['declined', 'cancelled', 'expired'].includes(\n status.text\n );\n const opens = building?.catering_hours?.start;\n const closed = building?.catering_hours?.end;\n\n if (disallowedStatus) {\n return false;\n }\n\n if (typeof opens === 'undefined' || typeof closed === 'undefined') {\n return false;\n }\n\n // Catering time could be a decimal so convert to a date\n const openMinutes = opens * 60;\n const closeMinutes = closed * 60;\n\n const startOfDay = booking.startDateTz.startOfValue('day');\n const cateringOpenTime = startOfDay.addValue({ minutes: openMinutes });\n const cateringCloseTime = startOfDay.addValue({ minutes: closeMinutes });\n\n if (\n cateringOpenTime.ms <= booking.startDateTz.ms ||\n cateringCloseTime.ms > booking.startDateTz.ms\n ) {\n // Booking ends before catering opens\n if (booking.endDateTz.ms <= cateringOpenTime.ms) {\n return false;\n }\n // Booking starts after catering closes\n if (booking.startDateTz.ms > cateringCloseTime.ms) {\n return false;\n }\n\n // Start time is OK\n if (booking.startDateTz.ms > DateNow(new Date()).ms) {\n // Due to COVID, no orders are available once a meeting begins.\n return true;\n }\n }\n\n return false;\n};\n\nexport const checkCollisions = (\n service: SpacesService,\n booking: Booking\n): Promise => {\n return new Promise((resolve, reject) => {\n\n let availabilityParams: {\n room_ids: string;\n dateTz: DateTZ;\n duration: number;\n setup: number;\n breakdown: number;\n hide_bookings: boolean;\n [key: string]: any;\n } = {\n room_ids: booking.space.id,\n dateTz: booking.startDateTz,\n duration: booking.duration,\n setup: booking.setup[booking.space.email],\n breakdown: booking.breakdown[booking.space.email],\n hide_bookings: false,\n };\n\n if (booking.recurrence_type === \"master\" || booking.recurrence_type === null) {\n availabilityParams = {\n ...availabilityParams,\n ignore: booking?.icaluid,\n recurrence_count: booking?.recurrence_count,\n recurrence_period: booking?.recurrence_period,\n recurrence_endTz: booking?.recurrence_endTz,\n recurrence_interval: booking?.recurrence_interval,\n recurrence_starts: booking?.recurrence_starts,\n is_recurrent: booking?.is_recurrent,\n recurrence_days: booking?.recurrence_days\n } as typeof availabilityParams;\n }\n\n service\n .available(\n availabilityParams,\n null,\n false\n )\n .then(\n (list) => {\n const space = list.length ? list[0] : null;\n if (space) {\n if (!space.bookable) return reject('Has conflict');\n const setup = booking?.setup[space?.email] || 0;\n const breakdown = booking?.breakdown[space?.email] || 0;\n const start_time = booking?.startDateTz.seconds - setup;\n const end_time = booking.endDateTz.seconds + breakdown;\n\n const bookings = space.settings.bookings;\n // console.log('Bookings:', bookings);\n // Compare the existing bookings to see if any truely conflict.\n if (bookings.length) {\n const has_conflict = bookings.find(bkn => {\n const b_setup = bkn.setup[space.email] || 0;\n const b_breakdown = bkn.setup[space.email] || 0;\n const start = (bkn.start_epoch || bkn.start) - b_setup;\n const end = (bkn.end_epoch || bkn.end) + b_breakdown;\n return (\n (end_time > start && end_time <= end) || // Booking ends during the meeting\n (start_time >= start && start_time < end) || // Booking starts during a meeting\n (start_time <= start && end_time >= end) // Booking overlaps entire meeting\n ) && \n ( \n bkn.id !== booking.id \n || \n ( !!booking.is_recurrent && (booking.recurrence_type === \"master\" || booking.recurrence_type === null ) ) \n ?\n bkn.recurrence_master_id !== booking.id\n :\n false\n \n )\n\n\n\n });\n // Conflicts found, reject\n if (has_conflict) return reject('has booking conflict');\n }\n return resolve(space.bookable);\n }\n reject('space not found');\n },\n () => reject('available error')\n );\n });\n};\n\nexport const getStatusErrorMessage = (status?: number) => {\n let msg = '';\n switch (status) {\n\t\t\tcase 400:\n\t\t\t\tmsg = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 403:\n\t\t\t\tmsg = 'Your do not have permission to update this booking.';\n\t\t\t\tbreak;\n\t\t\tcase 409:\n\t\t\t\tmsg = 'Sorry, your booking time conflicts with another booking.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmsg = 'Your booking failed to update, please try again';\n }\n return msg;\n};\n","export * from './room-results/room-results.viewmodel'\nexport * from './booking-filter.utils'\nexport * from './booking.form.actions'\nexport * from './booking.form.data'\nexport * from './booking.form.spec-helpers'\nexport * from './booking.form.types'\nexport * from './booking.selectors'\nexport * from './booking.utils'","import { Space } from '../../spaces/space.class';\nimport { BuildingLevel } from '../../organisation/level.class';\nimport { Building } from '../../organisation/building.class';\n\nexport class RoomResultsViewModel {\n\n public levelDisplay: string;\n public title: string;\n public office: string;\n public capacity: string;\n\n constructor(public space: Space,\n public level?: BuildingLevel,\n public building?: Building) {\n\n this.levelDisplay = `Level ${this.space?.level?.short_name}`;\n this.title = this.space.local_name;\n this.office = this.building ? `(${this.building?.code}) ${this.building?.name}` : '';\n this.capacity = `Capacity: ${this.space.capacity} people`;\n }\n}\n\n/**\n * For each result from results, we find its level and building from the lists.\n */\nexport const mapResultsToViewModels = (results: Space[],\n flattenedLevels: BuildingLevel[],\n buildings: Building[]): RoomResultsViewModel[] =>\n results.map((r: Space) => {\n const level = flattenedLevels.find(l => r.zones.includes(l.id));\n const building = buildings.find(b => r.zones.includes(b.id));\n return new RoomResultsViewModel(\n r,\n level,\n building\n );\n });\n","import { Injectable, NgZone } from '@angular/core';\nimport { BehaviorSubject, combineLatest, of, Observable } from 'rxjs';\nimport {\n catchError,\n debounceTime,\n filter,\n first,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { replaceBookings, timePeriodsIntersect } from './booking.utilities';\nimport { SpacesService } from '../spaces/spaces.service';\nimport { Booking } from '../bookings/booking.class';\nimport { Space } from '../spaces/space.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { OrganisationService } from '../organisation/organisation.service';\n\nexport type BookingType =\n | 'internal'\n | 'client'\n | 'external'\n | 'setup'\n | 'training'\n | 'interview'\n | 'declined';\n\nexport interface BookingFilters {\n /** List of zone ids to get bookings for */\n zone_ids?: string[];\n space_emails?: string[];\n hide_type?: BookingType[];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BookingStateService extends BaseClass {\n /** List of bookings */\n private _poll = new BehaviorSubject(false);\n /** List of bookings */\n private _long_poll = new BehaviorSubject<'month' | ''>('');\n private _long_poll_week = new BehaviorSubject<'week' | ''>('');\n /** List of bookings */\n private _bookings = new BehaviorSubject([]);\n /** List of meeting count per date */\n public _noOfMeetings = new BehaviorSubject<{}>({});\n /** Filter details for bookings */\n private _filters = new BehaviorSubject({});\n /** Currently active date */\n private _dateTz = new BehaviorSubject(DateNow(new Date()));\n /** Currently displayed zone */\n private _zone = new BehaviorSubject(' ');\n /** Whether booking data is being loaded */\n private _loading = new BehaviorSubject(false);\n /** Observable for filter and booking list changes */\n private _state = combineLatest(\n this._bookings,\n this._filters,\n this._dateTz,\n this._zone\n );\n\n /** Observable for list of bookings */\n public readonly bookings = this._bookings.asObservable();\n /** Observable for active date */\n public readonly dateTz = this._dateTz.asObservable();\n /** Observable for active zone */ // R-- zone was this._date.asObservable(); this looks like a mistake but it exists from the beginning of time\n public readonly zone = this._dateTz.asObservable();\n /** Observable for loading state of bookings */\n public readonly loading = this._loading.asObservable();\n\n public get booking_date() {\n // When this class is initialized this._dateTz is local timezone\n return this._dateTz.value;\n }\n\n public get timezone() {\n return localStorage.getItem('CONCIERGE.timezone');\n }\n\n /** Obsevable for filtered list of bookings */\n public readonly filtered = this._state.pipe(\n map((state) => {\n const bdTz = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const startTz = bdTz.startOfValue('day');\n const endTz = startTz.addValue({}).endOfValue('day');\n return this.filterBookings(startTz, endTz);\n }),\n shareReplay(1)\n );\n\n /** Obsevable for filtered list of bookings of the active week */\n public readonly filtered_week = this._state.pipe(\n map(() => {\n // Tested to be valid in building time now.\n const bd = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const start = bd.startOfValue('week').startOfValue('day');\n const end = this.getEndOfWeek(bd);\n return this.filterBookings(start, end);\n })\n );\n\n /** Obsevable for filtered list of bookings for active month */\n public readonly filtered_month = this._state.pipe(\n map(() => {\n const start = this.booking_date.startOfValue('month');\n const end = this.booking_date.endOfValue('month');\n return this.filterBookings(start, end);\n })\n );\n\n /** Active filters */\n public get filters() {\n return this._filters.getValue();\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private ngZone: NgZone,\n ) {\n super();\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Just to get the timezone correct\n this._dateTz.next(\n new DateTZ({\n date: this._dateTz.value.ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone,\n })\n );\n });\n\n /** Generate observable for updating bookings */\n const search = combineLatest(this._poll, this._zone, this._dateTz).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap(() => {\n const fzone = this._zone.getValue();\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n const start = this.booking_date.startOfValue('day');\n const end = start.endOfValue('day');\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start.seconds,\n available_to: end.seconds,\n });\n }),\n catchError(() => of([]))\n );\n\n const search_long_week = combineLatest(\n this._long_poll_week,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, false);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n\n //TO DO: make sure both spaces have same booking\n /** Subscribe to update observable */\n search.subscribe((space_list) => {\n this.processBookings(space_list);\n this._loading.next(false);\n });\n search_long_week.subscribe((space_list) => {\n this.processBookings(space_list, this._long_poll_week.getValue() as any);\n this._loading.next(false);\n });\n }\n\n /**\n * Function to build\n */\n private buildSpaceLongQuery(dailyCount: boolean = false): Observable {\n return combineLatest(\n this._long_poll,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = dailyCount ? this._org.building.id : props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, dailyCount);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n }\n\n private querySpace(type: string, fzone: string, dateTz: DateTZ, dailyCount: boolean = false) : Observable | Observable{\n const start = () => {\n const s = dateTz;\n if (type === 'week') {\n return s.startOfValue('week');\n } else {\n return s.startOfValue('month');\n }\n };\n\n const end = () => {\n const e = start();\n if (type === 'week') {\n /**\n * To Do: date-tz.class.ts endOfValue subtracts 1 day from end of week for 7 days a week type which returns Friday instead of Saturday\n * below is the adjustment -\n */\n return e.addValue({ days: 1 }).endOfValue('week');\n } else {\n return e.endOfValue('month');\n }\n /**\n * R--- when testing March 2022 London offices, the month is an hour short.\n * Is this a Luxon bug or London DST?\n */\n };\n\n // dates here are ok\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start().seconds,\n available_to: end().seconds,\n ...(dailyCount) ? { daily_count: true } : ''\n });\n }\n\n\n public getDailyMeetingCount() : void {\n this._long_poll.next('month');\n this.buildSpaceLongQuery(true).subscribe((counts) => {\n this._noOfMeetings.next(counts);\n this._loading.next(false);\n });\n }\n\n /**\n * Update the booking filters\n * @param details\n */\n public setFilters(details: BookingFilters) {\n this._filters.next(details);\n }\n\n /**\n * Update the booking date\n * @param details\n */\n public setDate(dateTz: DateTZ) {\n this._dateTz.next(dateTz);\n }\n\n /**\n * Update the booking's zone\n * @param details\n */\n public setZone(zone: string) {\n this._zone.next(zone);\n }\n\n /**\n * update day view once\n */\n public pollOnce(){\n this._poll.next(true);\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPolling(delay: number = 30 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingWeek(delay: number = 4 * 30 * 1000 ) {\n this._long_poll_week.next('week');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll_week.next('week'),\n delay\n );\n });\n }\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingEveryFiveMin(delay: number = 60 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingMonth(delay: number = 5 * 60 * 1000) {\n this._long_poll.next('month');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll.next('month'),\n delay\n );\n });\n }\n\n\n /**\n * Stop polling to update bookings;\n */\n public stopPolling() {\n this._poll.next(false);\n this.clearInterval('polling');\n this._long_poll.next('');\n this.clearInterval('polling_long');\n }\n\n public updateRoomList() {\n this._spaces.updateRoomList();\n }\n\n /**\n * Add booking to bookings listing\n * @param booking\n */\n public add(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Update booking in the bookings list\n * @param booking\n */\n public replace(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings\n .filter(\n (bkn) =>\n bkn.icaluid !== booking.icaluid && bkn.id !== booking.id\n )\n .concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Remove booking in the bookings list\n * @param booking\n */\n public remove(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.filter(\n (bkn) => bkn.icaluid !== booking.icaluid\n );\n this._bookings.next(new_bookings);\n }\n\n public attentToDelete(\n booking: Booking,\n action: 'series' | 'booking' = 'booking',\n undo: boolean = false\n ) {\n const bookings = this._bookings.getValue();\n const attempted_to_delete = ((action) => {\n return (bkg: Booking) => {\n switch (action) {\n case 'booking': {\n const booking_master = bookings.find(\n (bkn) => bkn.icaluid === booking.icaluid\n );\n if (!booking_master) return false;\n return bkg.id === booking.id;\n }\n case 'series': {\n const booking_master = bookings.find(\n (bkg) =>\n bkg.id ===\n (booking.recurrence_type === 'occurrence'\n ? booking.recurrence_master_id\n : booking.id)\n );\n if (!booking_master) return false;\n return (\n booking_master.id === bkg.id ||\n bkg.recurrence_master_id === booking_master.id\n );\n }\n default:\n false;\n }\n };\n })(action);\n\n const new_bookings = [...bookings].map((bkg) => {\n if (!undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = action;\n }\n\n if (undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = null;\n }\n\n return bkg;\n });\n\n this._bookings.next(new_bookings);\n }\n\n private processBookings(\n space_list: Space[],\n period: 'day' | 'week' | 'month' = 'day'\n ) {\n const start = () => {\n switch (period) {\n case 'month':\n return this.booking_date.startOfValue('month');\n case 'week':\n return this.booking_date.startOfValue('week');\n default:\n return this.booking_date.startOfValue('day');\n }\n };\n const end = () => {\n const s = start();\n switch (period) {\n case 'month':\n return s.endOfValue('month');\n case 'week':\n return s.endOfValue('week');\n default:\n return s.endOfValue('day');\n }\n };\n\n let bookings = this._bookings.getValue();\n space_list.forEach((space) => {\n return (bookings = replaceBookings(\n bookings,\n space.bookings.map((bkn) => new Booking(bkn)),\n {\n room_email: space.email,\n fromTz: start(),\n toTz: end(),\n }\n ));\n });\n this._bookings.next(bookings);\n }\n\n // private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n // const filters = this._filters.getValue();\n // const bookings = this._bookings.getValue();\n // const fzone = this._zone.getValue();\n // return bookings.filter((bkn) => {\n // const intersects = timePeriodsIntersect(\n // startTz.ms,\n // endTz.ms,\n // bkn.startDateTz.ms,\n // bkn.endDateTz.ms\n // );\n // const in_zone = bkn.room.zones.includes(fzone);\n // const has_space =\n // !filters.space_emails?.length ||\n // filters.space_emails.includes(bkn.room.email);\n // const in_zones =\n // !filters.zone_ids?.length ||\n // !!bkn.room.zones.find((zone) =>\n // filters.zone_ids.includes(zone)\n // );\n // const type = bkn.declined ? 'declined' : bkn.getType();\n\n // const show =\n // !filters.hide_type?.length ||\n // !filters.hide_type.includes(type as any);\n // return intersects && has_space && in_zone && in_zones && show;\n // });\n // }\n\n private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n const filters = this._filters.getValue();\n const bookings = this._bookings.getValue();\n const fzone = this._zone.getValue();\n return bookings.filter((bkn) => {\n const intersects = timePeriodsIntersect(\n startTz.ms,\n endTz.ms,\n bkn.startDateTz.ms,\n bkn.endDateTz.ms\n );\n // Check if any room in the booking satisfies the conditions\n const roomSatisfiesConditions = bkn.multi_rooms.some((room) => {\n const in_zone = room.zones.includes(fzone);\n const has_space =\n !filters.space_emails?.length ||\n filters.space_emails.includes(room.email);\n const in_zones =\n !filters.zone_ids?.length ||\n !!room.zones.find((zone) => filters.zone_ids.includes(zone));\n return in_zone && has_space && in_zones;\n });\n \n const type = bkn.declined ? 'declined' : bkn.getType();\n \n const show =\n !filters.hide_type?.length ||\n !filters.hide_type.includes(type as any);\n return intersects && roomSatisfiesConditions && show;\n });\n } \n\n /**If Sunday add one day to get Saturday as end of week */\n private getEndOfWeek(date: DateTZ): DateTZ {\n return date.dateWeekday === 7\n ? date.addValue({ days: 1 }).endOfValue('week').endOfValue('day')\n : date.endOfValue('week').endOfValue('day');\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport { CateringOrder } from '../catering';\nimport { User } from '../users';\nimport {\n flatten,\n HashMap,\n humaniseDuration,\n shorterBuildingDateFormatString,\n shorterLocalDateFormatString,\n toTitleCase,\n unique\n} from '@mckinsey-converge/base';\nimport { Space } from '../spaces/space.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport {\n BookingNote,\n} from './booking.types';\nimport { convertLocalTimestampToTimezonedDateTz, DateNow, DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, getLastDateFromList, handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { findSpace } from '../spaces';\nimport { DateTime } from 'luxon';\n\n\nexport interface IBookingQueryOptions {\n /** booking ID */\n id?: string;\n email?: string;\n target?: string;\n from?: number; // R--- depreciate\n until?: number; // R--- depreciate\n fromTz?: DateTZ;\n untilTz?: DateTZ;\n show_cancelled?: boolean;\n pagination?: boolean;\n limit?: number;\n offset?: number;\n sort?: string,\n filters?: any;\n include_rooms?: boolean;\n building_zone?: string;\n}\n\nexport class Booking extends BaseDataClass {\n /** Unique calendar event ID */\n // public readonly icaluid: string;\n /** Subject or title of the booking */\n public title: string;\n /** Luxon based date class of the booking start time */\n public startDateTz: DateTZ;\n /** Luxon based date class of the booking start time */\n public endDateTz: DateTZ;\n /** Description or details of the booking */\n public readonly body: string;\n /** Type of booking */\n public readonly booking_type: string;\n /** List of catering orders for the booking */\n public catering: readonly CateringOrder[];\n /** Whether booking's duration covers all day */\n public readonly all_day: boolean;\n /** Mapping of emails to approval statuses */\n public approval_status: HashMap;\n /**\n * New booking approval status set in constructor\n *\n * timeBasedStatusLabel is a getter calculated via current time, some parts of the application\n * may use status when it should use timeBasedStatusLabel\n */\n public status: 'tentative' | 'accepted' | 'approved' | 'declined' | 'cancelled' | 'expired' | 'unavailable';\n /** Host/Organiser of the booking */\n public organiser: User;\n /** List of people invited to attend the booking */\n public attendees: User[];\n /** Author of the booking */\n public readonly creator: User;\n\n /** List of notes associated with the booking */\n public notes: readonly BookingNote[];\n /** Mapping of spaces to equipment charge codes */\n public equipment_codes: HashMap;\n /** Mapping of spaces to expected number of attendees */\n public expected_attendees: HashMap;\n /** Map of space emails to the setup time before the meeting in minutes */\n public setup: HashMap;\n /** List of checked in attendees */\n public check_ins: object;\n /** Map of space emails to the breakdown time before the meeting in minutes */\n public breakdown: HashMap;\n /** List of fields edited since creation */\n public readonly edits: string[];\n /** List of users to be notified on visitor arrivals */\n public readonly notify_users: readonly string[];\n /** Whether the time or duration has changed */\n public time_changed = false;\n /**\n * Booking Space\n * Bookings only have one room on MCK\n */\n public room: Space;\n /** building_zone */\n public building_zone: string;\n /** Initialized Timezone */\n public timezone: string;\n /** Array of company names */\n public company?: string[];\n /** Flag for multiroom booking */\n public is_multiroom: boolean;\n /** Multiroom booking ID */\n public multiroom_master_id: string; \n /** Merged - field holds flag for merged-multiroom booking which tightly coupled with multiroom booking only */\n public merged: boolean;\n /** Type of recurrence, Shows whether this is a master or an occurence in the series. */\n public readonly recurrence_type: string;\n /** The frequency of the recurring booking. */\n public readonly recurrence_period: RecurrencePeriod;\n /** The interval time between each period. Defaults to 1. For example, with a period of \"weekly\" and an interval of 2, the recurrencd happen every 2 weeks. */\n public readonly recurrence_interval: number;\n /** Unix epoch in seconds of the recurrence end date */\n private _recurrence_endTz: DateTZ;\n /** The number of times to repeat the recurring booking. */\n public readonly recurrence_count: number;\n /** ID of the booking considered the master */\n public readonly recurrence_master_id: string;\n /** An array of booking IDs which belong to this recurring series. This INCLUDES the master booking ID. */\n public readonly occurrence_ids: string[];\n /** A list of INDIVIDUAL edits to any of the bookings in the series. This is so we can prompt the user if they are going to override previously updated bookings with a whole-series update. */\n public readonly occurrence_edits: string[];\n /** A list of Ocurrences */\n public readonly occurrence_details: { id: string, start_epoch: number }[];\n /** When the booking was created */\n public created_epoch: number;\n /** Is the Application concierge */\n public is_concierge: boolean;\n /**helper to know if recurring toggle is on */\n public is_recurrent: boolean;\n /**array of start dates of each ocurrence in the series */\n public recurrence_starts: Array\n /**array of conflicting dates not to be included in the recurrence series */\n public recurrence_exceptions: Array\n\n public recurrence_days?: Array\n\n /** Master recurrence start */\n public recurrence_start: number;\n\n /** Start Epoch */\n public start_epoch: number;\n public end_epoch: number;\n public level_zone: string;\n public opt_out: boolean;\n public outlook_opt_out: boolean;\n public multi_rooms: Space[];\n public room_setup: any;\n public room_breakdown: any;\n public headcount: number;\n public equipment_code: string;\n\n /** Currently back-end is not properly setting the recurrence_end property, this is a workaround */\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz;\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date;\n }\n\n /** Mark a booking for deleting */\n public attempted_to_delete?: 'series' | 'booking' | null;\n\n // No specific reason to set readonly but canm be change if needed to update in future\n public readonly booked_by : string | { name: string };\n public readonly booker: Object;\n public readonly booker_concierge: Object\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = settingsService.concierge;\n\n /**\n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = new DateTZ();\n\n const defaultTitle = ''; // Blank since the create booking form will init with test values.\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n const defaultBuildingZone = null // R --- no idea, should be a building.id but which and how\n const defaultOrgainiser = User.active_user || new User(); // meh, non American use.\n const defaultBookingType = 'internal';\n\n /**\n * Process the simple raw_data with defaults mixed in\n */\n this.title = raw_data.title || defaultTitle;\n this.timezone = raw_data.timezone || defaultLocalTimezone;\n // Used by components to get the building details\n this.building_zone = raw_data.building_zone || defaultBuildingZone;\n this.body = raw_data.body || '';\n // Provided booking type\n this.booking_type = raw_data.booking_type || defaultBookingType;\n // Attendees provided in API booking data\n this.attendees = (raw_data.attendees || []).map((i) => new User(i));\n // Provided organiser, active user, or empty user?\n this.organiser = raw_data.organiser ? new User(raw_data.organiser) : defaultOrgainiser;\n // Creator is provided or defaults to the organizer\n this.creator = (raw_data.booked_by ? new User(raw_data.booked_by) : defaultOrgainiser) || this.organiser;\n // Setup and breakdown times can conflict but not the true event start and end times\n this.setup = raw_data.setup || {};\n this.breakdown = raw_data.breakdown || {};\n this.room_setup = raw_data.room_setup;\n this.room_breakdown = raw_data.room_breakdown;\n // Notes are assigned by room but we only support a single room\n this.notes = raw_data.notes || [];\n this.equipment_codes = raw_data.equipment_codes || {};\n this.equipment_code = raw_data.equipment_code || '';\n this.expected_attendees = raw_data.expected_attendees || {};\n this.headcount = raw_data.headcount;\n this.check_ins = raw_data.check_ins || {};\n this.notify_users = raw_data.notify_users?.length ? raw_data.notify_users : [this.organiser?.name];\n this.company = raw_data.company || [];\n // retain booked by if there : helps to get correct creator above\n this.booked_by = raw_data.booked_by;\n this.booker = raw_data.booker;\n this.booker_concierge = raw_data.booker_concierge;\n this.level_zone = raw_data.level_zone;\n this.opt_out = raw_data.opt_out;\n this.outlook_opt_out = raw_data.outlook_opt_out;\n\n /**\n * \n */\n this.merged = raw_data?.merged || null;\n\n /**\n * Multiroom fields\n */\n this.is_multiroom = raw_data.is_multiroom || null;\n this.multiroom_master_id = raw_data.multiroom_master_id || null;\n\n /**\n * Setup Defaults when raw_data values are not provided\n *\n * all room_ids and space_list inputs can be refactored into just room like an API booking\n *\n * raw_data.room can be provides as the Space class or JSON object\n */\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n // this.room = raw_data?.room ? (Array.isArray(raw_data?.room) && raw_data.room.length > 0) ? raw_data?.room.map((element) => new Space(element))[0]: [new Space(raw_data.room)][0] : [new Space()][0];\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n\n if (raw_data && raw_data.room) {\n if (Array.isArray(raw_data.room) && raw_data.room.length) {\n this.room = raw_data.room.map((element) => new Space(element))[0];\n } else if (Array.isArray(raw_data.room) && raw_data.room.length === 0) {\n this.room = [new Space()][0];\n } else {\n this.room = [new Space(raw_data.room)][0];\n }\n } else {\n this.room = [new Space()][0];\n }\n\n\n const room_id = raw_data.room_id || raw_data.room_ids // Not sure why we have room_id and room_ids\n if (!this.room?.id && room_id?.length) {\n this.room = findSpace(room_id[0]) || this.room;\n }\n\n const roomsData = raw_data?.multi_rooms || raw_data?.room;\n this.multi_rooms = roomsData\n ? Array.isArray(roomsData)\n ? roomsData.map((element) => new Space(element))\n : [new Space(roomsData)]\n : [new Space()];\n\n \n const room_ids = [...(raw_data?.room_id || []), ...(raw_data?.room_ids || [])];\n\n room_ids.forEach(roomId => {\n const newRoom = findSpace(roomId);\n // Check if the room is found and not already included in this.room\n if (newRoom && !this.multi_rooms.some(room => room.id === newRoom.id)) {\n // Add the new room to this.room\n this.multi_rooms.push(newRoom);\n }\n });\n\n // this.room is sometimes getting set to undefined when raw_data?.room is coming as an object\n if(this.multi_rooms.length && this.room === undefined){\n this.room = this.multi_rooms[0];\n }\n \n /**\n * Setup the booking start and end time\n *\n *\n * Booking defaults to now if start is not defined.\n * Booking durration is now a getter\n */\n // now rounded to the next 5 minute increment\n const defaultStartTz = new DateTZ({ date: nowTz.ms, is_local_tz: false, building_tz: this.timezone }).setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n\n /**\n * When saving a booking the BaseDataClass doens't know to use the toAPIJson\n * so startDateTz isn't being convert to the epoch timestamp\n *\n * I'm not testing for the end time values because we can assume those follow the same pattern.\n */\n const startEpochProvided = !!(raw_data.start_epoch || raw_data.start);\n const startDateTzProvided = !!raw_data.startDateTz;\n\n /**\n * Not trying to be fancy here, just clear.\n */\n if (!startEpochProvided && startDateTzProvided) {\n /**\n * Once a booking is saved the BaseDataClass recreates the Booking\n * but doesn't use the toApiJSON method adapt the class input, mainly the\n * startDateTz isn't converted to the start_epoch timestamp.\n */\n this.startDateTz = raw_data.startDateTz;\n this.endDateTz = raw_data.endDateTz;\n } else if (startEpochProvided) {\n /**\n * A Booking created from the API responses arrives with the booking\n * start_epoch and end_epoch timestamps.\n */\n this.startDateTz = new DateTZ({\n date: ((raw_data.start_epoch || raw_data.start) * 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n this.endDateTz = new DateTZ({\n date: ((raw_data.end_epoch || raw_data.end)* 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n } else {\n /**\n * And there are uses of new Booking where there are no inputs\n * and defaults are necessary.\n */\n this.startDateTz = defaultStartTz;\n this.endDateTz = defaultStartTz.addValue({ minutes: 60 });;\n }\n\n /**\n * End time was by design ending at one minute before, IE 4:00PM is 3:59PM,\n * because of calendar and conflcit checking\n *\n * Check and finesse it.\n * Not sure why but some booking endtime added extra seconds\n */\n if ((this.endDateTz.minutes % 5) !== 0 || this.endDateTz.second > 0) {\n // Not sure of the source but some bookings do not conform.\n this.endDateTz = this.endDateTz.setValue({ second: 0, minute: Math.round(this.endDateTz.minutes / 5) * 5 });\n }\n\n\n\n /**\n * Setup the booking created_date\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n this.created_epoch = raw_data.created_epoch || nowTz.seconds;\n\n\n /**\n * Setup the booking all_day boolean\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n if ('all_day' in raw_data) {\n this.all_day = raw_data.all_day;\n } else {\n this.all_day = !!raw_data.all_day || this.duration > 23 * 60;\n }\n\n\n // R--- TODO Concierge will use startDateTz so i'm not sure if this is needed.\n if (!this.is_concierge && this.all_day && this.timezone) {\n /**\n * Concierge has a all_day form field, I can see it may need this for that, does it really?\n */\n this.startDateTz = this.startDateTz.startOfValue('day')\n }\n\n /**\n * Setup the booking approval status\n */\n let status = raw_data.status;\n // If not provided default to approved.\n if (!raw_data.status) {\n status = 'accepted';\n }\n // \"show_as\" is a special rule to override how the applications display the status\n if (raw_data.show_as && raw_data.show_as === 'cancelled') {\n status = 'declined';\n }\n const approvalStatus = {};\n this.multi_rooms.forEach(room => {\n approvalStatus[room.email] = status;\n });\n // Tracking new \"status\" and legacy \"approval_status\" from raw_data.status.\n this.status = status;\n this.approval_status = raw_data.approval_status || {};\n\n /**\n * Catering setup\n *\n * Bring in and sort the catering order by delivery time\n */\n\n this.catering = (raw_data.catering instanceof Array ? raw_data.catering : []).map(\n (i) => new CateringOrder(i)\n );\n\n\n\n /**\n * Edited fields setup\n *\n * Bring in and sort the catering order by delivery time\n *\n * cateringOrders can return the order sorted\n */\n const edited_fields = Array.isArray(raw_data.edits)\n ? raw_data.edits\n : unique(\n flatten(\n Object.keys(raw_data.edits || {}).map((room) => {\n return flatten(Object.values(raw_data.edits[room]));\n })\n )\n );\n this.edits = edited_fields;\n\n /**\n * New Recurring booking feilds\n *\n * New fields do not match the BookingRecurrenceDetails type\n * and are simpler to manage this way\n */\n this.recurrence_count = raw_data.recurrence_count || null;\n this.recurrence_days = raw_data.recurrence_days || null;\n this.occurrence_edits = raw_data.occurrence_edits || null;\n this.recurrence_endTz = raw_data.recurrence_end ? new DateTZ({date: raw_data.recurrence_end * 1000, is_local_tz: false, building_tz: this.timezone}) : null;\n this.recurrence_exceptions = raw_data.recurrence_exceptions || null;\n this.occurrence_ids = raw_data.occurrence_ids || null;\n this.recurrence_interval = raw_data.recurrence_interval || null;\n this.recurrence_period = raw_data.recurrence_period || null;\n this.recurrence_type = raw_data.recurrence_type || null;\n this.recurrence_master_id = raw_data.recurrence_master_id\n this.occurrence_details = raw_data.occurrence_details\n this.is_recurrent = raw_data.is_recurrent || (!!this.recurrence_type && !!this.recurrence_period) || null;\n this.recurrence_starts = raw_data.recurrence_starts || []\n this.start_epoch = raw_data.start_epoch\n this.end_epoch = raw_data.end_epoch\n\n /**\n * I'm not clear why, but the booking body, aka description is copied into the notes.\n * R--- In concerge data description is only a key when saving, also in the note array?\n */\n if (raw_data.body && !this.notes.find((i) => i.type === 'description')) {\n this.notes = [\n ...this.notes,\n {\n type: 'description',\n date: 0,\n message: raw_data.body,\n author: this.organiser.email\n }\n ];\n }\n\n /**\n * In case there is a cancellation in progress the property attempted_to_delete is set to false\n * And it is persisted until the booking is gone\n */\n this.attempted_to_delete = raw_data.attempted_to_delete || null;\n }\n\n\n /** Service for managing Bookings */\n protected get _service() {\n return ServiceManager.serviceFor(Booking);\n }\n\n /** Alias to approval_status */\n public get auto_approve(): boolean {\n // if concierge we auto_approve always.\n if (this.is_concierge) {\n return true;\n }\n return !this.multi_rooms.some(room => room.byRequest({\n dateTz: this.startDateTz,\n duration: this.duration,\n host: this.organiser\n }));\n }\n\n /** Whether booking has been approved */\n public get approved(): boolean {\n return !this.declined && !this.tentative;\n }\n\n /** All of the booking attendees including the organizer */\n public get allAttendees(): User[] {\n return unique([this.organiser].concat(this.attendees), 'email');\n }\n\n /** Computer format for booking type */\n public get bookingTypeId(): string {\n return this.booking_type.toLowerCase();\n }\n\n /** Human format for booking type */\n public get bookingTypeLabel(): string {\n return toTitleCase(this.booking_type);\n }\n\n /** Get accessor for the check in object, app expect array */\n public get checkInsArray(): string[] {\n return Object.keys(this.check_ins || {})\n }\n\n /** Legacy getter for \"class\" */ // R-- TODO remove\n public get class(): string {\n return this.booking_type;\n }\n\n /** */\n public get displayEndDateTz(): DateTZ {\n if ((this.endDateTz.minutes % 5) !== 0) {\n // All the bookings should end in 59 seconds\n return this.endDateTz.addValue({ seconds: 1 });\n }\n // but if not they return 00\n return this.endDateTz;\n }\n\n /** Whether booking has been declined */\n public get declined(): boolean {\n /**\n * I'm not sure, nor is Cam if this is ever used to decline\n * all booking for a specific room\n */\n const isAnyRoomDeclined = this.multi_rooms.some(room => room.name.toLowerCase().includes('decline'));\n if (isAnyRoomDeclined) {\n return true;\n }\n\n if (this.status.includes('decline')) {\n return true;\n }\n\n return false;\n }\n\n /** Description of the booking purpose */\n public get description(): string {\n const note = (this.notes || []).find((i) => i.type === 'description');\n return note ? note.message : '';\n }\n\n /** Catering getter */\n public get cateringOrders() {\n // Return the catering orders sorted by delivery time\n return this.catering ? this.catering.slice().sort((a, b) => {\n if (a?.delivery_time > b?.delivery_time) return 1;\n if (b?.delivery_time > a?.delivery_time) return -1;\n\n return 0;\n }) : [];\n }\n\n /** Get the created date as DateTz */\n public get creationDateTz() {\n return new DateTZ({ date: this.created_epoch * 1000, is_local_tz: false, building_tz: this.timezone })\n }\n\n public get tz_offset() {\n return getTimezoneOffsetString(this.timezone);\n }\n\n /** Display value for the date */\n public get date_string(): string {\n return this.startDateTz.formatDate('dd MMM yyyy');\n }\n\n /**\n * Get the booking durration based on start and end times\n */\n public get duration(): number {\n return Math.abs(this.startDateTz.startOfValue('minute').dateDiff(this.displayEndDateTz, 'minutes'));\n }\n\n /** Unix timestamp of the booking start */\n public get date() { // R--- remove if not necessary\n return this.startDateTz.ms;\n }\n\n /** Whether booking contains external visitors in the attendee list */\n public get has_visitors(): boolean {\n return this.attendees.reduce((a, v) => a || v.external, false);\n }\n\n /** Does the booking have catering orders */\n public get has_catering(): boolean {\n return !!this.catering.length;\n }\n\n /**\n * Unique calendar event ID\n * same as this.id, used to support existing component usage\n */\n public get icaluid(): string {\n return this.id;\n }\n\n /**\n * Get the booking room id\n */\n public get room_id(): string {\n return this.room.id;\n }\n\n /** Legacy getter of room, aka space */\n public get space(): Space {\n return this.room;\n }\n\n /** Status of the booking */\n public get timeBasedStatusLabel(): 'future' | 'upcoming' | 'done' | 'started' | 'in_progress' | 'expired_yesterday' {\n const buildingTzDt = DateNow(new Date()).toZone(this.timezone) ; // building time\n\n if (DateNow(new Date()).isBeforeDate(this.startDateTz.subtractValue({ minutes: 15 }))) {\n return 'future';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz)) {\n return 'upcoming';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: 15 }))) {\n return 'started';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: this.duration }))) {\n return 'in_progress';\n }\n // if current time is 12 AM (as per timezone) and booking expired yesterday\n else if(buildingTzDt.startOfValue('day').addValue({ minutes: 1 }).isAfterDate(this.startDateTz, 'day') ) {\n return 'expired_yesterday'\n }\n\n return 'done';\n }\n\n /** Whether booking is tentative */\n public get tentative(): boolean {\n if (\n this.status &&\n this.status.indexOf('tentative') >= 0\n ) {\n return true;\n }\n\n return false;\n }\n\n /** Display valuie for the start and end times of the booking */\n public get time_period(): string {\n return `${this.startDateTz.formatDate('h:mma')} - ${this.displayEndDateTz.formatDate('h:mma')}`;\n }\n\n /** Display value for the start time of the booking */\n public get start_time(): string {\n return this.startDateTz.formatDate('h:mma');\n }\n\n /** Display value for the end time of the booking */\n public get end_time(): string {\n return this.endDateTz.formatDate('h:mma');\n }\n\n /** Display value for the duration of the booking */\n public get length_string(): string {\n return humaniseDuration(this.duration);\n }\n\n /** Display value for the location of the booking */\n // public get local_room_name(): string {\n // return this.room?.local_name || 'No location';\n // }\n public get local_room_name(): string {\n if (this.multi_rooms.length === 0) {\n return 'No location';\n } else {\n return this.multi_rooms.map(room => room.local_name).join(', ');\n }\n } \n\n /** Display value for the level of the first space in the booking */\n public get level(): string {\n return this.space.level.name;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Booking {\n return new Booking(this.toJSON());\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(isEdit = false): Booking {\n return new Booking({\n ...this.toJSON(),\n id: isEdit ? this.id : null,\n });\n }\n\n /**\n *\n * @param status\n * @returns void\n */\n public undo(status?: 'accept' | 'decline', opts: { series?: boolean } = {}): Promise {\n return this._service.undo(\n this.id, status || 'accept',\n opts\n );\n }\n\n /**\n * Delete booking from the server\n */\n public delete(opts: { series?: boolean } = {}): Promise {\n if (this.id) {\n return this._service.delete(this.id, { ...opts });\n\n // R-- ask Cam again is he's positive these extra params are not needed for anything\n // return this._service.delete(this.id, {\n // concierge: this.is_concierge,\n // host: this.organiser.email,\n // room_id: this.space?.id,\n // icaluid: this.icaluid,\n // start: json.start,\n // end: json.end\n // });\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Booking): HashMap {\n let data = super.toJSON();\n // Remove the description from the notes\n data.notes = Array.isArray(data.notes) ? data.notes.filter((note) => note.type !== 'description') : data.notes;\n // Encode the nested objects\n data.room = data.room.toJSON();\n\n\n\n data.organiser = data.organiser.toJSON();\n data.creator = data.creator?.toJSON ? data.creator.toJSON(): data.creator;\n // Map the attendees User objects\n data.attendees = data.attendees.map((i: User) => i.toJSON());\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n return data;\n }\n\n /**\n * Convert object into plain object\n */\n public toApiJSON(this: Booking): HashMap {\n let data = super.toJSON();\n\n // Update booking payload contains additional fields\n data.icaluid = \"\";\n if (data.id) {\n data.icaluid = data.id;\n data.location_name = this.multi_rooms.map((item)=>{return item.local_name}).join(', ');\n data.from_room = this.multi_rooms.map((item)=>{return item.email}).join(', ');\n data.building_zone = this.room?.building?.id;\n }\n\n /**\n * These fields are rather in flux\n * According to Cam \"approve\" will be the prefered field\n * and auto_approve and approval_status can be removed.\n */\n data.approve = this.auto_approve; // this value appear incorrect on update\n data.auto_approve = [this.auto_approve]; // Needed to update approval status until BE accepts \"approve\"\n // delete data.approval_status;\n\n // Booking start and end data\n delete data.startDateTz;\n delete data.endDateTz;\n data.start = this.startDateTz.seconds;\n data.end = this.endDateTz.seconds;\n data.old_start = this.startDateTz.seconds; // remove is not necessary\n data.old_end = this.endDateTz.seconds; // remove is not necessary\n\n // Creation date value\n delete data.created_epoch;\n data.creation_date = this.creationDateTz.seconds;\n\n // Catering fields\n // data.catering = data.catering.toJSON();\n data.catering = this.cateringOrders;\n data.has_catering = this.has_catering;\n delete data.cateringOrders\n\n // Attendees appear quite incomplete\n // Map the attendees User objects\n data.attendees = this.allAttendees.map((i: User) => i.toJSON ? i.toJSON() : i);\n\n // Orgainizer and Creator data\n data.organiser = data.organiser.toJSON ? data.organiser.toJSON() : data.organiser;\n data.creator = data.creator.toJSON ? data.creator.toJSON() : data.creator;\n\n // Convert check_ins to checked_in array\n delete data.check_ins;\n data.checked_in = this.checkInsArray;\n\n // edits - edit booking is showing all fields even w/o an edit :(\n\n // Room data\n data.room_ids = this.multi_rooms.map((item)=>{return item.email});\n delete data.room;\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n // Not found in dev data\n delete data.name;\n delete data.email;\n delete data.is_concierge;\n // delete data.building_zone;\n // delete data.status;\n\n return data;\n }\n\n public getType(): string {\n if (!this || this.status?.includes('decline')) {\n return 'cancelled';\n }\n const booking_type = this.booking_type;\n if (booking_type === 'internal' && this.has_visitors) {\n return 'external';\n }\n return booking_type;\n }\n\n /** fallback for a booking when the recurrence_end is null but it's a series booking */\n public recurrenEndFromOcurrences(occurrence_details: { id: string, start_epoch: number }[]): DateTZ {\n const date = occurrence_details?.map(occurence => occurence)\n .sort((a, b) => new Date(a.start_epoch * 1000).getTime() - new Date(b.start_epoch * 1000).getTime())\n .reverse()\n .shift()\n .start_epoch * 1000\n return new DateTZ({date, is_local_tz: false, building_tz: this.timezone});\n }\n\n public get dateString() {\n return shorterLocalDateFormatString(this.startDateTz);\n }\n public get dateBuildingString() {\n return shorterBuildingDateFormatString(this.startDateTz);\n }\n\n public get endDateString(): string {\n return shorterLocalDateFormatString(this.recurrenEndFromOcurrences(this.occurrence_details));\n }\n}\n\n/**\n * Merge catering orders with same time and location\n * @param order_list List of catering orders\n */\nexport function mergeCateringOrders(order_list: CateringOrder[]) {\n // R--- investigate when this is used. Staff doesn't use it when adding catering orders.\n for (let i = 0; i < order_list.length; i++) {\n const orders = order_list.filter(\n (order) =>\n order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time\n );\n if (orders.length > 1) {\n const new_list = order_list.filter(\n (order) =>\n !(order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time)\n );\n new_list.push(new CateringOrder({\n ...order_list[i],\n items: flatten(orders.map(order => order.items)),\n booking_date: this.startDateTz.ms,\n booking_timezone: this.booking_timezone,\n }));\n order_list = new_list;\n i = 0;\n }\n }\n return order_list;\n}\n","import { DateTZ } from \"@mckinsey-converge/date-tz\";\n\nexport interface SpaceRules {\n auto_approve: boolean; // if false sapce is requestable else bookable\n hide: boolean;\n max_length?: number;\n min_length?: number;\n reason?: string // specially for non-bookable rooms\n}\n\nexport interface BookingNote {\n /** Type of note */\n type: 'equipment' | 'catering' | 'description' | 'private' | 'other' | 'catering-private';\n /** Name of the note's author */\n author: string;\n /** Contents of the note */\n message: string;\n /** Time the note was added to the booking */\n date: number;\n /** Display value for the time */\n time?: string;\n /** ID of the space associated with the note */\n space?: string;\n /** ID of the catering order associated with the note */\n order_id?: string;\n}\n\nexport interface DateDurationData {\n dateTz: DateTZ,\n duration: number,\n mobile: boolean,\n save?: boolean,\n}\n\nexport enum BOOKING_STATUS {\n approved = 'approved',\n declined = 'declined',\n tentative = 'tentative',\n unavailable = 'unavailable'\n}","import {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { AvailableBookingFields } from '../settings.interfaces';\nimport {\n HashMap,\n humaniseDuration,\n mockDate as mockDateBase,\n resetDate as resetDateBase,\n timeFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { CateringOrder } from '../catering/catering-order.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { User } from '../users/user.class';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport {\n BookingRule,\n SpaceStatus\n} from './space.types';\nimport { validateEndTime } from '../validation.utilities';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\nimport { Space } from '../spaces';\nimport * as cloneDeep from 'lodash/cloneDeep';\n\nconst MINUTE = 1;\nconst HOUR = 60;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\n\nconst DURATION_MAP: { [duration: string]: number } = {\n month: MONTH,\n months: MONTH,\n week: WEEK,\n weeks: WEEK,\n day: DAY,\n days: DAY,\n hour: HOUR,\n hours: HOUR,\n minute: MINUTE,\n minutes: MINUTE\n};\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const mockDate = mockDateBase;\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const resetDate = resetDateBase;\n\nexport interface IBookingSlot {\n start: number;\n end: number;\n}\n\n\nexport function bookingOptionsToQuery(options: IBookingQueryOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n delete query.type;\n if (options.filters) {\n delete query.filters;\n for (const property in options.filters) {\n if (!query[property]) {\n query[property] = options.filters[property]\n }\n }\n }\n\n // id?: string;\n // cancelled?: boolean;\n if (options.until) {\n query.to = options.until;\n delete query.until;\n }\n \n }\n return query;\n}\n\n\n/**\n * Generate a list of free time slots between the given bookings\n * @param list List of bookings to find slots between\n * @param min_size Minimum length of a free slot in minutes\n */\nexport function getFreeBookingSlots(list: Booking[]=[], min_size: number = 30, dateTzMs: number = DateNow(new Date()).ms,): IBookingSlot[] {\n /* istanbul ignore else */\n if (!list.length) {\n return [\n {\n start: 0,\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n }\n ];\n }\n const slots: IBookingSlot[] = [];\n let start = new DateTZ({ date: dateTzMs });\n list.sort((a, b) => a.date - b.date);\n for (const booking of list) {\n const bkn_start = booking.startDateTz;\n const bkn_end = booking.endDateTz;\n if (bkn_start.isAfterDate(start)) {\n const diff = Math.abs(bkn_start.dateDiff(start, 'minutes'));\n /* istanbul ignore else */\n if (diff >= min_size) {\n slots.push({ start: start.ms, end: bkn_start.ms });\n }\n start = bkn_end;\n } else if (start.startOfValue('minute').ms === bkn_start.startOfValue('minute').ms) {\n start = bkn_end;\n }\n }\n slots.push({\n start: start.ms,\n // R--- these X 10's make no sense. why not + 2 years?\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n });\n\n return slots;\n}\n\n/**\n * Get the next free time slot from the given bookings\n * @param list List of bookings to find the next slot\n * @param date Date to find next slot after in ms since UTC epoch\n * @param min_size Minimum length of the free slot in minutes\n * \n * R--- Possibly depreciate, I don't see it used anywhere except for its own test\n */\nexport function getNextFreeBookingSlot(\n list: Booking[],\n date: number = DateNow(new Date()).ms,\n min_size: number = 15\n): IBookingSlot {\n const slots = getFreeBookingSlots(list, min_size, date);\n const date_ = new DateTZ({date})\n const time = date_.startOfValue('minute').setValue({ second: 1 });\n for (const block of slots) {\n const start = new DateTZ({date: block.start});\n const end = new DateTZ({date: block.end});\n if (start.startOfValue('minute').isAfterDate(time)) {\n return block;\n } else if (time.isBeforeDate(end.startOfValue('minute'))) {\n const duration = end.startOfValue('minute').dateDiff(time, 'minutes');\n /* istanbul ignore else */\n if (duration >= min_size) {\n return block;\n }\n }\n }\n return slots[slots.length - 1];\n}\n\n/**\n * Generate form fields for the given booking\n * @param booking Booking to generate form for\n * @param current_user Current user of the system to default as the host\n */\nexport function generateBookingForm(\n booking: Booking,\n use_fields: AvailableBookingFields[],\n isConcierge: boolean = false,\n manualTimezone?: string,\n action?: SeriesAction | BookingAction | null\n ): FormGroup {\n if (!booking) {\n throw Error('No booking passed');\n }\n\n const user_service = ServiceManager.serviceFor(User);\n const current_user =\n user_service.current ||\n new User({ id: 'local-user', name: 'Local User', email: 'local@place.tech' });\n\n const fields: HashMap = {\n id: new FormControl(booking.id || ''),\n space_list: new FormControl( booking.is_multiroom? booking.multi_rooms : [booking.room], []),\n room: new FormControl(booking.room, {}),\n dateTz: new FormControl({ value: booking.startDateTz || DateNow(), disabled: false }, [Validators.required]),\n duration: new FormControl({ value: booking.duration, disabled: false }),\n organiser: new FormControl(booking.organiser || current_user, [Validators.required]),\n attendees: new FormControl(booking.attendees, []),\n title: new FormControl(booking.title || '', { validators: [ Validators.required, Validators.minLength(1) ], updateOn: 'blur' }), //Validators.pattern(\"[^=`~!@#$%*{};:'\\\",_.<>]*\")\n booking_type: new FormControl(booking.booking_type),\n body: new FormControl(booking.body),\n notes: new FormControl(booking.notes),\n equipment_codes: new FormControl(booking.equipment_codes),\n expected_attendees: new FormControl(booking.expected_attendees),\n company: new FormControl(booking.company),\n is_multiroom: new FormControl(booking.is_multiroom),\n merged: new FormControl({value: booking?.merged, disabled: true}),\n catering: new FormControl(\n booking.cateringOrders.map(\n (order) => new CateringOrder({\n ...order,\n booking_date: booking.startDateTz.ms,\n booking_timezone: booking.timezone,\n })\n )\n ),\n all_day: new FormControl(!!booking.all_day),\n has_catering: new FormControl(!!booking.has_catering),\n needs_space: new FormControl(true),\n action: new FormControl(''),\n timezone: new FormControl(manualTimezone || \"\"),\n is_before_date: new FormControl(false)\n };\n if (!isConcierge) {\n fields.duration.setValidators([Validators.required, validateEndTime(fields.dateTz)]);\n }\n /* istanbul ignore else */\n if (booking.id && booking.id !== 'ad-hoc') {\n fields.organiser.disable();\n /* istanbul ignore else */\n if (booking.endDateTz.ms < DateNow(new Date()).ms) {\n fields.dateTz.disable();\n }\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n fields.dateTz.setValidators(dateValidators);\n fields.dateTz.updateValueAndValidity();\n }\n let list_length = -1;\n fields.space_list.valueChanges.subscribe((list) => {\n const expected = fields.expected_attendees.value || {};\n const matches = Object.keys(expected).filter((key) =>\n list?.find((space) => space.email === key)\n ).length;\n if (list && list.length && matches === 0) {\n const codes = fields.equipment_codes.value || {};\n if (Object.keys(expected).length >= 0 || Object.keys(codes).length >= 0) {\n const key = Object.keys(expected)[0] || Object.keys(codes)[0];\n const new_expected = {};\n const new_codes = {};\n const notes = fields.notes.value;\n notes.forEach((note) => (note.space === key ? (note.space = list[0].email) : ''));\n new_expected[list[0].email] = expected[key];\n new_codes[list[0].email] = codes[key];\n fields.expected_attendees.setValue(new_expected);\n fields.equipment_codes.setValue(new_codes);\n }\n }\n list_length = list?.length;\n });\n fields.dateTz.valueChanges.subscribe((_) => {\n fields.duration.updateValueAndValidity();\n });\n fields.needs_space.valueChanges.subscribe((space_needed) => {\n if (!space_needed) {\n fields.space_list.setValue([]);\n }\n });\n fields.has_catering.valueChanges.subscribe((has_catering) => {\n if (!has_catering) {\n fields.catering.setValue([]);\n }\n });\n const simplified_fields: HashMap = [\n 'id',\n 'space_list',\n 'space_ids',\n 'notes',\n 'dateTz',\n 'booking_type',\n 'equipment_codes',\n 'expected_attendees',\n 'timezone',\n 'is_before_date',\n ...use_fields\n ].reduce((map, key) => {\n /* istanbul ignore else */\n if (fields[key]) {\n map[key] = fields[key];\n }\n return map;\n }, {});\n \n if (simplified_fields.all_day) {\n const handleAllDay = (value) => {\n if (value) {\n let startOfDay = simplified_fields.dateTz.value.clone();\n // When the booking space isn't set we still need a way to determine midnight\n // and here we use the current concierge building selection's timezone.\n if (manualTimezone) {\n startOfDay = startOfDay.toZone(manualTimezone);\n }\n\n simplified_fields.dateTz.setValidators([Validators.required]);\n simplified_fields.dateTz.setValue(simplified_fields.all_day.value\n ? startOfDay.startOfValue('day')\n : simplified_fields.dateTz.value);\n simplified_fields.duration.setValue(simplified_fields.all_day.value\n ? 24 * 60\n : simplified_fields.duration.value);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.disable();\n // simplified_fields.dateTz.disable();\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n simplified_fields.dateTz.setValidators(dateValidators);\n simplified_fields.duration.setValue(booking.duration || 30);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.enable();\n simplified_fields.dateTz.enable();\n }\n };\n simplified_fields.all_day.valueChanges.subscribe(handleAllDay);\n handleAllDay(simplified_fields.all_day.value);\n }\n\n const occurrences = booking.occurrence_details || [];\n\n //Add recurrence fields\n if(action && booking.recurrence_period === RecurrencePeriod.LIST){\n booking.recurrence_starts = occurrences\n .filter(occurrence => occurrence.id !== booking.recurrence_master_id)\n .map((occurrence) => new DateTZ({date: occurrence.start_epoch * 1000, is_local_tz: false, building_tz: booking.timezone})\n ) \n }\n /**If series exists then set the start and end dates from the first and last bookings in the occurrences array\n * this prevents prefilled form errors due to individual edits\n */\n if(action && action !== SeriesAction.CLONE && action !== BookingAction.CLONE && occurrences && occurrences.length && !booking.id){\n const start_dateTz = new DateTZ({\n date: occurrences.sort((d1, d2) => d1.start_epoch - d2.start_epoch)[0].start_epoch * 1000, \n is_local_tz: false, building_tz: booking.timezone\n })\n simplified_fields.dateTz.setValue(start_dateTz)\n const end = occurrences.sort((d1, d2) => d2.start_epoch - d1.start_epoch)[0].start_epoch * 1000\n booking.recurrence_endTz = new DateTZ({date: end, is_local_tz: false, building_tz: booking.timezone}) \n }\n\n // R-- needs TZ aware fields\n const _recurr_end = simplified_fields.dateTz?.value || new DateTZ({ date: 1 }); // new DateTZ({date: simplified_fields.date?.value}) \n const fields_with_recurrence = {\n ...simplified_fields,\n recurrence_period: new FormControl(booking.recurrence_period || RecurrencePeriod.WEEKLY),\n recurrence_interval: new FormControl(booking.recurrence_interval || 1),\n recurrence_endTz: new FormControl(booking.recurrence_endTz || _recurr_end.addValue({days: 1})),\n recurrence_count: new FormControl(booking.recurrence_count || 0),\n is_recurrent: new FormControl(booking.is_recurrent),\n recurrence_starts: new FormControl(booking.recurrence_starts || []),\n recurrence_exceptions: new FormControl([]),\n recurrence_pattern: new FormControl(RecurrencePeriod.WEEKLY), //Helper value to store the last selected pattern (daily, weekly, monthly),\n recurrence_days: new FormControl(booking.recurrence_days || [])\n }\n\n if(booking.is_recurrent && action !== BookingAction.CLONE){\n fields_with_recurrence.recurrence_starts.setValidators([arrayWithValues])\n fields_with_recurrence.recurrence_starts.updateValueAndValidity()\n fields_with_recurrence.recurrence_endTz.setValidators([Validators.required, validDateTZ]);\n }\n // Generate form group for booking item\n const form = new FormGroup(fields_with_recurrence);\n return form;\n}\n\n/**\n * Validate whether date is in the future\n * @param control Control to check value\n */\nexport function isFuture(control: AbstractControl) {\n const dateTz = control.value; // new DateTZ({date: control.value});\n return dateTz.isBeforeDate(DateNow(new Date()).subtractValue({ minutes: 5 }))\n ? { dateTz: 'Date needs to be in the future' }\n : null;\n}\n\n/**\n * Validate whether an array has values\n * @param control Control to check value\n */\nexport function arrayWithValues (control: AbstractControl) {\n return control.value.length !== 0 ? null : { field: 'Needs at least one value'}\n}\n\n/**\n * Validate whether a date has a valid value (future or current date)\n * @param control Control to check value\n */\n export function validDate (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = new DateTZ({date: control.value})\n const now = DateNow(new Date())\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Validate whether a date has a valid DateTZ value (future or current date)\n * @param control Control to check value\n */\n export function validDateTZ (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = DateNow(control.value.JSDate);\n const now = DateNow(new Date());\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Get minimum duration from ruleset in minutes\n * Default to 5min\n */\nexport function getMinLength(rule_list: HashMap): number {\n return Object.values(rule_list).reduce((min, block) => {\n const min_block = block.reduce((min_length, el) => {\n if (el.conditions.min_length && stringToMinutes(el.conditions.min_length) > min) {\n return stringToMinutes(el.conditions.min_length);\n } else {\n return min_length;\n }\n }, 5);\n if (min_block > min) {\n return min_block;\n } else {\n return min;\n }\n }, 5) as number;\n}\n\n/**\n * Whether the first input is greater than the last. Converts duration strings into minutes\n * @param duration_1 First input can be a number in minutes or a duration string e.g. `1 hour`\n * @param duration_2 Second input can be a number in minutes or a duration string e.g. `30 minutes`\n */\nexport function durationGreaterThanOrEqual(\n duration_1: string | number,\n duration_2: string | number\n) {\n const first: number = typeof duration_1 === 'string' ? stringToMinutes(duration_1) : duration_1;\n const second: number =\n typeof duration_2 === 'string' ? stringToMinutes(duration_2) : duration_2;\n return first >= second;\n}\n\n/**\n * Conver time string into minutes\n * @param str timestring e.g. `'1 day'`, `'15 minutes'`, `'2 weeks'`\n */\nexport function stringToMinutes(str: string): number {\n const parts = str.split(' ');\n return +parts[0] * DURATION_MAP[parts[1]];\n}\n\n/**\n * Get current status within bookings\n * @param bookings List of bookings\n * @param host Host of the new event\n * @param date Datetime of the new event\n */\nexport function statusFromBookings(\n bookings: Booking[] = [],\n bookable: boolean = true,\n requestable: boolean = false,\n dateTz: DateTZ = DateNow(),\n space?: Space\n) {\n const free_slots = getFreeBookingSlots(bookings.filter((bkn) => !bkn.declined));\n const now = DateNow() // new DateTZ({date}); // now should be now\n // commeted bellow piece as correct way to get next free booking slot is at line- 488\n // const next_free_slot = free_slots.find((slot) => {\n // return slot && (slot.start > now.ms || now.ms > slot.start - slot.start % 1000 || now.ms < slot.end - slot.end % 60 * 1000);\n // // const start = new DateTZ({date: slot?.start || 0 });\n // // const end = new DateTZ({date: slot?.end || 0}); // slot end isn't late enough? or after now/\n // // return start.isAfterDate(now) || (now.isAfterDate(start.startOfValue('second')) && now.isBeforeDate(end.startOfValue('minute')))\n // });\n\n const next_free_slot = getNextFreeBookingSlot(bookings.filter((bkn) => !bkn.declined), dateTz.ms);\n \n const start = new DateTZ({date: next_free_slot?.start || 0});\n const end = new DateTZ({date: next_free_slot?.end || 0});\n const currently_free = dateTz.isAfterDate(start.startOfValue('second')) && dateTz.isBeforeDate(end.startOfValue('minute'));\n const time_until_next_block = humaniseDuration(\n currently_free ? end.dateDiff(dateTz, 'minutes') : start.dateDiff(dateTz, 'minutes'),\n 'short'\n );\n\n const free_tomorrow = !currently_free && !start.isSameDate(dateTz, 'day');\n const free_today = currently_free && !end.isSameDate(dateTz, 'day');\n \n return {\n status: (!bookable\n ? SpaceStatus.NotBookable\n : currently_free\n ? requestable\n ? SpaceStatus.Requestable\n : SpaceStatus.Available\n : SpaceStatus.InProgress) as SpaceStatus,\n available_until: free_today\n ? 'No meetings today'\n : currently_free\n ? `Free until ${end.formatDate(timeFormatString())}(${time_until_next_block})`\n : free_tomorrow\n ? 'Unavailable today'\n : `Free at ${start.formatDate(timeFormatString())}(${time_until_next_block})`\n };\n}\n\n/**\n * V1 version display.\n */\nexport const spaceStatusToDisplay = (status: SpaceStatus): string => {\n switch (status) {\n case SpaceStatus.NotBookable:\n return 'Not Bookable';\n case SpaceStatus.Requestable:\n return 'Available by Request';\n case SpaceStatus.Unavailable:\n return 'Unavailable';\n case SpaceStatus.InProgress:\n return 'Meeting in Progress';\n case SpaceStatus.Available:\n default:\n return 'Available';\n }\n};\n\nexport function replaceBookings(\n list: Booking[],\n new_bookings: Booking[],\n filter_options: { room_email: string; fromTz: DateTZ; toTz: DateTZ }\n) {\n const filtered_list = list.filter((booking) => {\n return (\n !(booking.multi_rooms.some(room => room?.email === filter_options.room_email)) ||\n !timePeriodsIntersect(filter_options.fromTz.ms, filter_options.toTz.ms, booking.startDateTz.ms, booking.endDateTz.ms)\n );\n });\n const updated_list = filtered_list.concat(new_bookings);\n updated_list.sort((a, b) => a.date - b.date);\n return unique(updated_list, 'icaluid');\n}\n\nexport function timePeriodsIntersect(\n start1: number,\n end1: number,\n start2: number,\n end2: number,\n type = ''\n) {\n return (\n (start1 >= start2 && start1 < end2) ||\n (end1 > start2 && end1 <= end2) ||\n (start2 >= start1 && start2 < end1) ||\n (end2 > start1 && end2 <= end1)\n );\n}\n\nexport function formatWhen({\n all_day,\n startTZ,\n endTZ,\n displayEndTZ\n}): string {\n if (all_day) {\n return `${startTZ.formatDate('dd MMM yyyy')} - All Day`;\n } else {\n if (startTZ.isSameDate(endTZ, 'day')) {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('h:mma')}`;\n } else {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('dd MMM yyyy, h:mma')}`;\n }\n }\n}\n\nexport const isIncludes = (item: any, field: string, searchVaue: string) => (item && item[field] && item[field].toLowerCase().includes(searchVaue));\n\nexport function searchRoomsAndBookings(allItems: (Space | Booking)[], searchValue: string, isConcierge:boolean = false) {\n\n let relevantItems: (Space | Booking)[] = [];\n\n if(isConcierge) {\n relevantItems = allItems.filter( (item: any ) => \n isIncludes(item, 'title', searchValue) ||\n isIncludes(item.creator, 'name', searchValue) ||\n isIncludes(item.organiser, 'name', searchValue) ||\n isIncludes(item, 'simple_name', searchValue) || // search with room name \n (item?.attendees && !!item?.attendees.filter(el => el.name.toLowerCase().includes(searchValue)).length ) \n );\n } else {\n relevantItems = allItems.filter( (item: any ) => \n this.isIncludes(item.creator, 'name', searchValue) ||\n this.isIncludes(item.organiser, 'name', searchValue) ||\n this.isIncludes(item, 'simple_name', searchValue) \n );\n }\n\n const filteredItems = this.duplicateMultiroomEntriesIfAny(relevantItems);\n \n return filteredItems;\n} \n\nexport function duplicateMultiroomEntriesIfAny(bookings) {\n // Initialize an array to hold the original and duplicated entries \n const updatedBookings = [...bookings];\n\n // Loop through the original bookings array \n [...bookings].forEach(booking => {\n if(booking?.is_multiroom) {\n // calculate the number of times to duplicates the booking\n const duplicatesCount = booking.multi_rooms.filter(el => el.id !== booking.space.id);\n\n // Create the duplicate and add them to the updatedBookings array.\n for(let i = 0; i < duplicatesCount.length; i++) {\n // Deep copy the booking to ensure references are not copied\n const duplicatedBooking = cloneDeep(booking); \n duplicatedBooking.room = duplicatesCount[i]; \n updatedBookings.push(duplicatedBooking);\n }\n }\n });\n\n // Return the array with duplicated entries \n return updatedBookings;\n\n}\n \n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { DateNow } from \"@mckinsey-converge/date-tz\";\nimport { Observable } from 'rxjs/internal/Observable';\nimport { forkJoin } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n const now = DateNow(new Date())\n if (!options.from) {\n options.from = now\n .startOfValue('day')\n .subtractValue({ days: 2 })\n .ms;\n }\n if (!options.until) {\n options.until = null;\n }\n\n const key = `bookings|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Booking[]) => {\n delete this._promises[key];\n resolve(list);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking, series?: boolean): Promise {\n const body = booking.toApiJSON()\n if(series){\n body.series = true\n }\n return booking.id ? this.update(booking.id, body) : this.add(body);\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n public checkinIndividualVisitor(id: string, fields: BookingCheckinParams) {\n return this.taskObsr(id, 'checkin', fields); \n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n public declineMultiple(bookings: Booking[]): Observable {\n const requests = [];\n bookings.forEach(bkg => {\n const booking = bkg.toJSON();\n const id = booking.id;\n const fields = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: booking.space?.email,\n icaluid: booking.icaluid,\n start: booking.startDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n end: booking.endDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n };\n if (bkg.is_recurrent && bkg.recurrence_type === 'master') {\n // Add series=true for recurrent bookings\n fields['series'] = true;\n } \n requests.push(this.taskObsr(id, 'concierge_decline', fields) ); \n });\n return forkJoin(requests);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { PaginatedAPIService } from '../paginated.service';\nimport { Booking, IBookingQueryOptions, } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { Observable } from 'rxjs';\n\nexport interface PaginatedBooking {\n results: Booking[];\n total: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsPaginatedService extends PaginatedAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n\n const key = `bookingsPaginated|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (response: any) => {\n delete this._promises[key];\n resolve(response);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking): Promise {\n return booking.id ? this.update(booking.id, booking.toJSON()) : this.add(booking.toJSON());\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n // public getHoldingBay(query: IBookingQueryOptions): Promise {\n // const key = `bookingsPaginated|holding-bay`;\n // if (!this._promises[key]) {\n // this._promises[key] = new Promise((resolve, reject) => {\n // const respond = (response: any) => {\n // delete this._promises[key];\n // resolve(response);\n // };\n // const error = e => {\n // reject(e);\n // delete this._promises[key];\n // }; \n // this.query(query, { url: '/api/staff/bookings/holding_bay' }).then(respond, error);\n // });\n // }\n\n // return this._promises[key];\n // }\n\n public getHoldingBay = (query: IBookingQueryOptions): Observable => this.queryHoldingBay(query, { url: '/api/staff/bookings/holding_bay' });\n}\n","export * from './booking.class'\nexport * from './space.types'\nexport * from './bookings.service'\nexport * from './bookingsPaginated.service'\nexport * from './booking.utilities'\nexport * from './booking-state.service'\nexport * from './space.utilities'\nexport * from './booking.types'\n","import { SpaceRules } from './booking.types';\n\nimport {\n durationGreaterThanOrEqual,\n stringToMinutes\n} from './booking.utilities';\nimport {\n SpaceCheckOptions,\n SpaceRuleOptions\n} from './space.types';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * Get booking rules for the given user and space\n * @param options\n */\nexport function rulesForSpace(options: SpaceRuleOptions): SpaceRules {\n if (!options) {\n throw Error('Options are needed to check for rule matches');\n }\n const space_rules_for_user: SpaceRules = {\n auto_approve: true,\n hide: true,\n reason: ''\n };\n let match = false;\n /* istanbul ignore else */\n if (options.space) {\n for (const type in options.rules) {\n if (\n options.rules.hasOwnProperty(type) &&\n options.rules[type] instanceof Array &&\n options.space.zones.find((zone) => zone === type)\n ) {\n for (const rule_block of options.rules[type]) {\n /* istanbul ignore else */\n if (\n checkRules({\n user: options.user,\n space: options.space,\n time: options.time,\n duration: options.duration,\n rules: rule_block.conditions\n })\n ) {\n const ruleset = rule_block.rules;\n const conditions = rule_block.conditions;\n space_rules_for_user.hide = false;\n /* istanbul ignore else */\n if (conditions.max_length) {\n space_rules_for_user.max_length = stringToMinutes(\n conditions.max_length as string\n );\n }\n /* istanbul ignore else */\n if (conditions.min_length) {\n space_rules_for_user.min_length = stringToMinutes(\n conditions.min_length as string\n );\n }\n // NOTE: use max_length in conditions instead of book_length in rules\n // if (ruleset.book_length) {\n // space_rules_for_user.max_length = stringToMinutes(ruleset.book_length as string);\n // }\n /* istanbul ignore else */\n if (ruleset.auto_approve !== undefined) {\n space_rules_for_user.auto_approve = ruleset.auto_approve;\n }\n match = true;\n space_rules_for_user.reason = '';\n break;\n }\n else {\n space_rules_for_user.reason = 'OfficeRules';\n }\n }\n }\n \n /* istanbul ignore else */\n if (!space_rules_for_user.hide) {\n break;\n }\n }\n }\n if (!match) {\n space_rules_for_user.hide = true;\n }\n return space_rules_for_user;\n}\n\n\n/**\n * Check if user matches the given ruleset\n * @param options\n */\nfunction checkRules(options: SpaceCheckOptions): boolean {\n /* istanbul ignore else */\n if (options.rules) {\n const time = new DateTZ({date: options.time});\n const count = Object.keys(options.rules).length;\n let matches = 0;\n Object.keys(options.rules).forEach((key) => {\n let counter = 0;\n const condition: string[] =\n options.rules[key] instanceof Array\n ? (options.rules[key] as [])\n : [options.rules[key] as string];\n switch (key) {\n case 'groups':\n /* istanbul ignore else */\n if (options.user && options.user.groups) {\n counter = 0;\n condition.forEach((i) =>\n options.user.groups.find((j) => j === i) ? counter++ : null\n );\n /* istanbul ignore else */\n if (counter > 0) {\n matches++;\n }\n }\n break;\n case 'locations':\n /* istanbul ignore else */\n if (options.user && options.user.location) {\n counter = 0;\n condition.forEach((i) =>\n (options.user.last_location.name || '').indexOf(i) >= 0\n ? counter++\n : null\n );\n /* istanbul ignore else */\n if (counter >= options.rules[key].length) {\n matches++;\n }\n }\n break;\n case 'is_before':\n /* istanbul ignore else */\n if (options.time) {\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date()).addValue({ minutes: duration });\n let match = time.isBeforeDate(check);\n /* istanbul ignore else */\n matches += match ? 1 : 0;\n }\n break;\n case 'is_after':\n /* istanbul ignore else */\n if (options.time) {\n\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date());\n time.isAfterDate(check.addValue({ minutes: duration })) ? matches++ : '';\n }\n break;\n case 'min_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(options.duration, condition[0])\n ) {\n matches++;\n }\n break;\n case 'max_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(condition[0], options.duration)\n ) {\n matches++;\n }\n break;\n }\n });\n return matches >= count;\n }\n return false;\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringCategoriesService extends BaseAPIService {\n\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringCategory, this);\n this._name = 'catering category/group';\n this._api_route = 'catering/category';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering categories. Use catering menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering categories. Use catering menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringCategory(raw_item);\n }\n\n public format(item: CateringCategory) {\n return { ...item };\n }\n}\n","import { CateringItem } from \"./catering-item.class\";\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport class CateringCategory extends CateringItem {\n /** Whether item is a category */\n public is_category = true;\n public admin_only: boolean;\n public restricted_from: number;\n\n constructor(data: HashMap) {\n super(data);\n this.is_category = true;\n (this as any).must_select = this.must_select || 0;\n (this as any).order_anytime = !!data.order_anytime && this.package;\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj = super.toJSON();\n obj.order_anytime = !!obj.order_anytime && obj.package;\n return obj;\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nexport interface CateringAvailability {\n /** Month of the year that the item starts being available */\n readonly from_month: number;\n /** Month of the year that the item ends being available */\n readonly to_month: number;\n}\n\nexport class CateringItem {\n /** Unique ID of the catering item */\n public readonly id: string;\n /** Display name of the catering item */\n public readonly name: string;\n /** Description of the item */\n public readonly description: string;\n /** URL to the image associated with the item */\n public readonly image_path: string;\n /** Type of catering item */\n public readonly catering_type: string;\n /** Availability of the item */\n public readonly available: CateringAvailability;\n /** Time in hours that is needed to prepare the item beforehand */\n public readonly prior_notice: number;\n /** Cost of the item without decimals */\n private unit_price: number;\n /** Cost of the item without decimals */\n public readonly supplier_cost: number;\n /** Minimum number this item allowed in an order */\n public readonly minimum_quantity: number;\n /** Maximum number this item allowed in an order */\n public readonly maximum_quantity: number;\n /** List of categories that the item is contained in */\n public readonly parent_categories: readonly string[];\n /** Allegen information associated with the item */\n public readonly allergy: string;\n /** Whether the supply of this item has run out */\n public out_of_stock: boolean;\n /** Whether item can be ordered within the time limit set by the building */\n public readonly order_anytime: boolean;\n /** Number of child items that must be selected as part of the package */\n public readonly must_select: number;\n /** List of associated items */\n public readonly items: CateringItem[];\n public readonly availableItems: CateringItem[];\n /** Whether child items are part of a package */\n public readonly package: boolean;\n /** List of zone ids associated with the category */\n public readonly zones: readonly string[];\n /** Number of this item in the assoicated order */\n private _amount = 0;\n /** Unique ID of the catering item */\n private instance_id: string;\n /** Whether item is a category */\n public is_category: boolean = false;\n /** Whether item is disabled in Staff App */\n public admin_only: boolean;\n /** restricted_from indicates category restriction from hours ahead of delivery time */\n public restricted_from: number;\n\n public get can_order_anytime(): boolean {\n return (\n this.order_anytime ||\n !this.package && this.items.reduce(\n (anytime, item) => anytime || item.can_order_anytime,\n false,\n )\n );\n }\n\n /** Number of this item in the assoicated order */\n public get amount(): number {\n return this._amount || 0;\n }\n\n /** Unit price in the assoicated order */\n public get price(): number {\n return this.unit_price || 0;\n }\n\n /** Total cost of the amount of items set */\n public get total(): number {\n return (this._amount * this.unit_price) || 0;\n }\n\n constructor(data: HashMap) {\n this.instance_id = `item-${Math.floor(Math.random() * 999_999_999)}`;\n this.id = data.id || '';\n this.name = data.name || '';\n this.is_category = this.id.includes('category-');\n this.available = {\n from_month: (data.available ? data.available.from_month : data.available_from) || -1,\n to_month: (data.available ? data.available.to_month : data.available_to) || -1,\n };\n this.description = data.description || '';\n this.prior_notice = data.prior_notice || data.notice;\n this.unit_price = data.unit_price || data.price || 0;\n this.supplier_cost = data.supplier_cost;\n this.minimum_quantity = Math.max(0, data.minimum_quantity || 0);\n this.maximum_quantity = Math.max(1, data.maximum_quantity || 999);\n this.parent_categories = data.category_ids || data.parent_categories || data.categories;\n this.order_anytime = !!data.order_anytime;\n this.image_path = data.image_path || '';\n this.admin_only = data.admin_only;\n this.restricted_from = data.restricted_from || data?.root_category_restricted_from || 0;\n \n this.catering_type = data.catering_type;\n this.must_select = data.must_select ?? 0;\n this._amount = data._amount || data.amount || 0;\n this.allergy = data.allergy || '';\n const cateringItems: CateringItem[] = (data.items || []).map(item => new CateringItem(item));\n this.items = cateringItems;\n const filteredCateringItems = cateringItems.filter(c => !c.out_of_stock);\n this.availableItems = filteredCateringItems;\n this.out_of_stock = !!data.out_of_stock ||\n // if original items are empty, we hit the bottom, so if we filter out items then its out of stock.\n (cateringItems.length > 0 && filteredCateringItems.length === 0);\n this.package = data.package === 'true' || data.package === true;\n this.zones = data.zones && data.zones.length ? [...data.zones] : [];\n }\n\n public setAmount(amount: number = 0): void {\n if (amount <= this._amount) {\n if (amount < this.minimum_quantity) {\n amount = 0;\n }\n } else {\n if (amount < this.minimum_quantity) {\n amount = this.minimum_quantity;\n }\n }\n this._amount = Math.max(0, Math.min(this.maximum_quantity, amount));\n }\n\n /**\n * Updates the unit_price in the assoicated order if necessary\n * @param price value to compare to unit_price\n */\n public setPrice(price: number = 0): void {\n if(this.unit_price !== price) this.unit_price = price;\n }\n\n /**\n * Increase amount of the item the order\n * @param amount Amount to increase by\n */\n public addToOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount += amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = this.minimum_quantity;\n } else if (this._amount > this.maximum_quantity) {\n this._amount = this.maximum_quantity;\n }\n }\n\n /**\n * Decrease amount of the item the order\n * @param amount Amount to decrease by\n */\n public removeFromOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount -= amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = 0;\n }\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._changes;\n delete obj._server_names;\n // Convert remaining members to be public\n obj.price = obj.unit_price;\n obj.categories = obj.parent_categories;\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n return obj;\n }\n\n\n\n public within_category_restricted_time(dateTz): boolean {\n /**\n * Update : https://mckinsey.atlassian.net/browse/CNG-574\n * Right now the frontend is restricting catering orders based off the field .settings.discovery_info.catering_restricted_from,\n * so for this ticket change it’s best we keep that field as the default time restriction, then add a new field to catering categories called \n * restricted_from which will override the old field if it’s present!\n * restricted_from can be set by concierge admin to restrict item from being order before set time ex if it been set to 24 then the item should\n * available to order before 24 hours of booking/order time!\n */\n\n if(!!this?.restricted_from) {\n const expired = DateNow(new Date()).addValue({ hours: this?.restricted_from }).startOfValue('minute');\n return dateTz.isBeforeDate(expired);\n } else {\n return false;\n }\n \n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { CateringItem } from './catering-item.class';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringItemsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringItem, this);\n this._name = 'Catering Menu';\n this._api_route = 'catering/item';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering items. Use menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering items. Use menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringItem(raw_item);\n }\n\n public format(item: CateringItem) {\n return item instanceof CateringItem ? item.toJSON() : item;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { CateringItem } from './catering-item.class';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringMenuService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Catering Menu';\n this._api_route = 'menu';\n }\n\n /**\n * Convert user data to local format\n * @param user User data\n */\n protected processItem(item: HashMap) {\n return item.items ? new CateringCategory(item) : new CateringItem(item);\n }\n}\n","\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringNotesService {\n\n public cateringNotes = [];\n\n \n public setNotes(notes) {\n this.cateringNotes = notes;\n }\n\n public getNotes() {\n return this.cateringNotes;\n }\n}","import { CateringItem } from './catering-item.class';\nimport { HashMap } from '@mckinsey-converge/base';\n\nimport { CateringCategory } from './catering-category.class';\nimport { Booking } from '../bookings';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport type CateringOrderMutableProperties =\n | 'items'\n | 'location_id'\n | 'location'\n | 'delivery_time'\n | 'charge_code'\n | 'notes'\n | 'status';\n\nexport type CateringOrderStatus = 'accepted' | 'preparing' | 'ready' | 'delivered' | 'cancelled';\n\nconst now = DateNow(new Date());\n\n// R--- refactor booking date to be dateTz\nexport class CateringOrder {\n /**\n * Booking fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Unique Booking ID for the catering order */\n readonly booking_id: string;\n /** \n * Timestamp based booking time of the booking associated with the order\n * \n * Must be provide as the true Booking startDateTz or as a new DateTZ with \n * the correct date: timestamp, local_tz = false and bulding_tz values\n */\n readonly booking_date: number;\n /**\n * Timezone of the booking associated with the order\n */\n readonly booking_timezone: string;\n /** ID of the location to deliver the items to */\n location_id: string = '';\n /** Display text for the location to deliver the items to */\n location: string = '';\n /**\n * Smart timezone aware catering datetime with timezone\n */\n readonly bookingDateTz: DateTZ;\n\n /** \n * Booking associated with the order \n * \n * The booking attached to the CateringOrder is a special case used \n * mainly on the Concierge catering reports because someone created \n * a bad pattern to save catering changes to the booking. \n * \n * Avoid when possible.\n */\n public booking: Booking = null;\n\n /**\n * Catering specific fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Whether the order status change is loading */\n public loading: boolean;\n /** Unique ID for the catering order */\n readonly id: string;\n /** Number of minutes after the start of the associated meeting to delivery the order */\n readonly delivery_time: number = 0;\n /** Status of the catering order */\n readonly status: CateringOrderStatus;\n /** Whether items in the order need to be prepared in the kitchen */\n readonly kitchen: boolean;\n /** Whether items in the order are in the pantry */\n readonly pantry: boolean;\n /** List of items */\n readonly items: readonly (CateringItem | CateringCategory)[] = [];\n /** Creation time of the order */\n readonly created_at: number;\n /** Charge code associated with the order */\n readonly charge_code: string;\n /** Notes associated with the order */\n readonly notes: string;\n // /** Mapping of properties to their changes */\n // private _changes: HashMap = {};\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n /** Currency code for the location of the order */\n public symbol: string;\n /** Whether the is an error with the order */\n public error: boolean;\n\n\n constructor(data: HashMap) {\n /** \n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = DateNow(new Date());\n // now rounded to the next 5 minute increment\n const defaultStartTz = nowTz.setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n\n this.id = data.id || `order-${Math.floor(Math.random() * 999_999_999)}`;\n\n // If the booking is provided default the booking values to the true booking values\n this.booking = data.booking || null;\n\n \n // Has a booking so init with those values\n if (this.hasBookingAttached) {\n this.booking_date = this.booking.startDateTz.ms;\n this.booking_timezone = this.booking.timezone;\n this.bookingDateTz = this.booking.startDateTz;\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n } else {\n this.booking_date = data.booking_date || defaultStartTz.ms;\n this.booking_timezone = data.booking_timezone || defaultLocalTimezone;\n this.bookingDateTz = new DateTZ({ date: this.booking_date, is_local_tz: false, building_tz: this.booking_timezone });\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n }\n \n this.delivery_time = typeof data.delivery_time === 'number' ? data.delivery_time : 0;\n this.status = data.status || 'accepted';\n this.charge_code = data.charge_code || data.code;\n this.notes = data.notes;\n this.kitchen = data.kitchen instanceof Array ? !!data.kitchen.length : data.kitchen;\n this.pantry = data.pantry instanceof Array ? !!data.pantry.length : data.pantry;\n this.symbol = data.symbol || 'USD';\n this.items = (data.items || [])\n .map(item => (item.items ? new CateringCategory(item) : new CateringItem(item)))\n .filter(item => !!item.amount);\n }\n\n /** Special Case, check if a full booking is attached */\n public get hasBookingAttached(): boolean {\n return !!this.booking;\n }\n\n /** Display string for the types of items in the order */\n public get type(): string {\n let type = '';\n /* istanbul ignore else */\n if (this.kitchen) type += 'Kitchen';\n /* istanbul ignore else */\n if (this.pantry) {\n /* istanbul ignore else */\n if (type) type += ' + ';\n type += 'Pantry';\n }\n return type;\n }\n\n /** Total cost of the order */\n public get total(): number {\n return this.items.reduce((total, item) => total + (item.total || 0), 0);\n }\n\n /** Total number of items in the order */\n public get item_count(): number {\n return this.items.reduce((total, item) => total + (item.amount || 0), 0);\n }\n\n public get deliver_date(): DateTZ {\n return (this.bookingDateTz || this.booking?.startDateTz).addValue({ minutes: this.delivery_time })\n }\n\n /** Display string for the delivery time of the order (short version) */\n public get deliver_at(): string {\n return this.deliver_date.formatDate('h:mm a');\n }\n\n /** Display string for the delivery time of the order */\n public get deliver_at_time(): string {\n return this.deliver_date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Display string for the delivery date of the order */\n public get deliver_on_date(): string {\n return this.deliver_date.formatDate('dd MMM yyyy');\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): CateringOrder {\n return new CateringOrder(this.toJSON());\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringOrder): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._server_names;\n // Remove local public members\n delete obj.booking;\n delete obj.loading;\n delete obj.bookingDateTz;\n\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substr(1)] || key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n\n return obj;\n }\n}\n","import { CateringItem } from './catering-item.class';\n\nexport const mergeCateringItemWithFormData = (existing: CateringItem, override: any) =>\n new CateringItem({\n ...(existing instanceof CateringItem ? existing.toJSON() : existing),\n ...override\n });\n","export * from './catering-item.class';\nexport * from './catering-category.class';\nexport * from './catering-menu.service';\nexport * from './catering-order.class';\nexport * from './catering-categories.service';\nexport * from './catering-items.service';\nexport * from './catering.utilities';\nexport * from './catering-notes.service';\n","import { Injectable } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloseDialogService {\n private dialogRefMap = new Map>();\n\n constructor() { }\n\n // Register a dialog with its ID\n registerDialog(id: string, dialogRef: MatDialogRef): void {\n this.dialogRefMap.set(id, dialogRef);\n }\n\n // Close a specific dialog by ID\n closeDialog(id: string): void {\n const dialogRef = this.dialogRefMap.get(id);\n if (dialogRef) {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n }\n }\n\n // Optional: Close all dialogs\n closeAllDialogs(): void {\n this.dialogRefMap.forEach((dialogRef, id) => {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n });\n }\n}\n\nexport enum DialogIds {\n MeetingDetails = 'meetingDetailsDialogId',\n BookingConfirmation = 'bookingConfirmationDialogId',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CollapseService {\n private collapseSubject = new BehaviorSubject(false);\n collapse$ = this.collapseSubject.asObservable();\n\n collapsePanel() {\n this.collapseSubject.next(false);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class DataCommonModule {}\n","import { Injectable } from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subscription\n} from 'rxjs';\n\nimport {\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\n/** List of keys that cannot be in a combination by themselves or with each other */\nconst INVALID_STANDALONE_KEYS: string[] = ['control', 'shift', 'alt', 'meta', 'os'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HotkeysService {\n /** Map of subjects which store press states of keys */\n private keydown_states: HashMap> = {};\n /** Map of obserers for key state subjects */\n private keydown_observers: HashMap> = {};\n /** List of keys at the end of a combination */\n private combo_end: string[] = [];\n /** List of registered hotkey combinations */\n private registered_combos: string[][] = [];\n /** Counter for the number of keydown events. Used for checking order of key presses */\n private counter: number = 0;\n /** Last key code to be pressed */\n private last_down: string;\n\n constructor() {\n window.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.last_down !== code) {\n /* istanbul ignore else */\n if (!this.keydown_states[code]) {\n this.keydown_states[code] = new BehaviorSubject(null);\n this.keydown_observers[code] = this.keydown_states[code].asObservable();\n }\n this.keydown_states[code].next(++this.counter);\n /* istanbul ignore else */\n if (this.combo_end.indexOf(code) >= 0) {\n event.preventDefault();\n }\n this.last_down = code;\n }\n });\n\n window.addEventListener('keyup', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.keydown_states[code]) {\n this.keydown_states[code].next(null);\n }\n /* istanbul ignore else */\n if (this.last_down === code) {\n this.last_down = null;\n }\n });\n }\n\n /**\n * Listen to the given key combination\n * @param combo Array of key codes to listen to or a hotkey string e.g. `Alt+Shift+KeyK`\n * @param next Callback for combination presses\n */\n public listen(combo: string | string[], next: () => void): Subscription {\n combo = (combo instanceof Array ? combo : combo.split('+'));\n const combination: string[] = combo.map(i => this.mapKey(i.toLowerCase()));\n /* istanbul ignore else */\n if (combination.length > 0 && this.validCombination(combination)) {\n this.registered_combos.push(combination);\n const last_key = combination[combination.length - 1];\n /* istanbul ignore else */\n if (!this.keydown_states[last_key]) {\n this.keydown_states[last_key] = new BehaviorSubject(null);\n this.keydown_observers[last_key] = this.keydown_states[last_key].asObservable();\n }\n this.updateCombinationEndList();\n return this.keydown_observers[last_key].subscribe((count) => {\n /* istanbul ignore else */\n if (count) {\n const presses: number[] = [];\n /* istanbul ignore else */\n if (combination.length > 0) {\n // Check that keys are pressed\n for (const key of combination) {\n const state = this.keydown_states[key];\n presses.push(state ? state.getValue() || -1 : -1);\n }\n // Check that keys are pressed in the correct order\n for (let i = 0; i < combination.length - 1; i++) {\n if (presses[i] > presses[i + 1]) {\n return;\n }\n }\n }\n const total = presses.reduce((a, v) => a + (v > 0 ? 1 : -1), 0);\n /* istanbul ignore else */\n if (total >= combination.length) {\n next();\n }\n }\n });\n }\n return null;\n }\n\n /**\n * Map key codes with multiple versions to simple form\n * @param code Code to transform\n */\n private mapKey(code: string): string {\n /* istanbul ignore else */\n if (code.indexOf('alt') >= 0 || code.indexOf('shift') >= 0 || code.indexOf('control') >= 0) {\n return code.replace('left', '').replace('right', '');\n }\n return code;\n }\n\n /**\n * Update the list of the last keys in combinations to allow for prevent default actions on pre-existing hotkeys\n */\n private updateCombinationEndList(): void {\n const key_list = [];\n for (const combo of this.registered_combos) {\n this.combo_end.push(combo[combo.length - 1]);\n }\n this.combo_end = unique(key_list);\n }\n\n /**\n * Checks if the given hotkey combination is allowed and valid\n * @param combo Array of key codes\n */\n private validCombination(combo: string[]): boolean {\n let non_meta = 0;\n for (const key of combo) {\n /* istanbul ignore else */\n if (INVALID_STANDALONE_KEYS.indexOf(key) < 0) {\n non_meta++;\n }\n }\n return non_meta > 0;\n }\n}\n","export * from './location.class';\nexport * from './location.service';\n","import { HashMap } from '@mckinsey-converge/base';\n\nimport { Organisation } from '../organisation/organisation.class';\nimport {\n ServiceLike,\n ServiceManager\n} from '../service-manager.class';\nimport { BuildingLevel } from '../organisation/level.class';\n\nexport class MapLocation {\n /** ID of the element on the associated map */\n public readonly id?: string;\n /** Name of the location */\n public readonly name?: string;\n /** X coordinate of the location */\n public readonly x?: number;\n /** Y coordinate of the location */\n public readonly y?: number;\n /** Level details for the location */\n public readonly level: BuildingLevel;\n /** Whether the position is fixed */\n public readonly fixed: boolean;\n /** Accuracy of the location when not fixed */\n public readonly confidence?: number;\n /** Whether location is at a desk */\n public readonly at_desk?: boolean;\n /** Whether location is set */\n public readonly empty: boolean;\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(MapLocation);\n }\n\n /** Display string for the building and level of the location */\n public get display(): string {\n const service = ServiceManager.serviceFor(Organisation);\n if (!service) {\n return this.level.name;\n }\n const bld = service.buildings.find((bld) => bld.id === this.level.building_id);\n return bld ? `${bld.name}, ${this.level.name}` : this.level.name;\n }\n\n /** Whether location is in a different building from the active one */\n public get in_another_building(): boolean {\n const service = ServiceManager.serviceFor(Organisation);\n return service && service.building.id !== this.level.building_id;\n }\n\n constructor(raw_data: HashMap) {\n this.id = raw_data.id || raw_data.map_id || raw_data.desk_id;\n this.name = raw_data.name || '';\n this.x = raw_data.x\n ? Math.floor(this.normalise(raw_data.x, raw_data.x_max || 10000) * 10000)\n : null;\n this.y = raw_data.y\n ? Math.floor(this.normalise(raw_data.y, raw_data.x_max || 10000) * 10000)\n : null;\n const service = ServiceManager.serviceFor(Organisation);\n this.level =\n raw_data.level instanceof BuildingLevel\n ? raw_data.level\n : service\n ? service.levelWithID(raw_data.level)\n : new BuildingLevel(raw_data.level);\n this.fixed = this.x === null && this.y === null;\n this.confidence = Math.max(5, Math.min(15, raw_data.confidence || 0));\n this.at_desk = this.id && this.id.indexOf('area-') === 0;\n this.empty = !(this.name && this.level && (this.id || this.x || this.y));\n }\n\n /** Normalise the given value within the max */\n private normalise(value: number, max: number): number {\n return value / (max * 1.0);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { MapLocation } from './location.class';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocationService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(MapLocation, this);\n this._name = 'Location';\n this._api_route = 'people';\n }\n\n public add(...args): never {\n throw new Error('Create not allowed for location service')\n }\n\n public update(...args): never {\n throw new Error('Update not allowed for location service')\n }\n\n public delete(...args): never {\n throw new Error('Delete not allowed for location service')\n }\n\n public process(item: HashMap) {\n return new MapLocation(item) as any;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { BookingRule } from '../bookings';\nimport { ServiceManager } from '../service-manager.class';\n\nexport interface BuildingCity {\n timezone: string\n name: string\n}\n\nexport interface IBuildingRoleUser {\n name: string;\n email: string;\n phone: string;\n}\n\nexport interface LockerMap {\n [zone: string]: {\n [area: string]: {\n [type: string]: (string | boolean)[][];\n };\n };\n}\n\nexport interface ICoordinates {\n longitude: number;\n latitude: number;\n}\n\nexport interface LevelFeature {\n id: string;\n level_id: string;\n name: string;\n}\n\nexport interface BookingRuleDetails {\n /** List of booking rules details for the building */\n readonly rules: readonly string[];\n /** Custom booking rules for the map */\n readonly map_rules?: readonly string[];\n /** Custom booking rules for the map */\n readonly other_rules?: readonly string[];\n /** Contact email address for the building */\n readonly contact?: string;\n /** Information string to display before the rule listings */\n readonly info?: string;\n /** Link for more details */\n readonly link?: { url?: string, name?: string };\n /**\n * Allow buildings to define their own rules formats where needed or for special messages.\n */\n readonly custom_html?: string;\n}\n\nexport class Building extends BaseDataClass {\n /** Service for managing buildings */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Engine Zone ID for the building */\n public readonly zone_id: string;\n /** Organisation Code for the building */\n public readonly code: string;\n /** Geographical address of the building */\n public readonly address: string;\n /** Details about the booking rules for the building */\n public readonly booking_details: BookingRuleDetails;\n /** Details about the booking rules for the building */\n public readonly booking_rules: HashMap;\n /** Number of hour before a booking catering is restricted */\n public readonly catering_restricted_from: number;\n /** Currency code for the country assoicated with the building */\n public readonly currency: string;\n /** Map of fields that are required on the form */\n public readonly required: HashMap;\n /** IANA timezone database string for the location the building resides */\n public readonly timezone: string;\n /** Whether catering is available in this building */\n public readonly has_catering: boolean;\n /** ID of the system used for the holding bay */\n public readonly holding_bay: string;\n /** ID of the system used for standalone visitors bookings */\n public readonly visitor_space: string;\n /** List of zones to determine sort order spaces */\n public readonly sort_order: readonly string[];\n /** Searchable map features */\n public readonly searchables: readonly LevelFeature[];\n /** List of available extras for the building */\n public readonly extras: readonly Identity[];\n /** List of available extra equipment for loan at the building */\n public readonly loan_items: readonly Identity[];\n /** List of available levels for the building */\n public readonly levels: readonly BuildingLevel[];\n /** The city the building belongs in **/\n public readonly city: string;\n\n public readonly catering_hours: { readonly start: number, readonly end: number };\n /** Map of custom settings for the building */\n private _settings: HashMap;\n /** Map of roles and list of the associated users */\n private _roles: HashMap;\n /** Map of the locker ID arrays */\n private _lockers: LockerMap;\n /** Map of important system ids for the building */\n private _systems: HashMap;\n /** Map of important phone numbers for the building */\n private _phone_numbers: HashMap;\n /** Globe coordiates for the build */\n private _location: ICoordinates;\n /** List of zones associated with the building */\n public readonly zones: readonly string[];\n\n constructor(raw_data: HashMap) {\n super(raw_data);\n const settings = raw_data.settings || {};\n const disc_info = settings.discovery_info || {};\n this.zone_id = raw_data.zone_id || raw_data.zone;\n this.extras = (raw_data.extras || disc_info.extras || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.loan_items = (raw_data.loan_items || disc_info.loan_items || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.levels = (raw_data.levels || disc_info.levels || []).map(i => new BuildingLevel({\n ...i,\n building_id: this.id\n }));\n this._roles = raw_data.roles || disc_info.roles || {};\n this._lockers = raw_data.lockers || raw_data.locker_structure || disc_info.locker_structure || {};\n this._systems = raw_data.systems || disc_info.systems || {};\n this._settings = settings;\n this._phone_numbers = raw_data.phone_numbers || disc_info.phone_numbers || {};\n this._location = raw_data.location || disc_info.location || { longitude: null, latitude: null };\n this.catering_hours = raw_data.catering_hours || disc_info.catering_hours || settings.catering_hours || {\n start: 7,\n end: 20\n };\n const searchables = [];\n if (raw_data.neighbourhoods) {\n for (const lvl in raw_data.neighbourhoods) {\n if (raw_data.neighbourhoods.hasOwnProperty(lvl)) {\n const lvl_features = raw_data.neighbourhoods[lvl] || {};\n for (const feature in lvl_features) {\n if (lvl_features.hasOwnProperty(feature)) {\n searchables.push({\n id: lvl_features[feature],\n name: feature,\n level_id: lvl\n });\n }\n }\n }\n }\n }\n this.searchables = searchables;\n this.code = raw_data.code || disc_info.code || settings.code || '';\n this.address = raw_data.address || disc_info.address || settings.address || '';\n this.booking_details = raw_data.booking_details || disc_info.booking_details || settings.booking_details || {};\n this.booking_rules = raw_data.booking_rules || disc_info.booking_rules || settings.booking_rules || {};\n this.catering_restricted_from = raw_data.catering_restricted_from || disc_info.catering_restricted_from || settings.catering_restricted_from || 0;\n this.currency = raw_data.currency || disc_info.currency || settings.currency || 'USD';\n this.required = raw_data.required || disc_info.required || settings.required || {};\n if (disc_info.requires_equipment_code) {\n this.required.equipment_code = true;\n }\n if (disc_info.requires_expected_attendees) {\n this.required.expected_attendees = true;\n }\n this.timezone = raw_data.timezone || disc_info.timezone || settings.timezone || '';\n this.has_catering = raw_data.has_catering || disc_info.has_catering || settings.has_catering || false;\n this.holding_bay = raw_data.holding_bay || disc_info.holding_bay || settings.holding_bay || '';\n this.visitor_space = raw_data.visitor_space || disc_info.visitor_space || settings.visitor_space || '';\n this.sort_order = raw_data.sort_order || disc_info.sort_order || settings.sort_order || [];\n this.city = raw_data.city || disc_info.city || 'No City';\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings) || getItemWithKeys(['discovery_info', ...keys], this._settings);\n return value;\n }\n\n /**\n * Get list of users with the associated role\n * @param name Role to find users for\n */\n public role(name: string): IBuildingRoleUser[] {\n return [...(this._roles[name] || [])];\n }\n\n /**\n * Get list of the names of available user role lists\n */\n public get role_names(): string[] {\n return Object.keys(this._roles).filter(i => this._roles.hasOwnProperty(i));\n }\n\n /** Map of the locker ID arrays */\n public get lockers(): LockerMap {\n return { ...(this._lockers || {}) };\n }\n\n /** Map of important system ids for the building */\n public get systems(): HashMap {\n return { ...(this._systems || {}) };\n }\n\n /** Map of important phone numbers for the building */\n public get phone_numbers(): HashMap {\n return { ...(this._phone_numbers || {}) };\n }\n\n /** Real coordinates */\n public get location(): ICoordinates {\n return { ...this._location };\n }\n\n /**\n * Get search map feature for the given level ID\n * @param level_id ID of level to grab features for\n */\n public featuresForLevel(level_id: string): LevelFeature[] {\n return (this.searchables || []).filter(i => i.level_id === level_id);\n }\n\n /**\n * Building objects are readonly and cannot be changed\n */\n public async save(): Promise {\n throw new Error('Building objects are readonly and cannot be changed');\n }\n\n /**\n * Building objects are readonly and cannot be deleted\n */\n public async delete(): Promise {\n throw new Error('Building objects are readonly and cannot be deleted');\n }\n}\n","export * from './building.class';\nexport * from './level.class';\nexport * from './organisation.class';\nexport * from './organisation.service';\n","import { HashMap } from 'libs/base/src/lib/types.utilities';\n\n/** Building Level data */\nexport class BuildingLevel {\n /** ID of the building level zone */\n readonly id: string;\n /** ID of the building zone associated with the level */\n readonly building_id: string;\n /** Name of the level */\n readonly name: string;\n /** Number or short identifier of the level */\n readonly short_name: string;\n /** Map URL for the level */\n readonly map_url: string;\n /** Usage type for the level */\n readonly type: 'staff' | 'client' | 'any';\n /** Setting for the level */\n readonly settings: HashMap;\n\n constructor(_data: HashMap = {}) {\n this.id = _data.id || _data.level_id || '';\n this.building_id = _data.bld_id || _data.building_id || '';\n this.name = _data.name || _data.level_name || '';\n const lower_name = this.name.toLowerCase();\n const num = lower_name.indexOf('level') >= 0 ? lower_name.replace(/ ?level ?/gi, '') : lower_name.substr(0, 1).toUpperCase();\n this.short_name = _data.short_name || num || '';\n this.map_url = _data.map_url || '';\n this.type = _data.type || _data.floor_type || 'any';\n this.settings = _data.settings;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap\n} from '@mckinsey-converge/base';\n\n/* istanbul ignore next */\n\nexport class Organisation extends BaseDataClass {\n /** List of available building zone ids for the organisation */\n public readonly available_buildings: readonly string[];\n /** Map of custom settings for the building */\n private _settings: HashMap;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this._settings = raw_data.settings || {};\n this.available_buildings = (raw_data.settings?.discovery_info?.buildings || []).map(\n (bld) => bld.zone_id\n );\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings);\n return value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { Organisation } from './organisation.class';\nimport { Building } from './building.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { first } from 'rxjs/operators';\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { UsersService } from '../users';\nimport { SettingsService } from '../settings.service';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganisationService extends BaseAPIService {\n /** Organisation data for the application */\n private _organisation: Organisation;\n /** Actively displayed building */\n private _active_building: string;\n\n private _spaceTypesSubject: Subject = new Subject();\n\n constructor(\n protected _composer: ComposerService,\n private _service: ApplicationService,\n private _users: UsersService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Organisation, this);\n ServiceManager.setService(Building, this);\n this._name = 'Organisation';\n this._api_route = 'zones';\n this.set('buildings', []);\n this.set('active_building', null);\n this._users.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /**\n * Add is not available on organisation service\n */\n public async add(form_data: HashMap, query_params?: HashMap): Promise {\n throw new Error('Add is not available on the organisation service');\n }\n\n /**\n * Update is not available on organisation service\n */\n public async update(\n id: string,\n form_data: HashMap,\n query_params?: HashMap\n ): Promise {\n throw new Error('Update is not available on the organisation service');\n }\n\n /**\n * Delete is not available on organisation service\n */\n public async delete(id: string): Promise {\n throw new Error('Delete is not available on the organisation service');\n }\n\n /**\n * Get list of levels for the given building ID\n * @param bld_id Building ID\n */\n public levels(bld_id: string): readonly BuildingLevel[] {\n return (this.buildings.find((i) => i.id === bld_id) || ({} as Building)).levels;\n }\n\n /**\n * Get a setting from the organisation or active building\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string) {\n return this.building.setting(key) || this._organisation.setting(key);\n }\n\n /** Active building */\n public get building(): Building {\n return this.buildings.find((i) => i.id === this._active_building);\n }\n\n /** List of types of spaces */\n public get space_types(): Identity[] {\n return this.get('space_types') || [];\n }\n\n public set building(bld: Building) {\n if (bld instanceof Building) {\n this._active_building = bld.id;\n } else {\n this._active_building = bld;\n }\n this.set('active_building', this.building);\n this.loadSpaceTypes();\n localStorage.setItem('PlaceOS.building', this._active_building);\n localStorage.setItem('CONCIERGE.timezone', bld.timezone);\n }\n\n /** List of buildings for the organisation */\n public get buildings(): Building[] {\n return this.get('buildings') || [];\n }\n\n /**\n * Get list of available equipment\n * @param id ID of the building to get the list from. i.e. Defaults to the active building\n */\n public getExtras(id: string, bld_id?: string) {\n const bld = this.buildings.find((i) => i.id === bld_id) || this.building;\n if (bld && id) {\n return bld.extras.filter((i) => `${i.id}`.indexOf(id) >= 0);\n }\n return [];\n }\n\n /**\n * Get the first level matching the list of given IDs\n * @param ids List of ID to search with\n */\n public levelWithID(ids: string | string[]): BuildingLevel {\n const list = ids instanceof Array ? ids : [ids];\n const bld_list = this.buildings;\n for (const id of list) {\n for (const bld of bld_list) {\n for (const lvl of bld.levels) {\n if (lvl.id === id) {\n return lvl;\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Initialise service data\n */\n protected async load(): Promise {\n /* istanbul ignore else */\n if (localStorage) {\n this._active_building = localStorage.getItem(`${this.settingsService.frontend.toUpperCase()}.building`);\n }\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.organisation = { message: 'Loading organisation data', state: 'loading' };\n await this.loadOrganisation();\n loading.organisation = { message: 'Loading organisation data', state: 'complete' };\n loading.buildings = { message: 'Loading building data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadBuildings();\n loading.buildings = { message: 'Loading building data', state: 'complete' };\n loading.levels = { message: 'Loading building floor data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadLevels();\n loading.levels = { message: 'Loading building floor data', state: 'complete' };\n this._service.set('loading', loading);\n loading.space_types = { message: 'Loading space type data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadSpaceTypes();\n loading.space_types = { message: 'Loading space type data', state: 'complete' };\n this._service.set('loading', loading);\n const user = this._users.current;\n\n if (user) {\n const id = localStorage.getItem('PlaceOS.building');\n const building = this.buildings.find(bld => id && bld.id === id) || this.buildings.find((bld) => bld.code === user.location);\n if (building) {\n this._active_building = building.id;\n this.set('active_building', building);\n } else if(this.building) {\n // This conditional solves a problem of infinite loop when user building doesn't exist.\n this._active_building = this.building.id;\n this.set('active_building', this.building);\n }\n }\n }\n\n /**\n * Load organisation data for application\n */\n public async loadOrganisation(): Promise {\n const org_data = await this.query({ tags: 'org', engine: true });\n this._organisation = new Organisation(org_data[0]);\n this.set('organisation', this._organisation);\n return this._organisation;\n }\n\n /**\n * Load building data for the organisation already stored in the service..\n */\n public async loadBuildings(): Promise {\n return this.loadBuildingsWithOrg(this._organisation);\n }\n\n /**\n * Load building data for the organisation passed.\n */\n public async loadBuildingsWithOrg(organisation: Organisation): Promise {\n const bld_data = await this.query({ tags: 'building', engine: true, limit: 1000 });\n const buildings = (bld_data as HashMap[])\n .map((i) => new Building(i))\n .filter((bld) => organisation.available_buildings.includes(bld.id));\n this.set('buildings', buildings);\n /* istanbul ignore else */\n if (!this._active_building && buildings && buildings.length > 0) {\n this._active_building = buildings[0].id;\n }\n return buildings;\n }\n\n /**\n * Load level data for the buildings\n */\n public async loadLevels(): Promise {\n const lvl_data = await this.query({ tags: 'level', engine: true, limit: 1000 });\n const levels = (lvl_data as HashMap[]).map((i) => new BuildingLevel(i));\n this.set('levels', levels);\n return levels;\n }\n\n /**\n * Load space type data for the buildings\n */\n public async loadSpaceTypes(): Promise {\n const type_data = await this.query({ tags: 'room', engine: true, limit: 1000, building_id: this._active_building });\n const types = (type_data as HashMap[]).map((i) => ({ id: i.id, name: i.name }));\n this.set('space_types', types);\n // Emit the updated space_types\n this._spaceTypesSubject.next(types);\n }\n\n /**\n * Observable to listen for changes in space_types\n */\n public get spaceTypesObservable(): Observable {\n return this._spaceTypesSubject.asObservable();\n }\n\n public getOrganizationFiltersByRoomType(key: string) {\n if (!this._organisation) {\n return {}\n }\n const discovery_info = this._organisation.setting('discovery_info')\n\n return discovery_info && discovery_info[key] ? discovery_info[key] : {}\n }\n\n public getRoomTypeSubsetDDOptions(type:string) {\n const filters = this.getOrganizationFiltersByRoomType(type) || {}\n return [...Object.keys(filters).map((key) => {\n const display = filters[key].toString();\n return {\n display,\n value: key,\n meta: {}\n }\n }) ];\n }\n\n\n\n /**\n * The function will generate filter options, excluding London. London has its own set of options as per the request. \n * The filter options pertain to a subset of room type options managed by the room admin module.\n * @returns filterOptions: filter options for day view space type filter\n */\n public getRoomFilterOptionsPerLocation() {\n let internalSubSet = this.getRoomTypeSubsetDDOptions('internal_room_types');\n if(this.building.name.toLowerCase().includes('london')) {\n internalSubSet = internalSubSet.filter(e => !e.value.includes('meeting') && !e.value.includes('partner') );\n }\n const filterOptions = [];\n internalSubSet.forEach(el => filterOptions.push({name: el.display, id: el.value} ) ); \n return filterOptions\n }\n\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseAPIService } from './base.service';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class PaginatedAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}, config: { url?: string } = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = query_params.cache || 1000;\n delete query_params.cache;\n }\n const query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = config && config.url ? `${config.url}${query ? '?' + query : ''}` : `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: IEngineResponse;\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * \n * @param query_params \n * @param config \n * @returns \n */\n queryHoldingBay(query_params: HashMap = {}, config: { url?: string } = {}):Observable {\n const query = toQueryString(query_params);\n const url = `${config.url}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );\n }\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse{\n let result: IEngineResponse;\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n return result;\n }\n \n\n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => {\n result = this.process(d); \n },\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { FormGroup } from \"@angular/forms\";\nimport { HashMap } from \"@mckinsey-converge/base\"\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\n\nexport enum RecurrencePeriod {\n LIST = 'list',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n //RELATIVE_MONTHLY = 'relativeMonthly', for the moment we will only support absoluteMonthly\n ABSOLUTE_MONTHLY = 'monthly'\n}\n\nexport enum DaysOfWeek {\n SUNDAY = 'sunday',\n MONDAY = 'monday',\n TUESDAY = 'tuesday',\n WEDNESDAY = 'wednesday',\n THURSDAY = 'thursday',\n FRIDAY = 'friday',\n SATURDAY = 'saturday'\n\n}\n\nexport enum SeriesAction {\n EDIT = 'edit',\n CLONE = 'clone'\n}\n\nexport enum BookingAction {\n CLONE = 'booking_clone',\n EDIT = 'booking_edit'\n}\n\nexport interface WeekDays {\n id: string;\n active: boolean;\n day_index: number;\n full_name: string;\n}\n\nexport interface RepeatPeriod {\n id: RecurrencePeriod;\n label: string\n}\n\nexport enum RepeatsOn {\n PATTERN = 'pattern',\n DATE = 'date'\n}\n\nexport interface RecurrenceType {\n type: RepeatsOn;\n label: string;\n}\n\nexport interface RecurrenceDetails {\n period: RecurrencePeriod,\n end: DateTZ,\n list: Array\n interval: number\n}\n\nexport interface RecurrenceRecurringDetails extends RecurrenceDetails {\n start: number\n}\n\nexport const recurrencePeriodToDurationType = (period: RecurrencePeriod) =>{\n switch (period) {\n case RecurrencePeriod.DAILY:\n return 'days'\n case RecurrencePeriod.WEEKLY:\n return 'weeks' \n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return 'months' \n default:\n return 'days'\n }\n}\n\n/**\n * Generate weekdays from monday to saturday\n */\nexport const generateWeekDays = (date: number, params: { building_tz?: string } = {}): Array=> {\n const { building_tz } = params;\n let start_week = DateNow(new Date()).startOfValue('week').addValue({days : 1}); //set monday as start of week\n const week_days: Array = []\n for (let i = 1; i <= 7; i++) {\n const activeDate = new DateTZ({date, building_tz, is_local_tz: false })\n const active = activeDate.dateWeekday === i\n const full_name = start_week.formatDate('EEEE')\n const day_index = i === 7 ? 0 : i //Sunday must be indexed as day 0\n week_days.push({id: full_name.substring(0, 1), active, day_index, full_name: full_name.toLocaleLowerCase()});\n start_week = start_week.addValue({ days : 1 });\n }\n return week_days\n}\n\nexport const getFirstDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isBeforeDate(b) ? a : b; });\n}\n\nexport const getLastDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isAfterDate(b) ? a : b; });\n}\n\nexport const recurrenceDetails = (recurr: RecurrenceDetails): string => {\n const end = getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `Occurs Every ${period} until ${end}`\n }else{\n return `Occurs Every ${recurr.interval} ${period}s until ${end}`\n }\n } \n \n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `Occurs on Specific Dates until ${getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')}`\n default:\n return ''\n }\n}\n\nexport const recurrenceRecurringDetails = (recurr: RecurrenceRecurringDetails): string => {\n const end = recurr.end\n const start = new DateTZ({ date: recurr.start })\n\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `occurs every ${period} effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }else{\n return `occurs every ${recurr.interval} ${period}s effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }\n }\n\n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `occurs on Specific Dates`\n default:\n return ''\n }\n}\n\nexport const handleRecurrenceFields = (data: HashMap) => {\n if(data.is_recurrent){\n if(data.recurrence_period !== RecurrencePeriod.LIST){\n delete data.recurrence_starts\n delete data.recurrence_endTz\n if(data.recurrence_period !== RecurrencePeriod.WEEKLY){\n delete data.recurrence_days\n }\n } else if(data.recurrence_period){\n data.recurrence_list = [...(data.recurrence_starts || []).map((date: DateTZ) => date.startOfValue('minute').seconds)]\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.recurrence_days\n }\n delete data.is_recurrent\n }else{\n delete data.recurrence_period;\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.is_recurrent\n delete data.recurrence_exceptions\n delete data.recurrence_days\n }\n\n return data\n}\n\n/** Removes expired occurrences and updates start and end dates when cloning a series */\nexport const removeExpiredOcurrences = (form: FormGroup) =>{\n if(form.controls.action?.value === SeriesAction.CLONE ){\n const tz = form.controls.space_list.value[0].timezone\n const date_now = new DateTZ({ is_local_tz: false, building_tz: tz });\n const occurrences = form.controls.recurrence_starts.value.filter((date: DateTZ) =>\n date_now.isBeforeDate(date, 'day') || date_now.isSameDate(date, 'day')\n )\n form.controls.recurrence_starts.setValue(occurrences)\n const { start, end } = setStartAndEndDateFromArray(occurrences, tz)\n form.controls.dateTz.setValue(start)\n form.controls.recurrence_endTz.setValue(end)\n }\n}\n\n/** \n * Returns starts and end dates from an array of dates in milliseconds \n **/\n export const setStartAndEndDateFromArray = (dates: Array, tz: string): {start: DateTZ, end: DateTZ} =>{\n if(dates.length !== 0){\n return {\n start: dates.sort((d1, d2) => d1.ms - d2.ms)[0] ,\n end: dates.sort((d1, d2) => d2.ms - d1.ms)[0]\n }\n }\n //if the dates array is empty set the start and end dates as the current and next day\n const now = DateNow(new Date()).toZone(tz)\n return {start: now, end: now.addValue({days: 1})}\n}\n\nexport const setRecurrenceStartsTime = (form: FormGroup) => {\n const { recurrence_starts, dateTz } = form.value\n const list = (recurrence_starts || []).map((date: DateTZ) => date.setValue({hour: dateTz.dateHour, minute: dateTz.minutes}))\n form.controls.recurrence_starts.setValue(list)\n}","export * from './report.class'\nexport * from './reports.service'\n","import { CurrencyPipe } from '@angular/common';\n\nimport {\n csvToJson,\n downloadFile,\n HashMap,\n humaniseDuration,\n jsonToCsv,\n} from '@mckinsey-converge/base';\n\nimport { ServiceManager } from '../service-manager.class';\nimport { Space } from '../spaces';\nimport { Organisation } from '../organisation';\n\nexport class Report {\n /** Type of report */\n public readonly type: string;\n /** List of data associated with the report */\n public readonly data: T[];\n\n constructor(raw_data: HashMap = {}) {\n this.type = raw_data.type || '';\n this.data = this.cleanData(raw_data.data);\n }\n\n /** Create report data structure from CSV */\n public static fromCSV(type: string, data: string): Report {\n const csv_json = csvToJson(data);\n return new Report({ type, data: csv_json });\n }\n\n /** Download report data as CSV format */\n public downloadCSV(name: string = 'unnamed.csv'): void {\n downloadFile(name, jsonToCsv(this.data));\n }\n\n /** Download report data as JSON format */\n public downloadJSON(name: string = 'unnamed.json'): void {\n downloadFile(name, JSON.stringify(this.data, undefined, 4));\n }\n\n public formatCancelledBy(email: string) {\n if (email !== null && email !== undefined) {\n let name = email.split('@')[0];\n name = name.split('_').join(' '); //get name from email and convert it to title case\n name = name.replace(/\\w\\S*/g, function (txt) {\n return `${txt\n .charAt(0)\n .toUpperCase()}${txt.substr(1).toLowerCase()}`;\n });\n return name;\n } else {\n return email;\n }\n }\n\n public timeConverter( UNIX_timestamp: number ){\n if(!UNIX_timestamp) return '';\n let a = new Date(UNIX_timestamp * 1000);\n let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n let year = a.getFullYear();\n let month = months[a.getMonth()];\n let date = a.getDate();\n let hour = ((a.getHours() + 11) % 12 + 1);\n let suffix = a.getHours() >= 12 ? \"PM\":\"AM\";\n let min = a.getMinutes() === 0 ? '00':a.getMinutes();\n let time = date + ' ' + month + ' ' + year + ' - ' + hour + ':' + min + ' ' + suffix;\n return time;\n }\n\n private cleanData(data: T[] = []) {\n if (data.length > 0 && this.type === 'day') {\n for (let i = 0; i < data.length; i++) {\n data[i]['booker'] = data[i]['booker'].name;\n data[i]['expected_attendees'] = Object.values(data[i]['expected_attendees'])[0];\n }\n } else if (data.length > 0 && this.type === 'audit') {\n for (let i = 0; i < data.length; i++) {\n data[i]['created_at'] = this.timeConverter(data[i]['created_at']);\n }\n } else if (data.length > 0 && this.type === 'catering') {\n for (let i = 0; i < data.length; i++) {\n data[i]['Cancelled By'] = this.formatCancelledBy(\n data[i]['Cancelled By']\n );\n }\n const fields = Object.keys(data[0]);\n const room_field = fields.find(\n (key) =>\n key.toLowerCase().includes('room') &&\n key.toLowerCase().includes('email')\n );\n const price_field = fields.find((key) =>\n key.toLowerCase().includes('price')\n );\n\n for (let row of data) {\n /* istanbul ignore else */\n const space_service = ServiceManager.serviceFor(Space);\n if (room_field && price_field && space_service) {\n const room = space_service.find(\n row[room_field].toLowerCase()\n );\n const org_service = ServiceManager.serviceFor(Organisation);\n const bld = org_service.buildings.find(\n (bld: { id: any }) =>\n bld.id === room?.level?.building_id\n );\n row[price_field] = new CurrencyPipe('en_us').transform(\n row[price_field] / 100,\n bld?.currency\n );\n }\n /* istanbul ignore else */\n for (let field of fields) {\n row[field] =\n typeof row[field] === 'string'\n ? row[field].replace(/\\,/g, '٫')\n : row[field];\n }\n }\n } else if (this.type === 'bookings') {\n data = data.map((i: HashMap) => {\n const booking = i;\n try {\n if (booking.setup instanceof Object) {\n booking.setup = booking.setup[booking.room_email];\n }\n if (booking.breakdown instanceof Object) {\n booking.breakdown =\n booking.breakdown[booking.room_email];\n }\n booking.setup = humaniseDuration((booking.setup || 0) / 60);\n booking.breakdown = humaniseDuration(\n (booking.breakdown || 0) / 60\n );\n booking.description = (booking.description || '')\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ');\n booking['Meeting Host'] =\n booking.organizer?.name || booking.organizer;\n booking['Booked By'] =\n booking.booked_by?.name ||\n booking.booked_by?.email ||\n '';\n booking.charge_code =\n booking.equipment_codes[booking.room_email] || '';\n // booking.expected_attendees = Object.keys(booking.expected_attendees).map(key => booking.expected_attendees[key]).join(', ');\n booking.attendees = (booking.attendees || [])\n .map((person) => person.name || person.email || person)\n .join('٫ ');\n booking.notes = (booking.notes || [])\n .map((note) =>\n note.author &&\n (note.type === 'description' ||\n note.type === 'private')\n ? `[${note.author}|${note.type}]${note.message\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ')}`\n : ''\n )\n .join(' | ');\n booking.cancelled = booking.isCancelled;\n booking.status = booking.status[booking.room_email] || '';\n booking.company = booking.company.join(', ');\n if (booking.cancelled_by) {\n booking.cancelled_by = this.formatCancelledBy(\n booking.cancelled_by\n );\n }\n booking.cancelled_date = this.timeConverter(booking.cancelled_at_epoch);\n\n } catch (e) {}\n const remove_fields = [\n 'id',\n 'icaluid',\n 'accepted_at',\n 'accepted_by',\n 'check_ins',\n 'changeKey',\n 'created',\n 'booking_type',\n 'edit_history',\n 'end_epoch',\n 'old_attendees',\n 'start_epoch',\n 'expected_attendees',\n 'isAllDay',\n 'isCancelled',\n 'body',\n 'is_free',\n 'lastModifiedDateTime',\n 'locationType',\n 'locations',\n 'organizer',\n 'booked_by',\n 'originalEndTimeZone',\n 'originalStartTimeZone',\n 'room_booking_status',\n 'room_email',\n 'room_emails',\n 'room_id',\n 'sensitivity',\n 'seriesMasterId',\n 'show_as',\n 'notes',\n 'subject',\n 'type',\n 'previous_booking',\n 'catering',\n 'responseStatus',\n 'equipment_codes',\n 'cancelled_at_epoch',\n ];\n for (const field of remove_fields) {\n if (booking[field] !== undefined) {\n delete booking[field];\n }\n }\n const output = {};\n const order = [\n 'title',\n 'start',\n 'end',\n 'location',\n 'Meeting Host',\n 'Booked By',\n 'booked_at',\n 'booked_ahead_by',\n 'all_day',\n 'attendees',\n 'company',\n 'description',\n 'cancelled',\n 'cancelled_by',\n 'cancelled_date',\n ];\n const keys = Object.keys(booking);\n keys.sort((a, b) => {\n const idx_a = order.indexOf(a);\n const idx_b = order.indexOf(b);\n return (\n (idx_a === -1 ? keys.length : idx_a) -\n (idx_b === -1 ? keys.length : idx_b)\n );\n });\n for (const key of keys) {\n output[key] = booking[key];\n }\n return output;\n }) as any;\n }\n return data;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { Report } from './report.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReportsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Reports';\n this._api_route = 'reports';\n }\n\n protected process(raw_data: any): Report {\n return raw_data instanceof Array\n ? new Report({ data: raw_data })\n : Report.fromCSV('', raw_data);\n }\n}\n","import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { HashMap } from '@mckinsey-converge/base';\n\n\nexport interface ServiceLike extends HashMap {\n parent: any;\n add: (_: HashMap) => Promise;\n update: (id: string, _: HashMap) => Promise;\n delete: (id: string, params?: HashMap) => Promise;\n task: (id: string, name: string, data: HashMap) => Promise;\n listen: (prop: string) => Observable;\n}\n\nexport interface ServiceProvider {\n provideFor: Type;\n useValue: T;\n}\n\nexport class ServiceManager {\n /** Map of available services for child classes */\n private static _service_list: ServiceProvider[] = [];\n\n /** Set the services used to handle data model requests */\n public static setService(type: Type, service: any): void {\n if (window.debug) {\n (window as any).ServiceManager = this._service_list;\n }\n const index = ServiceManager._service_list.findIndex(provider => provider.provideFor === type);\n if (index >= 0) {\n ServiceManager._service_list.splice(index, 1, { provideFor: type, useValue: service });\n } else {\n ServiceManager._service_list.push({ provideFor: type, useValue: service });\n }\n }\n\n /** Get the services used to handle data model requests */\n public static serviceFor(type: Type): ServiceLike {\n const provider = ServiceManager._service_list.find(provider => provider.provideFor === type) || { useValue: null };\n return provider.useValue;\n }\n\n constructor() {\n throw new Error('ServiceMananger is static class');\n }\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\n\nimport { VERSION } from '@mckinsey-converge/environment';\nimport {\n BaseClass,\n getItemWithKeys,\n HashMap,\n log\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from './service-manager.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ndeclare global {\n interface Window {\n debug: boolean;\n }\n}\n\nexport const SETTINGS_TOKEN = 'settings_service_data';\n\ntype SettingsAppData = T & {\n title: string;\n description: string;\n short_name: string;\n logo_light: {\n type: string;\n src: string;\n background: string;\n }\n logo_dark: {\n type: string;\n src: string;\n background: string;\n }\n heap_io: {\n app_id: number;\n force_ssl: boolean;\n secure_cookie: boolean;\n disable_text_capture: boolean;\n cookie_path: string;\n }\n}\n\nexport interface SettingsData {\n debug: boolean;\n mock: boolean;\n frontend: 'staff' | 'concierge' | 'booking';\n composer: {\n domain: string;\n route: string;\n protocol: string;\n port: string;\n use_domain: boolean;\n local_login: boolean;\n }\n app: SettingsAppData;\n}\n\nexport class SettingsObject {\n constructor(public data: SettingsData) {\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SettingsService extends BaseClass {\n /** Name of the application */\n private _app_name = 'Converge';\n /** List of override settings in order of priority */\n private _overrides = new BehaviorSubject([]);\n /** Mapping of behaviour subjects */\n private _subjects: HashMap> = {};\n /** Mapping of observables */\n private _observables: HashMap> = {};\n /** Which frontend we're in. staff, concierge, or bookings **/\n public readonly frontend: string;\n private _bypass_bookings: boolean = false;\n\n /**\n * @hidden\n */\n public set overrides(value: HashMap[]) {\n this._overrides.next(value);\n }\n\n /** Get observable for key */\n public listen(name: string): Observable {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n return this._observables[name];\n }\n\n /** Update observable value for key */\n public post(name: string, value: T): void {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n this._subjects[name].next(value);\n }\n\n public value(name: string): T {\n return !this._observables[name] ? null : this._subjects[name].getValue();\n }\n\n /** Page title */\n public get title() {\n return this._title.getTitle();\n }\n\n public set title(value: string) {\n this._title.setTitle(`${value} | ${this._app_name}`);\n }\n\n constructor(private _title: Title,\n @Inject(SETTINGS_TOKEN)\n private settings: SettingsObject) {\n super();\n ServiceManager.setService(SettingsService, this);\n const time = new DateTZ({date: VERSION.time});\n const built = DateNow(new Date()).isSameDate(time, 'day')\n ? `Today at ${time.formatDate('h:mma')}`\n : time.formatDate('do MMM yyyy, h:mma');\n const frontend = this.get('frontend') || 'Unknown';\n this.frontend = frontend;\n log('CORE', `${VERSION.semver}`, null, 'debug', true, frontend?.toUpperCase());\n log('APP', `${VERSION.hash} | Built: ${built}`, null, 'debug', true, frontend?.toUpperCase());\n this.init();\n }\n\n /**\n * Initialise the settings\n */\n public async init() {\n if (this.get('debug')) {\n window.debug = true;\n }\n if (this.get('app')?.name) {\n this._app_name = this.get('app').name;\n }\n log('Settings', 'Successfully loaded settings');\n this._initialised.next(true);\n }\n\n /** Whether settings service has initialised */\n public get app_name() {\n return this._app_name;\n }\n\n public get concierge() {\n return this.frontend === 'concierge';\n }\n\n public set bypass_bookings(value: boolean) {\n this._bypass_bookings = value;\n }\n\n public get bypass_bookings() {\n return this._bypass_bookings;\n }\n\n /**\n * Get a setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public get(key: string): any {\n const keys = key.split('.');\n if (keys[0] !== 'app') {\n return getItemWithKeys(keys, this.settings.data);\n }\n const override_settings = this._overrides.getValue();\n for (const override of override_settings) {\n const value = getItemWithKeys(keys.slice(1), override);\n if (value != null) {\n return value;\n }\n }\n return getItemWithKeys(keys, this.settings.data);\n }\n}\n","export * from './space.class';\nexport * from './spaces.service';\nexport * from './space.utilities';\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n} from '@mckinsey-converge/base';\nimport {\n Building,\n BuildingLevel,\n Organisation\n} from '../organisation';\nimport { User } from '../users';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { SpaceRules } from '../bookings/booking.types';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { DateTime } from 'luxon';\n\nexport interface ISpaceAvailabilityOptions {\n /** Start date and time of the availability block */\n dateTz?: DateTZ;\n /** Length of the availability block */\n duration: number;\n /** */\n id?: string;\n /** List of spaces to look at the availability for */\n room_ids?: string;\n /** Whether the spaces looked at should be bookable */\n bookable?: boolean;\n /** List of spaces or zones to ignore */\n ignore?: string;\n /** List of zones to look at the availability for */\n zone_ids?: string | string[];\n /** Whether space bookings should not be returned */\n hide_bookings?: boolean;\n /** Min capacity on the room **/\n capacity?: number\n clear?: boolean;\n /** Length of the setup */\n setup?: number;\n /** Length of the breakdown */\n breakdown?: number;\n /** Hide declined bookings */\n hide_declined?: boolean;\n /** Max capacity on the room **/\n capacity_max?: number\n\n diff_capacity?: boolean\n\n /** Fields to include recurrence in the availability search */\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array\n is_recurrent?: boolean\n is_multiroom?: boolean\n merged?: boolean\n recurrence_days?: Array\n}\n\nexport interface SpaceBookingRuleOptions {\n dateTz: DateTZ;\n duration: number;\n host: User;\n}\n\nexport const OPTION_DEFAULTS: ISpaceAvailabilityOptions = {\n duration: 60\n};\n\nexport interface RecurrenceAvailability {\n /** Unix epoch in seconds */\n readonly date: number;\n /** Whetehr space is available at this time */\n readonly available: boolean;\n}\n\n/**\n * Room Settings Type\n *\n * Exmaple:\n * available: true\n * available_until: 1644344999\n * bookings: []\n * catering: false\n * charge_code: false\n * extra_features: \"meeting_room boardroom\"\n * internal_or_external: \"internal\"\n * map_id: \"08.8.15\"\n * natural_light: false\n * room_booking_screen: true\n * room_name: \"8.15 Meeting\"\n * vc: false\n * recurrence_availability: {\n * date: \"1642596300\",\n * available: false,\n * }\n */\nexport interface RoomSettings {\n // Local room name is required.\n room_name?: string\n // TBD if anything else should be required\n available?: boolean\n available_until?: number\n bookings?: HashMap[]\n catering?: boolean\n charge_code?: boolean\n extra_features?: string\n internal_or_external?: string\n map_id?: string\n natural_light?: boolean\n room_booking_screen?: boolean\n vc?: boolean\n recurrence_availability?: RecurrenceAvailability[]\n equipment_code?: boolean\n external?: boolean\n}\n\n/**\n * List of space features that come from settings.\n *\n * Im sure this list will grow. It is not the most comprehensive list.\n */\nexport enum SpaceFeatures {\n BoardRoom = 'boardroom',\n Catering = 'catering',\n CocktailRoom = 'cocktail',\n ConferencePhone = 'conference_phone',\n ConferenceRoom = 'conference',\n ElectronicWhiteboard = 'whiteboard',\n FlipChart = 'flipchart',\n Glassboard = 'glassboard',\n PartnerOffice = 'partner',\n PhoneBooth = 'phone_booth',\n TheatreRoom = 'theatre',\n TeamRoom = 'team_room',\n VideoConference = 'vc',\n NaturalLight = 'natural_light',\n WirelessContentSharing = 'wireless_content_sharing',\n WorkshopRoom = 'workshop',\n UShapeRoom = 'u_shape',\n Miscellaneous = 'miscellaneous'\n}\n\nexport enum SpaceEquipments {\n conference_phone,\n whiteboard,\n vc,\n flipchart,\n glassboard,\n wireless_content_sharing\n}\nexport enum SpaceStyles {\n boardroom,\n cocktail,\n conference,\n partner,\n theatre,\n team_room,\n // natural_light,\n workshop,\n u_shape,\n miscellaneous\n}\n\nconst EMPTY_ARRAY = [];\n\nexport class Space extends BaseDataClass {\n /** Whether space can be booked by users */\n public readonly bookable: boolean;\n /** People capacity of the space */\n public readonly capacity: number;\n /** Index to force order when sorting multiple spaces */\n public readonly sort_priority: number;\n /** Settings has extensive info displayed in the app. */\n public readonly settings: RoomSettings;\n /** URL for the control interface of the space */\n public readonly support_url: string;\n /** Engine zones associated with the space */\n public readonly zones: readonly string[];\n /** Is the Application concierge */\n public is_concierge: boolean = false;\n /** To allow bookings with rooms for staff calendar view only */\n public allowStaffRoomWithBookings: boolean = false;\n\n /** Simple name == local name being using in seeting.room_name\n\t\t *\n\t\t*/\n public simple_name: string;\n\n /** Room style set of all room style one room has\n * [\"boardroom\", \"cocktail\", \"miscellaneous\", \"natural_light\", \"theatre\", \"u-shape\", \"workshop\"] */\n public room_style: string[] = [];\n\n /** Equipment set of all room equipment one room has\n * [\"conference_phone\", \"whiteboard\", \"vc\", \"flipchart\", \"glassboard\", \"whiteboard\", \"wireless_content_sharing\"] */\n public equipment: string[] = [];\n\n /** Filters has charge code settings for booking and catering */\n public filters: RoomSettings;\n\n /** room_type subset of internal or external rooms */\n public room_type: string[] | string;\n /**\n * Features used in identifying room types.\n *\n * Both features and extra_features are space delimited strings.\n *\n * There is a getter featuresArray that returns the\n * combination of the two as an array.\n */\n public readonly features: string;\n public readonly extra_features: string;\n public map_id: string;\n\n\n /** Service for managing spaces */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Return the rooms' building */\n public get building() {\n return this._service?.buildings.find((bld) => {\n return this.zones.includes(bld.id);\n });\n }\n\n /** Return building timezone */\n public get timezone() {\n return this.building?.timezone;\n }\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = !!settingsService?.concierge;\n this.allowStaffRoomWithBookings = settingsService?.bypass_bookings || false;\n\n const defaultGlobalName = raw_data.name || raw_data.email || 'Meeting Room';\n const defaultSettings = {\n room_name: defaultGlobalName\n }\n /**\n * Duplicate of base-api.class just for readability\n * .name is the full, mckinsey standardised name of the room.\n * You can think of it was what people would call the room when\n * considering every office and room globally.\n *\n * this.name = raw_data.name;\n */\n /**\n * Settings has extensive info displayed in the app.\n * setting.room_name is always used when displaying the room name in the applications\n * setting.room_name is the more office-specific room name, you can think of this as\n * the one people in that office would refer to the room as.\n *\n */\n this.settings = raw_data.settings || defaultSettings;\n this.filters = raw_data?.filters;\n // Room fields\n this.bookable = raw_data.bookable || false;\n this.capacity = raw_data.capacity || 0;\n this.support_url = raw_data.support_url;\n this.zones = raw_data.zones instanceof Array ? raw_data.zones : [];\n // Feature fields\n this.features = raw_data.features || '';\n this.extra_features = raw_data.settings?.extra_features || '';\n\n\t\tthis.room_type = raw_data?.room_type;\n this.simple_name = raw_data?.simple_name;\n this.map_id = raw_data?.map_id || raw_data.settings?.map_id || '';\n this.room_style = raw_data?.room_style || [];\n this.equipment = raw_data?.equipment || [];\n\n }\n\n /**\n * Return the global room name\n * IE LDN-4-408-06\n */\n public get global_name(): string {\n return this.name || ''\n }\n\n /**\n * Return the local room name\n * i.e. 4.08\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.room_name\n */\n public get local_name(): string {\n return this.simple_name || this.name || ''; // this.settings?.room_name\n }\n\n public get street_and_city(): string {\n return this.building ? `${this.building.address}, ${this.building.city}` : '';\n }\n\n /**\n * Return the map_id from settings\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.map_id and use map_id from space modal( after testing over prod)\n */\n // public get map_id(): string {\n // return this?.map_id || this.settings?.map_id || '';\n // }\n\n /** Internal / External status */\n public get internal_or_external(): string {\n const external = this.filters?.external;\n return external ? 'external' : 'internal'; // ( external ? 'external' : this.settings?.internal_or_external ) || 'internal';\n }\n\n /**\n * Works in conjunction with available_until.\n *\n * If a room is bookable that only means you can make a booking but not when.\n * Available indicates that it is available to be booked durring the queried times.\n */\n public get available(): boolean {\n return this.settings?.available ?? false;\n }\n\n public get currently_in_use(): boolean {\n const nowMs = new DateTZ({ date: DateTime.now(), is_local_tz: false, building_tz: this.timezone }).ms;\n const runningBookings = this.settings?.bookings?.filter( bks => {\n const startEpoch = new DateTZ({ date: bks.start_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n const endEpoch = new DateTZ({ date: bks.end_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n return startEpoch <= nowMs && endEpoch >= nowMs;\n })\n // console.log(raw_data.settings.room_name+' : '+ nowMs.ms);\n // console.log('IS IN USER CURRENTLY : ', isinUsernow);\n return !!runningBookings.length;\n }\n\n /** Last returned availability time */\n public get available_until(): number {\n return this.settings?.available_until;\n }\n\n /** Bookings associated with the space */\n public get bookings(): HashMap[] {\n // We should need to care if a room as bookings in Staff\n if (!this.is_concierge && !this.allowStaffRoomWithBookings) {\n return EMPTY_ARRAY;\n }\n\n if (this.settings?.bookings?.length) {\n /**\n * When we're dealing with Concierge the API data arriving is rooms, and those rooms contain booking,\n * but those bookings don't contain a room since the room is the root.\n * In order for Concierge to filter bookings by room we need to reattach this room\n * to each of the bookings, with it's own bookings.\n *\n * It's loopy and kooky but correcting for this pattern is beyond the scope of this refactor.\n */\n const spaceWithBookings = new Space(this.toJSON());\n return this.settings?.bookings.map(b => {\n b.room = spaceWithBookings;\n return b;\n });\n }\n return EMPTY_ARRAY;\n }\n\n /**\n\t\t * Whether space has catering\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.catering and use filters?.catering instead\n\t\t */\n public get has_catering(): boolean {\n return this.filters?.catering || this.settings?.catering || false;\n }\n\n /** Returns an array of the space delimited feature and extra_feature strings.\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove features, extra_features\n */\n public get featuresArray(): (SpaceFeatures | string)[] {\n // (this.simple_name === \"Entresol M-06\" ) && console.log('raw_data : ', this)\n const roomType = Array.isArray(this.room_type) ? this.room_type : [this.room_type]\n const features = [\n ...this.features.split(' '),\n ...this.extra_features?.split(' '),\n\n ...roomType, // required to work with staff>result>filters\n ...this?.room_style,\n ...this?.equipment,\n\n (this.filters?.natural_light) && SpaceFeatures.NaturalLight || undefined, // || this.settings?.natural_light\n // this.settings?.natural_light && SpaceFeatures.NaturalLight || undefined,\n // this.settings?.vc && SpaceFeatures.VideoConference || undefined,\n ].filter(f => !!f).map(f => f.toLowerCase());\n //will be an array... new Set() turns it into a set, but [... ] turns it back into an array again\n return [ ...new Set(features) ];\n }\n\n /** Level in which the space is associated */\n public get level(): BuildingLevel {\n const service = ServiceManager.serviceFor(Organisation);\n return (service ? service.levelWithID(this.zones as any) : null) || new BuildingLevel({});\n }\n\n /**\n * Return the new recurrence_availability from settings\n */\n public get recurrence_availability(): RecurrenceAvailability[] {\n return this.settings?.recurrence_availability || [];\n }\n\n public get availableOccurrences(): number {\n if(this?.recurrence_availability) {\n return this?.recurrence_availability?.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this?.recurrence_availability.length;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Space {\n return new Space(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): Space {\n const space = { ...this };\n space.settings.bookings = []; // clear out bookings\n return new Space({ ...space, id: null, email: null });\n }\n\n /**\n * Generate the booking rules for space with given options\n * @param options Conditions for generating the space rules\n */\n public rulesFor(options: SpaceBookingRuleOptions): SpaceRules {\n if (!this._service || !this.level) {\n return { auto_approve: true, hide: false };\n }\n\n const building = this.is_concierge ? this.level.building_id : this.building\n\n if (!building) {\n return { auto_approve: true, hide: false };\n }\n const { dateTz, duration, host } = options;\n const rules: SpaceRules = rulesForSpace({\n time: dateTz.ms,\n duration,\n space: this,\n user: host,\n rules: building.booking_rules\n });\n return rules;\n }\n\n /**\n * Whether space can only be booked by request\n * @param options Conditions for checking the space rules\n */\n public byRequest(options: SpaceBookingRuleOptions) {\n const rules = this.rulesFor(options);\n return !rules.auto_approve;\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Space): HashMap {\n return { ...super.toJSON(), settings: { ...this.settings, bookings: [] }, filters: { ...this.filters }, equipment: [ ...this.equipment] };\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport {\n ISpaceAvailabilityOptions,\n Space\n} from './space.class';\nimport { Building } from '../organisation/building.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\n\nexport function availabilityOptionsToQuery(options: ISpaceAvailabilityOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n if (options.dateTz) {\n const date = options.dateTz.startOfValue('minute');\n query.available_from = date.seconds; // Add one second or API will not allow end to end booking\n query.available_to = date.addValue({ minutes: options.duration || 60 }).subtractValue({ seconds: 1 }).seconds;\n\n if (options.setup) query.setup = options.setup ;\n if (options.breakdown) query.breakdown = options.breakdown;\n \n delete query.dateTz;\n delete query.duration;\n }\n\n if (!options.capacity_max) delete query.capacity_max\n\n if (options.hide_declined) query.hide_declined = options.hide_declined;\n query = handleRecurrenceFields(query)\n }\n return query;\n}\n\n/**\n * Compare two spaces to determine order\n * @param first\n * @param second\n */\nexport function sort(first: Space, second: Space, blds: Building[] = []) {\n const bld = blds.find(bld => first.zones.includes(bld.id));\n const bld_b = blds.find(bld => second.zones.includes(bld.id));\n if (bld) {\n if (bld !== bld_b) {\n return (bld.name).localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = first.zones.indexOf(zone_id) >= 0;\n const b_has_zone = second.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n }\n return first.name.localeCompare(second.name);\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { BaseAPIService } from '../base.service';\nimport { ISpaceAvailabilityOptions, Space } from './space.class';\nimport { ApplicationLoadingState, HashMap } from '@mckinsey-converge/base';\nimport { availabilityOptionsToQuery } from './space.utilities';\nimport { ServiceManager } from '../service-manager.class';\nimport { OrganisationService } from '../organisation';\nimport { ApplicationService } from '../app.service';\nimport { SettingsService } from '../settings.service';\nimport { DateNow } from '@mckinsey-converge/date-tz';\nimport { Observable } from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\n\nlet SPACE_LIST = [];\n\nexport function findSpace(id: string) {\n return SPACE_LIST.find((_) => _.id === id || _.email === id);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SpacesService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n private _org: OrganisationService,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n \n super(_composer, settingsService);\n ServiceManager.setService(Space, this);\n this._name = 'Space';\n this._api_route = 'rooms';\n this._compare = (a, b) =>\n !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this._list_filter = (a: Space) => {\n const bld = this._org.building;\n return a.level.building_id === bld.id;\n };\n this._org.initialised\n .pipe(first((_) => _))\n .subscribe(() => this.init());\n }\n\n public async query(query: HashMap = {}, setList:boolean = false) {\n const list = await super.query(query);\n if ( (query.hasOwnProperty('cache') && query.cache === false) || !Object.keys(query).length || setList) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n return list;\n }\n\n public filterAvailableSpaces(list: Space[]) {\n return list.filter((i) => {\n if (i.recurrence_availability?.length) return i; //if recurrence, send the space regardless of availability (needed for edit and cloning series)\n return i.available;\n });\n }\n\n /**\n * Get available spaces\n * @param options\n */\n public available(\n options: ISpaceAvailabilityOptions,\n uniqueId?: string,\n filter: boolean = true\n ): Promise {\n if (!options) {\n throw new Error('Space avilability requires request options');\n }\n\n const now = DateNow(new Date());\n if (!options.dateTz) {\n options.dateTz = now.startOfValue('minute');\n }\n\n if (options.hide_declined === undefined) {\n options.hide_declined = true;\n }\n\n const key = `available|${options.id ? options.id : ''}|${\n uniqueId ?? ''\n }`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Space[]) => {\n delete this._promises[key];\n resolve(filter ? this.filterAvailableSpaces(list) : list);\n };\n const error = (e) => {\n reject(e);\n delete this._promises[key];\n };\n const query = availabilityOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(\n (i) => respond([i]),\n error\n );\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n const loading: ApplicationLoadingState =\n this._service.get('loading') || {};\n if (!loading.spaces) {\n loading.spaces = {\n message: 'Loading space data',\n state: 'loading',\n };\n this._service.set('loading', loading);\n }\n // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n const option = {\n zone_ids: this._org.building.id\n }\n await this.query(option, true).catch(() => {\n loading.spaces = { message: 'Loading space data', state: 'failed' };\n this._service.set('loading', loading);\n });\n loading.spaces = { message: 'Loading space data', state: 'complete' };\n this._service.set('loading', loading);\n }\n\n /**\n * Convert raw data into API object\n * @param raw_data Raw API data\n */\n public process(raw_data: HashMap): Space {\n return new Space(raw_data);\n }\n /**\n * \n * Special observable function to make http call for rooms\n * @param query \n * @returns observable\n */\n public queryRooms = (query: HashMap = {}): Observable => super.queryRoomsForQR(query);\n\n public setSpaceList(list) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n\n public queryBooking = (query: HashMap = {}) : Observable | Observable => super.queryObsr(query);\n public updateSpace = (id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.updateObsr(id, form_data, should_inject_concierge, query_params);\n public uploadSpacePhotos = (apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.uploadSpacePhotos(apiSubRoute, form_data, should_inject_concierge, query_params);\n \n public updateRoomList() {\n this.load().then((_) => null)\n }\n}\n","import {\n BehaviorSubject,\n of\n} from 'rxjs';\nimport {\n Building,\n Organisation\n} from './organisation';\nimport { BaseDataClass } from './base-api.class';\nimport { MapLocation } from './location';\nimport { User } from './users';\nimport { Booking } from './bookings';\nimport {\n RoomSettings,\n Space,\n SpaceFeatures\n} from './spaces';\nimport { ServiceManager } from './service-manager.class';\nimport {\n CateringCategory,\n CateringItem\n} from './catering';\nimport {\n HashMap,\n padZero,\n predictableRandomInt,\n unique\n} from '@mckinsey-converge/base';\n\nimport * as faker from 'faker';\n\nimport {\n SETTINGS_TOKEN,\n SettingsData,\n SettingsObject,\n SettingsService\n} from './settings.service';\nimport { Report } from './reports';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nfaker.seed(2560);\n\nlet SERVICE: any;\n\ndeclare global {\n interface Jest {\n fn: () => any\n }\n}\n\n\ndeclare let jest: Jest;\n\n/* istanbul ignore file */\n\nexport function generateMockOrganisationService(): HashMap {\n return {\n levelWithID: jest.fn(),\n listen: jest.fn(),\n loadOrganisation: jest.fn(),\n initialised: of(true),\n building: new Building(generateMockBuilding({ id: 'bld-01' })),\n loadBuildingsWithOrg: jest.fn(),\n getOrganizationFiltersByRoomType: jest.fn(),\n getRoomTypeSubsetDDOptions: jest.fn(),\n getRoomFilterOptionsPerLocation: jest.fn(),\n ...generateMockDataService('OrganisationService')\n };\n}\n\nexport const generateMockSpacesService = (): HashMap => ({\n available: jest.fn(),\n ...generateMockDataService('SpacesService')\n});\n\nexport const generateMockUsersService = (): HashMap => ({\n loadCurrentUser: jest.fn(),\n ...generateMockDataService('UsersService')\n});\n\nexport const bookingState = () => ({\n bookings: of([]),\n filtered: of([]),\n filtered_week: of([]),\n filtered_month: of([]),\n setZone: jest.fn(),\n setDate: jest.fn(),\n setFilters: jest.fn(),\n add: jest.fn(),\n replace: jest.fn(),\n remove: jest.fn(),\n startPolling: jest.fn(),\n startPollingMonth: jest.fn(),\n startPollingWeek: jest.fn(),\n startPollingEveryFiveMin: jest.fn(),\n _noOfMeetings: of([])\n});\n\nconst test_app = {\n title: 'McKinsey & Company',\n description: 'McKinsey & Company Staff UI written with Angular Framework',\n short_name: 'STAFF',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: ''\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: ''\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/staff/'\n }\n};\n\nexport const TEST_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/test',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false\n },\n app: test_app,\n mock: false,\n frontend: 'staff'\n};\n\nexport const generateMockSettingsService = (overrides: Partial> = {}) => new SettingsService({ getTitle: () => jest.fn() } as any,\n new SettingsObject({\n ...TEST_SETTINGS,\n ...overrides\n }));\n\n/**\n * Provides an injectable instance for settings.\n */\nexport const provideMockSettingsObject = (settings: Partial> = {}) => ({\n provide: SETTINGS_TOKEN,\n useValue: new SettingsObject({\n ...TEST_SETTINGS,\n ...settings\n })\n});\n\n/**\n * Generate a mocked version of the application service\n */\nexport function generateMockAppService(settingsOverrides: Partial> = {}) {\n SERVICE = {\n setting: jest.fn(),\n notify: jest.fn(),\n notifyInfo: jest.fn(),\n notifyWarn: jest.fn(),\n notifySuccess: jest.fn(),\n notifyError: jest.fn(),\n log: jest.fn(),\n navigate: jest.fn(),\n navigateBack: jest.fn(),\n get: jest.fn(),\n listen: jest.fn(),\n set: jest.fn(),\n Composer: { auth: { token: 'test' } },\n Hotkeys: { listen: jest.fn() },\n Users: generateMockUsersService(),\n Organisation: generateMockOrganisationService(),\n Locations: generateMockDataService('LocationsService'),\n Base: generateMockDataService('BaseService'),\n Menu: generateMockDataService('CateringMenuService'),\n Spaces: generateMockSpacesService(),\n Bookings: generateMockDataService('BookingsService'),\n Reports: generateMockDataService('ReportsService'),\n CateringItems: generateMockDataService('CateringItemsService'),\n CateringCategories: generateMockDataService('CateringCategoriesService'),\n Settings: generateMockSettingsService(settingsOverrides),\n initialised: of(true)\n };\n ServiceManager.setService(BaseDataClass, SERVICE.Base);\n ServiceManager.setService(Organisation, SERVICE.Organisation);\n ServiceManager.setService(Building, SERVICE.Organisation);\n ServiceManager.setService(User, SERVICE.Users);\n ServiceManager.setService(Booking, SERVICE.Bookings);\n ServiceManager.setService(Space, SERVICE.Spaces);\n ServiceManager.setService(MapLocation, SERVICE.Locations);\n ServiceManager.setService(Report, SERVICE.Reports);\n ServiceManager.setService(CateringItem, SERVICE.CateringItems);\n ServiceManager.setService(CateringCategory, SERVICE.CateringCategories);\n SERVICE.Organisation.buildings = [SERVICE.Organisation.building];\n SERVICE.Users.current = new User(generateMockUser());\n SERVICE.Users.initialised = of(true);\n SERVICE.Bookings.booking_list = new BehaviorSubject(new Array(10).fill(0).map(_ => new Booking(generateMockBooking())));\n SERVICE.listen.mockReturnValue(of(null, []));\n return SERVICE;\n}\n\nexport function generateMockDataService(name: string) {\n const service = {\n find: jest.fn(),\n filter: jest.fn(),\n listen: jest.fn(),\n get: jest.fn(),\n set: jest.fn(),\n setting: jest.fn(),\n query: jest.fn(),\n show: jest.fn(),\n add: jest.fn(),\n save: jest.fn(),\n remove: jest.fn(),\n delete: jest.fn(),\n update: jest.fn(),\n addFrom: jest.fn(),\n removeFrom: jest.fn(),\n task: jest.fn(),\n available: jest.fn(),\n process: jest.fn(),\n updateList: jest.fn(),\n clearList: jest.fn(),\n removeFromList: jest.fn(),\n accept: jest.fn(),\n decline: jest.fn(),\n checkin: jest.fn(),\n is_logged_in: false,\n initialised: of(true),\n getHoldingBay: jest.fn(),\n name,\n queryRooms: of(true),\n queryRoomsForQR: of([]),\n queryObsr: of([]),\n queryBooking: of(true),\n checkinIndividualVisitor: jest.fn(),\n taskObsr: of(true),\n updateSpace: jest.fn(),\n updateObsr: of([]),\n uploadSpacePhotos: of([])\n\n };\n\n service.getHoldingBay.mockImplementation(_ => Promise.resolve([new Booking({})]));\n service.save.mockImplementation(_ => Promise.resolve(new Booking({})));\n\n service.listen.mockReturnValue(of(null));\n service.filter.mockReturnValue([]);\n return service;\n}\n\nlet SPACE_COUNT: number = 0;\n\nexport function generateMinimalRoomDetails(count: number) {\n return {\n name: `space-0${count}`,\n email: `space-0${count}@test.com`,\n settings: {\n name: `localname-0${count}`,\n catering: true\n }\n }\n}\n\nexport function generateMockSpace(overrides: HashMap = {}, space_id: number = null, recurring_search: boolean = false ): Space {\n const id = `space-${space_id || SPACE_COUNT++}`;\n const name = overrides.name || `${faker.name} ${faker.name.lastName()} Space`;\n const startOfDay = DateNow(new Date()).startOfValue('day');\n let settings: RoomSettings = {\n available: true,\n available_until: startOfDay.addValue({ days: 1 }).seconds, // (Date.now() / 1000) + (60 * 60 * 24), // now plus 24 hrs\n bookings: Array(10).fill(0).map(i => generateMockBooking()),\n catering: true,\n charge_code: true,\n extra_features: \"meeting_room boardroom\",\n internal_or_external: \"internal\",\n map_id: \"1\",\n natural_light: false,\n room_booking_screen: true,\n room_name: `${name} - Local Name`,\n vc: false,\n }\n if (overrides.settings) {\n settings = { ...settings, ...overrides.settings };\n delete overrides.settings;\n }\n if (recurring_search) {\n settings.recurrence_availability = [\n {\n date: startOfDay.seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 1 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 2 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 3 }).seconds,\n available: false,\n },\n ]\n }\n\n const linked = Math.floor(predictableRandomInt(99999)) % 2 === 0 && SPACE_COUNT > 1;\n return new Space({\n id,\n name: `${name} - Global Name`,\n map_id: `${space_id || SPACE_COUNT}`,\n type: faker.commerce.productName(),\n searchable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n controlable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n hourly_rate: Math.floor(predictableRandomInt(300)) * 100,\n bookable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n capacity: 15,\n sort_priority: 0,\n setup: Math.floor(predictableRandomInt(6)) * 5,\n breakdown: Math.floor(predictableRandomInt(6)) * 5,\n support_url: `/control/#/${id}`,\n image: faker.image.business(),\n zones: ['zone_lvl-0'],\n features: `${SpaceFeatures.BoardRoom} ${SpaceFeatures.ElectronicWhiteboard}`,\n email: `${name.toLowerCase().split(' ').join('.')}@${USER_DOMAIN}`,\n settings,\n ...overrides\n });\n}\n\nlet BOOKING_COUNT = 0;\nlet BOOKING_DATE = DateNow(new Date()).setValue({ hour: 6 }).setValue({minute: 0}).subtractValue({ days: 10 }).startOfValue('minute');\n\n/**\n * Set the initial time used for generating mock bookings\n * @param time New initial time as ms from UTC epoch\n */\nexport function setMockBookingStartDatetime(time: number) {\n const date = new DateTZ({date: time})\n BOOKING_DATE = date.startOfValue('minute');\n}\n\n/**\n * Create mock raw API data for a booking\n * @param override Overrides the properties of the generated booking with it's own\n */\nexport function generateMockBooking(override: HashMap = {}) {\n const id = `booking-${BOOKING_COUNT++}`;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4) + 2) * 15 });\n const start = BOOKING_DATE.ms;\n const duration = Math.floor(predictableRandomInt(4) + 2) * 15;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4)) * 15 });\n const organiser = generateMockUser({ external: false, visitor: false });\n const orders = Array(Math.floor(predictableRandomInt(5)))\n .fill(0)\n .map(_ => generateMockCateringOrder({ booking_date: start }, override.room_ids, override.menu));\n const hasCatering = Math.floor(predictableRandomInt(34567)) % 3 === 0;\n const date_start = new DateTZ({date: start})\n return {\n id,\n title: `${faker.commerce.productName()} Meeting`,\n attendees: Array(Math.floor(predictableRandomInt(5) + 2))\n .fill(0)\n .map((_, i) => generateMockUser(override.users)),\n organiser,\n start_epoch: date_start.seconds,\n end_epoch: date_start.addValue({ minutes: duration }).seconds,\n body: faker.lorem.paragraph(),\n notes: [{ type: 'other', message: faker.lorem.paragraph() }],\n location: faker.address.city(),\n // Mckinsey only has internal or external meetings\n booking_type: ['internal', 'external'][predictableRandomInt(2)],\n setup: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n breakdown: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n status: 'accepted',\n catering: hasCatering ? orders : [],\n room: new Space(generateMinimalRoomDetails(1)), // returns space-01 type values\n equipment_codes: {},\n company:[],\n ...override\n };\n}\n\nlet BLD_COUNT = 0;\nlet LVL_COUNT = 0;\n\n/**\n * Generate raw mock data for creating a building\n * @param id Forced ID for the mock\n * @param overrides Supply object value overrides in place. Supports a levelGenerator function\n * to stabilize level ids for testing.\n */\nexport function generateMockBuilding(overrides: HashMap = {}): HashMap {\n const id = `zone_bld-${BLD_COUNT++}`;\n const levels = Array(10)\n .fill(0)\n .map((_, i) => generateMockLevel(undefined, overrides.levelGenerator?.(i)));\n const features: any = {};\n for (const lvl of levels) {\n const count = Math.floor(predictableRandomInt(3) + 2);\n features[lvl.level_id] = {};\n for (let i = 0; i < count; i++) {\n features[lvl.level_id][faker.commerce.productName()] = `feature-${i + 1}`;\n }\n }\n return {\n id,\n zone_id: id,\n extras: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n code: 'NYO',\n name: faker.name.firstName(),\n address: 'building address field',\n city: 'building city',\n loan_items: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n levels,\n roles: {\n 'first-aiders': Array(10)\n .fill(0)\n .map(i => generateMockUser())\n },\n neighbourhoods: features,\n settings: {\n test: {\n nested: {\n level2: true,\n org: false\n }\n },\n city: faker.address.city()\n },\n timezone: 'America/Chicago',\n ...overrides\n };\n}\n\n/**\n * Generate raw mock data for a building level\n * @param id Forced ID for the mock\n * @param overrides value overrides\n */\nexport function generateMockLevel(id?: string, overrides: HashMap = {}): HashMap {\n if (!id) {\n id = `zone_lvl-${LVL_COUNT++}`;\n }\n return {\n id,\n level_id: id,\n level_name: `Level ${LVL_COUNT}`,\n short_name: `L ${LVL_COUNT}`,\n ...overrides\n };\n}\n\nlet USER_COUNT = 0;\n\nexport let USER_DOMAIN = 'acaprojects.com';\n\nconst USER_EMAILS: string[] = [];\n\n/**\n * Generate raw mock data for a user\n * @param id Forced ID for the mock\n * @param name Forced name for the user\n * @param external Whether user is external of the organisation\n */\nexport function generateMockUser(override: HashMap = {}): HashMap {\n const id = `user-${USER_COUNT++}`;\n const name = `${faker.name.firstName()} ${faker.name.lastName()}`;\n const external = override.external || !(predictableRandomInt(99999) % 2);\n const organisation = external ? faker.company.companyName() : USER_DOMAIN.split('.')[0];\n let delegates: {email: string, opt_out: boolean}[] = [];\n const delegate_count = Math.min(predictableRandomInt(4) + 1, USER_EMAILS.length);\n for (let i = 0; i < delegate_count; i++) {\n delegates.push({email: USER_EMAILS[Math.floor(predictableRandomInt(USER_EMAILS.length))], opt_out: false});\n }\n delegates = unique(delegates);\n const email = `${name\n .split(' ')\n .join('.')\n .toLowerCase()}@${external ? 'not-' : ''}${USER_DOMAIN}`;\n USER_EMAILS.push(email);\n return {\n id,\n name,\n first_name: name.split(' ')[0],\n last_name: name.split(' ')[1],\n email,\n phone: faker.phone.phoneNumber(),\n visitor: external,\n organisation: {\n id: organisation\n .split(' ')\n .join('.')\n .toLowerCase(),\n name: organisation\n },\n department: faker.commerce.department(),\n staff_code: padZero(Math.floor(predictableRandomInt(99999)), 5),\n delegates,\n image: faker.image.avatar(),\n ...override\n };\n}\n\nexport function generateMockCateringOrder(overrides: HashMap = {}, room_id: string = '', menu: HashMap = {}) {\n return {\n id: `order-${predictableRandomInt(9999_9999)}`,\n delivery_time: predictableRandomInt(6) * 5,\n location_id: room_id, // R--- could be undefined\n items: new Array(predictableRandomInt(5, 1)).fill(0).map(i => pickMenuItem(menu)),\n ...overrides\n };\n}\n\nfunction pickMenuItem(menu_map: HashMap = {}) {\n const zones = Object.keys(menu_map);\n const menu = menu_map[zones[predictableRandomInt(zones.length)]] || [];\n const category = menu[predictableRandomInt(menu.length)] || { items: [] };\n const group = { ...(category.items[predictableRandomInt(category.items.length)] || {}) };\n if (!group.package && group.items?.length) {\n const item = { ...group.items[predictableRandomInt(group.items.length)] };\n item.amount = predictableRandomInt(5, 1);\n return item;\n }\n group.amount = predictableRandomInt(5, 1);\n return group;\n}\n\nexport function generateMockLocation(overrides: HashMap, fixed_locations: string[], maps: string[]): HashMap {\n const fixed = predictableRandomInt(999_999_999) % 2 === 0;\n if (fixed && (!overrides || overrides.fixed)) {\n return {\n map_id: fixed_locations[predictableRandomInt(fixed_locations.length)],\n level: maps[predictableRandomInt(maps.length)],\n ...overrides\n };\n } else {\n return {\n x: predictableRandomInt(900, 100),\n x_max: 1000,\n y: predictableRandomInt(500, 100),\n level: maps[predictableRandomInt(maps.length)],\n confidence: predictableRandomInt(30),\n ...overrides\n };\n }\n}\n\nlet ORG_COUNT = 0;\n\nexport function generateMockOrganisation(): HashMap {\n const buildings = Array(3).fill(0).map(i => generateMockBuilding());\n return {\n id: `zone_org-${ORG_COUNT++}`,\n name: `Organisation ${ORG_COUNT}`,\n buildings,\n settings: {\n discovery_info: {\n buildings\n },\n test: {\n nested: {\n org: true\n }\n }\n }\n };\n}\n\n\nexport const generateMockBuildingSetByCity = () => {\n const buildings: Building[] = Array(10).fill(0)\n .map(() => new Building(generateMockBuilding()));\n buildings.push(...Array(2).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'Auckland'\n },\n city: 'Auckland'\n }))));\n buildings.push(...Array(5).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'NYC'\n },\n city: 'NYC'\n }))));\n return buildings;\n};\n\nexport function generateMockModalData(data: HashMap = null) : HashMap {\n if (data) {\n return data;\n }\n return {\n pendingDate: new Date(1603087100 + (1000 * 60 * 15)),\n pendingDuration: 60,\n date: 1603087100,\n duration: 30,\n }\n}\n\nexport const mockDateToBuildingTz = (date?: number) =>{\n return new DateTZ({date, building_tz: 'America/Chicago', is_local_tz: false})\n}","export * from './user.class'\nexport * from './user.utilities'\nexport * from './users.service'\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { MapLocation } from '../location';\nimport { ServiceManager } from '../service-manager.class';\n\nexport class User extends BaseDataClass {\n \n /** Currently logged in user */\n public static get active_user(): User {\n const service = ServiceManager.serviceFor(User);\n return service ? service.current : null;\n }\n\n /** First name of the user */\n public readonly first_name: string;\n /** Last name of the user */\n public readonly last_name: string;\n /** Windows user ID */\n public readonly windows_id: string;\n /** FMNO */\n public readonly fmno: string;\n /** Type of user */\n public readonly type: 'partner' | 'external' | 'internal';\n /** Contact phone number of the user */\n public readonly phone: string;\n /** Organisational department the user is part of */\n public readonly business_unit: string;\n /** Whether user is external from the application's organisation */\n public readonly external: boolean;\n /** Whether user is a visitor */\n public readonly visitor: boolean;\n /** Organisational Identifier for the user */\n public readonly staff_code: string;\n /** Basic location descriptor for the user */\n public readonly location: string;\n /** List of users that this user can act on behalf */\n public readonly delegates: readonly {email: string, opt_out: boolean}[];\n /** URL of the user's avatar image */\n public readonly image: string;\n /** List of user groups associated with this user */\n public readonly groups: readonly string[];\n /** Organisation the user is associated with */\n private _organisation: Identity;\n\n /** Map location of the user */\n private _location: MapLocation;\n /** List of desk bookings */\n // private _desk_bookings: HashMap = {}; // R--- can't explain why this is here.\n /** Host/Organisawe email notification opt out/in setting */\n public opt_out: boolean;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this.first_name = raw_data.first_name || '';\n this.last_name = raw_data.last_name || '';\n this.windows_id = raw_data.email || '';\n this.fmno = raw_data.fmno;\n this.external = raw_data.external || false;\n this.visitor = raw_data.visitor || false;\n\n\n this.type = this.visitor ? 'external' : 'internal';\n this.phone = raw_data.phone || raw_data.mobile || '';\n this.business_unit = raw_data.business_unit || raw_data.department || '';\n this._organisation = raw_data.organisation || {\n id: raw_data.organisation_id,\n name: raw_data.organisation_name\n };\n\n this._location = null;\n this.image = raw_data.image || '';\n this.staff_code = raw_data.staff_code || raw_data.fmno || '';\n this.delegates = raw_data.delegates || [];\n this._location = new MapLocation(\n raw_data.location && raw_data.location instanceof Object\n ? raw_data.location\n : { name: raw_data.location }\n );\n this.groups = raw_data.groups || [];\n this.location = raw_data.location || raw_data.officeLocation || '';\n this.opt_out = raw_data.opt_out;\n }\n\n /** Organisation the user is associated with */\n public get organisation() {\n return this._organisation;\n }\n\n /** Map location of the user */\n public get last_location(): MapLocation {\n return new MapLocation(this._location || {});\n }\n\n /**\n * Ask the server for the users current location\n */\n public locate(): Promise {\n const service: any = ServiceManager.serviceFor(MapLocation);\n return new Promise((resolve, reject) => {\n if (service) {\n service.show(this.id, { desk: this.email }).then(\n l => {\n this._location = l;\n resolve(l);\n },\n e => reject(e)\n );\n } else {\n resolve(null);\n }\n });\n }\n\n /**\n * Whether user is available during the given period\n * @param start Start time as a unix timestamp with milliseconds\n * @param end End time as a unix timestamp with milliseconds\n */\n public available(start?: number, end?: number): Promise {\n return new Promise(resolve => {\n this._service.query({ email: this.email, start, end }).then(\n l => resolve(l && l.length > 0),\n _ => resolve(false)\n );\n });\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): User {\n return new User(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): User {\n return new User({ ...this, id: null, email: null });\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: User): HashMap {\n const data = super.toJSON();\n delete data.location;\n return data;\n }\n}\n\n// R--- Might need an toApiJSON due to visitor field.","import {\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { HashMap } from '@mckinsey-converge/base';\nimport { User } from './user.class';\n\n/**\n * Generate form fields for the given user\n * @param user User to generate form for\n */\nexport function generateUserForm(user: User): FormGroup {\n if (!user) {\n throw Error('No user passed');\n }\n const fields: HashMap = {\n id: new FormControl(user.id || ''),\n name: new FormControl(user.name || ''),\n first_name: new FormControl(user.first_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n last_name: new FormControl(user.last_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n email: new FormControl(user.email || '', [Validators.email])\n };\n // Generate form group for booking item\n return new FormGroup(fields);\n}\n","import { Injectable } from '@angular/core';\nimport { Location } from '@angular/common';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { Md5 } from 'ts-md5/dist/md5';\n\nimport { BaseAPIService } from '../base.service';\nimport { User } from './user.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ILoginOptions {\n /** URL to post login request to */\n url?: string;\n /** Whether form data is passed in the body of the request */\n form?: boolean;\n /** Custom headers to pass into the post request */\n headers?: HashMap;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n protected uhttp: HttpClient,\n protected location: Location,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(User, this);\n this._name = 'Users';\n this._api_route = 'users';\n this._compare = (a, b) => !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this.set('list', []);\n this.set('current_user', new User({ id: 'local_user', name: 'Local User' }));\n this.set('delegates', null);\n this._composer.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /** Currently logged in user */\n public get current(): User {\n return this.get('current_user');\n }\n\n /** Whether the user has properly logged in */\n public get is_logged_in(): boolean {\n return this.current && this.current.id !== 'local_user';\n }\n\n /* istanbul ignore next */\n /**\n * Sets the access token and expiry for the user\n * @param token OAuth bearer token\n * @param expiry Expiry epoch timestamp in ms\n * @param reload Whether to reload the page after setting tokens\n */\n public setToken(token: string, expiry?: number, reload: boolean = true) {\n if (!expiry) {\n const now = DateNow(new Date())\n expiry = now.addValue({ days: 7 }).endOfValue('day').ms;\n }\n const path = `${location.origin}${\n this._service.setting('composer.route') || ''\n }/oauth-resp.html`;\n const client_id = Md5.hashStr(path);\n if (sessionStorage) {\n sessionStorage.setItem(`${client_id}_access_token`, token);\n sessionStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (localStorage) {\n localStorage.setItem(`${client_id}_access_token`, token);\n localStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (reload) {\n this.location.go(this.location.path());\n }\n return path;\n }\n\n /**\n * Post login request to the API\n * @param query_params Key value pairs to pass into\n * @param options Options for the login request\n */\n public async login(query_params: HashMap, options: ILoginOptions = {}): Promise {\n if (this.settingsService.concierge) {\n if (!this._promises['login']) {\n this._promises['login'] = new Promise((resolve, reject) => {\n this.set('status', 'loading');\n let headers = new HttpHeaders();\n if (!options || options.form !== false) {\n headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');\n }\n const url = (options ? options.url : '') || '/auth/signin';\n this.uhttp.post(url, query_params, { headers }).subscribe(\n (_) => null,\n (e) => reject(e),\n () => {\n this._composer.auth.authorise();\n resolve();\n }\n );\n });\n }\n return this._promises['login'];\n }\n }\n\n\n /**\n * Logout of user and redirect to logout URL\n */\n public logout() {\n this._composer.auth.logout();\n }\n\n /**\n * Loads current user from API. This diverges from {@link load} in order to simply return\n * the user object instead of setting it on the service.\n */\n public async loadCurrentUser(): Promise {\n return this.show('current')\n }\n\n /**\n * Load initial data for the service\n */\n protected load(tries: number = 0): Promise {\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.user = { message: 'Loading user credentials', state: 'loading' };\n this._service.set('loading', loading);\n this.set('status', 'loading');\n return new Promise((resolve) => {\n // this is due to unclear nature of the merge between concierge and staff\n // concierge has the retries enabled, while staff continuously retries.\n if (this.settingsService.concierge && tries > 4) {\n this.set('status', 'invalid');\n loading.user = { message: 'Loading user credentials', state: 'failed' };\n this._service.set('loading', loading);\n return resolve();\n }\n this.show('current').then(\n async (current_user) => {\n this.set('status', 'available');\n this.set('current_user', current_user);\n this._initialised.next(true);\n if (this._service && this._service.setting('app.user.grab_api_details')) {\n this.show(current_user.email).then(\n async (user) => {\n this.set('current_user', user);\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = {\n message: 'Loading user credentials',\n state: 'complete'\n };\n this._service.set('loading', loading);\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n } else {\n \n // is after process\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => current_user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = { message: 'Loading user credentials', state: 'complete' };\n this._service.set('loading', loading);\n }\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n });\n }\n\n private async loadDelegates() {\n const delegates = this.current.delegates;\n if (!delegates || !delegates.length) {\n return [];\n }\n const promises: Promise[] = [];\n for (const del of delegates) {\n promises.push(this.show(del.email));\n }\n const list = await Promise.all(promises);\n this.set('delegates', list);\n this.set('list', unique((this.get('list') || []).concat(list)));\n return list;\n }\n\n /**\n * Convert raw API data into a valid User Object\n * @param raw_item Raw API data\n */\n protected process(raw_data: any): User {\n return new User(raw_data);\n }\n}","import { AbstractControl } from '@angular/forms';\n\nimport { User } from './users';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\nconst HAS_ERROR = true;\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n */\nexport function buildValidateDate(date?: number) {\n const from = new DateTZ({ date });\n return (c) => validateDate(c, date);\n}\n\n/**\n * Check that control value is a date that is the same or after from date\n * @param control Angular form control\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateDate(control: AbstractControl, is_from?: number) {\n const from = new DateTZ({date: is_from})\n const date = new DateTZ({date: control.value})\n return date.isBeforeDate(from) ? { date: HAS_ERROR, message: 'Booking needs to be made in the future' } : null;\n}\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function buildValidateStartTime(date: number, is_from?: number) {\n const from = new DateTZ({date: is_from})\n return (c) => validateStartTime(c, date, from.ms);\n}\n\n/**\n * Check that control value time is after the comparison date time\n * @param control Angular form control\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateStartTime(control: AbstractControl, date: number, is_from?: number) {\n const now = new DateTZ({date: is_from});\n const parts = control.value.split(':');\n const date_obj = new DateTZ({date});\n return date_obj.setValue({ hour: +parts[0], minute: +parts[1] }).isBeforeDate(now) ? {\n start: HAS_ERROR,\n message: 'Booking time needs to be made in the future'\n } : null;\n}\n\nexport function buildValidateDuration(min: number = 30, max: number = 240) {\n return (c) => validateDuration(c, min, max);\n}\n\nexport function validateDuration(control: AbstractControl, min: number = 30, max: number = 240) {\n if (control.value < (min || 30)) {\n return { duration: HAS_ERROR, message: `Minimum booking duration is ${min} minute${min === 1 ? 's' : ''}` };\n } else if (control.value > (max || 480)) {\n return { length: HAS_ERROR, message: `Maximum booking duration is ${max} minute${max === 1 ? 's' : ''}` };\n }\n return null;\n}\n\nexport function buildValidateAttendees(host: User, min: number = 0) {\n return (c) => validateAttendees(c, host, min);\n}\n\nexport function validateAttendees(control: AbstractControl, host: User, min: number = 0) {\n if (!control || !(control.value instanceof Array)) {\n return min > 0\n ? { invalid: true, message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you` }\n : null;\n }\n const list: User[] = control.value;\n if (host) {\n const result = list.find(a => a.email === host.email);\n if (result) {\n list.splice(list.indexOf(result), 1);\n }\n }\n return list.length >= min ? null : {\n count: true,\n message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you`\n };\n}\n\nexport function validateEndTime(dateControlTz: AbstractControl) {\n return (control: AbstractControl) => {\n // const date = new DateTZ({date: date_control ? date_control.value : undefined})\n const now = DateNow(new Date())\n return dateControlTz.value.addValue({ minutes: control.value || 60 }).isBeforeDate(now)? { end_time: true } : null;\n };\n}\n\nexport function noWhitespaceValidator(control: AbstractControl) {\n const value = control?.value;\n if ( value === '') {\n return null; // Return null if control value is undefined or null\n }\n const isWhitespace = value.trim().length === 0;\n // const isValid = !isWhitespace;\n return !isWhitespace ? null : { whitespace: true };\n}\n\n","export * from './lib/date-tz.class'","import { DateObjectUnits, DateTime, DateTimeUnit, DurationLike, DurationUnits } from 'luxon';\nimport { getTimezoneOffset } from 'date-fns-tz';\n\nfunction padZero(value: number, length: number): string {\n let str = `${value}`;\n while (str.length < length) str = `0${str}`;\n return str;\n}\n\ninterface DateTZParams {\n date?: number | DateTime\n building_tz?: string\n is_local_tz?: boolean\n all_day?: boolean\n}\n\nconst now = new Date()\n\nexport class DateTZ {\n date: DateTime\n date_org: DateTime\n building_tz: string\n is_local_tz: boolean = true\n all_day: boolean\n local_tz: string\n valid: boolean\n\n constructor(data?: DateTZParams) { \n this.date_org = typeof data?.date === 'number' ? DateTime.fromMillis(data?.date) : data?.date ? data?.date : DateTime.fromMillis(now.valueOf())\n this.is_local_tz = data?.is_local_tz === false ? data?.is_local_tz : true\n this.all_day = data?.all_day || false\n this.local_tz = DateTime.now().zoneName\n this.building_tz = data?.building_tz || this.local_tz\n this.date = !this.is_local_tz ? this.date_org.setZone(this.building_tz) : this.date_org\n this.valid = this.date.isValid\n }\n\n //get epoch milliseconds\n public get ms(): number {\n return this.date.valueOf()\n }\n\n //get epoch seconds\n public get seconds(): number {\n return Math.trunc(this.date.toSeconds())\n }\n\n //get the second of the minute\n public get second(): number {\n return this.date.second\n }\n\n //get the minutes of the hour\n public get minutes(): number {\n return this.date.minute\n }\n\n //get the minutes of the hour\n public get hours(): number {\n return this.date.hour\n }\n\n public get utc(): number {\n const newDate = new DateTZ({...this, date: this.date.toUTC()})\n return newDate.seconds\n }\n\n public get dateDay(): number {\n return this.date.day\n }\n\n public get dateHour(): number {\n return this.date.hour\n }\n\n public get dateYear(): number {\n return this.date.year\n }\n\n public get dateWeekday(): number {\n try {\n return this.date.weekday;\n } catch (e) {\n return this.date.toJSDate().getDay();\n }\n }\n\n public get dateMonth(): number {\n return this.date.month\n }\n\n public dateDiff (compare_to: DateTZ, unit: DurationUnits, ans_unit = 'minutes'): number {\n return this.date.diff(compare_to.date, unit)[ans_unit]\n }\n\n //set the date to the begining of the given unit\n public startOfValue (unit: DateTimeUnit) {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 7) {\n // Don't change, we want sunday as the start of the week even though luxon thinks it is Monday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 1) {\n // If this.date is monday, just subtract one more day to make it Sunday\n const monday = new DateTZ({ ...this, date: this.date })\n newDate = monday.subtractValue({ days: 1 });\n } else {\n // If later than monday, startOfWeek back to monday and then subtact another day to get to Sunday.\n const monday = new DateTZ({...this, date: this.date.startOf(unit)})\n newDate = monday.subtractValue({ days: 1 })\n }\n }\n\n return newDate\n }\n\n //set the date to the end of the given unit\n public endOfValue (unit: DateTimeUnit) : DateTZ {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 6) {\n // Don't change, we want saturday as the end of the week even though luxon thinks it is Sunday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 7) {\n // If this.date is Sunday, this alone is the luxon end of week so add a day\n // to get to monday, then endOfWeek to Sunday, and subtract 1 day to Saturday\n const sunday = new DateTZ({ ...this, date: this.date }).addValue({ days: 1 })\n newDate = sunday.endOfValue(unit).subtractValue({ days: 1 }); // return next saturday\n } else {\n // If not saturday or sunday\n // endOfWeek to Sunday and then subtact a day to get to Saturday.\n const later = new DateTZ({...this, date: this.date.endOf(unit)})\n newDate = later.subtractValue({ days: 1 })\n }\n } else {\n newDate = new DateTZ({...this, date: this.date.endOf(unit)})\n }\n\n return newDate\n }\n \n public startEpoch (): number {\n const org = new DateTZ({date: this.date_org})\n return this.all_day\n ? this.startOfValue('day').ms - this.dateDiff(org, 'minutes')\n : this.ms\n }\n\n //clone the given value and unit to the date\n public clone (): DateTZ {\n // return new DateTZ({...this})\n return this.addValue({ seconds: 0 })\n }\n\n //adds the given value and unit to the date\n public addValue (duration: DurationLike, isLastDayOfMonth?: boolean): DateTZ {\n return new DateTZ({...this, date: isLastDayOfMonth ? this.date.plus(duration).endOf('month') : this.date.plus(duration)});\n }\n\n //subtracts the given value and unit to the date\n public subtractValue (duration: DurationLike): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.minus(duration)})\n return newDate\n }\n\n public setValue (obj: DateObjectUnits): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.set(obj)})\n return newDate\n }\n\n public formatDate (format: string): string {\n // Return new immuatable via \"plus\" to prevent \n // TypeError: Cannot assign to read only property 'weekData' of object\n // https://github.com/moment/luxon/issues/601\n return this.date.plus({ seconds: 0 }).toFormat(format)\n }\n\n public formatLocalDate (format: string): string {\n // setZone already returns new immutable so it doesn't have the formatDate issue.\n return this.date.plus({ seconds: 0 }).setZone(this.local_tz).toFormat(format)\n }\n\n public isSameDate(compare_to: DateTZ, value: DateTimeUnit): boolean {\n return this.date.hasSame(compare_to.date, value)\n }\n\n public isAfterDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear > compare_to.dateYear\n case 'month':\n if(this.isAfterDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth > compare_to.dateMonth\n }\n case 'day':\n if(this.isAfterDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay > compare_to.dateDay\n }\n case 'hour':\n if(this.isAfterDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour > compare_to.dateHour\n }\n case 'minute':\n if(this.isAfterDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes > compare_to.minutes\n }\n default:\n return this.ms > compare_to.ms;\n }\n }\n\n public isBeforeDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear < compare_to.dateYear\n case 'month':\n if(this.isBeforeDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth < compare_to.dateMonth\n }\n case 'day':\n if(this.isBeforeDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay < compare_to.dateDay\n }\n case 'hour':\n if(this.isBeforeDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour < compare_to.dateHour\n }\n case 'minute':\n if(this.isBeforeDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes < compare_to.minutes\n }\n default:\n return this.ms < compare_to.ms;\n }\n }\n\n public toZone(tz: string): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: this.date.setZone(tz), \n building_tz: tz, \n is_local_tz: false\n })\n return newDate\n }\n\n public setTimestamp(timestamp: number): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: timestamp,\n })\n return newDate\n }\n\n public get JSDate(): Date {\n return this.date.toJSDate()\n }\n\n // helper to log out the dateTZ values\n public logDateTz (label: string = ''): void {\n console.log(`${label} local tz/date/time`, this.addValue({ seconds: 0 }).formatLocalDate(\"cccc d MMMM,yyyy h:mma\"), this.local_tz)\n console.log(`${label} building tz/date/time`, this.addValue({ seconds: 0 }).formatDate(\"cccc d MMMM,yyyy h:mma\"), this.building_tz)\n }\n}\n\nexport const DateNow = (date: Date = new Date()) => {\n return new DateTZ({date: date.valueOf()})\n} \n\n// input the local time and the building timezone\nexport const convertLocalTimestampToTimezonedDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const date = new Date(timestamp);\n return new DateTZ({ date: timestamp, building_tz: buildingTimezone, is_local_tz: false }).setValue({\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes()\n });\n}\n\n// input the building time and the building timezone\nexport const convertTimezonedTimestampToLocalDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const local_tz = DateTime.now().zoneName;\n const localOffset = getTimezoneOffset(local_tz, new Date(timestamp));\n const desiredOffset = getTimezoneOffset(buildingTimezone, new Date(timestamp));\n if (localOffset > desiredOffset) {\n const eleA = timestamp + (localOffset - desiredOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n } else {\n const eleA = timestamp + (desiredOffset - localOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n }\n}\n\nexport const localTimezone = () => {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n}\n\nexport const getTimezoneOffsetString = (tz: string) => {\n const offset_minutes = Math.floor(getTimezoneOffset(tz) / 1000 / 60);\n const hours = Math.floor(offset_minutes/60);\n const minutes = offset_minutes % 60;\n return `${offset_minutes > 0 ? '+' : '-'}${padZero(Math.abs(hours), 2)}${padZero(minutes, 2)}`;\n}\n\nexport function toMiddayUTC(value: DateTZ = DateNow()) {\n // exclude Auckland from rouding up timezone as it has 12+ hours UTC timezone difference\n return value.building_tz.includes('Auckland') ? value : new DateTZ({\n date: value.setValue({ hour: 12, minute: 0 }).ms,\n is_local_tz: false,\n building_tz: 'UTC',\n }).setValue({ hour: 12, minute: 0 });\n}\n\n/**returns the offset between two timezones in minutes and hours */\nexport function timezoneOffset(tz: string){\n const nowTz = DateNow(new Date())\n const offset = nowTz.date.offset - nowTz.toZone(tz).date.offset\n return {minutes: offset, hours: offset/60}\n}\n\nexport function isToday (date, timezone) {\n\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: timezone\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: timezone,\n }),\n 'day'\n );\n}\n","export * from './lib/environment.module';\nexport * from './lib/version';\nexport * from './lib/environment.service'\nexport * from './lib/types'\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n providers: []\n})\nexport class EnvironmentModule {\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { EnvironmentData } from './types';\n\nexport const ENVIRONMENT_TOKEN = 'environments_service_data';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EnvironmentService {\n\n public get production(): boolean {\n return this.environment.production;\n }\n\n public get heap_io_id(): number {\n return this.environment.heap_io_id;\n }\n\n constructor(@Inject(ENVIRONMENT_TOKEN) private environment: EnvironmentData) {\n }\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"dirty\": false,\n \"raw\": \"dacd45ad9\",\n \"hash\": \"dacd45ad9\",\n \"distance\": null,\n \"tag\": null,\n \"semver\": null,\n \"suffix\": \"dacd45ad9\",\n \"semverString\": null,\n \"version\": \"0.0.0\",\n \"time\": 1733434456096\n};\n/* tslint:enable */\n","export * from './lib/legacy-overlays.module';\nexport * from './lib/space-select-modal/space-select-modal.component';\nexport * from './lib/new-user-modal/new-user-modal.component';\nexport * from './lib/confirm-modal/confirm-modal.component';\nexport * from './lib/catering-confirm-modal/catering-confirm-modal.component';\nexport * from './lib/catering-details-modal/catering-details-modal.component';\nexport * from './lib/requirement-details-modal/requirement-details-modal.component';\nexport * from './lib/booking-confirm/booking-confirm.component';\nexport * from './lib/user-form/user-form.component'\nexport * from './lib/booking-form/booking-form.component'\nexport * from './lib/no-catering-modal/no-catering-modal.component'\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport { Router } from '@angular/router';\n\nimport {\n ApplicationService,\n Booking,\n BookingsService,\n BookingStateService,\n CateringOrder,\n getFirstDateFromList,\n OrganisationService,\n rulesForSpace,\n recurrenceDetails,\n SeriesAction,\n SettingsService,\n Space,\n SpacesService,\n User,\n UsersService,\n formatWhen,\n BOOKING_STATUS,\n CloseDialogService,\n DialogIds\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent,\n HashMap,\n humaniseDuration\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ConflictsModalComponent, ConflictsModalComponentData } from '@mckinsey-converge/ui';\n\n\nexport interface BookingConfirmModalData {\n old_booking: Booking;\n booking: Booking;\n action?: SeriesAction\n}\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n\n@Component({\n selector: 'a-booking-confirm-modal',\n templateUrl: './booking-confirm.component.html',\n styleUrls: ['./booking-confirm.component.scss']\n})\nexport class BookingConfirmComponent extends BaseDirective implements OnInit{\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for changes are being processed */\n public loading: string;\n /** Whether space availability is being checked */\n public checking_available: boolean;\n /** Whether to show all attendees */\n public show_attendees: boolean = false;\n /** Whether to show all locations */\n public show_locations: boolean;\n /** Whether to show all catering orders */\n public show_orders: boolean;\n /** Whether booking has succeeded */\n public success: boolean;\n /** Whether booking needs to be accepted */\n public readonly is_request: boolean;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n lastMomentConflict: boolean = false;\n \n @ViewChild('attendeesListRef') attendeesListRef: ElementRef;\n @ViewChild('locationsListRef') locationsListRef: ElementRef;\n @ViewChild('cateringListRef') cateringListRef: ElementRef;\n\n /** Booking to confirm changes to */\n public get old_booking(): Booking {\n return this._data.old_booking;\n }\n\n /** Booking to confirm changes to */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Active user */\n public get user(): User {\n return this._users.current;\n }\n\n /** Title of the displayed event */\n public get title(): string {\n return this.booking.title;\n }\n\n /** Comapny names */\n public get company(): string[] {\n return this.booking.company;\n }\n \n\n /** Display string of when the event will occur */\n public get when(): string {\n const duration_value = this.booking.duration;\n const all_day = this.booking.all_day && duration_value < 25 * 60;\n if(this.booking.is_recurrent && this.booking.recurrence_starts && this.booking.recurrence_starts.length){\n return formatWhen({all_day, ...this.recurrenceDates })\n }\n return formatWhen({\n all_day,\n startTZ: this.booking.startDateTz,\n endTZ: this.booking.endDateTz,\n displayEndTZ: this.booking.displayEndDateTz})\n }\n\n public get recurrenceDates(){\n const startTZ = getFirstDateFromList(this.booking.recurrence_starts)\n const endTZ = startTZ.addValue({minutes: this.booking.duration})\n return {startTZ, endTZ, displayEndTZ: endTZ}\n }\n\n /** Display string for the recurrence value of the booking */\n public get recurrence(): string {\n return recurrenceDetails({\n period: this.booking.recurrence_period,\n end: this.booking.recurrence_endTz,\n list: this.booking.recurrence_starts,\n interval: this.booking.recurrence_interval\n });\n }\n\n /** Display string for the event's duration */\n public get duration(): string {\n const duration_value = this.booking.duration;\n return this.booking.all_day ? 'All Day' : humaniseDuration(duration_value);\n }\n\n /** List of spaces associated with the event */\n public get spaces(): Space[] {\n return this.booking.multi_rooms;\n }\n\n /** List of attendees associated with the event not including the host */\n public get attendees(): User[] {\n const attendees = this.booking.attendees;\n return attendees.filter((i) => i.email !== this.organiser.email);\n }\n\n /** Host of the event */\n public get organiser(): User {\n return this.booking.organiser || this._users.current;\n }\n\n /** Host of the event */\n public get equipment_codes(): HashMap {\n return this.booking.equipment_codes || {};\n }\n\n /** Host of the event */\n public get catering_codes(): HashMap {\n const catering = this.catering;\n const codes = {};\n for (const order of this.catering) {\n codes[order.location_id] = order.charge_code;\n }\n return codes;\n }\n\n /** Host of the event */\n public get equipment_notes(): HashMap {\n return this.booking.notes\n .filter((note) => note.type === 'equipment')\n .reduce((map, notes) => {\n map[notes.space] = notes.message;\n return map;\n }, {});\n }\n\n /** Details about the event */\n public get notes(): string {\n return this.booking.body;\n }\n\n /** List of catering orders in the booking */\n public get catering(): CateringOrder[] {\n return (this.booking.catering || []).map((order) => {\n const space: any = this.spaces.find(\n (a_space) => a_space.email === order.location_id\n ) || {\n level: {}\n };\n const building: any =\n this._org.buildings.find((bld) => bld.id === space.level.building_id) || {};\n return new CateringOrder({\n ...order,\n location: space.local_name,\n symbol: building.currency,\n booking_date: this.booking.startDateTz.ms,\n booking_timezone: this.booking.timezone,\n });\n });\n }\n\n /** Map of changes to the booking */\n public get changes(): HashMap {\n return {};\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _org: OrganisationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private _router: Router,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingConfirmModalData,\n public settings: SettingsService,\n private closeDialogService: CloseDialogService, \n private renderer: Renderer2,\n ) {\n super();\n this.booking.time_changed =\n this.old_booking &&\n (this.old_booking.startDateTz.ms !== this.booking.startDateTz.ms ||\n this.old_booking.duration !== this.booking.duration);\n // in concierge, all bookings are acceptable without explicit approval.\n\n const rules = rulesForSpace({ user: this.user, space: this.booking.room, duration: 60 });\n this.is_request = this.settings.concierge ? false : rules.auto_approve;\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined; \n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && (booker_concierge !== null && booker_concierge !==undefined ) && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && (booker_concierge['email'] && organiser.email !==booker_concierge['email']) ) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n /**\n * Save booking changes\n */\n public saveChanges() {\n this.loading = 'Checking availability of selected spaces';\n this._dialog_ref.disableClose = true;\n this.checkSpaceAvailability().then(\n () => {\n this.loading = 'Processing booking request...';\n // Change the unchanged settings to the selected room\n const newEmail = this.booking.space.email;\n const replaceObjects = ['setup', 'breakdown', 'approval_status']\n replaceObjects.forEach(key => {\n const obj = this.booking[key];\n if (obj && obj.constructor === Object) {\n const keys = Object.keys(obj);\n if (keys.length > 0) {\n const replacement = {};\n keys.forEach(nk => {\n replacement[newEmail] = obj[nk];\n })\n this.booking[key] = replacement;\n }\n }\n });\n\n const buffer = {};\n this.booking.multi_rooms.map(room => room.email).forEach(elem => buffer[elem] = 900);\n\n // // if no setup or breakdown time already added and notes or catering exist? add 15 min buffer setup and breakdown to booking\n // if(this.booking.setup === null || this.booking.breakdown === null){\n // const has_note_buffer = (this.booking.notes && this.booking.notes?.length) || (this.booking.catering && this.booking.catering?.length) ? \n // buffer : null; // 900 seconds = 15 min\n // if (has_note_buffer) {\n // this.booking.setup = has_note_buffer;\n // this.booking.breakdown = has_note_buffer; \n // this.booking.room_setup = has_note_buffer; \n // this.booking.room_breakdown = has_note_buffer; \n // }\n // }\n\n // if no setup time already added and notes or catering exist? add 15 min buffer setup time to booking\n if (this.booking.setup === null || this.booking.setup === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.setup = has_note_buffer;\n this.booking.room_setup = has_note_buffer;\n }\n }\n\n // if no breakdown time already added and notes or catering exist? add 15 min buffer breakdown time to booking\n if (this.booking.breakdown === null || this.booking.breakdown === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.breakdown = has_note_buffer;\n this.booking.room_breakdown = has_note_buffer;\n }\n }\n\n\n this._bookings.save(this.booking, this._data.action === SeriesAction.EDIT).then(\n async (bkn) => {\n this.loading = null;\n this.success = true;\n this._dialog_ref.disableClose = false;\n const updated = new Booking({ ...this.booking, ...bkn.toApiJSON() });\n this._booking_state_service.replace(updated);\n \n /**\n * update the master booking in case of recurring to have latest updated in the system\n */\n if(updated.recurrence_master_id !== null)\n { \n const master_booking = await this._bookings.show(updated.recurrence_master_id);\n this._booking_state_service.replace(master_booking);\n }\n\n if (bkn.is_recurrent && bkn.recurrence_type === 'master') {\n this._booking_state_service.pollOnce();\n this.closeDialogService.closeDialog(DialogIds.MeetingDetails);\n }\n\n localStorage.removeItem('ACA_STAFF.booking_form_data');\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess(\n `Successfully ${this.booking.id ? 'updated' : 'created'} booking`\n );\n },\n (err) => {\n\n this._dialog_ref.disableClose = false;\n let erroMessage: string = '';\n switch(err.status){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 400:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.lastMomentConflict = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n },\n (err) => {\n\n this.lastMomentConflict = true;\n this._dialog_ref.disableClose = false;\n const erroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n }\n\n /**\n * Staff only\n */\n public newBooking() {\n this._router.navigate(['/book', 'spaces']);\n this._dialog_ref.close();\n }\n\n /**\n * Staff only\n */\n public toSchedule() {\n this._router.navigate(['/schedule'], {\n queryParams: { email: this.booking.organiser.email }\n });\n this._dialog_ref.close();\n }\n\n /**\n * Check whether the selected spaces are available for the selected time period\n */\n public checkSpaceAvailability(): Promise {\n const spaces: Space[] = this.spaces;\n if (\n (this.booking.id &&\n (this.booking.startDateTz.ms === this.old_booking.startDateTz.ms &&\n this.booking.duration === this.old_booking.duration)) ||\n (spaces && spaces.length <= 0)\n ) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n // Use of this.booking.timezone is unreliable, use booking space instead.\n const all_day = this.booking.all_day;\n // R--- should be nothing to do with date as a timestamp getter\n this._spaces\n .available({\n room_ids: spaces.map((space) => space.id).join(','),\n dateTz: this.booking.startDateTz,\n duration: all_day ? 24 * 60 : this.booking.duration,\n ignore: this.booking.icaluid,\n recurrence_count: this.booking.recurrence_count,\n recurrence_period: this.booking.recurrence_period,\n recurrence_endTz: this.booking.recurrence_endTz,\n recurrence_interval: this.booking.recurrence_interval,\n recurrence_starts: this.booking.recurrence_starts,\n is_recurrent: this.booking.is_recurrent,\n recurrence_days: this.booking.recurrence_days\n })\n .then(\n (space_list) => {\n for (const space of space_list) {\n if (!space.bookable) {\n this.lastMomentConflict = true;\n return reject(\n `${space.name} is not available at the select time period.`\n );\n }\n }\n if (space_list.length < spaces.length) {\n this.lastMomentConflict = true;\n return reject(\n `${spaces[0].name} is not available at the select time period.`\n );\n }\n resolve();\n },\n (err) => reject(err)\n );\n });\n }\n\n public openConflictsModal(){\n const ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.booking.local_room_name,\n conflicts: this.booking.recurrence_exceptions,\n copy_conflicts: true,\n timezone: this.booking.timezone\n }\n });\n\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(event.reason === 'close'){\n ref.close();\n }else if(event.reason === 'action'){\n navigator.clipboard.writeText(this.conflictsText)\n }\n \n })\n );\n ref.afterClosed().subscribe(() => this.unsub('modal_events'));\n }\n\n public get conflictsText(){\n let text = ''\n this.booking.recurrence_exceptions.map((date)=>{\n const dateTZ = new DateTZ({date: date*1000});\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n text = `${text}\\n${display}${dateTZ.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n })\n return text\n }\n\n public toggleList(listType: 'attendees' | 'locations' | 'catering') {\n if (listType === 'attendees') {\n this.show_attendees ? this.collapseList(this.attendeesListRef) : this.expandList(this.attendeesListRef);\n this.show_attendees = !this.show_attendees;\n } else if (listType === 'locations') {\n this.show_locations ? this.collapseList(this.locationsListRef) : this.expandList(this.locationsListRef);\n this.show_locations = !this.show_locations;\n } else if (listType === 'catering') {\n this.show_orders ? this.collapseList(this.cateringListRef) : this.expandList(this.cateringListRef);\n this.show_orders = !this.show_orders;\n }\n }\n\n public expandList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n const listItems = listElement.getElementsByClassName('list-item');\n let totalHeight = 0;\n\n for (let i = 0; i < listItems.length; i++) {\n totalHeight += listItems[i].offsetHeight;\n }\n\n this.renderer.setStyle(listElement, 'max-height', `${totalHeight}px`);\n this.renderer.addClass(listElement, 'shown');\n }\n\n public collapseList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n this.renderer.setStyle(listElement, 'max-height', '4.5em');\n this.renderer.removeClass(listElement, 'shown');\n }\n}\n","\n
\n \n
\n \n
\n Booking Details\n Confirmed!\n Requested!\n
\n
Please await confirmation of room
\n
\n
\n \n
{{ title || 'No title' }}
\n
\n
\n \n
{{ when }}
\n
\n
\n \n
{{ recurrence }}
\n 0\"\n (click)=\"openConflictsModal()\"\n >\n Conflicts\n
\n \n
\n \n
{{ duration }}
\n
\n
\n Locations({{ spaces.length || '0' }})*:\n
\n
\n
\n
{{ item?.local_name }}
\n \n Notes\n
\n \n Code\n
\n
\n
No Locations
\n
\n 1\"\n (click)=\"toggleList('locations')\"\n >\n {{ show_locations ? 'Hide' : 'Show more' }} Locations\n \n \n \n
\n \n
{{ organiser?.name || organiser?.email }}
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n
\n\n
\n \n \n \n \n
\n
\n\n
\n
\n
\n \n
\n
\n {{ loading }}\n
\n
\n
\n
\n\n \n \n \n
My Day\n \n\n","import {\n Component,\n Input,\n OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Output, EventEmitter \n} from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { distinctUntilChanged, first, skip } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n arrayWithValues,\n BookingAction,\n CateringOrder,\n SeriesAction,\n SettingsService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\n\nimport { NewUserModalComponent } from '../new-user-modal/new-user-modal.component';\nimport {\n SpaceSelectModalComponent,\n SpaceSelectModalData\n} from '../space-select-modal/space-select-modal.component';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\nimport { MatChipsModule} from '@angular/material/chips';\n\n\n@Component({\n selector: 'a-booking-form',\n templateUrl: './booking-form.component.html',\n styleUrls: ['./booking-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BookingFormComponent extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** List of available users to host bookings */\n public user_list: User[] = [];\n public nowTz: DateTZ = DateNow(new Date());\n /** From date input for date field */\n public fromDateTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n /** Last bookable date, concierge only */\n public readonly untilDateTz = DateNow(new Date()).addValue({ days: 365 }).endOfValue('day');\n public isConcierge: boolean;\n public localTimezone = DateNow(new Date()).building_tz;\n public localStart = \"\";\n public localEnd = \"\";\n // Define an array to store selected company options\n public chipOptions: any[] = [];\n public showTimeCateringWarning: boolean = false;\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _dialog: MatDialog,\n private settingsService: SettingsService,\n private cdRef: ChangeDetectorRef\n ) {\n super();\n this.isConcierge = this.settingsService.concierge;\n }\n\n public ngOnInit(): void {\n // Trim title \n // this.form.get('title').setValue(this.form.get('title').value.trim());\n\n this.chipOptions = [...this.form.controls.company.value];\n\n this.localTimezone = DateNow(new Date()).building_tz;\n const building_tz = (\n this.form.controls.action &&\n (\n this.form.controls.action.value === 'booking_clone' ||\n this.form.controls.action.value === 'clone' ||\n this.form.controls.action.value === 'edit' ||\n this.form.controls.action.value === 'booking_edit'\n ) &&\n this.form.controls.dateTz &&\n this.form.controls.dateTz.value\n ) ? this.form.controls.dateTz.value.building_tz : this.localTimezone;\n\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz });\n this.fromDateTz = closestToTimeSlotTz(this.nowTz, 15);\n\n this._users.initialised.pipe(first((_) => _)).subscribe(() => {\n const user: User = this._users.current;\n const delegates = user.delegates.map(\n (del) => this._users.find(del.email) || new User({ email: del.email, name: del.email.split('@')[0] })\n );\n this.user_list = [user].concat(delegates);\n });\n\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n this.subscription('formChanges', this.form.valueChanges\n .pipe(\n skip(1), // initial form changes\n distinctUntilChanged())\n .subscribe(() => {\n this.timeout('update_coachmark', () => {\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n }, 500);\n })\n );\n\n this.subscription('isRecurrentChanges', this.form.controls.is_recurrent.valueChanges\n .subscribe(() => {\n const recurrenceStarts = this.form.controls.recurrence_starts\n if(!this.form.controls.is_recurrent.value){\n recurrenceStarts.clearValidators() \n }else{\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n recurrenceStarts.setValidators(arrayValidators);\n }\n recurrenceStarts.updateValueAndValidity()\n })\n ); \n\n /**Disable Inputs */\n this.disableInputs();\n\n /**turn is_recurrent to false if editing or cloning a stand-alone/occurrence */\n if(this.form.controls.id?.value && !this.form.controls.action?.value){\n this.form.controls.is_recurrent.setValue(false)\n }\n\n // Subscribe to changes in dateTz, duration, and has_catering\n this.subscription('dateTz_changes', this.form.controls.dateTz.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n this.subscription('duration_changes', this.form.controls.duration.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // No need to subscribe to catering_changes since we're now handling has_catering\n this.subscription('has_catering_changes', this.form.controls.has_catering.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // Initial check\n this.checkTimeCateringWarning();\n}\n\n /**\n * \n * @param key : formcontrol name \n * Function trim value being submitted with only spaces/beginning/end \n */\n public trim(key: string): void {\n this.form.get(key).setValue(this.form.get(key).value.trim());\n }\n\n /** Whether notes and description should use the HTML editor */\n public get use_html(): boolean {\n return this._service.setting('app.booking.html_body') || false;\n }\n\n /** List of available types for bookings */\n public get booking_types(): Identity[] {\n return this._service.setting('app.booking.booking_types') || [];\n }\n\n /** Display string for the list of active spaces */\n public get spaces(): string {\n const spaces = this.form.controls.space_list.value;\n return spaces.length === 1\n ? spaces[0].local_name\n : spaces.length > 1\n ? `${spaces.length} spaces selected`\n : 'No Spaces selected';\n }\n\n public disableInputs() {\n const { id, action, needs_space, is_recurrent } = this.form.value;\n const has_id = !!id;\n const is_edit = action === BookingAction.EDIT;\n if (has_id) {\n this.form.get('is_recurrent')?.disable();\n }\n\n if(is_edit){\n this.form.get('is_multiroom')?.disable();\n }\n\n if (!this.isConcierge && !needs_space) {\n this.form.get('has_catering')?.disable();\n }\n if(has_id && is_edit && is_recurrent){\n this.form.get('dateTz')?.disable()\n this.form.patchValue({ action: null });\n }\n }\n\n /**\n * Open modal to change the space details for the booking\n */\n public openSpacesModal(): void {\n const ref = this._dialog.open(\n SpaceSelectModalComponent,\n {\n width: 'auto',\n height: 'auto',\n maxWidth: '95vw',\n data: {\n spaces: this.form.controls.space_list.value,\n dateTz: this.form.controls.dateTz.value,\n duration: this.form.controls.duration.value,\n host: this.form.controls.organiser.value,\n multiple: true,\n needsCatering: !!this.form.controls.catering?.value?.length,\n }\n }\n );\n this.subscription(\n 'new_spaces',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n let space_list = this.form.controls.space_list.value;\n space_list = event.metadata;\n this.form.controls.space_list.setValue(unique(space_list, 'id'));\n if (event.noCatering) {\n // Set has_catering to false and clear the catering list\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n } else {\n const catering = this.form.controls?.catering?.value.map((order: CateringOrder) => {\n order.location = space_list[0].name;\n order.location_id = space_list[0].email;\n return order;\n });\n this.form.controls.catering?.setValue(catering || []);\n }\n ref.close();\n this.unsub('new_spaces');\n }\n if (event.reason === 'close') {\n ref.close();\n this.unsub('new_spaces');\n }\n })\n );\n }\n\n /**\n * Open modal to change the recurrence details for the booking\n */\n public openNewUserModal() {\n const ref = this._dialog.open(NewUserModalComponent, {\n width: 'auto',\n height: 'auto'\n });\n this.subscription(\n 'new_user',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const attendees = this.form.controls.attendees?.value;\n attendees.push(event.metadata);\n this.form.controls.attendees.setValue(unique(attendees, 'email'));\n ref.close();\n this.unsub('new_user');\n this.cdRef.detectChanges();\n }\n })\n );\n }\n\n // Add & Remove chip and set the value of the form control accordingly\n addCompany(event, company): void {\n if (company) {\n this.chipOptions.push(company);\n this.form.controls.company.setValue(this.chipOptions);\n }\n event.preventDefault();\n }\n\n removeOption(option: any): void {\n const index = this.chipOptions.indexOf(option);\n if (index >= 0) {\n this.chipOptions.splice(index, 1);\n }\n this.form.controls.company.setValue(this.chipOptions);\n }\n\n private updateCoachmarkTimes(timezone: string) {\n if (!timezone) timezone = this.localTimezone;\n // Resolve the problem that locally I might have the same TZ offset but the names don't match.\n const localTzOffset = DateTime.now().setZone(this.localTimezone).offset;\n const buildingTzOffset = DateTime.now().setZone(timezone).offset;\n const dateTz = this.form.controls.dateTz.value;\n if (dateTz && localTzOffset !== buildingTzOffset) {\n const startDate = dateTz.clone();\n this.localStart = startDate.formatLocalDate(\"h:mma\");\n this.localEnd = startDate.addValue({ minutes: this.form.value.duration }).formatLocalDate(\"h:mma\");\n } else {\n // No location is selected so coachmark is hidden\n this.localStart = \"\";\n this.localEnd = \"\";\n }\n this.cdRef.detectChanges();\n }\n\n public get isSeriesAction(){\n return this.form.value.action === SeriesAction.CLONE || this.form.value.action === SeriesAction.EDIT\n }\n\n onToggleChange(toggledControlName: string, is_multiroom: boolean): void {\n if (toggledControlName === 'is_recurrent') {\n // If the is_recurrent toggle is being activated, deactivate is_multiroom\n if (this.form.controls.is_recurrent?.value) {\n this.form.controls.is_multiroom?.setValue(false);\n this.form.controls.merged?.setValue(false);\n this.form.get('merged')?.disable();\n\n }\n } else if (toggledControlName === 'is_multiroom') {\n // If the is_multiroom toggle is being activated, deactivate is_recurrent\n if (this.form.controls.is_multiroom?.value) {\n this.form.controls.is_recurrent?.setValue(false);\n }\n if(is_multiroom) { \n this.form.get('merged').setValue(false);\n this.form.get('merged')?.enable() \n } else {\n this.form.get('merged').setValue(false); \n this.form.get('merged')?.disable(); }\n }\n }\n \n private checkTimeCateringWarning() {\n const dateTz = this.form.controls.dateTz.value;\n const duration = this.form.controls.duration.value;\n const hasCatering = this.form.controls.has_catering?.value;\n const cateringOrders = this.form.controls.catering?.value;\n \n if (dateTz && duration && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n\n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n\n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n // Booking is outside of catering hours and has catering selected\n this.showTimeCateringWarning = true;\n } else {\n this.showTimeCateringWarning = false;\n }\n } else {\n this.showTimeCateringWarning = false;\n }\n\n // Inform Angular that the component needs to be checked\n this.cdRef.markForCheck();\n }\n\n}\n","
\n \n \n \n
\n
\n \n Title*:\n \n \n \n\n \n {{ ( form?.get('title').errors && form?.get('title').hasError('pattern')) \n ? 'Some special characters (^=`~!@#$%*{};:\\'_\\\",.\\<>) are not allowed' : 'Title is required'}} \n \n \n
\n\n
\n \n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n \n \n
\n \n
\n Duration is invalid. End time must be in the future\n
\n
\n
\n
\n Please be aware that this booking starts at {{localStart}} and ends at {{localEnd}} in your local timezone.\n
\n
\n Warning: Changing the booking time outside of catering hours will drop your catering order.\n
\n
\n
\n
\n
\n Recurring booking\n
\n \n
\n Multiroom\n
\n
\n \n
\n
Merged
\n
\n \n
\n
\n \n \n
\n \n \n \n \n \n {{ user.name || user.email }}\n \n \n \n
\n
\n \n \n \n {{ form?.get('attendees').errors?.customError }}\n \n
\n
\n \n
\n \n
\n \n
\n \n \n {{ ( form?.get('company').errors && form?.get('company').hasError('pattern'))\n ? 'Some special characters (^=`~@#$%*{};:_\\\",.\\<>) are not allowed' : ''}}\n \n
\n \n
\n \n \n {{ selected }}\n
\n
\n
\n
\n\n
1\">\n \n \n \n \n {{ type.name }}\n \n \n \n
\n
\n Need a meeting space?\n \n
\n
\n \n \n Need catering?\n \n
\n
\n \n \n \n \n \n \n \n
\n\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport {\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringItem,\n OrganisationService,\n Space,\n SpacesService\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringConfirmModalData {\n all_day: boolean;\n form: FormGroup;\n dateTz: DateTZ;\n}\n\n@Component({\n selector: 'a-catering-confirm-modal',\n templateUrl: './catering-confirm-modal.component.html',\n styleUrls: ['./catering-confirm-modal.component.scss']\n})\nexport class BookingCateringConfirmModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** List of selected items for the order */\n public item_list: CateringItem[] = [];\n\n /** Space selected for delivery */\n public get space(): Space {\n return this._spaces.find(this._data.form?.controls?.location_id?.value);\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n let date = this._data.dateTz;\n if (this._data.form && this._data.form.controls.delivery_time) {\n date = date.addValue({ minutes: this._data.form.controls.delivery_time.value });\n }\n return date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Form field for order items */\n public get item_field(): FormControl {\n return this._data.form.controls.items as any;\n }\n\n /** Total cost of the order */\n public get order_cost(): number {\n return this.item_list.reduce((amount, item) => {\n const price = item.price\n return amount + item.amount * price\n }, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n /* istanbul ignore else */\n if (!this.space || !this.space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find(\n (bld) => bld.id === this.space.level.building_id\n ) || { currency: 'USD' };\n return building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringConfirmModalData\n ) {\n super();\n if (!this._data.form) {\n this._service.notifyError('No form data for order');\n this._dialog_ref.close();\n }\n }\n\n public ngOnInit(): void {\n /* istanbul ignore else */\n if (this._data.form.controls.items) {\n this.subscription(\n 'item_list',\n this._data.form.controls.items.valueChanges.subscribe((items) => {\n /* istanbul ignore else */\n if (!items || items.length <= 0) {\n this._dialog_ref.close();\n }\n })\n );\n }\n this.item_list = this._data.form.controls.items.value.map((item) => new CateringItem(item.toJSON()));\n }\n}\n","
\n
Confirm Catering Order
\n \n
\n\n
\n
\n Delivering to {{ space?.local_name || space?.simple_name || space?.settings?.room_name }} at {{ delivery_time }}\n
\n
\n \n
\n
\n \n
{{ order_cost / 100 | currency:symbol }}
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n OrganisationService,\n BookingNote,\n CateringOrder,\n Space,\n UsersService,\n CateringNotesService,\n Booking\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n catering: AbstractControl;\n booking: Booking\n}\n\n@Component({\n selector: 'a-catering-details-modal',\n templateUrl: './catering-details-modal.component.html',\n styleUrls: ['./catering-details-modal.component.scss']\n})\nexport class CateringDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: HashMap = {};\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return (this._data.spaces || []).filter((space) =>\n this._data.catering.value.find((order) => order.location_id === space.email)\n );\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.pattern || this.active_form.controls.code.errors?.minlength;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n return this.space_list.reduce(\n (valid, space) => valid && this.form[space.email].valid,\n true\n );\n }\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _cateringNotesService: CateringNotesService,\n @Inject(MAT_DIALOG_DATA) private _data: CateringDetailsModalData\n ) {\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type === 'catering'\n );\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = this._data.catering.value.reduce((map, order: CateringOrder) => {\n map[order.location_id] = order.charge_code;\n return map;\n }, {});\n this.generateFormFields();\n }\n\n public submit(): void {\n this.space_list.forEach((space) => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes\n const notes = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type !== 'catering'\n );\n const new_notes = this.space_list.map(\n (space) =>\n ({\n author: this._data.booking.booked_by ? this._data.booking.booked_by['name'] : this._users.current.name,\n type: 'catering',\n message: this.form[space.email].controls.notes.value,\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote)\n );\n this._cateringNotesService.setNotes(new_notes);\n this._data.notes_field.setValue(notes.concat(new_notes).filter((note) => note.message));\n // Save the notes\n const orders = this._data.catering.value.map(\n (order) =>\n new CateringOrder({\n ...order,\n charge_code: this.form[order.location_id]\n ? this.form[order.location_id].controls.code.value\n : ''\n })\n );\n\n this._data.catering.setValue(orders);\n // This should go to the next\n this.event.emit({ reason: 'done' });\n } else {\n this._scrollToBottom();\n }\n }\n\n /** Generate form fields for each space */\n private generateFormFields(): void {\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space.level.building_id\n );\n \n this.needs_charge_code[space.email] = space?.filters?.charge_code || space?.settings?.charge_code || false;\n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(this.codes[space.email] || '',\n this.needs_charge_code[space.email] ?\n [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4), Validators.required ] : [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4)])\n });\n }\n }\n\n /** Scroll the content container to the bottom */\n private _scrollToBottom(): void {\n this._content_el?.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n}\n","
\n
\n \n \n \n
\n \n
\n\n
\n
\n \n
Please specify any allergies or gluten intolerances
\n
\n
\n
\n \n \n \n \n
\n
\n \n Charge Code\n *\n \n \n \n \n Note: Your booking will be confirmed before you are charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\n\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\nexport interface ConfirmModalData {\n /** Title of the modal */\n title: string;\n /** Contents of the modal */\n content: string;\n /** Text displaed on the confirmation button */\n action?: string;\n /** Icon to display on the modal */\n icon: ApplicationIcon;\n}\n\nexport const CONFIRM_METADATA = {\n height: 'auto',\n width: '24em',\n maxHeight: 'calc(100vh - 2em)',\n maxWidth: 'calc(100vw - 2em)'\n};\n\n@Component({\n selector: 'confirm-modal',\n templateUrl: './confirm-modal.component.html',\n styleUrls: ['./confirm-modal.component.scss']\n})\nexport class ConfirmModalComponent extends BaseDirective {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: string;\n\n /** Title of the confirm modal */\n public get title(): string {\n return (this._data ? this._data.title : null) || 'Confirm';\n }\n\n /** Body of the confirm modal */\n public get content(): string {\n return (this._data ? this._data.content : null) || 'Are you sure?';\n }\n\n /** Display text on the confirm button */\n public get action(): string {\n return (this._data ? this._data.action : null) || 'Ok';\n }\n\n /** Display icon properties */\n public get icon(): ApplicationIcon {\n return (this._data ? this._data.icon : null) || null;\n }\n\n constructor(\n private _dialog: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: ConfirmModalData\n ) {\n super();\n }\n\n /**\n * User confirmation of the content of the modal\n */\n public accept() {\n this.event.emit({ reason: 'done' });\n }\n}\n","
\n

{{ title || 'Confirm' }}

\n
\n\n
\n \n
\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { SpaceSelectModalComponent } from './space-select-modal/space-select-modal.component';\nimport { NewUserModalComponent } from './new-user-modal/new-user-modal.component';\nimport { ConfirmModalComponent } from './confirm-modal/confirm-modal.component';\nimport { NoCateringModalComponent } from './no-catering-modal/no-catering-modal.component';\nimport { BookingCateringConfirmModalComponent } from './catering-confirm-modal/catering-confirm-modal.component';\nimport { CateringDetailsModalComponent } from './catering-details-modal/catering-details-modal.component';\nimport { RequirementDetailsModalComponent } from './requirement-details-modal/requirement-details-modal.component';\nimport { BookingConfirmComponent } from './booking-confirm/booking-confirm.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UserFormComponent } from './user-form/user-form.component';\nimport { BookingFormComponent } from './booking-form/booking-form.component';\nimport { EditorModule } from '@tinymce/tinymce-angular';\n\nconst DECLARATIONS = [\n SpaceSelectModalComponent,\n NewUserModalComponent,\n ConfirmModalComponent,\n NoCateringModalComponent,\n BookingCateringConfirmModalComponent,\n CateringDetailsModalComponent,\n RequirementDetailsModalComponent,\n BookingConfirmComponent,\n UserFormComponent,\n BookingFormComponent,\n];\n\n@NgModule({\n imports: [\n LegacyUiModule,\n FormsModule,\n ReactiveFormsModule,\n CommonModule,\n UiModule,\n BaseModule,\n EditorModule,\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ...DECLARATIONS,\n BaseModule\n ]\n})\nexport class LegacyOverlaysModule {\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { BaseDirective, DialogEvent } from '@mckinsey-converge/base';\nimport { generateUserForm, User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'new-user-modal',\n templateUrl: './new-user-modal.component.html',\n styleUrls: ['./new-user-modal.component.scss'],\n})\nexport class NewUserModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for the new user */\n public form: FormGroup;\n /** New user data store */\n public user: User;\n /** Whether user details are being saved */\n public loading: boolean;\n\n public ngOnInit(): void {\n this.user = new User();\n this.form = generateUserForm(this.user);\n }\n\n public saveChanges() {\n this.form.markAllAsTouched();\n if (this.form.valid) {\n if (!this.form.controls.email.value) {\n this.form.controls.email.setValue(\n `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`\n );\n }\n const firstName = this.form.value.first_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n const lastName = this.form.value.last_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n \n const new_user = new User({\n ...this.form.value,\n name: `${firstName} ${lastName}`,\n type: 'external',\n external: true,\n visitor: true,\n });\n this.event.emit({ reason: 'done', metadata: new_user });\n }\n }\n}\n","
\n

Add External Attendee

\n \n
\n
\n \n
\n
\n \n \n
\n\n
\n
\n
\n \n
\n
\n Saving attendee...\n
\n
\n
\n
\n\n","import {\n Component,\n Output,\n EventEmitter\n} from '@angular/core';\nimport {\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'no-catering-modal',\n templateUrl: './no-catering-modal.component.html',\n styleUrls: ['./no-catering-modal.component.scss']\n})\nexport class NoCateringModalComponent extends BaseDirective {\n constructor(\n private _dialog_ref: MatDialogRef,\n ) {\n super();\n }\n\n // /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n\n // Submit the Survey in it's current state.\n public confirm() {\n this.event.emit({ reason: 'done', noCatering: true });\n this._dialog_ref.close();\n }\n\n // Close the modal\n public cancel() {\n this.event.emit({ reason: 'close' });\n this._dialog_ref.close();\n }\n}\n","
\n \n
\n
\n
\n \n

Catering is not available for your new room selection. \n
Are you sure you want to drop order and change rooms?

\n
\n
\n \n \n \n
\n
\n
","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n BookingNote,\n OrganisationService,\n SettingsService,\n Space,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface RequirementDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n codes_field: AbstractControl;\n head_counts_field: AbstractControl;\n standalone?: boolean;\n}\n\n@Component({\n selector: 'a-requirement-details-modal',\n templateUrl: './requirement-details-modal.component.html',\n styleUrls: ['./requirement-details-modal.component.scss']\n})\nexport class RequirementDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: boolean;\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return this._data.spaces;\n }\n\n public get has_recurrence(): boolean {\n return false\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.minlength || this.active_form.controls.code.errors?.pattern;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n // return this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n return this.space_list.length > 0 && this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n }\n\n public isConcierge: boolean;\n public frontend: string;\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n @Inject(MAT_DIALOG_DATA) private _data: RequirementDetailsModalData,\n private _settings: SettingsService,\n ) {\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value\n .filter((note: BookingNote) => note.type === 'equipment');\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = { ...this._data.codes_field.value };\n this.head_counts = { ...this._data.head_counts_field.value };\n this.generateFormFields();\n }\n\n public submit(): void {\n // Get the email of the first space\n const firstSpaceEmail = this.space_list[0].email;\n\n // Copy values from the first space's form controls to all other spaces\n this.space_list.forEach(space => {\n if (space.email !== firstSpaceEmail) {\n this.form[space.email].controls.notes.setValue(this.form[firstSpaceEmail].controls.notes.value);\n this.form[space.email].controls.code.setValue(this.form[firstSpaceEmail].controls.code.value);\n this.form[space.email].controls.head_count.setValue(this.form[firstSpaceEmail].controls.head_count.value);\n }\n });\n\n this.space_list.forEach(space => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes \n const notes = this._data.notes_field.value\n .filter((note: BookingNote) => note.type !== 'equipment');\n const new_notes = this.space_list.map(space => ({\n author: this._users.current.name,\n type: 'equipment',\n message: this.form[space.email].controls.notes.value.trim(),\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote));\n this._data.notes_field.setValue(notes.concat(new_notes).filter(note => note.message));\n this._data.codes_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.code.value;\n return map;\n }, {}));\n this._data.head_counts_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.head_count.value;\n return map;\n }, {}));\n this.event.emit({ reason: 'done' });\n } else {\n this._content_el.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n }\n\n /** Generate form fields for each space */\n // private generateFormFields(): void {\n // for (const space of this.space_list) {\n // const building = this._org.buildings.find(\n // bld => bld.id === space[0]?.level.building_id\n // );\n // // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n // const { filters, settings } = space;\n // const roomBasedEqCode = filters?.equipment_code || settings?.equipment_code;\n // const officeBasedEqCode = building?.required?.equipment_code;\n // this.needs_charge_code[space.email] = roomBasedEqCode !== undefined ? roomBasedEqCode : officeBasedEqCode !== undefined ? officeBasedEqCode: false;\n\n // this.form[space.email] = new FormGroup({\n // notes: new FormControl(this.notes[space.email] || ''),\n // code: new FormControl(\n // this.codes[space.email] || '',\n // this.needs_charge_code[space.email] ?\n // [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] : [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n // ),\n // head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n // });\n // }\n // }\n \n private generateFormFields(): void {\n // Initialize a variable to determine if any space needs a charge code\n let anySpaceNeedsChargeCode = false;\n \n // First pass to determine if any space needs a charge code\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space?.level.building_id\n );\n const { filters, settings } = space;\n const roomBasedEqCode = filters?.equipment_code;\n const officeBasedEqCode = building?.required?.equipment_code;\n \n // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n if (roomBasedEqCode || officeBasedEqCode) {\n anySpaceNeedsChargeCode = true;\n this.needs_charge_code = true;\n break;\n } else{\n this.needs_charge_code = false;\n }\n }\n \n // Second pass to create form groups with the determined charge code requirement.\n // We show only the first space, but if one of the selected spaces needs a mandatory charge code,\n // then all spaces need a mandatory charge code\n for (const space of this.space_list) { \n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(\n this.codes[space.email] || '',\n anySpaceNeedsChargeCode ?\n [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] :\n [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n ),\n head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n });\n }\n }\n}\n","
\n
\n \n \n \n \n {{\n this.space_list.length > 1 ? this.space_list.length + ' spaces selected' :\n this.space_list[0]?.local_name || 'No spaces selected'\n }}\n \n \n \n \n
\n \n
\n\n
\n
\n \n
\n {{\n has_recurrence && !isConcierge\n ? 'To update headcount information, add equipment or catering, please edit individual meeting occurences in My Day'\n : \"Would you like to add equipment to your booking's spaces?\"\n }}\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n Charge Code*\n \n \n \n \n Note: Your booking will be confirmed before you are\n charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n \n Headcount Estimate*\n \n \n \n \n Note: This estimate is used to calculate catering and/or\n assign rooms. Please keep updated of any changes.\n \n \n Headcount Estimate is required\n \n \n
\n \n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {\n BehaviorSubject,\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n first,\n map,\n switchMap,\n take,\n withLatestFrom\n} from 'rxjs/operators';\nimport {\n Building,\n mapBuildingToSelectOption,\n mapCityToAllSelectOption,\n OrganisationService,\n SettingsService,\n Space,\n SpaceBookingRuleOptions,\n SpacesService,\n toggleSelectedByGroup,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n DialogEvent,\n HashMap,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport { NoCateringModalComponent } from '../no-catering-modal/no-catering-modal.component'\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport interface SpaceSelectModalData {\n /** List of selected spaces */\n spaces: Space[];\n /** Start time for availability of spaces */\n dateTz: DateTZ;\n /** Duration of the availability block to look for */\n duration: number;\n /** Host of the booking being made */\n host: User;\n /** Whether multiple spaces can be selected */\n multiple: boolean;\n /** Force zone ids */\n zone_ids?: string;\n /** Booking needs catering */\n needsCatering?: boolean,\n}\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'a-space-select-modal',\n templateUrl: './space-select-modal.component.html',\n styleUrls: ['./space-select-modal.component.scss']\n})\nexport class SpaceSelectModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether space list is being loaded */\n public loading: boolean;\n /** List of available spaces to select from */\n public spaces: Space[] = [];\n /** Active building to filter spaces on */\n public active_building: Building;\n /** Active building to filter spaces on */\n public active_type: Identity;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n /** List of currently selected spaces */\n public selected_spaces: Space[] = [];\n /** Mapping as to whether a space is by request */\n public request_map: HashMap = {};\n /** Whether selected list should be shown on mobile */\n public show_list: boolean;\n\n /** host to load (only in staff) **/\n public host: User;\n\n /** List of available buildings */\n public types: Identity[] = [];\n\n public isConcierge: boolean;\n public frontend: string;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n /** Whether multiple spaces can be selected */\n public get multiple(): boolean {\n return false;\n }\n\n public get has_zone(): boolean {\n return !!this._data.zone_ids;\n }\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n\n public noCateringDialogRef: MatDialogRef;\n\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public savedSelection\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _spaces: SpacesService,\n private _settings: SettingsService,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: SpaceSelectModalData\n ) {\n super();\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld) => {\n this.loading = true;\n const zone_ids: string[] = [];\n /* istanbul ignore else */\n if (this.active_building) {\n zone_ids.push(this.active_building.id);\n }\n\n if (bld?.includes('|')) {\n bld = this.savedSelection\n }\n\n const id = request_id;\n return this._spaces.available({\n zone_ids: bld?.length ? bld : this._data.spaces[0].building.id || zone_ids.join(','),\n dateTz: this._data.dateTz,\n duration: this._data.duration\n }).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _ })),\n map((resp: { id: number, list: Space[] }) => {\n this.loading = false;\n const filtered_list = resp.list.filter((space: Space) => {\n // if concierge skip rules check.\n if (this._settings.concierge) {\n return (this.active_type && this.active_type.id ? space.zones.includes(`${this.active_type.id}`) : true) &&\n !this.selected_spaces.find((s) => s.id === space.id);\n }\n\n const rules = space.rulesFor({\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this.host || this._data.host\n });\n return (\n rules.hide !== true &&\n (this.active_type && this.active_type.id\n ? space.zones.includes(`${this.active_type.id}`)\n : true) &&\n !this.selected_spaces.find((_space) => _space.id === space.id)\n );\n });\n return resp.id === request_id ? filtered_list : this.spaces;\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.spaces = list.filter((space) => {\n if (!space.available) {\n return false;\n }\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n });\n this.spaces.sort((a, b) => this.sort(a, b));\n if (!this.selectedOptions.value.length) {\n this.setDefaultBuilding()\n }\n })\n );\n this.active_building = this._data.spaces?.length\n ? this._org.buildings.find((i) => i.id === this._data.spaces[0].level.building_id)\n : this._org.building;\n this.types = [{ id: '', name: 'Any Space Type' } as any].concat(\n this._org.space_types || []\n );\n this.active_type = this.types[0];\n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: { name: city, timezone },\n value: bld_list?.filter((bld) => bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld) => mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ]\n this.options.next(buildings)\n }));\n\n }\n\n /** Add space to selected list */\n public addSpace(space: Space) {\n this.selected_spaces.push(space);\n this.selected_spaces = unique(this.selected_spaces, 'id');\n }\n\n /** Remove space from selected list */\n public removeSpace(space: Space) {\n this.selected_spaces = this.selected_spaces.filter((a_space) => a_space.id !== space.id);\n }\n\n /** Emit current state of the selected list */\n public save(list: Space[]) {\n if (!this._data.needsCatering) {\n // No catering order to warn about\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // Check if the room has catering \n if (list[0].has_catering) {\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // If not warn that the room doesn't have catering\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.event.emit({ reason: 'done', metadata: list, noCatering: event.noCatering });\n }\n if (event.reason === 'close') {\n this.event.emit({ reason: 'close' });\n }\n })\n );\n }\n\n private update() {\n const map = {};\n const options: SpaceBookingRuleOptions = {\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this._data.host\n };\n this.selected_spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.request_map = map;\n }\n\n public setDefaultBuilding() {\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id)) || { name: '', sort_order: [] };\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld) => bld.value)\n\n });\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n public selectSpace(space: Space) {\n const list = this.spaces;\n if (list.find((item) => item.id === space.id)) {\n this.spaces = list.filter((item) => item.id !== space.id);\n } else {\n this.spaces = [space];\n }\n }\n\n public clearList() {\n this.spaces = []\n this.savedSelection = []\n }\n\n public triggerSearch = () => {\n if (this.savedSelection.length) {\n this.change$.next(this.savedSelection)\n } else {\n this.spaces = []\n }\n }\n\n}\n","
\n
Select meeting space{{ multiple ? 's' : '' }}
\n \n
\n\n
\n
\n \n \n 1\">Type\n 1\">\n \n \n {{ type?.name }}\n \n \n \n \n
\n \n \n
\n
\n
{{ space.local_name }}
\n
{{ space.level.name }}
\n
\n
\n \n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n {{ (!isConcierge && request_map[space.id]) ? 'Request' : 'Select' }}\n \n
\n
\n
\n
\n
\n
\n
\n

Selected spaces

\n
\n \n
\n \n \n
\n
\n
{{ space.name }}
\n
{{ space.level.name }}
\n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n
Loading available spaces...
\n
\n
\n\n
\n
\n \n
\n
No results available, please select another office.
\n
\n
\n\n
\n
\n \n
\n
No selected spaces
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'user-form',\n templateUrl: './user-form.component.html',\n styleUrls: ['./user-form.component.scss']\n})\nexport class UserFormComponent {\n /** Group of form fields used for creating the system */\n @Input() public form: FormGroup;\n}\n","
\n
\n
\n First Name:\n \n \n First name is required\n \n \n
\n
\n Last Name:\n \n \n Last name is required\n \n
\n
\n Email:\n \n \n A valid email is required\n \n
\n
\n
\n","export * from './lib/legacy-ui.module';\nexport * from './lib/custom-fields';\nexport * from './lib/icon/icon.component';\nexport * from './lib/feedback/feedback.component';\nexport * from './lib/action-icon/action-icon.component';\nexport * from './lib/user-avatar/user-avatar.component';\nexport * from './lib/bookings/catering/item/item.component';\nexport * from './lib/cng-search-bar/cng-search-bar.component';\n","import { Component, OnInit, Input } from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'action-icon',\n templateUrl: './action-icon.component.html',\n styleUrls: ['./action-icon.component.scss']\n})\nexport class ActionIconComponent implements OnInit {\n /** Icon to display */\n @Input() public icon: ApplicationIcon;\n /** Whether action is being processed */\n @Input() public loading: boolean;\n /** State of the action */\n @Input() public state: 'success' | 'error' | '' = '';\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","
\n \n
\n \n
\n
\n \n
\n
\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringCategory,\n CateringItem,\n SettingsService\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { PackageOptionsModalComponent } from '../package-options-modal/package-options-modal.component';\n\nfunction hasSelectionRequirements(category: CateringCategory) {\n return (\n category.must_select < category.items.length ||\n (category.must_select === category.items.length &&\n category.items.find((item: any) => item.items && item.must_select < item.items.length))\n );\n}\n\nfunction getActiveList(category: CateringCategory) {\n const items = category.items || [];\n let list = items.filter((item) => item.amount > 0).map((item) => item.id);\n for (const item of items) {\n if ((item as any).items && (item as any).items.length) {\n list = list.concat(getActiveList(item as any));\n }\n }\n return list;\n}\n\n@Component({\n selector: 'a-catering-menu-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringMenuItemComponent extends BaseDirective implements OnChanges {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Field for storing items */\n @Input() public field: FormControl;\n /** Current symbol for the selected space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n public initial_state = null;\n\n /** List of contents of the package */\n public get contents(): string {\n return this.item.items\n ? this.item.items.reduce((list, item) => {\n /* istanbul ignore else */\n if (list) {\n list += '\\n\\n';\n }\n return (list += `${item.name}${\n (item as any).items\n ? (item as any).items.reduce(\n (a_list, an_item) =>\n (a_list += `\\n ${an_item.amount ? '✓' : '•'} ${an_item.name} `),\n ''\n )\n : ''\n } ${item.amount ? '✓' : ''}`);\n }, '')\n : '';\n }\n\n constructor(private _service: ApplicationService, private _dialog: MatDialog,\n public settings: SettingsService) {\n super();\n // on the item selection set the revert/close state\n this.initial_state = this.item;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.field && this.field) {\n const list = this.field.value;\n // check the category\n let item = list.find((an_cat) => an_cat.id === this.item.id);\n if (item) {\n // update the category level amount\n this.item.setAmount(item ? item.amount : 0);\n } else {\n // find a category item\n for (var cat of list) {\n item = cat?.items.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(item ? item.amount : 0);\n break;\n }\n }; \n } \n\n // On the confirm catering order modal set the revert/close state\n if (!this.initial_state && this.item.amount) {\n this.initial_state = this.item;\n }\n\n this.subscription(\n 'field_change',\n this.field.valueChanges.subscribe((list) => {\n const item = list.find((an_item) => an_item.id === this.item.id);\n this.item.setAmount(item ? item.amount : 0);\n this.updatePackageSelection();\n })\n );\n }\n }\n\n /**\n * Update the amount of the item in the order\n * @param value New amount\n */\n public updateAmount(value: number) {\n /* istanbul ignore else */\n if (this.field) {\n const list: CateringItem[] = this.field.value;\n const item = list.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(value);\n item.setAmount(value);\n // MCK-1550 fix\n const price = this.item.price;\n item.setPrice(price)\n } else {\n const amount = this.item.amount;\n this.item.setAmount(value);\n if (\n this.item.package &&\n amount < value &&\n this.item.items &&\n this.item.items.length &&\n hasSelectionRequirements(this.item)\n ) {\n this.selectPackageOptions().then(\n (confirmed_item) => {\n list.push(new CateringCategory(confirmed_item));\n this.field.setValue(list.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n } else {\n list.push(new CateringItem(this.item));\n }\n }\n this.field.setValue(list.filter((an_item) => an_item.amount));\n }\n }\n\n public updatePackageSelection() {\n const cart_item = this.field.value.find((item) => item.id === this.item.id);\n if (cart_item) {\n const active_items = getActiveList(cart_item);\n this.timeout(\n 'update_package',\n () => {\n this.item.items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n if ((item as any).items) {\n (item as any).items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n });\n }\n });\n },\n 5\n );\n }\n }\n\n /** Reselect package options */\n public updatePackageOptions(): void {\n let updatedList: CateringItem[] = [];\n this.selectPackageOptions().then(\n (confirmed_item) => {\n // Update the existing category package\n this.field.value.forEach((category: CateringCategory) => {\n if (category.id === confirmed_item.id) {\n updatedList.push(new CateringCategory(confirmed_item))\n } else {\n updatedList.push(category)\n }\n })\n this.field.setValue(updatedList.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n }\n\n /**\n * Open modal for user to select package options\n */\n private selectPackageOptions(): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(PackageOptionsModalComponent, {\n maxWidth: '95vw',\n data: {\n item: new CateringCategory(this.item)\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n let done = false;\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n done = true;\n resolve(ref.componentInstance.item);\n this.initial_state = this.item;\n ref.close();\n }\n });\n ref.afterClosed().subscribe(() => {\n /* istanbul ignore else */\n if (!done) {\n if (this.initial_state) {\n resolve(this.initial_state);\n } else {\n reject();\n }\n }\n });\n });\n }\n}\n","\n \n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n { item.availableItems.length, plural, =1 { Contains {{ item.availableItems.length }} item } other {\n Contains {{ item.availableItems.length }} items } }\n
\n 0\"\n [matTooltip]=\"contents\"\n >\n {{ item.must_select }}\n \n Selected\n \n
\n 0\"\n (click)=\"updatePackageOptions()\"\n i18n=\"Catering order item options change action\"\n >\n Customise\n \n \n \n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n CateringCategory,\n CateringItem\n} from '@mckinsey-converge/data-common';\n\nexport interface PackageOptionsModalData {\n item: CateringCategory;\n}\n\nexport function checkItemRequirements(category: CateringCategory): boolean {\n const items = category.items || [];\n return category.must_select >= items.length\n ? items.reduce((valid, item) => valid && checkItemRequirements(item as any), true)\n : items.reduce((amount, item) => amount + (item.amount ? 1 : 0), 0) ===\n category.must_select;\n}\n\nexport function getActiveItems(category: CateringCategory): HashMap {\n let map = {};\n if (category.items) {\n const item = category.items.find(item => item.amount > 0);\n if (item) {\n map[category.id] = item.id;\n }\n category.items.forEach(item => map = { ...map, ...getActiveItems(item as any) });\n }\n return map;\n}\n\n@Component({\n selector: 'a-package-options-modal',\n templateUrl: './package-options-modal.component.html',\n styleUrls: ['./package-options-modal.component.scss']\n})\nexport class PackageOptionsModalComponent {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n\n /** Item to select options for */\n public get item(): CateringCategory {\n return this._data.item;\n }\n\n /** Whether package requirements have been met */\n public get requirements_met(): boolean {\n return checkItemRequirements(this.item);\n }\n\n public get active_items(): HashMap {\n return getActiveItems(this.item);\n }\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: PackageOptionsModalData) {\n }\n\n /**\n * Update the list of selected items\n */\n public updateAmount(a_package: CateringCategory, option: CateringItem, state: boolean) {\n if (state) {\n const needed = a_package.must_select;\n const active = a_package.items.filter(an_item => an_item.amount > 0).length;\n if (active >= needed) {\n const item = a_package.items.find(an_item => an_item.amount > 0);\n item.setAmount(0);\n }\n option.setAmount(1);\n } else {\n option.setAmount(0);\n }\n }\n}\n","
\n

Package Options

\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n \n \n
\n \n 1\"\n [checked]=\"!!option.amount\"\n (change)=\"updateAmount(package, option, $event.checked)\"\n >\n {{ option.name }}\n \n \n {{ option.name }}\n \n \n = package.items.length || option.must_select\">\n {{ option.name }}\n \n \n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\n\n// Interface to define the structure of the configuration object for the search bar\nexport interface SearchBarConfig {\n placeholder?: string;\n totalFoundItem?: number;\n showSrchWarning?: boolean;\n}\n\n@Component({\n selector: 'cng-search-bar',\n templateUrl: './cng-search-bar.component.html',\n styleUrls: ['./cmg-search-bar.component.scss']\n})\nexport class CngSearchBarComponent implements OnChanges {\n // Input property to accept configuration for the search bar\n @Input() config: SearchBarConfig = {\n placeholder: 'Search ...',\n totalFoundItem: 0,\n showSrchWarning: false\n };\n\n // Output event emitter to emit search strings to parent components\n @Output() search = new EventEmitter();\n\n // Local variable to store the search string entered by the user\n searchStr: string = '';\n\n // Lifecycle hook that is called when any data-bound property of a directive changes\n ngOnChanges(changes: SimpleChanges): void {\n // Check if the config property has changed\n if (changes.config) {\n const configChanges = changes.config.currentValue;\n // Update the config with new values or fallback to defaults\n this.config = {\n placeholder: configChanges.placeholder || 'Search ...',\n totalFoundItem: configChanges.totalFoundItem || 0,\n showSrchWarning: configChanges.showSrchWarning || false\n };\n }\n }\n\n // Method to handle the search action\n onSearch(value: string): void {\n // Emit the search string if it's not empty\n if (value) {\n this.search.emit(value);\n } else {\n this.clearSearch();\n }\n }\n\n // Method to clear the search input and reset related configurations\n clearSearch(box: HTMLInputElement | null = null): void {\n this.searchStr = '';\n if (box) {\n box.value = '';\n }\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n this.search.emit('');\n }\n\n // Method to reset the search-related warnings and item count\n resetSearch(): void {\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n }\n}\n","
\n \n \n
{{ config.totalFoundItem }}
\n \n \n \n
\n \n No search found!\n
\n
\n ","import { Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n@Directive({\n selector: '[hover-class]'\n})\nexport class HoverClassDirective {\n @Input('hover-class') hoverClass: string;\n\n constructor(private elementRef: ElementRef) {}\n\n @HostListener('mouseenter') onMouseEnter() {\n this.update('add');\n }\n\n @HostListener('mouseleave') onMouseLeave() {\n this.update('remove');\n }\n\n @HostListener('blur') onBlur() {\n this.update('remove');\n }\n\n private update(action: string): void {\n this.hoverClass.split(' ').forEach(item => this.elementRef.nativeElement.classList[action](item));\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'an-action-field',\n templateUrl: './action-field.component.html',\n styleUrls: ['./action-field.component.scss']\n})\nexport class ActionFieldComponent extends BaseDirective {\n /** Name of the field */\n @Input() public name: string;\n /** Value to display on the field */\n @Input() public placeholder: string;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Emitter for user interaction events */\n @Output('onAction') public on_action = new EventEmitter();\n /** Whether to show tooltip */\n public show_tooltip = false;\n\n /**\n * Emit that the user has performed an action on the field\n */\n public performAction() {\n this.show_tooltip = !this.show_tooltip;\n this.on_action.emit();\n }\n}\n","\n
{{ placeholder }}
\n
\n \n
\n\n","import { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'a-counter',\n templateUrl: './counter.component.html',\n styleUrls: ['./counter.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n /* istanbul ignore next */\n useExisting: forwardRef(() => CounterComponent),\n multi: true,\n },\n ],\n})\nexport class CounterComponent implements ControlValueAccessor {\n /** Maximum amount for the counter */\n @Input() public max: number = 10;\n /** Minimum amount for the counter */\n @Input() public min: number = 0;\n\n @Input() public useInput = false;\n\n /** Current value of the counter */\n public value: number;\n public previous_value: number = 0;\n /** Whether shift key is being held by the user */\n public shift_key: boolean;\n /** Whether control key is being held by the user */\n public ctrl_key: boolean;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /**\n * Add the `step` to the current value\n */\n public add() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value += step;\n if (this.value > this.max) {\n this.value = this.max || 10;\n }\n this.setValue(this.value);\n }\n\n /** Remove the `step` from the current value */\n public remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }\n\n public handleTimeout = null;\n\n public onInputChange(new_value: string) {\n if (this.handleTimeout) {\n clearTimeout(this.handleTimeout);\n this.handleTimeout = null;\n }\n this.handleTimeout = setTimeout(() => this.changeInput(new_value), 500);\n }\n\n public changeInput(new_value: string) {\n let value = Number(new_value);\n if (isNaN(value)) {\n value = this.previous_value;\n }\n if (value < this.min) {\n value = this.min || 0;\n }\n if (value > this.max) {\n value = this.max || 10;\n }\n this.setValue(value);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.previous_value = new_value;\n this.value = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.value = value;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","\n \n \n
\n {{value || '0'}}\n
\n \n\n","import { Component, OnInit, forwardRef, Input, ViewChild, Output, EventEmitter } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-date-field',\n templateUrl: './date-field.component.html',\n styleUrls: ['./date-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateFieldComponent),\n multi: true\n }\n ]\n})\nexport class DateFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n /** Optional event emitter for changes */\n @Output() public onChange = new EventEmitter();\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Currently selected date */\n public date: number;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n /** Display value for the current date */\n public get date_string(): string {\n // R--- Needs TZ aware inputs\n const date = new DateTZ({date: this.date})\n return date.formatDate('dd MMM yyyy');\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public ngOnInit() {\n this.date = DateNow(new Date()).ms;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = new DateTZ({date: this.date });\n const new_d = new DateTZ({date: new_value})\n let new_date = new_d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n this.date = new_date;\n if (this._onChange) {\n this._onChange(new_date);\n this.onChange.emit(new_date);\n }\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","\n
{{ date_string }}
\n
\n \n
\n\n\n
\n \n
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport {\n humaniseDuration,\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-duration-field',\n templateUrl: './duration-field.component.html',\n styleUrls: ['./duration-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ]\n})\nexport class DurationFieldComponent extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor {\n /** Maximum duration option available */\n @Input() public max: number = 240;\n /** Minimum duration option available */\n @Input() public min: number = 15;\n /** Step value between options */\n @Input() public step: number = 15;\n /** Reference time for displaying next to durations */\n @Input() public time: number;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Special case prepopulation i.e. out of step options */\n @Input() public specialPreprops: Array = [];\n /** Whether form all_day is enabled. */\n @Input() public all_day: boolean = false;\n\n public duration: number = 60;\n /** List of available duration options */\n public duration_options: Identity[];\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n public ngOnInit(): void {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.max || changes.min || changes.step || changes.time || changes.all_day) {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.duration = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(+new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.duration = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n private generateDurationOptions(max: number, min: number, step: number, all_day: boolean = false): Identity[] {\n const blocks: Identity[] = [];\n let time = min;\n // R--- Change input to dateTz\n let date = this.time ? new DateTZ({date: this.time}) : null;\n\n // Add special case for 10min duration/prepropulation\n for (const option of this.specialPreprops) {\n blocks.push({\n id: option,\n name: date\n ? `${date.addValue({ minutes: option }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(option)})`\n : `${humaniseDuration(option)}`\n });\n }\n\n\n while (time <= max) {\n blocks.push({\n id: time,\n name: date\n ? `${date.addValue({ minutes: time }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(time)})`\n : `${humaniseDuration(time)}`\n });\n time += step;\n }\n if (all_day) {\n blocks.push({ id: 24 * 60, name: 'All Day' }); \n }\n blocks.push({ id: 7 * 24 * 60, name: '1 week' });\n return blocks;\n }\n}\n","
\n \n \n \n {{ option.name }}\n \n \n \n
\n","export * from './action-field/action-field.component'\nexport * from './counter/counter.component'\nexport * from './date-field/date-field.component'\nexport * from './duration-field/duration-field.component'\nexport * from './time-field/time-field.component'\nexport * from './user-search-field/user-search-field.component'\nexport * from './user-list-field/user-list-field.component'\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-time-field',\n templateUrl: './time-field.component.html',\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ]\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n /** Time step between each allowed time option */\n @Input() public step: number = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public no_past_times: boolean = true;\n /** String representing the currently set time */\n public date: number = DateNow(new Date()).ms;\n /** String representing the currently set time */\n public time: string = DateNow(new Date()).formatDate('HH:mm');\n /** Available time blocks for the selected date */\n public _time_options: Identity[];\n /** Whether select field should be shown */\n public show_select: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n // R--- This is the form input that needs to be TZ active.\n public ngOnInit(): void {\n this.show_select = true;\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n this.timeout('hide', () => this.show_select = false);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step) {\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n }\n\n public get date_(){\n return new DateTZ({date: this.date})\n }\n\n /** Available time blocks for the selected date */\n public get time_options() {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] });\n if (date.minutes % 15 !== 0 && !this._time_options.find(time => time.id === date.formatDate('HH:mm'))) {\n this._time_options.push({\n name: `${date.formatDate(timeFormatString())}`,\n id: date.formatDate('HH:mm')\n });\n this._time_options.sort((a, b) => `${a.id}`.localeCompare(`${b.id}`));\n }\n return this._time_options;\n }\n\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.time = new_value;\n if (this._onChange) {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] }).startOfValue('minute');\n this._onChange(date.ms);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n if (!value) {\n return;\n }\n this.date = value;\n let date = this.date_.startOfValue('minute');\n date = date.setValue({ minute: Math.ceil(date.minutes / 5) * 5 });\n this.time = date.formatDate('HH:mm');\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Show select field for time options\n */\n public showSelect() {\n this.show_select = true;\n this.timeout('on_shown', () => {\n if (this.select_field) {\n this.select_field.focus();\n this.select_field.open();\n this.subscription('listen_close', this.select_field.openedChange.subscribe((state) => {\n if (!state) {\n this.show_select = false;\n }\n }));\n }\n });\n }\n\n /**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n private generateAvailableTimes(datestamp: number, show_past: boolean, step: number = 15): Identity[] {\n let date = new DateTZ({date: datestamp});\n const blocks = [];\n if (show_past || date.isAfterDate(DateNow(new Date()))) {\n date = date.startOfValue('day');\n } else if (date.isAfterDate(DateNow(new Date()))) {\n date = DateNow(new Date());\n }\n date = date.setValue({ minute: Math.ceil(date.minutes / step) * step });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n name: `${date.formatDate(timeFormatString()).toLocaleLowerCase()}`,\n id: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n }\n}\n","\n
\n \n
\n
\n \n
\n\n\n \n \n {{ option.name }}\n \n \n\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n tap,\n map,\n switchMap,\n finalize\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n csvToJson,\n downloadFile,\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-list-field',\n templateUrl: './user-list-field.component.html',\n styleUrls: ['./user-list-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserListFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserListFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Number of characters needed before a search will start */\n @Input() public limit: number = 3;\n /** Emitter for action to make a new user */\n @Output('newUser') public new_user = new EventEmitter();\n\n /** User list to display */\n public user_list: User[];\n /** List of active selected users on the list */\n public active_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** String */\n public search_str: string;\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User[]) => void;\n /** Form control on touch handler */\n private _onTouch: (_: User[]) => void;\n\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n\n constructor(private _service: ApplicationService, private _users: UsersService, private cdRef: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(100),\n distinctUntilChanged(),\n switchMap((query) => {\n this.loading = true;\n return query.length >= this.limit\n ? this._users.query({\n q: query.slice(0, Math.max(this.limit, 3)),\n cache: 60 * 1000\n })\n : Promise.resolve([]);\n }),\n catchError((_) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.user_list = list;\n this.user_list.forEach((i: any) => {\n i.match_name = matchToHighlight(i.match_name);\n i.match_email = matchToHighlight(i.match_email);\n return i;\n });\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n })\n );\n }\n\n /**\n * Add user to the user list\n * @param user\n */\n public addUser(user: User) {\n /* istanbul ignore else */\n if (!this.active_list) {\n this.active_list = [];\n }\n const index = this.active_list.findIndex((a_user) => a_user.id === user.id);\n /* istanbul ignore else */\n if (index < 0) {\n this.active_list = [...this.active_list, user];\n }\n this.setValue(this.active_list);\n this.search_str = '';\n }\n\n /**\n * Remove user from the user list\n * @param user\n */\n public removeUser(user: User) {\n this.active_list = this.active_list.filter((a_user) => a_user.id !== user.id);\n this.setValue(this.active_list);\n }\n\n /**\n * Load CSV file and populate the user list with the contents\n * @param event File input field event\n */\n public addUsersFromFile(event) {\n /* istanbul ignore else */\n if (event.target) {\n const file = event.target.files[0];\n /* istanbul ignore else */\n if (file) {\n const reader = new FileReader();\n reader.readAsText(file, 'UTF-8');\n reader.addEventListener('load', (evt) => {\n this.processCsvData((evt.srcElement as any).result);\n event.target.value = '';\n this.cdRef.detectChanges();\n });\n reader.addEventListener('error', (_) =>\n this._service.notifyError('Error reading file.')\n );\n }\n }\n }\n\n /**\n * Process raw CSV data and save user data to attendee list\n * @param data CSV data\n */\n private processCsvData(data: string) {\n const list = csvToJson(data) || [];\n const id = this._users.current.staff_code; \n list.forEach((el) => {\n const firstName = el.first_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n const lastName = el.last_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n\n el.name = el.name || `${firstName} ${lastName}`;\n const display = (el.name || `${Math.floor(Math.random() * 9999_9999)}`)\n .split(' ')\n .join('_')\n .toLowerCase();\n /* istanbul ignore else */\n if (!el.email) {\n el.email = `${display}+${id}@guest.mckinsey.com`;\n }\n el.type = 'external';\n el.external = !el.email.endsWith(\"@mckinsey.com\") && !el.email.endsWith(\"@external.mckinsey.com\");\n this.addUser(new User(el));\n });\n }\n\n /* istanbul ignore next */\n /** Download template CSV file */\n public downloadCSVTemplate() {\n const template = `Organisation Name,First Name,Last Name,Email,Phone\\nFake Org,John,Smith,john.smith@example.com,01234567898`;\n downloadFile('template.csv', template);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User[]): void {\n this.active_list = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User[]) {\n this.active_list = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User[]) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: User[]) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n \n \n \n
\n
\n \n \n {{ user.name }}\n \n \n \n
\n
\n\n
No attendees
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n switchMap\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-search-field',\n templateUrl: './user-search-field.component.html',\n styleUrls: ['./user-search-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserSearchFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserSearchFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Limit available options to these */\n @Input() public options: User[];\n /** Currently selected user */\n public active_user: User;\n /** User list to display */\n public user_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** Current display value of the search input field */\n public search_str: string = '';\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User) => void;\n /** Form control on touch handler */\n private _onTouch: () => void;\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n \n constructor(private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap(query => {\n this.loading = true;\n return this.options && this.options.length > 0\n ? Promise.resolve(this.options)\n : query.length >= 3\n ? (this._users.query({ q: query, cache: 60 * 1000 }) as Promise)\n : Promise.resolve([]);\n }),\n catchError((err) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription('search_results', this.search_results$.subscribe(list => {\n this.user_list = list;\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n }));\n }\n\n /** Handle input changes */\n public onInputChange(value: string): void {\n this.search_str = value;\n this.search$.next(value);\n }\n\n /**\n * Reset the search string back to the name of the active user\n */\n public resetSearchString(): void {\n if (this.active_user) {\n this.search_str = this.active_user.name;\n } else {\n this.search_str = '';\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User): void {\n this.active_user = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n this.resetSearchString();\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User): void {\n this.active_user = value;\n this.search_str = value ? value.name : '';\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouch = fn;\n }\n\n /** Function to display the user's name in the input field */\n public displayFn(user?: User): string {\n return user ? user.name : '';\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'feedback',\n templateUrl: './feedback.component.html',\n styleUrls: ['./feedback.component.scss'],\n})\nexport class FeedbackComponent extends BaseDirective implements OnInit {\n /** Name of the currently active page */\n public current_page: string;\n\n constructor(private _router: Router) {\n super();\n }\n\n public ngOnInit(): void {\n this.timeout('Getting Title', () => this.updateRoute(document.title), 1000);\n this._router.events.subscribe((event: NavigationEnd) => {\n /* istanbul ignore else */\n if (event instanceof NavigationEnd) {\n this.timeout('Getting Title', () => this.updateRoute(document.title));\n }\n });\n }\n\n public updateRoute(location) {\n location = location.substr(0, location.indexOf(' |'));\n this.current_page = location;\n }\n}\n","\n
\n Feedback\n \n \n \n
\n
\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent extends BaseDirective {\n @Input() public icon: ApplicationIcon;\n}\n","
\n {{ icon.content }}\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ActionFieldComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserListFieldComponent,\n UserSearchFieldComponent\n} from './custom-fields';\nimport { IconComponent } from './icon/icon.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ACA_PIPES_MODULE } from '@acaprojects/ngx-pipes';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { FeedbackComponent } from './feedback/feedback.component';\nimport { ActionIconComponent } from './action-icon/action-icon.component';\nimport { PopoutMenuComponent } from './popout-menu/popout-menu.component';\nimport { SearchbarComponent } from './searchbar/searchbar.component';\nimport { UserAvatarComponent } from './user-avatar/user-avatar.component';\nimport { CateringMenuItemComponent } from './bookings/catering/item/item.component';\nimport { PackageOptionsModalComponent } from './bookings/catering/package-options-modal/package-options-modal.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { CngSearchBarComponent } from './cng-search-bar/cng-search-bar.component';\nimport { HoverClassDirective } from './cng-search-bar/hover-class.directive';\n\nconst DECLARATIONS = [\n ActionFieldComponent,\n IconComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserSearchFieldComponent,\n UserListFieldComponent,\n FeedbackComponent,\n ActionIconComponent,\n PopoutMenuComponent,\n SearchbarComponent,\n UserAvatarComponent,\n CateringMenuItemComponent,\n PackageOptionsModalComponent,\n CngSearchBarComponent,\n HoverClassDirective\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ACA_PIPES_MODULE,\n FormsModule,\n ReactiveFormsModule,\n ...MATERIAL_MODULES,\n BaseModule,\n UiModule\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ACA_PIPES_MODULE,\n ...DECLARATIONS,\n ...MATERIAL_MODULES,\n BaseModule,\n ]\n})\nexport class LegacyUiModule {\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nexport interface PopoutAction extends ApplicationIcon {\n /** ID of the action */\n id: string;\n}\n\n@Component({\n selector: 'a-popout-menu',\n templateUrl: './popout-menu.component.html',\n styleUrls: ['./popout-menu.component.scss']\n})\nexport class PopoutMenuComponent extends BaseDirective {\n /** List of available actions */\n @Input() public actions: PopoutAction[] = [];\n /** Emitter for user actions */\n @Output() public action = new EventEmitter();\n /** Whether actions should show */\n public show: boolean;\n\n public close() {\n this.timeout('close', () => {\n this.show = false;\n });\n }\n}\n","\n \n\n\n","import { Component, OnInit, Input, EventEmitter, Output, ViewChild, ElementRef, SimpleChanges, OnChanges } from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-searchbar',\n templateUrl: './searchbar.component.html',\n styleUrls: ['./searchbar.component.scss']\n})\nexport class SearchbarComponent extends BaseDirective implements OnChanges {\n /** Current contents of the searchbar input */\n @Input('value') public value: string;\n /** Current contents of the searchbar input */\n @Input() public placeholder: string;\n /** Whether external changes are being processed */\n @Input() public loading: boolean;\n /** Whether external changes are being processed */\n @Input() public autofocus: boolean;\n /** Emitter for changes to the searchbar value */\n @Output() public valueChange = new EventEmitter();\n /** Input field reference */\n @ViewChild('input', { static: true }) private input_field: ElementRef;\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.autofocus && this.autofocus) {\n this.focusField()\n }\n }\n\n public focusField() {\n /* istanbul ignore else */\n if (this.input_field && this.input_field.nativeElement) {\n this.input_field.nativeElement.focus();\n }\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component, Input } from '@angular/core';\nimport { User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-user-avatar',\n templateUrl: './user-avatar.component.html',\n styleUrls: ['./user-avatar.component.scss']\n})\nexport class UserAvatarComponent {\n /** User to display avatar for */\n @Input() public user: User;\n\n public get initials(): string {\n if (!this.user) {\n return 'NA';\n }\n const parts = this.user.name.split(' ');\n return parts.length > 1\n ? `${parts[0][0]}${parts[parts.length - 1][0]}`\n : this.user.name.slice(0, 2);\n }\n}\n","
\n
{{ initials }}
\n
\n\n \n\n","export * from './lib/loading.actions'\nexport * from './lib/loading.model'\nexport * from './lib/loading.effects'\nexport * from './lib/loading.selectors'\nexport * from '../testing'\n","import {\n createAction,\n createSelector,\n on,\n On,\n props\n} from '@ngrx/store';\nimport {\n LoadingModel,\n wrapLoading\n} from './loading.model';\nimport {\n selectIsLoading,\n selectOptionalError,\n selectOptionalSuccess,\n selectSuccess\n} from './loading.selectors';\nimport { MemoizedSelector } from '@ngrx/store/src/selector';\nimport {\n ActionCreator,\n NotAllowedCheck,\n TypedAction\n} from '@ngrx/store/src/models';\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport interface Payload {\n payload: T\n}\n\nexport type LoadingAction = T & TypedAction\nexport type LoadingActionCreator = T extends null | undefined ?\n ActionCreator TypedAction>\n : ActionCreator) => LoadingAction>\n\ntype ClearAction = ActionCreator TypedAction>\n\ninterface Selectors {\n success: MemoizedSelector\n optionalSuccess: MemoizedSelector\n error: MemoizedSelector\n loading: MemoizedSelector\n model: (TState) => LoadingModel\n}\n\nexport interface LoadingActionObject {\n request: LoadingActionCreator\n success: LoadingActionCreator>\n error: LoadingActionCreator>\n clear: ClearAction,\n ons: On[],\n selectors: Selectors\n}\n\n/**\n * Creates a {@link LoadingActionObject} that contains a set of ActionCreators\n * for request, success, error, loading, and clear data. Also, it contains\n * the necessary On reducers and selectors in order to properly connect them in\n * a standardized way to data in the application.\n *\n * `TState` is the type of data on your reducer, not global store.\n * `TRequest` is an object type to use in request methods.\n * `TSuccess` is the object type of the T parameter on `LoadingModel`.\n *\n * This assumes you have state represented by:\n * ```typescript\n * interface SomeState {\n * stateKey: LoadingModel\n * }\n * ```\n *\n * To dispatch an action:\n * ```typescript\n *\n * // request parameters depend on the object type used as second type parameter\n * // in createLoadingAction\n * this.store.dispatch(someLoadingAction.request())\n *\n * // action created with createLoadingAction\n * this.store.dispatch(someLoadingAction.request({\n * name: 'Andrew G',\n * age: 24\n * }))\n *\n * ```\n *\n * The generated selectors only select data from its fractured state, not the global\n * store. In order to use them, make sure you {@link select} the global state\n * before using them:\n *\n * ```typescript\n *\n * this.store.pipe(\n * select(selectSomeState),\n * select(someLoadingAction.selectors.success)\n * ).subscribe(next => {\n *\n * })\n *\n * ```\n *\n * @param actionPrefix - Prefixes actions to uniquely identify them.\n * @param stateKey - The field within the reducer state to set data on.\n */\nexport const createLoadingAction = (\n actionPrefix: string,\n stateKey: keyof TState\n): LoadingActionObject => {\n const buildAction = (postfix: string) => `[${actionPrefix}] ${postfix}`;\n // @ts-ignore\n const request = createAction(buildAction('request'), props());\n const success = createAction(buildAction('success'), props>());\n const error = createAction(buildAction('error'), props>());\n const clear = createAction(buildAction('clear'));\n const ons: On[] = [\n on(request, (state: TState & HashMap>, action: LoadingAction) =>\n ({\n ...state,\n [stateKey]: wrapLoading(state[stateKey]).loading()\n })),\n on(success, (state: TState & HashMap>, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.success(action.payload)\n })),\n // some reason specifying state like in success and request does not work.\n on(error, (state: any, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.error(action.payload)\n })),\n on(clear, () => ({\n ...this.state,\n [stateKey]: LoadingModel.empty()\n }))\n ];\n const selectData = (state: TState) => {\n if (!state) {\n console.warn('[LoadingActions] State is empty for key', stateKey);\n }\n return wrapLoading(state?.[stateKey] as unknown as LoadingModel);\n };\n const selSuccess = createSelector, TSuccess>(\n selectData,\n selectSuccess\n );\n const selOptionalSuccess = createSelector(\n selectData,\n selectOptionalSuccess\n );\n const selError = createSelector(\n selectData,\n selectOptionalError\n );\n const selLoading = createSelector(\n selectData,\n selectIsLoading\n );\n return {\n request,\n success,\n error,\n clear,\n ons,\n selectors: {\n success: selSuccess,\n optionalSuccess: selOptionalSuccess,\n error: selError,\n loading: selLoading,\n model: selectData\n }\n };\n};\n","import {\n Actions,\n ofType\n} from '@ngrx/effects';\n\nimport { \n LoadingAction,\n LoadingActionObject\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n catchError,\n flatMap,\n map\n} from 'rxjs/operators';\nimport {\n Observable,\n of\n} from 'rxjs';\nimport { TypedAction } from '@ngrx/store/src/models';\n\n/**\n * This creates an effect to use in Effects classes. This coordinates a simple\n * success and error payload effect.\n * @param actions - The actions object\n * @param actionObject - The created createLoadingAction object.\n * @param caller - Define what API method or asynchronous operation is needed to\n * run this. Return TSuccess.\n */\nexport const createLoadingEffect = (\n actions: Actions, actionObject: LoadingActionObject,\n caller: (action: LoadingAction) => Promise): Observable> => actions.pipe(\n ofType(actionObject.request),\n flatMap((action) => caller(action as LoadingAction)),\n map((response: TSuccess) => actionObject.success({ payload: response })),\n catchError(err => {\n return of(actionObject.error({ payload: err }));\n })\n);\n","/* eslint-disable no-underscore-dangle,no-useless-constructor */\n/**\n * Wraps around the typical data objects we write for success, error, loading, and empty state. This convenience\n * wrapper consolidates all of that logic into a handy wrapper.\n */\nexport class LoadingModel {\n static empty = () => new LoadingModel(false, false, false, undefined);\n\n static success = (success?: T): LoadingModel =>\n new LoadingModel(false, false, true, success);\n\n static error = (error?: Error, optionalSuccess?: T): LoadingModel =>\n new LoadingModel(false, true, false, optionalSuccess, error);\n\n /**\n * Mutates the model with a success state, preserving other state fields.\n * @param success - override success state.\n */\n mutate = (\n success: T2 | null) => new LoadingModel(\n this.isLoading,\n this.hasError,\n !!success,\n !success ? undefined : success\n );\n\n loading = (success: T | null = this.success) =>\n new LoadingModel(\n true,\n false,\n !!success && this.hasSuccess,\n !success ? undefined : success\n );\n\n public get success(): T {\n return this._success as T;\n }\n\n public get optionalSuccess(): T | undefined {\n return this._success;\n }\n\n constructor(\n public isLoading: boolean,\n private hasError: boolean,\n private hasSuccess: boolean,\n private _success?: T,\n public error?: Error\n ) {\n }\n\n isEmpty = () => !this.isSuccess() && !this.isError();\n\n hasLoaded = () => !this.isEmpty() && !this.isLoading;\n\n isSuccess = () => this.hasSuccess;\n\n isError = () => this.hasError;\n\n shouldLoad = () => !this.isSuccess() && !this.isLoading;\n\n public toString = () =>\n `Loading: ${this.isLoading}, Success: ${this.hasSuccess}:**${this._success}**, ` +\n `Error: ${this.hasError}:${this.error}`;\n}\n\n/**\n * Wraps an object that conforms to LoadingModel to restore object loss from\n * hydrating state during development.\n */\nexport const wrapLoading = (loading: any): LoadingModel => {\n if (loading instanceof LoadingModel) {\n return loading;\n } else {\n if (!loading) {\n return LoadingModel.empty();\n } else {\n return new LoadingModel(\n loading.isLoading || false,\n loading.hasError || false,\n loading.hasSuccess || false,\n loading._success,\n loading.error\n );\n }\n }\n};\n","import { LoadingModel, wrapLoading } from './loading.model';\n\nexport const selectSuccess = (state: LoadingModel) =>\n wrapLoading(state).success;\nexport const selectOptionalSuccess = (state: LoadingModel) =>\n wrapLoading(state).optionalSuccess;\nexport const selectIsLoading = (state: LoadingModel) =>\n wrapLoading(state).isLoading;\nexport const selectIsSuccess = (state: LoadingModel) =>\n wrapLoading(state).isSuccess();\nexport const selectOptionalError = (state: LoadingModel) =>\n wrapLoading(state).error;\nexport const selectIsError = (state: LoadingModel) =>\n wrapLoading(state).isError();\nexport const selectHasLoaded = (state: LoadingModel) =>\n wrapLoading(state).hasLoaded();\nexport const selectIsEmpty = (state: LoadingModel) =>\n wrapLoading(state).isEmpty();\n\n","import {\n Observable,\n Subject\n} from 'rxjs';\nimport { Action } from '@ngrx/store';\nimport { Actions } from '@ngrx/effects';\nimport { TypedAction } from '@ngrx/store/src/models';\nimport { take } from 'rxjs/operators';\nimport {\n LoadingActionObject\n} from '../src/lib/loading.actions';\n\nexport const generateMockActions = () => {\n const dispatcher = new Subject();\n return {\n dispatcher,\n actions: new Actions(dispatcher)\n };\n};\n\n/**\n * Simple verifier that checks if the request action results in a success returned.\n */\nexport const verifyActionSuccess = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n data: TSuccess,\n payload?: TRequest,\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.success({ payload: options.data }));\n};\n\n/**\n * Simple verifier that checks if the request action results in a failure returned.\n */\nexport const verifyActionError = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n error: Error,\n payload?: TRequest\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.error({ payload: options.error }));\n};\n","export * from './effects.testing'\n","import { createLoadingAction } from '../../../loading/src/lib/loading.actions';\nimport { Space } from '../../../data-common/src/lib/spaces/space.class';\nimport {\n RoomQueryOptions,\n RoomState,\n RoomStoreState\n} from './rooms.types';\nimport {\n createAction,\n createSelector,\n props\n} from '@ngrx/store';\n\nexport const roomStateSelector = (state: RoomStoreState) => state.rooms;\n\nexport const loadRoomsWithQuery = createAction('[Rooms] Load Rooms with query', props());\n\nexport const loadRoomsForResults = createLoadingAction('Rooms', 'query');\n\nexport const loadRoomsForResultsMap = createLoadingAction('Rooms for map', 'query');\n\n\nexport const loadLaterThatDayResults = createLoadingAction('Later Rooms', 'later');\n\nexport const loadNextDayResults = createLoadingAction('Next Day Rooms', 'next');\n\nexport const loadByIdResults = createLoadingAction('By Id Rooms', 'byid');\n\nexport const selectRoomResultsSuccess = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.optionalSuccess);\n\nexport const loadDiffSizeResults = createLoadingAction('Different Size Rooms', 'size');\n","export * from './lib/storage.module';\nexport * from './lib/localstorage.wrapper'\n","export class LocalStorageWrapper {\n\n constructor(private prefix: string) {\n }\n\n protected setValue(key: string, value: string) {\n localStorage.setItem(`${this.prefix}.${key}`, value);\n }\n\n protected getValue(key: string): string | null {\n return localStorage.getItem(`${this.prefix}.${key}`) as string | null;\n }\n\n protected removeValue(key: string) {\n localStorage.removeItem(`${this.prefix}.${key}`);\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class StorageModule {\n}\n","export * from './lib/ui.module';\nexport * from './lib/types';\nexport * from './lib/base-template.component';\nexport * from './lib/recurrence-pattern-form/recurrence-pattern-form.component';\nexport * from './lib/recurrence-booking-form/recurrence-booking-form.component';\nexport * from './lib/conflicts-modal/conflicts-modal.component'\nexport * from './lib/override-changes-modal/override-changes-modal.component'\nexport * from './lib/date-tz-calendar-widget/date-tz-calendar-widget.component';\nexport * from './lib/date-tz-date-picker/date-tz-date-picker.component';\nexport * from './lib/date-tz-duration-field/date-tz-duration-field.component';\nexport * from './lib/date-tz-time-field/date-tz-time-field.component';\nexport * from './lib/aca-date-picker/aca-date-picker.component';\nexport * from './lib/conflict-alert-modal/conflict-alert-modal.component';\nexport * from './lib/tooltip/tooltip.enums';\nexport * from './lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nexport * from './lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n","import { Component, OnInit, Input, Output, OnChanges, SimpleChanges, forwardRef, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDatePickerOptions {\n /** Unix timestamp with millisecond. First selectable date */\n from?: number;\n /** Unix timestamp with millisecond. Last selectable date */\n to?: number;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: number;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'aca-date-picker',\n templateUrl: './aca-date-picker.component.html',\n styleUrls: ['./aca-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AcaDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class AcaDatePickerComponent implements OnInit, OnChanges, ControlValueAccessor {\n /** CSS class to add to the root element of the component */\n @Input() public klass = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDatePickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n /** Display the last selected day as active */\n @Input() public show_last_selection?: boolean = true\n\n public date: number = DateNow(new Date()).ms;\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private from: DateTZ;\n /** Last selectable date */\n private to: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n /** ID of the timer used for changing the month */\n private _change_timer: number;\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.date = item.value;\n if (this._onChange) {\n this._onChange(this.date);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date\n */\n public updateDate(): void {\n \n if (!this.date) {\n return;\n }\n const now = DateNow(new Date()).startOfValue('month');\n const date_ = new DateTZ({date: this.date})\n const date = date_.startOfValue('month');\n if (date.valid) {\n const difference = date.dateDiff(now, 'months', 'months');\n if (this.offset !== difference) {\n this.offset = difference;\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.from) {\n const date_ = new DateTZ({date: this.options.from})\n this.from = date_.startOfValue('day');;\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.from.startOfValue('month');\n this.min_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.from) {\n this.from = null;\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.to) {\n const date_ = new DateTZ({date: this.options.to})\n this.to = date_.startOfValue('day');\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.to.startOfValue('month');\n this.max_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.to) {\n this.to = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n if (!this.date) {\n return;\n }\n const date = DateNow(new Date()).addValue({ months : this.offset });\n const active = new DateTZ({date: this.date});\n let start = date.setValue({ day: 1 }).setValue({ weekday: 7 }).subtractValue({ weeks: 1 });\n const end_ = new DateTZ({date: start.ms})\n const end = end_.addValue({ weeks: 1 }).endOfValue('month').addValue({ days: 2 }).endOfValue('week');\n this.date_list = [];\n while (start.isBeforeDate(end) || start.isSameDate(end, 'day')) {\n this.date_list.push({\n value: start.ms,\n display: start.formatDate('d'),\n active: this.show_last_selection && active.isSameDate(start, 'day'),\n non_month: !date.isSameDate(start, 'month'),\n count: this.counters ? this.counters[start.formatDate('yyyy-MM-dd')] || 0 : 0,\n disabled: (this.from ? start.isBeforeDate(this.from, 'day') : false) || (this.to ? start.isAfterDate(this.to, 'day') : false),\n today: DateNow(new Date()).isSameDate(start, 'day')\n });\n start = start.addValue({ days : 1 });\n }\n this.month_name = date.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = DateNow(new Date()).startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days : 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n if (this._change_timer) {\n clearTimeout(this._change_timer);\n }\n this._change_timer = setTimeout(() => {\n const new_offset = this.offset + value;\n const now = DateNow(new Date())\n const date = now.addValue({ months : new_offset, days: now.dateMonth === 2 ? 2 : 0 }); //add 2 days if month is february to avoid calc errors\n if (this.from && date.isBeforeDate(this.from, 'month')) { return; }\n if (this.to && date.isAfterDate(this.to, 'month')) { return; }\n this.offset = new_offset;\n this.month.emit(this.offset);\n this.generateMonth();\n this._change_timer = null;\n }, 100);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const date = new DateTZ({date: this.date});\n const offset = this.offset;\n this.offset = DateNow(new Date()).dateDiff(date, 'months', 'months');\n if (offset !== this.offset) {\n this.generateMonth();\n }\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.updateDate();\n this.generateMonth();\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n
\n
\n
\n
\n
{{month_name}}
\n
= max_offset\" (click)=\"changeMonth(1)\" (touchend)=\"changeMonth(1)\">\n
\n
\n
\n
\n
{{item}}
\n
\n
\n
\n
\n {{item.display}}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n
\n
\n
\n
","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges\n} from '@angular/core';\n\nexport enum AlertMode {\n Warning = 'warning',\n Coachmark = 'coachmark',\n BlueCoachmark = 'blue-coachmark',\n Error = 'error'\n}\n\nexport enum AlertBannerDisplay {\n /**\n * New UI\n */\n V2 = 'v2',\n\n /**\n * Default, legacy ui.\n */\n V1 = 'v1',\n}\n\n@Component({\n selector: 'mck-alert-banner',\n template: `\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n \n
\n `,\n styleUrls: ['./alert-banner.component.scss']\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n\n @Input()\n public mode: AlertMode = AlertMode.Warning;\n\n @Output()\n public close = new EventEmitter();\n\n @Output()\n public action = new EventEmitter();\n\n @Input()\n public message: string;\n\n @Input()\n public buttonText: string;\n\n @Input()\n public showClose = true;\n\n @Input()\n public display: AlertBannerDisplay = AlertBannerDisplay.V1;\n\n public iconPath: string = 'assets/icon/warning-yellow.svg';\n public materialColor: string = 'black';\n public closeIcon: string = 'close_outline.svg';\n\n public ngOnInit(): void {\n this._onModeChange();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.mode) {\n this._onModeChange();\n }\n }\n\n private _onModeChange() {\n this.iconPath = 'assets/icon/warning-yellow.svg';\n this.closeIcon = 'close_outline.svg';\n switch (this.mode) {\n case AlertMode.Warning:\n this.materialColor = 'black';\n break;\n case AlertMode.Coachmark:\n this.materialColor = 'coachmark';\n this.closeIcon = 'close_outline_coachmark.svg';\n break;\n case AlertMode.BlueCoachmark:\n this.iconPath = 'assets/icon/info-bg-dark.svg'\n this.materialColor = 'blue-coachmark'\n break;\n case AlertMode.Error:\n this.iconPath = 'assets/img/error-icon.svg'\n this.materialColor = 'white'\n break;\n default:\n this.materialColor = 'black';\n }\n }\n\n}\n","import {\n Component,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NgControl\n} from '@angular/forms';\nimport { SelectOption } from '../types';\nimport {\n BehaviorSubject,\n combineLatest,\n from,\n Subject\n} from 'rxjs';\nimport {\n COMMA,\n ENTER\n} from '@angular/cdk/keycodes';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport {\n distinctUntilChanged,\n map,\n take\n} from 'rxjs/operators';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'mck-autocomplete-chip-select-item',\n template: `\n
\n \n {{label}}\n \n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n \n \n \n {{selected.shortDisplay}}\n close\n \n \n \n \n
\n \n \n {{option.dropdownOverride || option.display}}\n \n \n
\n
\n \n Clear\n \n \n Confirm\n \n
\n \n \n {{errorMessage}}\n
\n `,\n styleUrls: ['./auto-complete-chip-select-item.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AutoCompleteChipSelectItemComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor, OnDestroy {\n\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n @ViewChild('componentInput')\n componentInput: HTMLInputElement;\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n feedbackInput?: boolean;\n\n @Input()\n loading?: boolean;\n\n @Input()\n placeHolder: string;\n\n @Input()\n options: Subject[]>;\n\n @Input()\n selectedOptions: Subject[]>;\n\n @Input()\n useCTAs?: boolean;\n\n @Output()\n optionSelected = new EventEmitter>();\n\n @Output()\n feedbackOutput = new EventEmitter();\n\n @Output()\n chipsCleared: EventEmitter = new EventEmitter();\n\n @Output()\n onClickConfirm: EventEmitter = new EventEmitter();\n\n /**\n * If true, only allow 1 group at a time to get selected. Show others as disabled.\n */\n @Input()\n selectOnlyOneGroup = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input() public localFilter: boolean = true;\n\n /**\n * If error exists, a message.\n */\n @Input()\n errorMessage?: string;\n\n @Input()\n hideDropdownCarret?: boolean;\n\n @Input()\n displayCTA?: boolean;\n\n private selectOnlyOneGroupChange = new BehaviorSubject(false);\n\n separatorKeysCodes = [ENTER, COMMA];\n\n public filterFormControl: FormControl = new FormControl();\n\n public focused = false;\n public mobileFullScreen = false;\n\n public autocompleteOptions = new BehaviorSubject[]>([]);\n public filteredAutocompleteOptions = new BehaviorSubject[]>([]);\n\n /** List shown to user, filters children if a group header is added **/\n public chipOptions = new BehaviorSubject[]>([]);\n\n /** Form control on change handler */\n private _onChange?: (_: SelectOption[]) => void;\n /** Form control on touch handler */\n private _onTouch?: (_: string) => void;\n\n private value = new BehaviorSubject[]>([]);\n\n public enableCTAs: boolean = false\n\n public hasChips: boolean = false;\n\n constructor(@Self() @Optional() private control: NgControl) {\n super();\n if (this.control) {\n this.control.valueAccessor = this;\n }\n }\n\n public get invalid(): boolean {\n return this.control ? this.control.invalid : false;\n }\n\n public get showError(): boolean {\n if (!this.control) {\n return false;\n }\n\n const { dirty, touched } = this.control;\n\n return this.invalid ? (dirty && touched) : false;\n }\n\n public iconFillClass(color?: string): string {\n return color === 'external' ? 'mck-icon-fill-gray' : 'mck-icon-fill-white'\n }\n\n ngOnInit() {\n this.subscription('autoCompleteOptions', combineLatest([\n this.options,\n this.selectedOptions,\n this.selectOnlyOneGroupChange\n ])\n .pipe(\n map(([options, selectedOptions, selectOnlyOneGroup]) => {\n this.hasChips = !!selectedOptions.length;\n return options.map(option => {\n const selected = !!selectedOptions.find(s => s.value === option.value);\n let enabled = true;\n if (selectOnlyOneGroup) {\n // find first group item in selection\n const selectedGroupHeader = selectedOptions.find(s => s.groupHeader || s.groupId === option.groupId);\n\n // if no options chosen, enable it, otherwise only allow selections from other options.\n enabled =\n selectedOptions.length === 0 ||\n (selectedGroupHeader ? selectedGroupHeader.groupId === option.groupId : false);\n this.enableCTAs = selectedOptions.length !== 0\n }\n\n return {\n ...option,\n enabled,\n selected\n } as SelectOption;\n });\n })\n ).subscribe(next => {\n const options = next.sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n this.autocompleteOptions.next(options);\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(this.filterFormControl.value?.trim()));\n }));\n this.subscription('filterFormControlChanges',\n this.filterFormControl.valueChanges.subscribe(value => {\n if (this.localFilter && value.length) {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(value));\n } else {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions());\n }\n }));\n this.subscription('chipOptions', this.selectedOptions\n .pipe(map(selectedOptions => {\n // find group headers and check if children are part of that group.\n // if part of group, filter them out as redundant.\n const groupHeaders = selectedOptions.filter(s => s.groupHeader) || [];\n return selectedOptions.filter(s => s.groupHeader || s.groupChild && !(groupHeaders.find(g => g.groupId === s.groupId)));\n }))\n .subscribe(next => {\n this.chipOptions.next(next);\n }));\n\n this.subscription('formData', this.selectedOptions\n .pipe(map(selected => {\n // group headers always contain children, so only pick out children for data\n return selected;\n }))\n .subscribe(next => {\n this.value.next(next);\n }));\n\n // tie value changes to change.\n this.subscription('valueChanges', this.value\n .pipe(distinctUntilChanged())\n .subscribe(next => {\n if (this._onChange) {\n // rewrote this to avoid read only error\n const values = [];\n next.forEach((v, i) => {\n const value = { ...v };\n if (v.meta?.user) {\n value.display = v.meta.user.name;\n }\n values.push(value);\n });\n this._onChange(values);\n }\n }));\n\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n getFilteredAutocompleteOptions(searchString: string = '') {\n // Exact matches of the groupId or display value\n const exactMatches = this.autocompleteOptions.value.filter(o => {\n if (searchString && searchString.length) {\n return o.groupId.toLowerCase().indexOf(searchString.toLowerCase()) === 0 || o.display.toLowerCase().indexOf(searchString.toLowerCase()) === 0;\n }\n return o.groupId && o.display;\n });\n // Fuzzier search of the dropdownOverride field\n const moreOptions = this.autocompleteOptions.value.filter(o => {\n if (o?.dropdownOverride?.length && searchString) {\n const match = o.dropdownOverride?.toLowerCase().indexOf(searchString.toLowerCase()) > -1;\n // only return found locations that don't exist in exactMatches.\n return match && !exactMatches.find(e => {\n return e.value === o.value\n });\n }\n return false;\n });\n\n // Merge the two result sets\n let joinedOptions = exactMatches.concat(moreOptions).sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n\n // Create a 1D array of the groupId\n const groupIds = joinedOptions.map(o => o.groupId);\n // Get a deduped list of the group parents\n const parents = this.autocompleteOptions.value.filter(o => {\n return o?.groupHeader && groupIds.indexOf(o.groupId) !== -1;\n });\n\n // Remove the parents from the joinedOptions and merge with the reduced parents set, and then sort by groupId.\n // Resulting array sets the parents first in order so the widget renders properly.\n const filteredAutocompleteOptions = parents.concat(joinedOptions.filter(jo => !!jo.dropdownOverride)).sort((a, b) => {\n return b.groupId > a.groupId ? -1 : 1;\n });\n return filteredAutocompleteOptions;\n }\n\n loseFocus(): void {\n this.mobileFullScreen = false;\n this.focused = false;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectOnlyOneGroup) {\n this.selectOnlyOneGroupChange.next(this.selectOnlyOneGroup);\n }\n }\n\n keyedInput(matInput: string) {\n if (this.feedbackInput) {\n this.feedbackOutput.emit(matInput);\n }\n }\n\n selectOption(value: string) {\n this.options.pipe(\n take(1),\n map((options: SelectOption[]) => options.find(o => o.value === value))\n ).subscribe(next => {\n if (next) {\n this.optionSelected.emit(next);\n }\n });\n }\n\n removeOption(value: SelectOption) {\n this.optionSelected.emit(value);\n if (this.useCTAs) {\n this.onClickConfirm.emit();\n }\n\n }\n\n clearSelections() {\n this.selectedOptions.next([]);\n this.chipsCleared.emit();\n }\n\n onClickArrow() {\n // only close events we allow arrow to close panel.\n if (this.focused) {\n this.onFocus(false);\n }\n }\n\n onPanelFocusChange(focusIn: boolean) {\n this.onFocus(focusIn, true);\n }\n\n onFocus(focusIn: boolean, fromPanel?: boolean) {\n if (!focusIn && this.useCTAs) {\n this.onClickConfirm.emit();\n }\n // Only for location input???\n if (this.localFilter && fromPanel && focusIn) {\n // open on focus, mobile needs a refocus\n this.mobileFullScreen = true;\n this.timeout('showDefaults', () => {\n // All results do not show as expected unless I focus again.\n // Something about the mobile styles.\n this.onFocus(true);\n }, 100)\n }\n\n if (this.feedbackInput && !fromPanel) {\n // clear input when input creates options\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n this.feedbackOutput.emit('');\n }\n\n if (this.focused !== focusIn) {\n this.focused = focusIn;\n // clear on close\n if (!focusIn) {\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n }\n if (!fromPanel) {\n if (focusIn) {\n this.trigger.openPanel();\n } else {\n this.trigger.closePanel();\n // close the mobile full screen\n this.loseFocus();\n }\n }\n }\n }\n\n onChanged(value: SelectOption, event: MatCheckboxChange) {\n this.optionSelected.emit(value);\n }\n\n add(event: MatChipInputEvent) {\n // reset\n if (event.input) {\n event.input.value = '';\n }\n this.filterFormControl.setValue('');\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n // TODO: disabled not implemented yet.\n this.disabled = isDisabled;\n }\n\n writeValue(obj: SelectOption[] | undefined): void {\n // update selected options when this value is written\n this.options?.pipe(\n take(1),\n map((options: SelectOption[]) => {\n return options.filter(o => obj ? !!obj.find(spl => o.value === spl.value) : false );\n })\n ).subscribe(next => {\n this.selectedOptions.next(next);\n });\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null && !event.srcElement.classList.contains('mat-form-field-autofill-control')) {\n this.onFocus(false);\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\nimport { SelectOption } from '../types';\n\n/**\n * Patch orphaned SelectOption children into acting as their own group headers.\n *\n * This intends to help in the common scenario where filters have (for whatever\n * reason) prevented the child's usual group header from appearing.\n */\n@Pipe({\n name: 'groupHeaderPatch',\n})\nexport class GroupHeaderPipe implements PipeTransform {\n transform(items: SelectOption[]): SelectOption[] {\n if (!items) {\n return [];\n }\n\n return items.map(v => {\n const hasHeader = !!items.find(i => i.groupHeader && i.groupId === v.groupId);\n return {\n ...v,\n displayAsHeader: !hasHeader,\n }\n })\n }\n\n}\n","import { Component, Input, Output, forwardRef, SimpleChanges, OnChanges, OnInit, EventEmitter, ViewChild, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\nimport {\n BehaviorSubject\n} from 'rxjs';\n\n/**\n * @title Autocomplete filtering select of a single option via text search.\n */\n@Component({\n selector: 'mck-autocomplete-select-option',\n templateUrl: 'auto-complete-select-option.component.html',\n styleUrls: ['auto-complete-select-option.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutoCompleteSelectOptionComponent),\n multi: true\n }\n ],\n})\nexport class AutoCompleteSelectOptionComponent implements OnInit, OnChanges, ControlValueAccessor, OnDestroy{\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n @Input()\n public resetInput: number | undefined;\n\n @Input()\n public placeholder: string;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Output()\n public filteredOptionsChange = new EventEmitter[]>();\n\n @Output()\n public inputTextChange = new EventEmitter();\n\n @Output() emptyBoxEvent = new EventEmitter();\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n filterFormControl = new FormControl();\n filteredOptions: Observable[]>;\n\n /** The selected value */\n public value = new BehaviorSubject('');\n\n /** Available options to search / select from */\n public _options = new BehaviorSubject[]>(this.options);\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n ngOnInit() {\n this.updateFilteredOptions();\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n // Watch and apply changes from the parent component.\n if (changes.options || changes.selectedValue) {\n if (changes.options && !changes.selectedValue) {\n this.filterFormControl.setValue('')\n }\n this.updateFilteredOptions();\n }\n if (changes.resetInput) {\n this.filterFormControl.setValue('');\n this.updateFilteredOptions();\n }\n \n }\n\n private updateFilteredOptions() {\n this.filteredOptions = this.filterFormControl.valueChanges\n .pipe(\n startWith(''),\n map(value => typeof value === 'string' ? value : value && value?.display ? value.display : ''),\n map(name => name ? this._filter(name) : this.options.slice())\n );\n }\n\n displayFn(data: SelectOption): string {\n return data && data?.display ? data.display : '';\n }\n\n private _filter(display: string): SelectOption[] {\n const filterValue = display.toLowerCase();\n // return all the matches found\n const filtered = this.options.filter(option => {\n // split this input and index both, if both\n // match return true.\n if (filterValue.includes(' ')) {\n const filterValues =filterValue.split(' ');\n let matchesAll = true;\n for (let x = 0; x < filterValues.length; x++) {\n if (option.display.toLowerCase().indexOf(filterValues[x]) === -1) {\n matchesAll = false;\n }\n }\n if (matchesAll) {\n return true;\n }\n }\n // match the whole string\n return option.display.toLowerCase().indexOf(filterValue) > -1;\n });\n this.inputTextChange.emit(filterValue);\n this.filteredOptionsChange.emit(filtered);\n return filtered;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: SelectOption): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value.value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n public onChangeInput() {\n if (this.filterFormControl.value === '') {\n this.emptyBoxEvent.emit(true);\n }\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null ) {\n this.trigger.closePanel();\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n\n}","
\n {{label}}\n \n \n \n \n {{option.shortDisplay || option.display}}\n \n \n \n
","import {\n AfterViewInit,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n/**\n * A helper class for rendering embedded views (ng-template) as standalone components.\n *\n * If the view is lazy and does not render upon initialization,\n * it attempts embedding view again later.\n *\n * When testing a component directly that extends this class, its best to wrap the component\n * in a wrapper component for testing so that it can render itself.\n */\nexport class BaseTemplateComponent extends BaseDirective implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild(TemplateRef, { static: true })\n public template: TemplateRef;\n\n private isRendered = false;\n\n constructor(private vcRef: ViewContainerRef) {\n super();\n }\n\n public ngOnInit(): void {\n // try early rendering\n this.attemptViewEmbed();\n }\n\n public attemptViewEmbed() {\n if (this.template && !this.isRendered) {\n this.isRendered = true;\n this.vcRef.createEmbeddedView(this.template);\n return true;\n }\n return false;\n }\n\n public ngAfterViewInit(): void {\n if (!this.isRendered) {\n console.log('View not rendered yet, attempting to post initialization');\n setTimeout(() => {\n console.log('Timeout ended, trying again', this.template);\n if (!this.attemptViewEmbed()) {\n console.log('Attempting render in after view initialization');\n setTimeout(() => {\n if (!this.attemptViewEmbed()) {\n console.error('FAILED TO LOAD TEMPLATE');\n }\n }, 1000);\n }\n });\n }\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n this.isRendered = false;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'catering-drop-modal',\n templateUrl: './catering-drop-modal.component.html',\n styleUrls: ['./catering-drop-modal.component.scss']\n})\nexport class CateringDropComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onConfirm(): void {\n this.dialogRef.close(true);\n}\n\nonCancel(): void {\n this.dialogRef.close(false);\n}\n}\n","
\n

Catering conflict

\n
\n\n
\n
\n

Proceed without catering?

\n
\n
\n
\n\n
\n \n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input\n } from \"@angular/core\";\n import { DropdownPanel } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select-options\",\n templateUrl: \"./cng-select-options.component.html\",\n styleUrls: [\"./cng-select-options.component.scss\"]\n })\n export class CngSelectOptionsComponent implements DropdownPanel {\n @ViewChild(TemplateRef) templateRef: TemplateRef;\n @Output() closed = new EventEmitter();\n @Input() ddWidth: string;\n \n constructor() {}\n }\n ","\n
\n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input,\n OnInit\n } from \"@angular/core\";\n import { DropdownPanel, DropdownOpion } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select\",\n templateUrl: \"./cng-select.component.html\",\n styleUrls: [\"./cng-select.component.scss\"]\n })\n export class CngSelectComponent implements OnInit {\n @Input() data: any;\n public isClosed: boolean = false;\n public selected: DropdownOpion;\n constructor() {\n\n }\n ngOnInit(): void {\n this.selected = this.data.defaultSelected;\n }\n\n public optionSelected(item: DropdownOpion) {\n // this.selected = item;\n this.data.defaultSelected = item;\n this.data?.onChangeCallback && this.data?.onChangeCallback(item);\n }\n }\n ","\n\n
\n {{data?.defaultSelected?.display}}\n
\n \n
\n
\n\n
{{item?.display}}
\n
","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n ViewContainerRef\n } from '@angular/core';\n import { DropdownPanel } from './dropdown-panel';\n import { Overlay, OverlayRef } from '@angular/cdk/overlay';\n import { TemplatePortal } from '@angular/cdk/portal';\n import { merge, Observable, Subscription } from 'rxjs';\n \n @Directive({\n selector: '[dropdownTriggerFor]',\n host: {\n '(click)': 'toggleDropdown()'\n }\n })\n export class DropdownTriggerForDirective implements OnDestroy, AfterViewInit, OnInit {\n private isDropdownOpen = false;\n private overlayRef: OverlayRef;\n private dropdownClosingActionsSub = Subscription.EMPTY;\n \n @Input('dropdownTriggerFor') public dropdownPanel: DropdownPanel;\n @Output() isPanelOpened = new EventEmitter();\n constructor(\n private overlay: Overlay,\n private elementRef: ElementRef,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {\n \n }\n ngOnInit(): void {\n // const cngSelectEl = this.elementRef.nativeElement.nextElementSibling; \n // const parentWidth = this.elementRef.nativeElement.offsetWidth; \n // this.renderer.setStyle(cngSelectEl, 'width', `${parentWidth}px`);\n }\n ngAfterViewInit(): void {\n \n }\n\n \n toggleDropdown(): void {\n this.isDropdownOpen ? this.destroyDropdown() : this.openDropdown();\n \n }\n \n openDropdown(): void {\n let {ddWidth} = this.dropdownPanel;\n this.dropdownPanel.ddWidth = ddWidth !=='' ? ddWidth : `${this.elementRef.nativeElement.offsetWidth}px`;\n this.isDropdownOpen = true;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8\n }\n ])\n });\n \n const templatePortal = new TemplatePortal(\n this.dropdownPanel.templateRef,\n this.viewContainerRef\n );\n this.overlayRef.attach(templatePortal);\n \n this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(\n () => this.destroyDropdown()\n );\n }\n \n private dropdownClosingActions(): Observable {\n const backdropClick$ = this.overlayRef.backdropClick();\n const detachment$ = this.overlayRef.detachments();\n const dropdownClosed = this.dropdownPanel.closed;\n \n return merge(backdropClick$, detachment$, dropdownClosed);\n }\n \n private destroyDropdown(): void {\n if (!this.overlayRef || !this.isDropdownOpen) {\n return;\n }\n \n this.dropdownClosingActionsSub.unsubscribe();\n this.isDropdownOpen = false;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef.detach();\n }\n \n ngOnDestroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n }\n }\n ","import {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ViewChild,\n AfterViewInit,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { CollapseService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'mck-collapse-header',\n template: `\n \n \n {{title}} \n
\n
\n \n
\n \n
\n
\n {{description}}\n \n \n \n \n `,\n styleUrls: ['./collapse-header.component.scss'],\n})\nexport class CollapseHeaderComponent implements OnInit, OnDestroy {\n\n @Input() title: string;\n @Input() description: string;\n @Input() isLoading = false;\n @Input() expandedIds: string[] = [];\n @Output() updateSectionIdOnOpen = new EventEmitter<{ status: string, id: string }>(); // Emit the id of the opened result section\n\n @ViewChild('expansionPanel') expansionPanel: MatExpansionPanel;\n\n public isExpanded = new BehaviorSubject(false);\n private collapseSubscription: Subscription;\n\n constructor(private collapseService: CollapseService) {}\n\n ngOnInit(): void {\n this.collapseSubscription = this.collapseService.collapse$.subscribe(() => {\n if (this.expansionPanel) {\n this.expansionPanel.close(); // Close the panel\n }\n });\n }\n\n // Update opened section id and emit the id of the opened result section to the parent component \n public updateOpenedSectionId(isOpen: string) {\n this.updateSectionIdOnOpen.emit({ status: isOpen, id: this.expandedTitleId });\n }\n\n\n \n /**\n * Gets the expanded title as an id by removing parentheses and replacing spaces with underscores.\n * @returns The expanded title.\n */\n public get expandedTitleId(): string {\n return this.title?.split('(')[0]?.split(' ')?.join('_') ;\n }\n\n ngOnDestroy(): void {\n this.collapseSubscription.unsubscribe();\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nexport interface RoomAvaibilityModalData {\n\theaderText: string,\n\tmessage: string,\n\tbuttonLabel: string,\n\tcallback: Function,\n shouldClose: boolean\n}\n\n@Component({\n selector: 'conflict-alert-modal',\n templateUrl: 'conflict-alert-modal.component.html',\n styleUrls: ['./conflict-alert-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConflictAlertModalComponent implements OnInit {\n constructor(public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public dialogData: RoomAvaibilityModalData) {\n }\n ngOnInit(): void {}\n\n public done() {\n this.dialogData?.callback(); this.dialogRef.close()\n }\n}\n","
\n \n
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{{dialogData?.headerText}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{dialogData?.message}}
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t\t \n\t\t\t\n
","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {DialogEvent} from '@mckinsey-converge/base';\nimport {DateTZ, isToday} from '@mckinsey-converge/date-tz';\n\nexport interface ConflictsModalComponentData {\n room_name: string;\n conflicts: number[];\n copy_conflicts?: boolean;\n timezone: string;\n status?: string;\n}\n\n@Component({\n selector: 'app-conflicts-modal',\n templateUrl: './conflicts-modal.component.html',\n styleUrls: ['./conflicts-modal.component.scss']\n})\nexport class ConflictsModalComponent implements OnInit{\n public room_name: string;\n public conflicts: number[];\n public copy_conflicts: boolean;\n public timezone;\n public status: string;\n\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: ConflictsModalComponentData){\n\n }\n\n public ngOnInit(){\n this.timezone = this._data.timezone;\n this.room_name = this._data.room_name\n this.conflicts = this._data.conflicts\n this.copy_conflicts = this._data.copy_conflicts\n this.status = this._data.status\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone});\n const dateIsToday = isToday(dateTZ, this.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n\n public copy(): void {\n this.event.emit({ reason: 'action' });\n }\n\n\n}\n","
\n \n
\n\n
\n

Conflicts ({{conflicts.length}})

\n
\n The {{room_name}} room is not available on the following dates.\n Do you want to proceed without booking these days?\n
\n
\n The {{room_name}} room is not available on the following dates.\n You need to make individual bookings to cover these days, please.\n
\n
\n
\n
\n Date\n
\n
\n
\n {{formatDate(conflict)}}\n
\n
\n
\n
\n\n \n {{copy_conflicts ? 'Copy to clipboard' : 'Close'}}\n \n \n {{copy_conflicts ? 'Close' : 'Continue'}}\n \n\n","import { Component, OnInit, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'custom-snackbar',\n templateUrl: './custom-snackbar-component.component.html',\n styleUrls: ['./custom-snackbar-component.component.scss'],\n})\nexport class CustomSnackbarComponent implements OnInit {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) {\n }\n\n ngOnInit() {}\n\n get getIcon() {\n switch (this.data.snackType) {\n case 'success':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-success.svg',\n };\n case 'error':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-failure.svg',\n };\n case 'warn':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-warning.svg',\n };\n case 'info':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-info.svg',\n };\n default:\n return { type: 'info', iconPath: 'assets/icon/toast-info.svg' };\n }\n }\n\n closeSnackbar() {\n this.data.snackBar.dismiss();\n }\n}\n","
\n
\n
\n \"{{getIcon.type}}\n
\n
\n {{data.message}}\n
\n
\n
\n
close
\n
\n
","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CustomSnackbarComponent } from './custom-snackbar-component.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackBarService {\n messageText: string[];\n constructor(public snackBar: MatSnackBar) {}\n\n public openSnackBar(\n message,\n type,\n duration?,\n verticalPosition?,\n horizontalPosition?\n ) {\n const _snackType = type !== undefined ? type : 'success';\n this.snackBar.openFromComponent(CustomSnackbarComponent, {\n duration: duration || 4000,\n horizontalPosition: horizontalPosition || 'end',\n verticalPosition: verticalPosition || 'top',\n data: {\n message: message,\n snackType: _snackType,\n snackBar: this.snackBar,\n },\n });\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n OnChanges,\n SimpleChanges,\n forwardRef,\n EventEmitter,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDateTzPickerOptions {\n /** DateTZ object. First selectable date */\n fromDateTz?: DateTZ;\n /** DateTZ object. Last selectable date */\n untilDateTz?: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: DateTZ;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'date-tz-calendar-widget',\n templateUrl: './date-tz-calendar-widget.component.html',\n styleUrls: ['./date-tz-calendar-widget.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzCalendarWidgetComponent),\n multi: true,\n },\n ],\n})\nexport class DateTzCalendarWidgetComponent\n extends BaseClass\n implements OnInit, OnChanges, ControlValueAccessor\n{\n /** CSS class to add to the root element of the component */\n @Input() public className = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDateTzPickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n\n public readonly weeks = new Array(6).fill(0);\n public selectedDateTz: DateTZ = DateNow();\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private fromTz: DateTZ;\n /** Last selectable date */\n private toTz: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n private _today = DateNow();\n\n public get timezone() {\n return this.selectedDateTz?.building_tz || '';\n }\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.selectedDateTz = item.value;\n if (this._onChange) {\n this._onChange(this.selectedDateTz);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date 2\n */\n public updateDate(): void {\n if (!this.selectedDateTz) {\n return;\n }\n const now = this._today.startOfValue('month');\n const startOfMonthDateTz = this.selectedDateTz.startOfValue('month');\n if (startOfMonthDateTz.valid) {\n const difference = startOfMonthDateTz.dateDiff(\n now,\n 'months',\n 'months'\n );\n if (this.offset !== difference) {\n this.offset = Math.round(difference);\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.fromDateTz) {\n const today = this._today.startOfValue('month');\n this.fromTz = this.options.fromDateTz.startOfValue('day');\n this.min_offset = Math.round(\n this.fromTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months')\n );\n } else if (this.fromTz) {\n this.fromTz = null; // R-- check if ok\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.untilDateTz) {\n const today = this._today.startOfValue('month');\n this.toTz = this.options.untilDateTz.startOfValue('day');\n this.max_offset = this.toTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months');\n } else if (this.toTz) {\n this.toTz = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n this._today = new DateTZ({ date: Date.now(), is_local_tz: !this.timezone, building_tz: this.timezone });\n const startOfMonthDateTz = this._today.addValue({ months: this.offset });\n const active = this.selectedDateTz || DateNow();\n let startDate = startOfMonthDateTz\n .setValue({ day: 1 })\n .setValue({ weekday: 7 })\n .subtractValue({ weeks: 1 });\n this.date_list = [];\n for (let i = 0; i < 42; i++) {\n this.date_list.push({\n value: startDate,\n display: startDate.formatDate('d'),\n active: active.isSameDate(startDate, 'day'),\n non_month: !startOfMonthDateTz.isSameDate(startDate, 'month'),\n count: this.counters\n ? this.counters[startDate.formatDate('yyyy-MM-dd')] || 0\n : 0,\n disabled:\n (this.fromTz ? startDate.ms < this.fromTz.ms : false) ||\n (this.toTz ? startDate.ms > this.toTz.ms : false),\n today: this._today.isSameDate(startDate, 'day'),\n });\n startDate = startDate.addValue({ days: 1 });\n }\n this.month_name = startOfMonthDateTz.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = this._today.startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days: 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n const new_offset = Math.min(\n this.max_offset,\n Math.max(this.min_offset, this.offset + value)\n );\n this.offset = Math.round(new_offset);\n this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const offset = this.offset;\n this.offset = Math.round(\n this._today.dateDiff(this.selectedDateTz, 'months', 'months')\n );\n if (offset !== this.offset) this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: DateTZ) {\n if (value) {\n this.selectedDateTz = value;\n this.updateDate();\n this.generateMonth();\n }\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n}\n","
\n
\n \n
\n \n
{{ month_name }}
\n = max_offset\"\n (click)=\"changeMonth(1)\"\n >\n
\n \n
\n \n \n \n \n \n \n \n \n \n
{{ item }}
\n \n {{ item.display }}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTzCalendarWidgetComponent } from '../date-tz-calendar-widget/date-tz-calendar-widget.component';\n\n@Component({\n selector: 'date-tz-date-picker',\n template: `\n \n {{label}}\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./date-tz-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class DateTzDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n @Input() public label?: string;\n /** Earliest date available the user is allowed to pick */\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n /** Latest date available the user is allowed to pick */\n @Input() public untilDateTz: DateTZ = DateNow(new Date()).endOfValue('day').addValue({ years: 1 });\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n // R-- possible TODO, address all_day that disables this input and displays \"Add Day for the value like the time picker\"\n @Input() public all_day: boolean = false;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public counters: any;\n\n @Input() public initialDateSelectionTz?: DateTZ;\n\n @Output() public onSelect = new EventEmitter();\n\n @Input() public invalid?: boolean;\n\n @Input() public timezone?: string;\n\n @Input() public can_pick_today: boolean = true;\n\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n\n public ngOnInit(): void {\n if (this.initialDateSelectionTz) {\n this.writeValue(this.initialDateSelectionTz)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(DateTzCalendarWidgetComponent, {static: true }) private _acaDatePicker: DateTzCalendarWidgetComponent;\n /** Currently selected date */\n public selectedDateTzValue = new BehaviorSubject(DateNow(new Date()));\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(new DateTZ({ is_local_tz: false, building_tz: d.building_tz }), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n // date\n public get dateTzObservable(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n return d \n }));\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(newValueTz: DateTZ) {\n // Keep hours and minutes of the old date\n const old_date = this.selectedDateTzValue.value;\n let newDateTz = newValueTz.setValue({ hour: old_date.dateHour, minute: old_date.minutes, second: old_date.second });\n\n // Check that new date is before from\n if (newDateTz.ms < this.fromDateTz.ms) {\n newDateTz = this.fromDateTz;\n }\n\n this.selectedDateTzValue.next(newDateTz);\n if (this._onChange) {\n this._onChange(newDateTz);\n }\n\n this.onSelect.emit(newDateTz);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n const building_tz = this.timezone || this.fromDateTz.building_tz\n const is_local_tz = DateNow(new Date()).building_tz === building_tz\n this.setValue(new DateTZ({ is_local_tz, building_tz }));\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(selectedDateTz: DateTZ) {\n this.selectedDateTzValue.next(selectedDateTz);\n this.show_tooltip = false;\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n DurationGroup,\n nearestDurationToInput,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators'; \nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { convertLocalTimestampToTimezonedDateTz, convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'date-tz-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DateTzDurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input() public label?: string;\n @Input() public required: boolean;\n @Input() max_length?: number;\n\n // /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDateTz: DateTZ;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Whether form all_day is enabled. */\n // R-- need to address all_day that disables this input and displays \"Add Day for the value\"\n @Input() public all_day: boolean = false;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** Component will return a number of minutes */\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDateTz = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDateTz]).pipe(\n \n map(([value, currentStartDate]) => { \n /**\n * convert current start date/time to building time zone first\n * \n */\n const ms = convertTimezonedTimestampToLocalDateTz(currentStartDate.ms, currentStartDate.building_tz).ms;\n return nearestDurationToInput(this.durationGroups, ms, value); \n }\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDateTz.pipe(\n map(d => generateDurationOptionsFromGroups(d, this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDateTz.value, this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDateTz) {\n this.currentStartDateTz.next(changes.startDateTz.currentValue);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n nearestStepToInput,\n timeWithGmtOffsetFormatString,\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n generateAvailableTimes,\n generateAvailableTimesTz,\n} from '../utils/time.utils';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\nimport { filter, map, withLatestFrom } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'date-tz-time-field',\n template: `\n
\n {{\n label\n }}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzTimeFieldComponent),\n multi: true,\n },\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DateTzTimeFieldComponent\n extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Input() public label?: string;\n @Input() public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the DateTZ object datetime to start time options from **/\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n // Disables this input and displays R--- \"All Day\" for the value\n @Input() public all_day: boolean = false;\n @Input() public show_current: boolean = false;\n @Input() public startFromDateTz: boolean = false;\n\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n /** DateTZ object representing the currently set datetime */\n public selectedDateTz = new BehaviorSubject(\n closestToTimeSlotTz(DateNow(new Date()), this.step)\n );\n\n /** string representing the currently set datetime display value, needed for the input to display the slected value */\n public selectedTimeString = new BehaviorSubject(\n timeWithGmtOffsetFormatString(this.selectedDateTz.value)\n );\n\n public filterFormControl: FormControl = new FormControl();\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(\n generateAvailableTimesTz(\n DateNow(),\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(DateNow())]\n : [],\n this.startFromDateTz\n )\n );\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // Subscribe to selected option changes\n this.subscription(\n 'dateTimeChanges',\n combineLatest([this.selectedDateTz])\n .pipe(\n map(([selectedDateTz]) => {\n /**\n * The selectedDateTz should already be pegged to the closest time slot, but\n * if the selected time rolls into the past this can correct it. // R--- verify this statement\n */\n return closestToTimeSlotTz(selectedDateTz, this.step);\n }),\n withLatestFrom(this.options),\n filter(\n ([date, timeOptions]: [\n DateTZ,\n SelectOption[]\n ]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(\n (t) => t.value === date.formatDate('HH:mm')\n );\n }\n ),\n map(([dateTz, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz,\n });\n\n // Sort the time options\n timeOptions.sort((a, b) =>\n `${a.value}`.localeCompare(`${b.value}`)\n );\n return timeOptions;\n })\n )\n .subscribe((next) => {\n return this.options.next(next);\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n changes.no_past_times ||\n changes.step ||\n changes.fromDateTz ||\n changes.all_day\n ) {\n // If there's a new date value then update the time options\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // If today and all day goes from on to off the selected value isn't going to be available.\n if (\n changes.all_day &&\n !changes.all_day.currentValue &&\n changes.all_day.previousValue\n ) {\n this.setValue(this.options.value[0].display);\n }\n }\n }\n\n /**\n * Getter if the time picker options are visiable or not\n */\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n /**\n * Getter to return the current form timestamp from the from date object\n */\n public get timezone(): string {\n return this.fromDateTz.building_tz;\n }\n\n /**\n * A filter for finding a matching value when using the input text search\n */\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.selectedDateTz,\n ]).pipe(\n map(([value, selectedDateTz]) => {\n return nearestStepToInput(\n this.step,\n value,\n DateTime.now().valueOf()\n );\n })\n );\n\n /**\n * Default text displayed in the search field when the component initializes\n */\n public placeHolderOption = this.options.pipe(\n map((os) => os.length > 0 && os[0])\n );\n\n /**\n * Returns the selected option object by matching the selectedDateTz formated string with the option.display string\n */\n public selectedOption = combineLatest([\n this.options,\n this.selectedDateTz,\n ]).pipe(\n map(([options, selectedDateTz]) =>\n options.find(\n (o) =>\n o.display === timeWithGmtOffsetFormatString(selectedDateTz)\n )\n )\n );\n\n /**\n * Determines the visually selected value when the options list is visible.\n *\n * @param option DateTZ\n * @returns boolean\n */\n public isSelected(option: SelectOption) {\n return this.selectedTimeString.value === option.display;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: DateTZ) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: DateTZ) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Method just used in unit tests to test disabling the input\n * @param disabled\n */\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Update the selected values\n * @param dateTz the DateTz object for the new time\n */\n public setSelectedValues(dateTz: DateTZ) {\n // Update the selected DateTz and string representations\n this.selectedTimeString.next(timeWithGmtOffsetFormatString(dateTz));\n this.selectedDateTz.next(dateTz);\n if (this._onChange) {\n this._onChange(dateTz);\n }\n }\n\n /**\n * Update the form field value\n * @param displayString The \"display\" value of this.options set by the time picker\n */\n public setValue(displayString: string): void {\n // Convert the display time string to the actual option object via an array find.\n const newTimeTz = this.options.value.find(\n (opt) => opt.display === displayString\n ).value;\n // Update the selected DateTz and string representations\n this.setSelectedValues(newTimeTz);\n // Send the\n if (newTimeTz) {\n if (this._onChange) {\n this._onChange(newTimeTz);\n }\n }\n }\n\n /**\n * Fires when the form control value is changed\n * @param dateTz The new value for the component\n */\n public writeValue(dateTz: DateTZ | null) {\n // Init is null ?\n if (dateTz != null) {\n // Update the selected DateTz and string representations\n this.setSelectedValues(dateTz);\n // Update the available options\n this.options.next(\n generateAvailableTimesTz(\n dateTz,\n !this.noPastTimes,\n this.step,\n dateTz.building_tz,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(dateTz)]\n : [],\n this.startFromDateTz\n )\n );\n }\n }\n}\n\nfunction generateOptionForDateTz(dateTz: DateTZ): SelectOption {\n return {\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n nearestDurationToInput,\n DurationGroup,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n map\n} from 'rxjs/operators';\nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'mck-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n @Input() max_length?: number;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDate: number;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDate = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDate]).pipe(\n map(([value, currentStartDate]) => nearestDurationToInput(this.durationGroups, currentStartDate.ms, value)\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDate.pipe(\n map(d => generateDurationOptionsFromGroups(d.toZone(this.timezone), this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDate.value.toZone(this.timezone), this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDate) {\n // R--- refactor input param\n const date = new DateTZ({date: this.startDate})\n this.currentStartDate.next(date);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mck-error-message',\n template: `\n
\n
\n
\n \n \n \n
\n
\n `,\n styleUrls: ['./error-message.component.scss']\n})\nexport class ErrorMessageComponent {\n\n constructor() {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-calendar-icon',\n template: `\n \n \n \n \n \n `,\n})\nexport class CalendarIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-chevron-icon',\n template: `\n \n \n
\n \n \n \n
\n
\n \n
\n `\n})\nexport class ChevronIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n @Input()\n up?: boolean;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit\n} from '@angular/core';\n\n@Component({\n selector: 'mck-close-icon',\n template: `\n \n \n \n \n `\n})\nexport class CloseIconComponent implements OnInit {\n\n @Input()\n fillClass?: string;\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component(\n {\n selector: 'mck-informational-image',\n template: `\n \n
\n
\n
\n \n
\n
\n
\n
\n `,\n styleUrls: ['./informational-image.component.scss'],\n encapsulation: ViewEncapsulation.None\n }\n)\nexport class InformationalImageComponent extends BaseTemplateComponent {\n\n @Input()\n public src: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-label',\n template: `\n \n \n \n *\n \n \n `,\n styleUrls: ['./label.component.scss']\n})\nexport class LabelComponent extends BaseTemplateComponent implements OnInit {\n\n @Input()\n required = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { MatSelect } from '@angular/material/select';\nimport { SelectOption } from '../options/select-option';\n\n@Component({\n selector: 'mck-legend-dropdown',\n template: `\n
\n \n \n \n \n
\n \n \n \n {{ buildPlaceholder() }}\n \n
\n \n
\n \n
\n `,\n styleUrls: ['./legend-dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LegendDropdownComponent {\n\n @Input()\n public placeholder: string;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public placeholderOpen?: string\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public buildPlaceholder(){\n return this.isOpen && this.placeholderOpen ? this.placeholderOpen : this.placeholder\n }\n}\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AcaDatePickerComponent } from '../aca-date-picker/aca-date-picker.component';\n\n@Component({\n selector: 'mck-date-picker',\n template: `\n \n Date\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./mck-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MckDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class MckDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public initialDateSelection?: number;\n\n @Input() public invalid?: boolean;\n\n @Output() public onSelect = new EventEmitter();\n\n // R--- or is this the date picker to refactor. too tired.\n public ngOnInit(): void {\n if (this.initialDateSelection) {\n this.writeValue(this.initialDateSelection)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(AcaDatePickerComponent, {static: true }) private _acaDatePicker: AcaDatePickerComponent;\n\n /** Currently selected date */\n public dateValue = new BehaviorSubject(DateNow(new Date()));\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.dateValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public get date(): Observable {\n return this.dateValue;\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = this.dateValue.value;\n const d = new DateTZ({date: new_value})\n let new_date = d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n const new_d = new DateTZ({ date: new_date })\n this.dateValue.next(new_d);\n if (this._onChange) {\n this._onChange(new_date);\n }\n this.onSelect.emit(new_date);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n this.setValue(DateNow(new Date()).ms);\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n const date = new DateTZ({date: value})\n this.dateValue.next(date);\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-modal-button-row',\n template: `\n \n \n \n \n
\n \n {{secondaryLabel}}\n \n \n {{primaryLabel}}\n\n \n
\n \n
\n `,\n styleUrls: ['./modal-button-row.component.scss']\n})\nexport class ModalButtonRowComponent extends BaseTemplateComponent {\n\n @Input()\n primaryLabel?: string;\n\n /**\n * Specify if you want to disable the primary button\n */\n @Input()\n primaryDisabled?: boolean = false;\n\n /**\n * Used only if primaryLabel is specified.\n */\n @Output()\n public primarySubmit = new EventEmitter();\n\n /**\n * Specify if you want to show a secondary label button\n */\n @Input()\n secondaryLabel?: string;\n\n @Input()\n disableFixed: boolean = false;\n\n /**\n * Specify if you want to disable the secondary button\n */\n @Input()\n secondaryDisabled?: boolean = false;\n\n /**\n * Used only if secondaryLabel is specified.\n */\n @Output()\n public secondarySubmit = new EventEmitter();\n\n @Input()\n smallButtons?: boolean = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-modal',\n template: `\n \n
\n
\n \n
\n
\n

{{header}}

\n
\n
\n \n
\n `,\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n @Input()\n header?: string;\n @Input() shouldClose?: boolean = true;\n\n constructor(private dialogRef: MatDialogRef) {\n }\n\n public close() {\n this.dialogRef.close();\n }\n}\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { DateTZ, isToday } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'override-changes-modal',\n templateUrl: './override-changes-modal.component.html',\n styleUrls: ['./override-changes-modal.component.scss']\n})\nexport class OverrideChangesModalComponent implements OnInit{\n\n public edits;\n public timezone;\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: OverrideChangesModalComponent){\n\n }\n\n public ngOnInit(){\n // this.edits = this._data.edits.sort((a, b) => a - b);\n\n // Function to convert epoch to 'YYYY-MM-DD' format\n const getDateString = (epoch) => {\n return new Date(epoch * 1000).toISOString().split('T')[0];\n };\n\n // Set to store unique date strings\n const uniqueDates = new Set();\n\n // Filter the edits array\n const filteredEdits = this._data.edits.filter(epoch => {\n const dateString = getDateString(epoch);\n if (!uniqueDates.has(dateString)) {\n uniqueDates.add(dateString);\n return true;\n }\n return false;\n });\n\n this.edits = filteredEdits;\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone });\n const dateIsToday = isToday(dateTZ, this._data.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n}","
\n \n \n
\n\n \n \n \n\n

Overriding Changes

\n

Editing the series here will override all previous changes made to individual occurrences. Are you sure you want to proceed?

\n\n \n \n \n \n \n \n \n \n \n \n \n
Dates
{{formatDate(edit)}}
\n
\n\n\n \n \n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\n\n/**\n * Transforms input by returning a subset of items based on if the\n * any items include the search text based on passed objectKey.\n *\n * objectKey can be pipe separated keys. e.g: 'name|age'. Then it will check against all.\n */\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(items: any[], searchText: string, objectKey?: string): any[] {\n if (!items) return [];\n if (!searchText) return items;\n searchText = searchText.toLowerCase();\n const splitKeys = objectKey?.split('|') ?? [];\n return items.filter(it => {\n let included = false;\n splitKeys.forEach((key) => {\n if (it[key]?.toLowerCase().includes(searchText)) {\n included = true;\n }\n });\n if (splitKeys.length === 0) {\n return it.toLowerCase().includes(searchText);\n }\n return included;\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n DomSanitizer,\n SafeHtml,\n SafeResourceUrl,\n SafeScript,\n SafeStyle,\n} from '@angular/platform-browser';\n\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n@Pipe({\n name: 'sanitize',\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n type: 'resource' | 'url' | 'script' | 'style' | 'html' = 'html'\n ): SafeHtml | SafeResourceUrl | SafeScript | SafeStyle {\n switch (type) {\n case 'resource':\n return (\n this.sanitizer.sanitize(\n SecurityContext.RESOURCE_URL,\n value\n ) || ''\n );\n case 'url':\n return (\n this.sanitizer.sanitize(SecurityContext.URL, value) || ''\n );\n case 'script':\n return (\n this.sanitizer.sanitize(SecurityContext.SCRIPT, value) || ''\n );\n case 'style':\n return (\n this.sanitizer.sanitize(SecurityContext.STYLE, value) || ''\n );\n }\n return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { SelectOption } from '../types';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'mck-radio-select',\n template: `\n \n
\n {{label}}\n \n {{option.display}}\n \n
\n
\n `,\n styleUrls: ['./radio-select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioSelectComponent),\n multi: true\n }\n ]\n})\nexport class RadioSelectComponent extends BaseTemplateComponent implements OnInit, ControlValueAccessor {\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n options: SelectOption[];\n\n public value = new BehaviorSubject | undefined>(undefined);\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n public setValue(value: string) {\n const obj = this.options.find(o => o.value === value);\n this.writeValue(obj);\n if (this._onChange) {\n this._onChange(obj)\n }\n }\n\n writeValue(obj: SelectOption): void {\n this.value.next(obj);\n }\n}\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { OrganisationService, RecurrencePeriod, RecurrenceType, removeExpiredOcurrences, RepeatsOn } from \"@mckinsey-converge/data-common\";\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { first } from \"rxjs/operators\";\nimport { RecurrencePatternForm } from \"../recurrence-pattern-form/recurrence-pattern-form.component\";\n\n@Component({\n selector: 'recurrence-booking-form',\n templateUrl: './recurrence-booking-form.component.html',\n styleUrls: ['./recurrence-booking-form.component.scss']\n})\n\nexport class RecurringBookingForm implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n\n public current_type: RecurrenceType; \n public recurrence_types: Array = [\n {type: RepeatsOn.PATTERN, label: 'Repeats on'},\n {type: RepeatsOn.DATE, label: 'Repeats on specific date'}\n ]\n\n public building_tz = \"\";\n\n @ViewChild(RecurrencePatternForm) pattern_form: RecurrencePatternForm;\n\n constructor(\n private _org: OrganisationService,\n ) {}\n\n public get recurrencePeriod(){\n return this.form.get('recurrence_period')\n }\n\n public ngOnInit(): void {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.building_tz = this._org?.building?.timezone || 'America/Chicago';\n })\n if(this.recurrencePeriod.value === RecurrencePeriod.LIST){\n this.current_type = this.recurrence_types[1];\n removeExpiredOcurrences(this.form)\n }else{\n this.current_type = this.recurrence_types[0];\n }\n }\n\n public onChangeType(value: string) {\n this.current_type = this.recurrence_types.filter((type) => type.type === value)[0]\n if(this.current_type.type === RepeatsOn.PATTERN){\n this.recurrencePeriod.setValue(this.pattern_form.recurrencePatternFormControl.value)\n }else{\n this.recurrencePeriod.setValue(RecurrencePeriod.LIST)\n }\n }\n\n public dateToBuildingTz(date?: number){\n return new DateTZ({date, building_tz: this.building_tz, is_local_tz: false})\n }\n\n public get error(){\n const recurrence_starts = this.form.controls.recurrence_starts\n const recurrence_days = this.form.controls.recurrence_days\n return recurrence_starts.invalid || recurrence_days.invalid\n }\n\n}\n","
\n \n
\n \n \n {{recurrence_types[0].label}}\n \n \n \n
\n
\n \n \n {{recurrence_types[1].label}}\n \n \n \n
\n
\n
\nThe recurrence pattern is not valid.","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { MatMenuTrigger } from \"@angular/material/menu\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { OrganisationService } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ,toMiddayUTC } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-date-form',\n templateUrl: './recurrence-date-form.component.html',\n styleUrls: ['./recurrence-date-form.component.scss']\n})\n\nexport class RecurrenceDateForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n public selected_dates: Array = []\n public timezone: string = '';\n public nowTz: DateTZ = DateNow(new Date());\n public fromDateTz: DateTZ = this.nowTz.clone();\n public untilDateTz: DateTZ = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n public dateTz: DateTZ = DateNow(new Date());\n\n public get recurrenceStarts(){\n return this.form.get('recurrence_starts');\n }\n\n public get formDateTz(){\n return this.form.get('dateTz');\n }\n\n constructor (private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The fromDateTz is curious, would it make sense to be based on the form dateTz?\n this.fromDateTz = this.nowTz.clone()\n this.untilDateTz = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n\n if(this.recurrenceStarts.value){\n const tempForSort = [...this.recurrenceStarts.value]; // due to cannot assign to read only property '0' of object '[object Array]'\n this.selected_dates = tempForSort.sort((d1: DateTZ, d2: DateTZ) => d1.ms - d2.ms);\n }\n this.subscription('ocurrenceChanges', this.recurrenceStarts.valueChanges\n .subscribe(() => {\n this.selected_dates = [...this.recurrenceStarts.value]\n })\n ); \n }\n\n /**\n * Add value to the list of selected dates\n * @param newDateTz\n */\n public addDate(newDateTz: DateTZ) {\n const d = newDateTz.clone();\n const start_date = this.formDateTz.value;\n let new_date = d.setValue({hour: start_date.dateHour, minute: start_date.minutes})\n \n /** Prevent user from selecting past dates */\n if (new_date.isBeforeDate(this.fromDateTz)) {\n new_date = this.fromDateTz;\n }\n\n /** Prevent user from selecting the same date more than once */\n const is_selected = this.selected_dates.filter((date: DateTZ)=> new_date.isSameDate(date, 'day'))\n if(is_selected.length){\n return\n }\n \n this.selected_dates.push(new_date);\n this.recurrenceStarts.setValue(this.selected_dates.sort((d1, d2) => d1.ms - d2.ms));\n this.setDateTzForm();\n }\n\n /**\n * \n * @param dateMsValue: number\n * @returns \n */\n public setPickerToGivenDate(dateTsValue: DateTZ) {\n this.fromDateTz = dateTsValue.clone();\n }\n\n /**\n * Function calls on close of date picker without date selection\n */\n public onDatePickerClose = () => {\n this.setPickerToGivenDate(this.nowTz)\n };\n\n public goToToday() {\n this.addDate(this.nowTz);\n this.setPickerToGivenDate(this.nowTz);\n }\n\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n public openDatePicker() {\n this._trigger.openMenu();\n }\n\n public deleteDate(date: DateTZ) {\n const index = this.selected_dates.map((d: DateTZ) => d.ms).indexOf(date.ms)\n this.selected_dates.splice(index, 1)\n this.recurrenceStarts.setValue(this.selected_dates)\n this.setDateTzForm()\n }\n\n public isToday(date) {\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: this.timezone,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone,\n }),\n 'day'\n );\n }\n\n public formatDate(date: DateTZ){\n const isToday = this.isToday(date);\n const display = date.formatDate('ccc dd MMM yyyy');\n\n return `${display}${isToday ? ' (Today)' : ''}`;\n }\n\n private setDateTzForm(): void {\n if (this.selected_dates.length === 0)\n return;\n\n const tz = this._org.building.timezone;\n const date_now = DateNow(new Date()).toZone(tz);\n let dateTz = this.selected_dates[0].clone();\n\n dateTz = dateTz.setValue({\n hour: (this.formDateTz.value as DateTZ).hours,\n minute: (this.formDateTz.value as DateTZ).minutes\n });\n\n if (this.selected_dates[0].isSameDate(this.nowTz, \"day\") && dateTz.hours < date_now.hours) {\n const { minutes: minute, hours: hour } = closestToTimeSlotTz(this.nowTz, 15);\n dateTz = dateTz.setValue({ minute, hour, second: 0 });\n }\n\n this.formDateTz.setValue(dateTz);\n }\n}\n","
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
DateAction
{{formatDate(date)}}Delete
\n
[+] Add another date
\n \n
\n \n Today\n \n
\n
\n
\n
","import { Component, Input, OnInit } from \"@angular/core\";\nimport { FormGroup, Validators } from \"@angular/forms\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { arrayWithValues, generateWeekDays, RecurrencePeriod, recurrencePeriodToDurationType, RepeatPeriod, validDateTZ, WeekDays } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-pattern-form',\n templateUrl: './recurrence-pattern-form.component.html',\n styleUrls: ['./recurrence-pattern-form.component.scss']\n})\n\nexport class RecurrencePatternForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n\n /** Range of dates for the Start Date Picker*/\n public nowTz: DateTZ = DateNow(new Date());\n public fromStartTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n public untilTz: DateTZ = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n public timezone: string = '';\n \n\n /** Range of dates for the End Date Picker*/\n public fromEndTz: DateTZ;\n\n public repeat_period_options: Array = [\n {label: 'Day', id: RecurrencePeriod.DAILY},\n {label: 'Week',id: RecurrencePeriod.WEEKLY},\n {label: 'Month', id: RecurrencePeriod.ABSOLUTE_MONTHLY}\n ]\n public week_days: Array = []\n\n public repeat_every_options\n\n\n public get recurrenceDateStartTzFormControl() {\n return this.form.get('dateTz')\n }\n\n public get recurrenceEndFormControl(){\n return this.form.get('recurrence_endTz')\n }\n\n public get recurrencePeriodFormControl(){\n return this.form.get('recurrence_period')\n }\n\n public get recurrenceIntervalFormControl(){\n return this.form.get('recurrence_interval')\n }\n\n public get recurrencePatternFormControl(){\n return this.form.get('recurrence_pattern')\n }\n\n public get recurrenceDaysFormControl(){\n return this.form.get('recurrence_days')\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The from date is curious, why isn't it based on the form dateTz?\n this.repeat_every_options = new Array(1)\n this.fromStartTz = closestToTimeSlotTz(this.nowTz, 15)\n this.untilTz = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n this.fromEndTz = this.fromStartTz.addValue({days: 1})\n\n this.setEndDateFromStartDate(this.recurrenceDateStartTzFormControl.value) //make sure end date is after start date\n\n if(!this.recurrencePeriodFormControl.value){\n this.recurrencePeriodFormControl.setValue(RecurrencePeriod.WEEKLY)\n }\n\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.recurrencePatternFormControl.setValue(this.recurrencePeriodFormControl.value)\n }\n\n this.week_days = generateWeekDays(this.recurrenceDateStartTzFormControl.value.ms, { building_tz: this.fromStartTz.building_tz })\n this.generateMaxIntervals()\n\n if(this.recurrenceDaysFormControl.value.length > 0){\n this.week_days = this.week_days.map((day) => \n ({...day, active: this.recurrenceDaysFormControl.value.includes(day.full_name)})\n )\n }\n\n if(!this.recurrenceDaysFormControl.value.length && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n const current_days = this.week_days.filter((day) => day.active).map((day)=>day.full_name)\n this.recurrenceDaysFormControl.setValue(current_days)\n }\n\n this.generateOcurrenceList()\n\n this.subscription('startTimeChanges', this.recurrenceDateStartTzFormControl.valueChanges\n .subscribe((next) => {\n this.setEndDateFromStartDate(next) \n })\n );\n\n this.subscription('endTimeChanges', this.recurrenceEndFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n );\n \n this.subscription('recurrencePeriodFormControlChanges', this.recurrencePeriodFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n ); \n }\n\n public setEndDateFromStartDate(startDateTz: DateTZ){\n let end_date = this.recurrenceEndFormControl.value.setValue({hour: startDateTz.dateHour, minute: startDateTz.minutes})\n\n /**Update the End date picker range */\n this.fromEndTz = startDateTz.isSameDate(this.untilTz,'day') ? startDateTz : startDateTz.addValue({days: 1})\n\n if(end_date.isBeforeDate(this.fromEndTz)){\n end_date = this.fromEndTz\n }\n\n this.recurrenceEndFormControl.setValue(end_date)\n\n this.generateMaxIntervals()\n this.updateActiveWeekday() \n }\n\n public setRepeatPeriod(value: RecurrencePeriod){\n this.updateValidators(value)\n this.recurrencePeriodFormControl.setValue(value);\n this.recurrencePatternFormControl.setValue(value);\n this.recurrenceIntervalFormControl.setValue(1)\n this.generateOcurrenceList();\n }\n\n public setRepeatEvery(value: number){\n this.recurrenceIntervalFormControl.setValue(value)\n this.generateOcurrenceList()\n }\n\n public repeatTimeString(value: string){\n return this.recurrenceIntervalFormControl.value !== 1 ? `${value}(s)` : value\n }\n\n public get displayWeekdays(){\n return this.recurrencePatternFormControl.value === RecurrencePeriod.WEEKLY\n }\n\n /* Check if selected interval is valid and reset to 1 if not*/\n private validateRecurrenceInterval = () => {\n if(this.repeat_every_options.length < this.recurrenceIntervalFormControl.value){\n this.recurrenceIntervalFormControl.setValue(1)\n } \n };\n\n /**\n * Generate max value for dorpdown interval\n */\n public generateMaxIntervals(){\n const start = this.recurrenceDateStartTzFormControl.value;\n const date_diff = this.recurrenceEndFormControl.value.dateDiff(start, this.periodToDurationType, this.periodToDurationType)\n //If no diff default to 1\n this.repeat_every_options = new Array(Math.round(date_diff) || 1)\n this.validateRecurrenceInterval();\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.generateOcurrenceList()\n }\n }\n\n /**\n * Generate ocurrence list base on the selected interval\n */\n public generateOcurrenceList() {\n\n /**If selected period is list then we don't want \n * to generate a list based on the repeats on selections*/\n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.LIST){\n return\n }\n\n const occurrence = []\n const first_date = this.recurrenceDateStartTzFormControl.value;\n let start = first_date\n const end = this.recurrenceEndFormControl.value;\n const interval = this.recurrenceIntervalFormControl.value\n const recurr_days = this.week_days.filter(day => day.active)\n /**\n * isLastDayOfMonth : Boolean\n * flag - to generate last day of every month in case of day or month reccuring booking if start date is last day of month\n */\n // const isLastDayOfMonth = first_date.date.day === first_date.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY;\n const isLastDayOfMonth = first_date.dateDay === 31 && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY ;\n \n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n start = start.startOfValue('week')\n }\n\n while (end.dateDiff(start.startOfValue('day'), this.periodToDurationType, this.periodToDurationType) >= 0) {\n \n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n occurrence.push(start) \n start = start.addValue({[this.periodToDurationType]: interval}, isLastDayOfMonth);\n /**\n * IF - should only consider resetting start under mentioned condition of ticket - https://acaprojects.atlassian.net/browse/MCK-2085\n * In summery - If user select any date except 31st, other months in the series (no matter 30 or 31 day month) should have same date select as start date.\n * If user select 31st as an start date, other month in the seleries should have select last day of the month (30th/31st/28th/29th).\n * Exception for February - February should select 28th or 29th If in above both selection includes date between 28th - 31st.\n * \n */\n if(start.dateDay !== first_date.dateDay && start.dateDay !== start.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY) {\n start = start.setValue({day: first_date.dateDay});\n } \n }else {\n recurr_days.forEach((day)=>{\n const date = start.addValue({days: day.day_index})\n if((date.isAfterDate(first_date) || date.isSameDate(first_date, 'day')) && \n (date.isBeforeDate(end) || date.isSameDate(end, 'day'))){\n occurrence.push(date)\n }\n })\n start = start.addValue({[this.periodToDurationType]: interval})\n }\n }\n\n this.form.controls.recurrence_count.setValue(occurrence.length)\n this.form.controls.recurrence_starts.setValue(occurrence.sort((d1, d2) => d1.ms - d2.ms))\n \n }\n\n public get periodToDurationType(){\n const period = this.recurrencePeriodFormControl.value\n return recurrencePeriodToDurationType(period)\n }\n\n /**\n * Update active weekday in the weekdays array\n */\n private updateActiveWeekday() {\n const _week_days = this.week_days.map((day)=>{\n if(this.recurrenceDaysFormControl.value.includes(day.full_name)){\n return {...day, active: true}\n }else{\n return {...day, active: false}\n }\n })\n this.week_days = [..._week_days] \n }\n\n public setWeekDays(new_day: WeekDays){\n const days = this.recurrenceDaysFormControl.value\n if(this.disabled){\n return\n }\n\n if(!new_day.active){\n days.push(new_day.full_name)\n }else{\n const current_index = days.indexOf(new_day.full_name)\n days.splice(current_index,1)\n }\n this.recurrenceDaysFormControl.setValue([...days])\n this.updateActiveWeekday()\n this.generateOcurrenceList()\n }\n\n /**Update the recurrence days validator if period changes */\n public updateValidators(value: RecurrencePeriod){\n if(value === RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n this.recurrenceDaysFormControl.setValidators(arrayValidators);\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }else if(value !== RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n this.recurrenceDaysFormControl.clearValidators();\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }\n }\n}\n","
\n
\n \n \n \n Date and time must be in the future\n
\n
\n \n \n \n Date and time must be in the future\n
\n
\n
\n \n
\n \n \n \n {{ i + 1}}\n \n \n \n \n \n \n {{ repeatTimeString(option.label) }}\n \n \n \n
\n
\n
\n \n
\n
\n {{day.id}}\n
\n
\n
\n
\n
","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { SelectOption } from '../types';\n\n@Component({\n selector: 'mck-select-option',\n template: `\n \n \n \n \n {{ option.display }}\n \n \n `,\n styleUrls: ['./select-option.component.css']\n})\nexport class SelectOptionComponent extends BaseTemplateComponent {\n\n @Input()\n option: SelectOption;\n\n @Input()\n selected: boolean;\n\n /**\n * If true, we still display as if it wasn't disabled.\n */\n @Input()\n ignoreDisabled = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators';\nimport { MatSelect } from '@angular/material/select';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\n@Component({\n selector: 'mck-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class SelectComponent implements OnInit, OnChanges, ControlValueAccessor {\n\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n /**\n * When true, can filter by searching on the input.\n */\n @Input()\n public searchEnabled = false;\n\n @Input()\n public splitDisplay = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Input()\n public showDivider: boolean = false\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n public filterFormControl: FormControl = new FormControl();\n\n public value = new BehaviorSubject(this.selectedValue || this.options[0]?.value);\n\n /** Available time blocks for the selected date */\n public _options = new BehaviorSubject[]>(this.options);\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public selectedOption = combineLatest([this._options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this._options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n\n constructor() {\n }\n\n public ngOnInit(): void {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this._options.next(this.options);\n this.value.next(this.selectedValue || this.options?.[0]?.value);\n }\n if (changes.selectedValue) {\n this.value.next(this.selectedValue?.value);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n}\n","
\n {{label}}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mck-selected-chip-count',\n template: `\n \n {{count}}\n \n \n `,\n styleUrls: ['./selected-chip-count.component.scss']\n})\nexport class SelectedChipCountComponent {\n\n @Input()\n count: number;\n\n @Output()\n close = new EventEmitter();\n\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\nexport enum SpacerMode {\n /**\n * If vertical, it expands in the vertical direction. Size is width.\n */\n Vertical = 'vertical',\n /**\n * If horizontal, it expands in the horizontal direction. Size is height.\n */\n Horizontal = 'horizontal',\n}\n\n@Component({\n selector: 'mck-spacer',\n template: `\n \n
\n
\n
\n
\n
\n `,\n styleUrls: ['./spacer.component.css'],\n})\nexport class SpacerComponent extends BaseTemplateComponent implements OnInit {\n SpacerMode = SpacerMode;\n\n @Input()\n size: string;\n\n @Input()\n mode: SpacerMode = SpacerMode.Horizontal;\n\n @Input()\n autoSize?: boolean;\n\n @Input()\n spacerClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-switch-group',\n template: `\n
\n {{title}}\n {{option.display}}\n
\n `,\n styleUrls: ['./switch-group.component.scss']\n})\nexport class SwitchGroupComponent implements OnInit {\n\n @Input()\n title: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selectedOptions: SelectOption[] = [];\n\n @Output()\n optionChecked = new EventEmitter>();\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n public onCheckedChange(option: SelectOption) {\n this.optionChecked.emit(option);\n }\n\n public isSelected(option: SelectOption) {\n return !!this.selectedOptions.find(s => s.value === option.value);\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlot,\n nearestStepToInput,\n timeWithGmtOffsetFormatString\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { generateAvailableTimes } from '../utils/time.utils';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport {\n filter,\n map,\n withLatestFrom\n} from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'mck-time-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n `,\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the date from start **/\n @Input() public from: number;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n // R-- Which time field is going to be used, there's too many\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** String representing the currently set date */\n public date = new BehaviorSubject(DateNow(new Date()).ms);\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.date]).pipe(\n map(([value, date]) => nearestStepToInput(this.step, value, DateTime.now().valueOf()))\n );\n\n /** String representing the currently set time */\n public value = new BehaviorSubject(closestToTimeSlot(DateTime.now(), this.step).toFormat('HH:mm'));\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(generateAvailableTimes(DateNow(new Date()).ms, !this.noPastTimes, this.step, this.timezone));\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this.options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n\n // Subscribe to selected option changes\n this.subscription('dateTimeChanges',\n combineLatest([\n this.date\n ]).pipe(\n map(([date]) => {\n // R--- The time input needing to be TZ aware.\n const closestTimeSlot = closestToTimeSlot(DateTime.fromMillis(date.valueOf()), this.step);\n // Need to return the date with building timezone or the HH:mm representation will no match the option values\n return new DateTZ({date: closestTimeSlot.valueOf(), is_local_tz:false, building_tz: this.timezone});\n }),\n withLatestFrom(this.options),\n filter(([date, timeOptions]: [DateTZ, SelectOption[]]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(t => t.value === date.formatDate('HH:mm'));\n }),\n map(([date, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(date),\n value: date.formatDate('HH:mm')\n });\n // Sort the time options\n timeOptions.sort((a, b) => `${a.value}`.localeCompare(`${b.value}`));\n return timeOptions;\n })\n ).subscribe(next => this.options.next(next)));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step || changes.timezone) {\n // If there's a new date value then update the time options\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n const buildingDate = new DateTZ({date: this.from, is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.value.next(buildingDate.formatDate('HH:mm'));\n }\n if (changes.from) {\n // When the from input param changes update the date value\n this.date.next(this.from);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n // value comes in as a HH:mm string\n const newTime = (new_value.indexOf(':') > 0 ? new_value : '00:00').split(':');\n // need the date with the building timezone so the hour set is relative to there and not local.\n const d = new DateTZ({ date: this.date.value, is_local_tz: false, building_tz: this.timezone });\n const date = d.setValue({ hour: parseInt(newTime[0]), minute: parseInt(newTime[1]) });\n if (date) {\n if (this._onChange) {\n this._onChange(date.ms);\n }\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number | null) {\n if (value != null) {\n // Time input value in building time milliseconds\n this.date.next(value);\n // Get the closest time to slot in case the browser was idle and elapse the valid times\n const date = closestToTimeSlot(DateTime.fromMillis(value).startOf('minute'), this.step);\n // Need the building time so HH:mm is correct\n const buildingDate = new DateTZ({date: date.valueOf(), is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.options.next(generateAvailableTimes(buildingDate.ms, !this.noPastTimes, this.step, this.timezone));\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-toggle',\n template: `\n
\n \n
\n `,\n styleUrls: ['./toggle.component.scss']\n})\nexport class ToggleComponent {\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selected: SelectOption;\n\n @Output()\n selectedChange = new EventEmitter>();\n\n public onTapOption(option: SelectOption) {\n this.selectedChange.emit(option);\n }\n\n isSelected(option: SelectOption) {\n return this.selected === option;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Component({\n selector: 'app-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss']\n})\nexport class TooltipComponent {\n isVisible: boolean = false; // To control the visibility of the tooltip\n position: TooltipPosition = TooltipPosition.DEFAULT;\n theme: TooltipTheme = TooltipTheme.DEFAULT;\n tooltip = '';\n left = 0;\n top = 0;\n visible = false;\n}","
\n
\n
\n {{string}}\n
\n
\n
","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n HostListener,\n Injector,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport {TooltipComponent} from \"./tooltip.component\";\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Directive({\n selector: '[tooltip]'\n})\nexport class TooltipDirective {\n\n @Input() tooltip = '';\n @Input() position: TooltipPosition = TooltipPosition.DEFAULT;\n @Input() theme: TooltipTheme = TooltipTheme.DEFAULT;\n @Input() trigger: ('hover' | 'click' | 'touch')[] = ['hover']; // Now an array of trigger types\n @Input() showDelay = 0;\n @Input() hideDelay = 0;\n @Input() show: boolean = true;\n\n private componentRef: ComponentRef | null = null;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n constructor(\n private elementRef: ElementRef, \n private appRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver, \n private injector: Injector) {\n }\n\n // Helper function to check if the tirgger type is present \n private hasTrigger(triggerType: 'hover' | 'click' | 'touch'): boolean {\n return this.trigger.includes(triggerType);\n }\n\n //Mouse and hover events\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.hasTrigger('hover') ) {\n this.initializeTooltip();\n }\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.hasTrigger('hover') ) {\n this.setHideTooltipTimeout();\n }\n }\n\n // Click event\n @HostListener('click')\n onClick(): void {\n if (this.hasTrigger('click') ) {\n if (this.componentRef === null) {\n this.initializeTooltip();\n } else {\n this.destroy(); // Hide tooltip if it is already shown\n }\n }\n }\n\n // Touch event\n\n\n @HostListener('touchstart', ['$event'])\n onTouchStart($event: TouchEvent): void {\n // Prevent default to avoid click event fire immedieatly \n // $event.preventDefault();\n if(this.hasTrigger('touch')) {\n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 150); // show the tooltip after short delay\n }\n \n }\n\n @HostListener('touchend')\n onTouchEnd(): void {\n // Hide the tooltip when touch end \n if(this.hasTrigger('touch') ){\n window.clearTimeout(this.touchTimeout);\n // this.setHideTooltipTimeout();\n setTimeout(() => {\n this.setHideTooltipTimeout();\n }, 500); \n }\n \n }\n\n // Initialization of the tooltip\n private initializeTooltip() {\n if (this.componentRef === null) {\n window.clearInterval(this.hideDelay);\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);\n this.componentRef = componentFactory.create(this.injector);\n\n this.appRef.attachView(this.componentRef.hostView);\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef).rootNodes;\n\n this.setTooltipComponentProperties();\n\n document.body.appendChild(tooltipDOMElement);\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\n }\n }\n\n private setTooltipComponentProperties() {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.position = this.position;\n this.componentRef.instance.theme = this.theme;\n\n const {left, right, top, bottom} = this.elementRef.nativeElement.getBoundingClientRect();\n\n switch (this.position) {\n case TooltipPosition.BELOW: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(bottom);\n break;\n }\n case TooltipPosition.ABOVE: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(top);\n break;\n }\n case TooltipPosition.RIGHT: {\n this.componentRef.instance.left = Math.round(right);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n case TooltipPosition.LEFT: {\n this.componentRef.instance.left = Math.round(left);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n\n private showTooltip() {\n if (this.componentRef !== null) {\n this.componentRef.instance.visible = this.show ? true : false;\n }\n }\n\n private setHideTooltipTimeout() {\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n destroy(): void {\n if (this.componentRef !== null) {\n window.clearInterval(this.showTimeout);\n window.clearInterval(this.hideDelay);\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","export enum TooltipPosition {\n ABOVE = 'above',\n BELOW = 'below',\n LEFT = 'left',\n RIGHT = 'right',\n DYNAMIC = 'dynamic',\n DEFAULT = 'below'\n}\n\nexport enum TooltipTheme {\n DARK = 'dark',\n LIGHT = 'light',\n DEFAULT = 'dark'\n}\n","export { AlertMode, AlertBannerDisplay } from './alert-banner/alert-banner.component';\nexport { SelectOption } from './options/select-option';\nexport * from './cng-select/dropdown-panel';","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSelectModule } from '@angular/material/select';\nimport { AutoCompleteChipSelectItemComponent } from './auto-complete-chip-select-item/auto-complete-chip-select-item.component';\nimport { AutoCompleteSelectOptionComponent } from './auto-complete-select-option/auto-complete-select-option.component';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { RadioSelectComponent } from './radio-select/radio-select.component';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FilterPipe } from './pipes/filter.pipe';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TimeFieldComponent } from './time-field/time-field.component';\nimport { DateTzTimeFieldComponent } from './date-tz-time-field/date-tz-time-field.component';\nimport { SpacerComponent } from './spacer/spacer.component';\nimport { DurationFieldComponent } from './duration-field/duration-field.component';\nimport { DateTzDurationFieldComponent } from './date-tz-duration-field/date-tz-duration-field.component';\nimport { AcaDatePickerComponent } from './aca-date-picker/aca-date-picker.component'; // the old widget\nimport { MckDatePickerComponent } from './mck-date-picker/mck-date-picker.component'; // the old form field \nimport { DateTzCalendarWidgetComponent } from './date-tz-calendar-widget/date-tz-calendar-widget.component'; // the new widget\nimport { DateTzDatePickerComponent } from './date-tz-date-picker/date-tz-date-picker.component'; // the new form field \nimport { CalendarIconComponent } from './icons/calendar/calendar-icon.component';\nimport { ChevronIconComponent } from './icons/calendar/chevron-icon.component';\nimport { SelectOptionComponent } from './select-option/select-option.component';\nimport { CloseIconComponent } from './icons/close/close-icon.component';\nimport { SelectedChipCountComponent } from './selected-chip-count/selected-chip-count.component';\nimport { AlertBannerComponent } from './alert-banner/alert-banner.component';\nimport { ErrorMessageComponent } from './error-message/error-message.component';\nimport { ToggleComponent } from './toggle/toggle.component';\nimport { LabelComponent } from './label/label.component';\nimport { ModalComponent } from './modal/modal.component';\nimport { CollapseHeaderComponent } from './collapse-header/collapse-header.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { SwitchGroupComponent } from './switch-group/switch-group.component';\nimport { ModalButtonRowComponent } from './modal-button-row/modal-button-row.component';\nimport { InformationalImageComponent } from './informational-image/informational-image.component';\nimport { GroupHeaderPipe } from './auto-complete-chip-select-item/groupHeader.pipe';\nimport { SelectComponent } from './select/select.component';\nimport { LegendDropdownComponent } from './legend-dropdown/legend-dropdown.component';\nimport { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';\nimport { RecurrencePatternForm } from './recurrence-pattern-form/recurrence-pattern-form.component'; \nimport { RecurrenceDateForm } from './recurrence-date-form/recurrence-date-form.component';\nimport { ConflictsModalComponent } from './conflicts-modal/conflicts-modal.component';\nimport { RecurringBookingForm } from './recurrence-booking-form/recurrence-booking-form.component';\nimport { OverrideChangesModalComponent } from './override-changes-modal/override-changes-modal.component';\nimport { SanitizePipe } from './pipes/sanitise.pipe';\nimport { ConflictAlertModalComponent } from './conflict-alert-modal/conflict-alert-modal.component';\nimport { CngSelectComponent } from './cng-select/cng-select.component';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { DropdownTriggerForDirective } from './cng-select/dropdown-trigger-for.directive';\nimport { CngSelectOptionsComponent } from './cng-select/cng-select-options.component';\nimport { TooltipComponent } from './tooltip/tooltip.component';\nimport { TooltipDirective } from './tooltip/tooltip.directive';\nimport { ZoomWarningComponent } from './zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nimport { CustomSnackbarComponent } from './custom-snackbar-component/custom-snackbar-component.component';\nimport { SnackBarService } from './custom-snackbar-component/custom-snackbar-component.service';\nimport { CateringDropComponent } from './catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n\nexport const MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule,\n MatExpansionModule,\n OverlayModule\n];\n\n@NgModule({\n imports: [CommonModule,\n ...MATERIAL_MODULES,\n ReactiveFormsModule,\n FormsModule,\n NgxMatSelectSearchModule, \n NgxSkeletonLoaderModule,\n MatSnackBarModule],\n declarations: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n GroupHeaderPipe,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n SelectOptionComponent,\n CloseIconComponent,\n SelectedChipCountComponent,\n AlertBannerComponent,\n ErrorMessageComponent,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n CustomSnackbarComponent,\n CateringDropComponent\n ],\n exports: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n AlertBannerComponent,\n ReactiveFormsModule,\n FormsModule,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n ],\n entryComponents: [\n CustomSnackbarComponent,\n CateringDropComponent\n ]\n \n})\nexport class UiModule {\n}\n","/**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n\nimport {\n closestToTimeSlot,\n closestToTimeSlotTz,\n DurationGroup,\n durationHumanized,\n timeFormatString,\n timeWithGmtOffsetFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../types';\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { DateTime } from 'luxon';\n\n// 24 hours\nexport const ALL_DAY_BOOKING_VALUE = 60 * 24;\n\nexport const DEFAULT_DURATION = 30;\n\n// R--- depreciate.\nexport const generateAvailableTimes = (\n datestamp: number,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz\n): SelectOption[] => {\n // R--- refactor to only used dateTz input and drop timezone param.\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let date = new DateTZ({ date: datestamp, is_local_tz: false, building_tz: timezone });\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || date.isAfterDate(now, 'day')) {\n // later than today\n date = date.startOfValue('day');\n } else {\n // today\n date = now;\n }\n // Get the closest timeslot to the start time\n const inputDate = DateTime.fromMillis(date.ms);\n const closestDate = closestToTimeSlot(inputDate, step);\n // Date changed to the closest time\n date = new DateTZ({ date: closestDate.valueOf(), is_local_tz: false, building_tz: timezone });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(date),\n shortDisplay: date.formatDate('hh:mma'),\n value: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n};\n\n\nexport const generateAvailableTimesTz = (\n fromDateTz: DateTZ,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz,\n all_day: boolean = false,\n extras: SelectOption[] = [],\n startFromDateTz: boolean = false\n): SelectOption[] => {\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let dateTz = fromDateTz.clone();\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || dateTz.isAfterDate(now, 'day')) {\n // later than today\n dateTz = dateTz.startOfValue('day');\n } else {\n // today/fromDateTz using the flag\n dateTz = startFromDateTz ? dateTz : now;\n }\n // Get the closest timeslot to the start time\n dateTz = closestToTimeSlotTz(dateTz, step);\n // Date changed to the closest time\n const end = dateTz.endOfValue('day');\n // Add the all day option for today\n if (all_day && dateTz.isSameDate(now, 'day')) {\n const startOfDay = dateTz.startOfValue('day');\n blocks.push({\n display: timeWithGmtOffsetFormatString(startOfDay),\n shortDisplay: startOfDay.formatDate('hh:mma'),\n value: startOfDay\n })\n }\n // Add options for the rest of the day\n while (dateTz.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n });\n \n dateTz = dateTz.addValue({ minutes: step });\n }\n\n return unique(extras.concat(blocks), 'shortDisplay');\n};\n\n/**\n * Generates list of duration options for new booking flow.\n * @param date - The start dateTime\n * @param max - The max number of minutes to go to from the date param.\n * @param min - The min number of minutes to display first time from.\n * @param step - The number of minutes to step up by for timeslots.\n */\nexport const generateDurationOptions = (\n date: DateTZ,\n max: number,\n min: number,\n step: number,\n extended: boolean): SelectOption[] => {\n const blocks: SelectOption[] = [];\n let value = min;\n while (value <= max) {\n let duration: string;\n if (extended) {\n const d = durationHumanized(value - min, true);\n duration = d ? `+${d}` : 'Current';\n } else {\n duration = durationHumanized(value, true);\n }\n\n blocks.push({\n value,\n display: `${date.addValue({ minutes: value }).formatDate(timeFormatString()).toLocaleLowerCase()} (${duration})`,\n });\n value += step;\n }\n return blocks;\n};\n\nexport const allDayOption: SelectOption = ({\n value: ALL_DAY_BOOKING_VALUE,\n display: 'All Day'\n});\n\nexport const oneWeekOption: SelectOption = ({\n value: 60 * 24 * 7, // 1 week\n display: 'One Week'\n});\n\nexport const defaultDurationGroups: DurationGroup[] = [\n {\n start: 15,\n step: 15,\n max: 60 * 24\n }\n // , {\n // start: 60,\n // step: 30,\n // max: (60 * 8) - 1 // 8 hours\n // }, {\n // start: 60 * 8,\n // step: 60,\n // max: 60 * 24 // 24 hours\n // }\n];\n\n/**\n * Maps the {@link DurationGroup} to {@link SelectOption} and appends the default all day and week options.\n */\nexport const generateDurationOptionsFromGroups = (date: DateTZ, durationGroups: DurationGroup[], extended: boolean): SelectOption[] => [\n ...(durationGroups.map(duration => generateDurationOptions(date, duration.max, duration.start, duration.step, extended)).reduce(((previousValue, currentValue) => {\n previousValue.push(...currentValue);\n return previousValue;\n }), [])),\n // allDayOption,\n // oneWeekOption\n ];\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-zoom-warning',\n templateUrl: './zoom-warning.component.html',\n styleUrls: ['./zoom-warning.component.scss']\n})\nexport class ZoomWarningComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onCloseClick(): void {\n this.dialogRef.close();\n }\n}\n","
\n

Excessive zoom warning

\n
\n\n
\n
\n

\n
\n
\n
\n\n
\n \n
\n
","export * from './lib/user.module';\nexport * from './lib/user.actions'\nexport * from './lib/user.types'\nexport * from './lib/user.reducer'\n","import { \n createLoadingAction\n } from '../../../loading/src/lib/loading.actions';\nimport {\n UserState,\n UserStoreState\n} from './user.types';\nimport { User } from '../../../data-common/src/lib/users/user.class';\nimport { createSelector } from '@ngrx/store';\n\nexport const loadUser = createLoadingAction('CurrentUser', 'current');\n\nexport const selectUserState = ({ user }: UserStoreState) => user;\n\nexport const selectHasUserData = createSelector(createSelector(selectUserState, loadUser.selectors.model), (state) => !!state.optionalSuccess);\n\nexport const selectCurrentUser = createSelector(selectUserState, loadUser.selectors.optionalSuccess);\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect\n} from '@ngrx/effects';\nimport { createLoadingEffect } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\nimport { UsersService } from '../../../data-common/src/lib/users/users.service';\n\n\n@Injectable()\nexport class UserEffects {\n\n constructor(private actions: Actions,\n private userService: UsersService) {\n }\n\n @Effect()\n loadUser = createLoadingEffect(this.actions, loadUser, () => this.userService.loadCurrentUser());\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StoreModule } from '@ngrx/store';\nimport { userReducer } from './user.reducer';\nimport { EffectsModule } from '@ngrx/effects';\nimport { UserEffects } from './user.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n StoreModule.forFeature('user', userReducer),\n EffectsModule.forFeature([UserEffects])\n ]\n})\nexport class UserModule {\n}\n","import { createReducer } from '@ngrx/store';\nimport { UserState } from './user.types';\nimport { LoadingModel } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\n\n\nexport const initialUserState: UserState = {\n current: LoadingModel.empty()\n};\n\nexport const userReducer = createReducer(initialUserState,\n ...loadUser.ons);\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./$$_lazy_route_resource lazy recursive\";","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { ShellWrapperComponent } from './shell/shell.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ShellWrapperComponent,\n children: [\n {\n path: 'day-view',\n loadChildren: () =>\n import('./calendar/day-view/day-view.module').then(m => m.DayViewModule)\n },\n {\n path: 'week-view',\n loadChildren: () =>\n import('./calendar/week-view/week-view.module').then(m => m.WeekViewModule)\n },\n {\n path: 'catering',\n loadChildren: () =>\n import('./catering/catering.module').then(m => m.CateringModule)\n },\n {\n path: 'visitors',\n loadChildren: () =>\n import('./visitors/visitors.module').then(m => m.VisitorsModule)\n },\n {\n path: 'reports',\n loadChildren: () =>\n import('./reports/reports.module').then(m => m.ReportsModule)\n },\n {\n path: 'room-admin',\n loadChildren: () =>\n import('./room-admin/room-admin.module').then(m => m.RoomAdminModule)\n },\n { path: '**', redirectTo: 'day-view' }\n ]\n },\n { path: '**', redirectTo: 'day-view' }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { useHash: true })],\n exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n","import { Component, HostListener, ViewEncapsulation } from '@angular/core';\nimport { UploadManager, Amazon, Md5Workers } from '@acaprojects/ngx-uploads';\nimport { ComposerService } from '@placeos/composer';\n\nimport { detectIE } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ZoomWarningComponent } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: [\n './styles/app.component.scss',\n './styles/custom-element.styles.scss',\n './styles/native-element.styles.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent extends BaseDirective {\n constructor(\n private _composer: ComposerService,\n private _uploads: UploadManager,\n private _md5_workers: Md5Workers,\n private _service: ApplicationService,\n private _dialog: MatDialog\n ) {\n super();\n /* istanbul ignore if */\n if (detectIE() && detectIE() < 12) {\n location.href = `${location.origin}${location.pathname}assets/not-supported.html`;\n return;\n }\n // CONCIERGE.date: If invalid, reset the localstorage date and timezone when reloading pages.\n const timezoneString = localStorage.getItem('CONCIERGE.timezone') || null;\n localStorage.removeItem('CONCIERGE.date');\n if (!timezoneString) {\n localStorage.removeItem('CONCIERGE.timezone'); \n }\n\n this._md5_workers.setup('assets/md5_worker.js');\n this.initUploads();\n }\n\n ngOnInit() {\n this.adjustZoom();\n }\n\n private adjustZoom() {\n const clientWidth = document.body.clientWidth;\n if (this.isMobileOrTablet()) { // Do not show the warning if it's a mobile or tablet device\n return;\n }\n if (clientWidth < 1300) {\n this._dialog.open(ZoomWarningComponent);\n }\n }\n private isMobileOrTablet(): boolean {\n const userAgent = navigator.userAgent || navigator.vendor;\n const maxTouchPoints = navigator.maxTouchPoints || 0; // Check for touch points \n if (maxTouchPoints > 0 && window.innerWidth <= 1024) {\n return true;\n } // Check for common mobile/tablet user agent strings \n const mobileAgents = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'IEMobile', 'Opera Mini'];\n for (const agent of mobileAgents) {\n if (userAgent.indexOf(agent) > -1) {\n return true;\n }\n }\n return false;\n }\n\n private initUploads() {\n this.subscription(\n 'composer',\n this._service.initialised.subscribe((state) => {\n /* istanbul ignore else */\n if (state) {\n this.timeout('init_uploads', () => {\n const token = this._composer.auth.token;\n if (!token) {\n return setTimeout(() => this.initUploads(), 300);\n }\n this._uploads.token = token;\n this._uploads.autoStart = true;\n this._uploads.endpoint = '/api/staff/uploads';\n UploadManager.addProvider(Amazon);\n });\n this.unsub('composer');\n }\n })\n );\n }\n}\n","
\n \n
\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { FormsModule } from '@angular/forms';\nimport { MAT_LABEL_GLOBAL_OPTIONS } from '@angular/material/core';\n\nimport { ComposerModule } from '@placeos/composer';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { environment } from '../environments/environment';\nimport { SharedContentModule } from './shared/shared.module';\nimport {\n ActionReducer,\n MetaReducer,\n StoreModule\n} from '@ngrx/store';\nimport { localStorageSync } from 'ngrx-store-localstorage';\nimport { ShellWrapperComponent } from './shell/shell.component';\nimport { provideMockSettingsObject } from '@mckinsey-converge/data-common';\nimport { DEFAULT_SETTINGS } from 'src/environments/settings';\nimport { ENVIRONMENT_TOKEN } from '@mckinsey-converge/environment';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BookingsModule } from 'src/app/bookings/bookings.module';\nimport { BookingsModule as BookingModuleStaff } from '@mckinsey-converge/bookings';\nimport { CalendarModule } from 'src/app/calendar/calendar.module';\nimport { EffectsModule } from '@ngrx/effects';\n\ndeclare global {\n interface Window {\n app_loaded: boolean;\n }\n}\n\n/**\n * Cache some state in local storage. Not for use in production.\n */\n export function localStorageSyncReducer(reducer: ActionReducer): ActionReducer {\n // Keys needed to fix prod reloading. MCK-1229\n let keys = [\n 'buildings',\n 'bookingForm',\n 'rooms',\n ];\n\n if (!environment.production) {\n keys = [\n 'bookings',\n 'buildings',\n 'organisation',\n 'bookingForm',\n 'rooms',\n 'user'\n ];\n }\n\n return localStorageSync({\n keys,\n rehydrate: true,\n })(reducer);\n}\n\nconst metaReducers: Array> = [localStorageSyncReducer];\n\n@NgModule({\n declarations: [\n AppComponent,\n ShellWrapperComponent\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n AppRoutingModule,\n HttpClientModule,\n FormsModule,\n ComposerModule,\n BookingsModule,\n CalendarModule,\n LegacyOverlaysModule,\n SharedContentModule,\n StoreModule.forRoot({}, { metaReducers }),\n BookingModuleStaff,\n EffectsModule.forRoot(),\n ],\n providers: [\n { provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'nevet' } },\n provideMockSettingsObject(DEFAULT_SETTINGS),\n { provide: ENVIRONMENT_TOKEN, useValue: environment }\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule {\n constructor() {\n window.app_loaded = true;\n }\n}\n","import {Component, OnInit, Inject, Output, EventEmitter} from '@angular/core';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {first} from 'rxjs/operators';\nimport {BaseDirective, closestToTimeSlotTz} from '@mckinsey-converge/base';\nimport {\n Booking,\n BookingAction,\n generateBookingForm, OrganisationService, RecurrencePeriod, removeExpiredOcurrences, SeriesAction, validDateTZ\n} from '@mckinsey-converge/data-common';\nimport {AvailableBookingFields} from '@mckinsey-converge/data-common';\nimport {ApplicationService} from '@mckinsey-converge/data-common';\nimport {HashMap, DialogEvent} from '@mckinsey-converge/base';\nimport {CateringDetailsModalComponent, CateringDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {BookingConfirmComponent} from '@mckinsey-converge/legacy-overlays';\nimport {RequirementDetailsModalComponent, RequirementDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {SpacesService} from '@mckinsey-converge/data-common';\nimport { ConflictsModalComponent, ConflictsModalComponentData, OverrideChangesModalComponent } from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { I } from '@angular/cdk/keycodes';\n\n\nexport interface BookingFlowEvent {\n /** Type of flow event */\n type: 'previous' | 'next' | 'reset' | 'close' | 'error';\n /** Step which the event was emitted from */\n step: string;\n /** Additional metadata for the event */\n metadata?: HashMap;\n}\n\nexport interface BookingModalData {\n /** Booking to create/edit */\n booking: Booking;\n /** Whether to edit only catering */\n only_catering?: boolean;\n /** Pass in timezone for new bookings */\n timezone?: string;\n /**Type of action on a series */\n action?: SeriesAction | BookingAction;\n //** If Booking request from day view grid click */\n isFromGrid?: boolean;\n}\n\n@Component({\n selector: 'a-booking-modal',\n templateUrl: './booking-modal.component.html',\n styleUrls: ['./booking-modal.component.scss'],\n})\nexport class BookingModalComponent extends BaseDirective implements OnInit {\n\n /** Range of dates for the Start Date Picker*/\n public from_start: DateTZ;\n public to: DateTZ;\n\n /** Range of dates for the Start Date Picker*/\n public from_end: DateTZ;\n\n /** Form fields */\n public form: FormGroup;\n /** Form data store */\n public booking: Booking;\n /** Step of the booking flow that is currently active */\n public flow_step: string;\n public modalTitle: string;\n\n public iscloning: SeriesAction | BookingAction | null = null;\n\n public edit_recurrence: boolean\n\n /** Whether to edit only catering */\n public get only_catering(): boolean {\n return !!this._data.only_catering;\n }\n\n @Output() public event = new EventEmitter();\n\n /** List of available booking fields for the form */\n public get available_fields(): AvailableBookingFields[] {\n return this._service.setting('app.booking.show_fields') || [];\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.getModalTitle();\n this._dialog_ref.disableClose = true;\n this._spaces.initialised.pipe(first(_ => _)).subscribe(() => {\n this.flow_step = this._data.only_catering ? 'catering' : 'form';\n this.loadFormData();\n });\n }\n\n public getModalTitle() {\n switch (this._data.action) {\n case BookingAction.EDIT:\n this.modalTitle = 'Edit Booking';\n break;\n case SeriesAction.CLONE:\n this.modalTitle = 'Clone Recurring Series';\n break;\n case BookingAction.CLONE:\n this.modalTitle = 'Clone Booking';\n break;\n case SeriesAction.EDIT:\n this.modalTitle = 'Edit Series';\n break;\n default:\n this.modalTitle = 'New Booking';\n break;\n }\n }\n\n /**\n * Handle events from child components\n * @param event Booking flow event\n */\n public handleFlowEvent(event: BookingFlowEvent) {\n /* istanbul ignore else */\n if (event.type === 'next') {\n this.toNextFlowStep(event);\n } else if (event.type === 'previous') {\n this.toPreviousFlowStep(event);\n } else if (event.type === 'reset') {\n this.resetForm();\n }\n }\n\n public close() {\n this._dialog_ref.close();\n }\n\n\n private toNextFlowStep(event: BookingFlowEvent) {\n const space_list = this.form.controls.space_list.value;\n switch (event.step) {\n case 'recurrence':\n this.openRecurrenceConflictsModal();\n break\n case 'search':\n if (\n space_list &&\n space_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'equipment')\n ) {\n this.openEquipmentDetailsModal();\n } else {\n if (this.form.controls.has_catering && this.form.controls.has_catering.value) {\n this.navigate('catering');\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n }\n break;\n case 'catering':\n const order_list = this.form.controls.catering.value;\n if (\n order_list.find(order => this.form.controls.space_list.value.find(space => space.email === order.location_id)) &&\n order_list &&\n order_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'details')\n ) {\n this.openCateringDetailsModal();\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n break;\n case 'changes':\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n break;\n default:\n this.form.markAsDirty();\n //const is_recurr_series_edit = this.booking.id && this.form.controls.is_recurrent.value && this._data.action\n const is_recurr_series_edit = this.booking.id && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT || this._data.action === BookingAction.CLONE\n )\n if (!space_list || !space_list.length || !this.booking.id || is_recurr_series_edit || this.booking.is_multiroom) {\n this.navigate('search');\n } else if (this.booking.id && space_list && space_list.length) {\n this.openEquipmentDetailsModal();\n } else {\n this.confirmBooking();\n }\n break;\n }\n }\n\n private toPreviousFlowStep(event: BookingFlowEvent) {\n switch (event.step) {\n case 'search':\n this.navigate('form');\n break;\n case 'catering':\n /* istanbul ignore else */\n if (!this._data.only_catering) {\n this.navigate('search');\n }\n else {\n this.close();\n }\n break;\n }\n }\n\n private navigate(route: string) {\n this.flow_step = route;\n }\n\n /** Clear user changes to the form data */\n private resetForm() {\n delete this.form;\n // Pass in the desired location timezone\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone,\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n }\n\n /**\n * Load existing form data or generate a new booking form\n *\n * It fires when the modal first opens.\n * this._data.booking is an empty {} when creating a booking but set when editing\n */\n private loadFormData(): void {\n const form_data: HashMap = this._data.booking ? this._data.booking.toJSON() : {};\n form_data.duration = form_data.duration || form_data?.startDateTz?.dateDiff(form_data?.endDateTz, 'minutes') || 0\n //\n /**\n * Set the desired timezone in the booking creation.\n * this._data?.timezone is when creating a new booking\n * this._data.booking?.timezone is when editing a booking\n *\n * R-- refactor to make consistent atm _data.timezone is defined everywhere\n * but generateBookingForm could use form_data.timezone\n */\n form_data.timezone = this._data.booking?.timezone || this._data?.timezone;\n // start a new booking out with a start end time.\n\n const is_cloning_or_edit = this._data.action === SeriesAction.CLONE ||\n this._data.action === BookingAction.CLONE ||\n this._data.action === BookingAction.EDIT ||\n this._data.action === SeriesAction.EDIT;\n\n if (\n ( !this._data?.isFromGrid && ( !form_data.startDateTz || form_data.startDateTz.isBeforeDate(DateNow()) ) )\n && !this._data.only_catering && !is_cloning_or_edit\n ) {\n form_data.startDateTz = closestToTimeSlotTz(new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: form_data.timezone }), 15);\n form_data.start_epoch = form_data.startDateTz.seconds;\n form_data.endDateTz = form_data.startDateTz.addValue({ minutes: form_data.duration });\n form_data.end_epoch = form_data.endDateTz.seconds;\n }\n this.booking = new Booking(form_data);\n\n if(this.booking.is_recurrent && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT\n )){ //if it's series get the recurrence_end from the occurences\n this.booking.recurrence_endTz = this.booking.recurrenEndFromOcurrences(this.booking.occurrence_details)\n }\n\n\n // An empty booking here is when creating a new booking, edit booking will populate all the values\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone, // MUST be defined in dialog.open(BookingModalComponent or booking will revert to a local timezone\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n\n // localize the booking form start time\n /* istanbul ignore else */\n if (form_data && form_data.room_ids && this.form.controls.space_list) {\n this.form.controls.space_list.setValue(\n form_data.room_ids.map(id => this._spaces.find(id) || {id, name: id})\n );\n }\n\n this.edit_recurrence = this.booking?.id\n && (this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === SeriesAction.CLONE);\n\n if (this._data.action === SeriesAction.CLONE || this._data.action === BookingAction.CLONE) {\n\n this.iscloning = this._data.action === SeriesAction.CLONE ? SeriesAction.CLONE : BookingAction.CLONE;\n\n this._data.action === BookingAction.CLONE\n ? this.form.get('title').setValue(`Clone ${this.booking.title}`)\n : this.form.get('title').setValue(`Series Clone ${this.booking.title}`);\n\n this.form.get('id').setValue('');\n this.form.get('organiser').enable();\n\n if (this._data.action === BookingAction.CLONE) {\n this.form.get('is_recurrent').setValue(false);\n this.form.get('is_recurrent').disable();\n }\n const tz = this._org.building.timezone;\n this.form.patchValue({ timezone: tz });\n\n // Check if the booking is a list, if so then updates the value for start and end date fields.\n if (form_data.recurrence_period === RecurrencePeriod.LIST) {\n removeExpiredOcurrences(this.form)\n }\n\n // cloning individual occurrence set tup\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n // case 1: past booking\n if (start_time.isBeforeDate(date_now, \"day\")) {\n if (form_data.recurrence_period !== RecurrencePeriod.LIST) {\n this.form.controls.dateTz.setValidators([\n Validators.required,\n validDateTZ\n ]);\n this.form.controls.dateTz.updateValueAndValidity();\n this.form.controls.dateTz.markAsTouched();\n this.form.controls.is_before_date.setValue(true);\n\n if(this._data.action === BookingAction.CLONE && this.form.controls.all_day.value === true) {\n this.form.get('dateTz').enable();\n }\n }\n }\n\n // case 2: booking is in the same day but but the start time has already passed\n if (\n start_time.isSameDate(date_now, \"day\") && start_time.startEpoch() < date_now.startEpoch()\n ) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n\n // case 3: future booking nothing to do\n //Nothing to do\n }\n\n if (\n this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === BookingAction.EDIT\n ) {\n const tz = this._org.building.timezone;\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n if (\n start_time.isSameDate(date_now, \"day\") && (\n start_time.startEpoch() <= date_now.startEpoch() &&\n start_time.addValue({ minutes: this.booking.duration}).startEpoch() >= date_now.startEpoch())\n ) {\n this.form.controls.is_before_date.setValue(true);\n }\n\n if (start_time.isSameDate(date_now, \"day\") && start_time.addValue({ minutes: this.booking.duration}).startEpoch() < date_now.startEpoch()) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n }\n\n if (!this.booking.catering.length) {\n const notes = this.booking.notes.filter(note => note.type !== 'catering');\n\n this.form.get('notes').setValue(notes);\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openEquipmentDetailsModal() {\n const equipment_ref = this._dialog.open(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n codes_field: this.form.controls.equipment_codes,\n head_counts_field: this.form.controls.expected_attendees\n }\n });\n this.subscription(\n 'equipments_modal_events',\n equipment_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n metadata: {ref: 'equipment'}\n });\n equipment_ref.close();\n }\n })\n );\n equipment_ref.afterClosed().subscribe(() => this.unsub('equipments_modal_events'));\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openCateringDetailsModal() {\n const catering_ref = this._dialog.open(\n CateringDetailsModalComponent,\n {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n catering: this.form.controls.catering,\n booking: this.booking\n }\n }\n );\n this.subscription(\n 'catering_modal_events',\n catering_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'catering',\n metadata: { ref: 'details' }\n });\n catering_ref.close();\n }\n })\n );\n catering_ref.afterClosed().subscribe(() => this.unsub('catering_modal_events'));\n }\n\n /*\n Open overriding changes modal - disabled for CNG-541\n */\n private overrideChanges() {\n const ref = this._dialog.open(OverrideChangesModalComponent, {\n width: '576px',\n data: {\n edits: this.booking.occurrence_edits,\n timezone: this.booking.timezone\n }\n });\n ref.componentInstance.event.subscribe(event => {\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n ref.close();\n } else if (event.reason === 'close') {\n ref.close();\n }\n });\n }\n\n /**\n * Open modal to confirm the booking details\n */\n private confirmBooking() {\n /* Clear recurrence validator if only catering is being edited */\n if(this.only_catering){\n this.clearRecurrenceValidators()\n }\n\n /* istanbul ignore else */\n if (this.form.valid || this.only_catering) {\n const formValues = this.form.value;\n // this.booking is the booking being edited, not much to it on a new booking\n // having an empty booking is used in determining changes I assume.\n const startDateTz = this.form.controls.dateTz.value\n const endDateTz = startDateTz.addValue({ minutes: formValues.duration })\n const booking = {\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(this.booking) : this.booking.toJSON()),\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(formValues) : formValues),\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: formValues.space_list[0],\n multi_rooms: formValues.space_list.map(room => room),\n };\n\n const dialog_ref = this._dialog.open(BookingConfirmComponent, {\n width: '32em',\n maxWidth: '95vw',\n maxHeight: '95vh',\n data: {\n old_booking: this.booking,\n booking: new Booking(booking),\n action: this._data.action\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n dialog_ref.componentInstance.event.subscribe(event => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.close();\n this.event.emit({ reason: 'done', metadata: this.form});\n } else if (event.reason === 'action') {\n this.resetForm();\n }\n else if(event.reason === 'last-moment-conflict') {\n this.form.patchValue({space_list: []}, {emitEvent: true});\n // this.handleFlowEvent({ type: 'reset', step: 'search' })\n dialog_ref.close();\n }\n });\n }\n }\n\n private sanitizeBookingFromCloning(booking: Booking | Object): Object {\n const obj = booking instanceof Booking ? booking.toJSON() : booking;\n return {...Object.keys(obj).reduce((acc, key) => {\n if(\n key.search(/^recurrence_/) === -1\n && key.search(/^occurrence_/) === -1\n ) {\n acc[key] = obj[key]\n };\n\n return acc;\n }, {}),\n is_recurrent: false\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openRecurrenceConflictsModal() {\n const recurr_ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.form.controls.space_list.value[0].name,\n conflicts: this.form.controls.recurrence_exceptions.value,\n timezone: this.booking.timezone\n }\n });\n this.subscription(\n 'conflicts_modal_events',\n recurr_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(this.booking.occurrence_edits && this.booking.occurrence_edits.length && event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'changes',\n });\n } else {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n }\n }\n recurr_ref.close();\n })\n );\n recurr_ref.afterClosed().subscribe(() => this.unsub('conflicts_modal_events'));\n }\n\n public get title(){\n const type = this.booking?.id ? 'Edit' : 'New'\n return `${type} ${this.edit_recurrence ? 'recurring' : ''} booking`\n }\n\n private clearRecurrenceValidators() {\n const recurrenceStarts = this.form.controls.recurrence_starts\n recurrenceStarts.clearValidators()\n recurrenceStarts.updateValueAndValidity()\n }\n}\n","
\n
\n \n {{ modalTitle }}\n
\n \n
\n\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'booking-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class BookingCateringComponent {\n /** Form fields for the booking */\n @Input() public form: FormGroup; // R-- maybe add booking timezone has hidden form field since the date timestamp is from here\n /** Whether catering is the only action in the flow */\n @Input() public only: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Active order to display details for */\n public active_order: CateringOrder;\n\n /** Field for storing catering details */\n public get catering_field() {\n return this.form && this.form.controls.catering ? this.form.controls.catering : null;\n }\n\n /** List of spaces selected for the booking */\n public get space_list(): Space[] {\n return this.form && this.form.controls.space_list\n ? this.form.controls.space_list.value\n : [];\n }\n\n /** Date of the booking */\n public get dateTz(): DateTZ {\n const now = DateNow(new Date())\n return this.form && this.form.controls.dateTz\n ? this.form.controls.dateTz.value\n : now.startOfValue('minute');\n }\n\n /** Duration of the booking */\n public get duration(): number {\n return this.form && this.form.controls.duration ? this.form.controls.duration.value : 60;\n }\n\n /** Whether booking is all day */\n public get all_day(): boolean {\n return this.form && this.form.controls.all_day && this.form.controls.all_day.value;\n }\n\n /** Create a new catering order */\n public newOrder(): void {\n const order = new CateringOrder({\n booking_timezone: this.dateTz.building_tz,\n });\n this.active_order = order;\n }\n\n /** Handle changes to catering order */\n public handleOrderEvent(order: CateringOrder) {\n // active_order = null\n if (!order) {\n this.active_order = null;\n }\n /* istanbul ignore else */\n if (order) {\n let orders = this.form.controls.catering.value;\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n // Tack on or replace the order\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n // Sort by delivery_time\n orders = orders.sort((a,b) => {\n if ( a.delivery_time < b.delivery_time) {\n return -1;\n }\n if ( a.delivery_time < b.delivery_time) {\n return 1;\n }\n return 0\n });\n this.form.controls.catering.setValue(orders);\n this.form.markAsDirty();\n }\n this.active_order = null;\n }\n}\n","
\n \n \n \n
\n\n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-category-display',\n templateUrl: './category.component.html',\n styleUrls: ['./category.component.scss']\n})\nexport class CateringMenuCategoryComponent {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Form control for the list of order items */\n @Input() public items: FormControl;\n /** Currency symbol for the active space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for close events */\n @Output() public close = new EventEmitter();\n}\n","
\n
\n \n
{{ category?.name }}
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n \n
\n
\n Category contains no available items\n
\n
\n
\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport {\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData,\n} from '@mckinsey-converge/legacy-overlays';\n\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\nimport { BehaviorSubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ninterface StartEndResponse {\n timezone: string, \n start: DateTZ;\n end: DateTZ\n}\n\n@Component({\n selector: 'a-catering-order-details',\n templateUrl: './order-details.component.html',\n styleUrls: ['./order-details.component.scss'],\n})\nexport class BookingCateringOrderDetailsComponent extends BaseDirective implements OnInit {\n /** Catering order to edit details of */\n @Input() public order: CateringOrder;\n /** Booking date */\n @Input() public dateTz: DateTZ;\n /** Booking duration */\n @Input() public duration: number;\n /** Booking duration */\n @Input() public space_list: Space[];\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** Whether top header details should be shown */\n @Input() public hide_details: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for changes to the catering order */\n @Output() public event = new EventEmitter();\n /** Form controls for order */\n public form: FormGroup;\n /** List of available catering item categories */\n public category_list: CateringCategory[] = [];\n /** Active category to display details for */\n public active_category: CateringCategory;\n /** List of available times for delivering catering */\n public available_times: Identity[] = [];\n /** Whether the menu is loading */\n public loading: boolean;\n /** Whether the search input should be shown */\n public show_search: boolean;\n /** Current search string for filtering */\n public readonly search$ = new BehaviorSubject('');\n /** List of menu items that match the search string */\n public matched_items: CateringItem[] = [];\n\n @ViewChild('input') private _input_el: ElementRef;\n\n /** Whether user is able to order from the currently selected space */\n public get can_order(): boolean {\n return (\n (this.active_building.has_catering || this.category_list.length) &&\n (this.has_available_items) &&\n !this.out_of_hours\n );\n }\n\n /** Whether booking is with the restricted ordering period */\n // R--- different in staff, but should it be?\n public get within_restricted_time(): boolean {\n return false;\n }\n\n /** Building associated with the selected space */\n public get active_building(): Building {\n const form = this.form || { controls: { location_id: { value: '' } } };\n const form_controls = (form).controls;\n const space: Space =\n this.space_list.find((space) => space.email == form_controls.location_id.value) ||\n ({ level: {} } as any);\n return (\n this._org.buildings.find((bld) => space.level.building_id === bld.id) ||\n ({ catering_restricted_from: 0 } as any)\n );\n }\n\n /** Currency code for the active building */\n public get symbol(): string {\n return this.active_building.currency || 'USD';\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n return this.form\n ? this.form?.controls?.items?.value.reduce((total, item) => total + item.amount, 0)\n : 0;\n }\n\n /* istanbul ignore next */\n /** Whether booking time is outside of catering hours */\n public get out_of_hours(): boolean {\n return this.form?.controls?.delivery_time.value < 0;\n }\n\n /** Whether items are available for order at anytime */\n public get has_available_items(): boolean {\n return this.category_list.reduce(\n (available, category) => available || category.can_order_anytime,\n true\n );\n }\n\n constructor(\n private _menu: CateringMenuService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.generateAvailableTimes();\n this.subscription(\n 'search',\n this.search$\n .pipe(\n map((str) => {\n const search = str.toLowerCase();\n const items = [];\n for (const category of this.category_list) {\n if (category.items) {\n for (const group of category.items) {\n if ((group as any).items.length) {\n if (\n (group as any).package &&\n (group.name.toLowerCase().includes(search) ||\n (group as any).items.find((item) =>\n item.name.toLowerCase().includes(search)\n ))\n ) {\n items.push(group);\n } else {\n for (const item of (group as any).items) {\n if (item.name.toLowerCase().includes(search)) {\n items.push(item);\n }\n }\n }\n } else {\n if (group.name.toLowerCase().includes(search)) {\n items.push(group);\n }\n }\n }\n }\n }\n return items;\n })\n )\n .subscribe((items) => (this.matched_items = items))\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.dateTz || changes.duration) {\n this.generateAvailableTimes();\n /* istanbul ignore else */\n if (\n this.form &&\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n /* istanbul ignore else */\n if (changes.space_list) {\n /* istanbul ignore else */\n if (this.form && this.space_list && !this.form.controls.location_id.value) {\n this.form.controls.location_id.setValue(this.space_list[0].email);\n }\n }\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.initForm();\n }\n }\n\n public focusSearch() {\n if (this._input_el && this.show_search) {\n this._input_el.nativeElement.focus();\n }\n }\n\n public flattenArray(arr: T[]): T[] {\n return arr.reduce((acc, val) => acc.concat(val), []);\n }\n\n public initForm() {\n if(Array.isArray(this.space_list[0])){\n // this.space_list = [...this.space_list[0]];\n this.space_list = this.flattenArray(this.space_list);\n }\n this.form = new FormGroup({\n id: new FormControl(this.order.id),\n booking_date: new FormControl(this.dateTz.ms), // R-- different in staff\n location_id: new FormControl(this.order.location_id || this.space_list[0].email),\n delivery_time: new FormControl(this.order.delivery_time || this.available_times[0]?.id),\n items: new FormControl(this.order.items.map((item) => new CateringItem(item))),\n });\n this.subscription(\n 'space_change',\n this.form.controls.location_id.valueChanges.subscribe((space) => {\n this.generateAvailableTimes();\n if (\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n this.form.controls.items.setValue([]);\n this.loadMenu();\n })\n );\n this.loadMenu();\n this.generateAvailableTimes();\n if (\n this.form &&\n !this.available_times.find((time) => time.id === this.form.controls.delivery_time.value)\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n\n public confirmOrder() {\n const ref = this._dialog.open<\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData\n >(BookingCateringConfirmModalComponent, {\n maxWidth: '95vw',\n data: {\n all_day: this.all_day,\n dateTz: this.dateTz,\n form: this.form,\n },\n });\n this.subscription(\n 'confirm_event',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n // R--- add booking_date and timezone\n // this.order bookingDateTz is missing correct timezone.\n const order = new CateringOrder({ ...this.order, ...this.form.value });\n this.event.emit(order);\n ref.close();\n }\n })\n );\n ref.afterClosed().subscribe(() => this.unsub('confirm_event'));\n }\n\n private loadMenu() {\n const space = this.space_list.find(\n (space) => space.email === this.form.controls.location_id.value\n );\n this.loading = true;\n this._menu\n .query({ zone_id: this._org.buildings.find((bld) => space.zones.includes(bld.id))?.id })\n .then(\n (list) => {\n this.loading = false;\n this.category_list = list\n .map((i) => new CateringCategory(i))\n .filter(c => !c.out_of_stock);\n },\n () => (this.loading = false)\n );\n }\n\n /** Generate a list of available delivery times for the given booking time */\n private generateAvailableTimes() {\n let { timezone, start, end } = this.generateStartAndEndTimes();\n start = start.setValue({ minute: Math.ceil(start.minutes / 5) * 5 });\n // will be different from staff in these commonly named methods.\n // R--- Form Controls TBD\n // R--- The timezone here doesn't seem legit, back to putting into a form hidden field\n let start_date = this.dateTz; // new DateTZ({ date: this.date, building_tz: timezone, is_local_tz: false});\n start_date.logDateTz('start date')\n this.available_times = [];\n while (start.isBeforeDate(end)) {\n this.available_times.push({\n id: Math.abs(start_date.dateDiff(start, 'minutes')),\n name: start.formatDate('h:mma').toLocaleLowerCase(),\n });\n start = start.addValue({ minutes : 5});\n }\n /* istanbul ignore else */\n if (this.available_times.length === 0) {\n this.available_times.push({ id: -1, name: 'Out of hours' });\n }\n }\n\n private generateStartAndEndTimes(): StartEndResponse {\n const now = DateNow(new Date())\n let timezone = now.local_tz;\n const space_email = this.space_list[0]?.email;\n let catering_hours = { start: 7, end: 20 };\n // R--- change date input to dateTz input.\n // R--- Same issue as the above generateAvailableTimes\n const date_ = this.dateTz; // new DateTZ({date: this.date, building_tz: timezone, is_local_tz: false})\n let building_time = date_.startOfValue('day');\n let cat_start_time = building_time.addValue({ hours: catering_hours.start });\n let cat_end_time = building_time.addValue({ hours: catering_hours.end });\n\n if (space_email) {\n // Fetch the Space and Building\n const space = this.space_list.find((space) => space.email === space_email);\n const building = this._org.buildings.find((bld) => space?.zones.includes(bld.id));\n if (building?.timezone) {\n // Update to the building timezone if defined.\n timezone = building.timezone;\n building_time = date_.toZone(timezone).startOfValue('day');\n }\n if (building?.catering_hours) {\n // Update to the building catering hours if defined.\n catering_hours = building?.catering_hours;\n }\n // Update the hours with the currently defined timezone.\n cat_start_time = building_time.addValue({ hours: catering_hours.start });\n cat_end_time = building_time.addValue({ hours: catering_hours.end });\n }\n\n // Start Time of the Booking\n let start = date_.toZone(timezone);\n let end = date_.toZone(timezone).addValue({ minutes: this.duration });\n\n // Do the booking start and end time coincide with the catering hours?\n if (start.isBeforeDate(cat_start_time)) {\n // booking start before catering opens'\n if (cat_end_time.isAfterDate(start)) {\n // catering closes after booking starts'\n start = cat_start_time.addValue({});\n } else {\n // were just closed, catering closes before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking starts after catering is open'\n if (cat_end_time.isBeforeDate(start)) {\n // were just closed, catering closed before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n }\n\n if (end.isBeforeDate(cat_end_time)) {\n // booking ends before catering closes'\n \n if (cat_start_time.isAfterDate(end)) {\n // were just closed, catering opens is after booking ends'\n start = cat_start_time.addValue({});\n end = cat_start_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking ends after catering closes'\n // set the booking end to the catering close time.'\n end = cat_end_time.addValue({});\n }\n\n return { timezone, start, end };\n }\n}\n","
\n
\n
\n
\n \n \n \n \n {{ space.local_name }}\n \n \n \n
\n
\n \n \n \n \n {{ time.name }}\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n \n
\n
{{ item.name }}
\n \n
\n
\n
\n
\n
\n \n Back\n \n \n Confirm Order({{ item_count || '0' }})\n \n
\n
\n\n
\n
\n \"No\n
\n

\n Catering is not available for this booking.
\n Catering must be ordered within business hours at {{ active_building?.name }}.\n

\n
\n
\n\n
\n
\n
\n \n
\n
\n Loading menu for {{ active_building?.name }}...\n
\n
\n
\n
\n\n \n\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'catering-order-list-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class CateringOrderListItemComponent implements OnInit {\n /** Catering order to display */\n @Input() order: CateringOrder;\n /** */\n @Input() public space_list: Space[];\n /** Selected datetime */\n @Input() date: number;\n /** Emitter for edit events */\n @Output() public edit = new EventEmitter();\n /** Emitter for delete events */\n @Output() public delete = new EventEmitter();\n\n public room: Space;\n\n public ngOnInit(): void {\n this.room = (this.space_list || []).find(space => space.email === this.order.location_id);\n }\n\n public get space_in_booking(): boolean {\n return !!this.room;\n }\n\n /** Space selected for delivery */\n public get local_space_name(): string {\n return this.room?.local_name || '';\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n /* istanbul ignore else */\n if (!this.order) {\n return '';\n }\n return this.order.bookingDateTz.addValue({ minutes: this.order.delivery_time || 0}).formatDate('h:mma').toLocaleLowerCase();\n }\n\n\n /** Total cost of the order */\n public get order_cost(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount * item.unit_price, 0);\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n const space = this._spaces.find((this.order || {}).location_id);\n /* istanbul ignore else */\n if (!space || !space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n constructor(private _spaces: SpacesService, private _org: OrganisationService) {}\n}\n","
\n Deliver to {{ local_space_name }} at {{ delivery_time }}\n
\n
\n
\n {{ item_count }}\n { item_count, plural, =1 { item } other { items } }\n
\n
{{ order_cost / 100 | currency: symbol }}
\n
\n
\n \n \n\n \n
\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { BookingFlowEvent } from '../../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-list',\n templateUrl: './order-list.component.html',\n styleUrls: ['./order-list.component.scss']\n})\nexport class BookingCateringOrderListComponent implements OnInit{\n /** Form field for storing catering orders */\n @Input() public catering: FormControl;\n /** Selected datetime for the booking */\n @Input() public date: number;\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** */\n @Input() public space_list: Space[];\n /** Whether catering is the only action in the flow */\n @Input() public only_catering: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Emiiter for order events */\n @Output() public order = new EventEmitter();\n\n public ngOnInit(): void {\n if(this.space_list && this.space_list.length) {\n this.catering.value.forEach(catering => {\n catering.location = this.space_list[0].name; \n catering.location_id = this.space_list[0].email;\n catering.bookingDateTz = this.date;\n });\n }\n }\n\n /** List of orders in the booking */\n public get orders(): CateringOrder[] {\n /* istanbul ignore else */\n if (!this.catering) {\n return [];\n }\n return this.catering.value;\n }\n\n /** Emit event for a new catering order */\n public newOrder() {\n this.order.emit();\n }\n\n /** Emit event for editing existing order */\n public editOrder(order: CateringOrder) {\n this.order.emit(order);\n }\n\n /** Remove order from the list */\n public deleteOrder(order: CateringOrder) {\n const orders = this.orders;\n const index = orders.findIndex(an_order => order.id === an_order.id);\n /* istanbul ignore else */\n if (index >= 0) {\n orders.splice(index, 1);\n this.catering.setValue(orders);\n }\n }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n this.event.emit({ type: 'next', step: 'catering' });\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'catering' });\n }\n}\n","
\n
\n

Catering Orders

\n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n Back\n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders
\n \n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { unique } from '@mckinsey-converge/base';\n\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'booking-space-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class BookingSpaceFiltersComponent extends BaseDirective implements OnInit {\n /** Date selected for the booking */\n @Input() public date: FormControl;\n /** List of location IDs being filtered on */\n @Input() public locations: string[] = [];\n /** Preselected buildings */\n @Input() public initBuildings: string[] = [];\n /** Emitter for changes to location filter */\n @Output() public locationsChange = new EventEmitter();\n /** List of available buildings */\n public building_list: Building[] = [];\n /** Whether to show the location list */\n public show_locations: boolean;\n\n public get date_() {\n // R--- another instance, can the form control date be TZ aware\n return new DateTZ({date: this.date.value}) \n }\n\n /** Whether active date is current day */\n public get is_today(): boolean {\n const now = DateNow(new Date())\n return now.isSameDate(this.date_, 'day');\n }\n\n /** Display string for the selected date */\n public get date_display(): string {\n // R--- needs to be TZ aware because of day is relative\n return this.is_today ? 'Today' : this.date_.formatDate('dd MMM yyyy');\n }\n\n /** List of filtered location */\n public get location_list(): Building[] {\n return this.locations.map(id => this.building_list.find(bld => bld.id === id));\n }\n\n public get building_selected(): HashMap {\n const map = {};\n for (const id of this.locations) {\n map[id] = true;\n }\n return map;\n }\n\n constructor(private _org: OrganisationService) {\n super();\n }\n\n public changeDate(amount: number) {\n let date = this.date_.addValue({ 'days': amount });\n const now_ = DateNow(new Date())\n const now = now_.startOfValue('minute');\n if (date.isBeforeDate(now)) {\n date = now;\n }\n this.date.setValue(date.ms);\n }\n\n public ngOnInit(): void {\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n this.building_list = bld_list;\n if (Array.isArray(this.initBuildings)) {\n this.locations = unique(this.initBuildings);\n } \n }));\n }\n\n /**\n * Update location filter to include the given building\n * @param building Building to add\n */\n public addLocationFilter(building: Building): void {\n this.locations.push(building.id);\n this.locations = unique(this.locations);\n this.locationsChange.emit(this.locations);\n }\n\n /**\n * Remove location from the active filters\n * @param building Building to remove\n */\n public removeLocationFilter(building: Building) {\n this.locations.splice(\n this.locations.findIndex(id => building.id === id),\n 1\n );\n this.locationsChange.emit([...this.locations]);\n }\n}\n","
\n
\n
\n \n
{{ date_display }}
\n \n
\n
\n
\n \n
\n Select locations(s)\n
\n \n
\n
\n
\n
\n \n \n {{ building.name }}\n \n \n \n
\n
\n\n \n\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n EventEmitter,\n Output,\n OnChanges\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport {\n debounceTime,\n distinctUntilChanged,\n switchMap,\n catchError,\n map,\n first,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\nimport { BehaviorSubject, Observable, of, Subject } from 'rxjs';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Booking, BookingAction, BookingStateService, ISpaceAvailabilityOptions, mapBuildingToSelectOption, mapCityToAllSelectOption, SeriesAction, toggleSelectedByGroup } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { randomInt } from '@mckinsey-converge/base';;\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatChipsModule} from '@angular/material/chips';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { NoCateringModalComponent } from '@mckinsey-converge/legacy-overlays';\n@Component({\n selector: 'booking-find-space',\n templateUrl: './find-space.component.html',\n styleUrls: ['./find-space.component.scss'],\n})\nexport class BookingFindSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** Form control for setting the active space */\n @Input() public spaces: FormControl;\n /** Form group for booking */\n @Input() public form: FormGroup;\n\n @Input() public isCloning: SeriesAction | BookingAction | null;\n\n @Input() public booking: Booking;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n /** List of spaces available during the required period */\n public space_list: Space[] = [];\n /** List of users from an API search */\n public search_results$: Observable;\n /** Whether space list is loading */\n public loading: boolean;\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n\n public searchQuery: string = '';\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n public savedSelection = [];\n\n public selectedSpace: Array = [];\n\n public oldSpace = [];\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether multiple spaces are allowed to be selected */\n public get multiple(): boolean {\n return this._service.setting('app.booking.multiple_spaces');\n }\n\n public get has_valid_space() {\n if(!Array.isArray(this.spaces.value)){\n this.spaces.setValue([this.spaces.value]); \n }\n return this.spaces?.value?.some(_ => _.id && _.bookable);\n }\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public OriginalSpaceList: any;\n\n public disableCondition: boolean = false;\n\n public noCateringDialogRef: MatDialogRef;\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld = []) => {\n this.loading = true;\n request_id = randomInt(9999_9999);\n const dateTz = this.form.controls.dateTz.value;\n\n const ignore = this.form.controls.action?.value === SeriesAction.EDIT ? this.form.controls.id.value : null\n\n // R--- need to pass on the all day param and let libs/data-common/src/lib/spaces/spaces.service.ts \n // availability do the math.\n let query: ISpaceAvailabilityOptions = {\n dateTz: this.form.controls.all_day.value\n ? dateTz.startOfValue('day').startOfValue('minute').startOfValue('second')\n : dateTz.startOfValue('minute').startOfValue('second'),\n duration: this.form.controls.all_day.value\n ? 24 * 60\n : this.form.controls.duration.value,\n zone_ids: bld.length ? bld : this._org.building.id,\n bookable: true,\n recurrence_count: this.form.controls.recurrence_count.value,\n recurrence_period: this.form.controls.recurrence_period.value,\n recurrence_endTz: this.form.controls.recurrence_endTz.value,\n recurrence_interval: this.form.controls.recurrence_interval.value,\n recurrence_starts: this.form.controls.recurrence_starts.value,\n is_recurrent: this.form.controls.is_recurrent.value,\n recurrence_days: this.form.controls.recurrence_days.value,\n ignore\n };\n\n /* istanbul ignore else */\n if (this.zone_ids && this.zone_ids.length) {\n query.zone_ids = this.zone_ids.join(',');\n }\n const id = request_id;\n return this._spaces.available(query).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _})),\n map((resp: { id: number, list: Space[]}) => {\n this.loading = false;\n return resp.id === request_id ? resp.list : this.space_list;\n })\n );\n\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.space_list = list.filter((space) => {\n if (!space.available && !this.form.controls.action?.value) {\n return false;\n }\n\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n }).filter(space => space.available);\n\n this.space_list.sort((a, b) => this.sort(a, b));\n if(!this.selectedOptions.value.length){\n this.setDefaultBuilding()\n }\n // this.space_list.map((space)=>{\n // if(space.id === this.spaces.value?.id){\n // this.spaces.setValue([space])\n // const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n // this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n // }\n // })\n \n if(!this.form.controls.is_multiroom.value && this.spaces.value.length>=1){\n this.spaces.setValue([this.spaces.value[0]]);\n }\n\n this.space_list.forEach((space) => {\n this.spaces.value.forEach((savedSpace) => {\n if (space.id === savedSpace.id) {\n const updatedSpaces = this.spaces.value.map(sp => sp.id === space.id ? space : sp);\n this.spaces.setValue(updatedSpaces);\n \n const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr) => recurr.date));\n }\n });\n });\n \n this.OriginalSpaceList = this.space_list;\n\n // when updating a booking, the selected spaces are not available, so add them \n if (this.form.controls.is_multiroom.value) {\n //[Deprecated]if a space is already selected, filter the available spaces by it's level id\n if (this.spaces.value[0]?.level.id.trim() !== '') {\n // const levelId = this.spaces.value[0].level.id;\n // this.space_list = this.space_list.filter((s) => s.level.id === levelId);\n this.space_list = [\n ...this.spaces.value,\n ...this.space_list.filter(\n (sv) => !this.spaces.value.some((sh) => sh.id === sv.id)\n ),\n ];\n }\n }\n \n if (\n this.isCloning === BookingAction.CLONE\n || this.isCloning === SeriesAction.CLONE\n ) {\n\n const space = this.space_list.find(space => space.id === this.booking.room.id);\n const bookable = space !== undefined;\n this.space_list = bookable && this.space_list.filter(space => space.id !== this.booking.room.id) || this.space_list;\n\n const original_space = new Space({\n ...this.booking.room,\n ...(space || {\n settings: {\n ...this.booking.room.settings,\n recurrence_availability: []\n }\n } as any),\n bookable\n });\n\n this.oldSpace = [original_space];\n this.spaces.value.some(space => space.id === original_space.id) && this.spaces.setValue([original_space]);\n this.selectedSpace = this.updateSelectedSpace(original_space, [...this.selectedSpace]); //.push(original_space);\n }\n\n if(this.form.controls.is_recurrent.value){\n this.sortByRecurrenceAvailability();\n }\n\n\n const booking_space_list = this.form.controls.space_list.value;\n\n const idsFromUpadatedSpaceList = this.space_list.map(item => item.id);\n // Check if previous selection exists in the updated list\n const isExists = booking_space_list.filter(item => idsFromUpadatedSpaceList.includes(item?.id));\n // const isExists = idsFromUpadatedSpaceList.includes(booking_space_list.id);\n\n if(booking_space_list.length !== 0 && isExists.length){\n this.spaces.setValue(booking_space_list);\n }else {\n this.spaces.setValue([]);\n }\n })\n );\n \n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: {name: city, timezone},\n value: bld_list?.filter((bld)=> bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld)=>mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ] \n this.options.next(buildings)\n }));\n\n }\n\n public updateSelectedSpace(originalSpace, selectedSpace) {\n // Check if originalSpace already exists in selectedSpace\n const index = selectedSpace.findIndex(space => space.id === originalSpace.id);\n\n if (index === -1) {\n // If originalSpace doesn't exist, push it into selectedSpace\n selectedSpace.push(originalSpace);\n } else {\n // If originalSpace already exists, remove it before pushing\n selectedSpace.splice(index, 1);\n selectedSpace.push(originalSpace);\n }\n\n return selectedSpace;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.form) {\n const onChange = (_) => this.change$.next(_);\n /* istanbul ignore else */\n if (this.form.controls.dateTz) {\n this.subscription(\n 'date_field',\n this.form.controls.dateTz.valueChanges.subscribe(onChange)\n );\n }\n /* istanbul ignore else */\n if (this.form.controls.duration) {\n this.subscription(\n 'duration_field',\n this.form.controls.duration.valueChanges.subscribe(onChange)\n );\n }\n }\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n\n // public selectSpace(space: Space) {\n // const list = this.spaces.value;\n // if (list.find((item) => item.id === space.id)) {\n // this.spaces.setValue(list.filter((item) => item.id !== space.id));\n // } else {\n // this.spaces.setValue([space]);\n // }\n // }\n\n public selectSpace(space: Space) {\n let list = this.spaces.value;\n\n if (this.form.controls.is_multiroom?.value) {\n // If multiroom is selected\n const index = list.findIndex((item) => item.id === space.id);\n if (index > -1) {\n // Remove the space if it's already selected\n list.splice(index, 1);\n // If no spaces selected now, insert original space_list\n if (list.length === 0) {\n this.space_list = this.OriginalSpaceList;\n }\n } else {\n // Add the space to the selection\n list.length < 10 ? list.push(space) : null;\n //[Deprecated]If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n }\n } else if (list.find((item) => item.id === space.id)) {\n this.spaces.setValue(list.filter((item) => item.id !== space.id));\n } else {\n this.spaces.setValue([space]);\n }\n }\n\n // public selectSpace(space: Space) {\n // let list = this.spaces?.value;\n \n // if (this.form.controls.is_multiroom?.value) {\n // // If multiroom is selected\n // const index = list.findIndex((item) => item.id === space.id);\n // if (index > -1) {\n // // Remove the space if it's already selected\n // list.splice(index, 1);\n // // If no spaces selected now, insert original space_list\n // if (list.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n // } else {\n // // Add the space to the selection\n // list.length < 10 ? list.push(space) : null;\n // // If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n // }\n // } else {\n // // Handle single space selection (as before)\n // list = list.some((item) => item.id === space.id) ? [] : [space];\n // }\n // this.spaces.setValue(list);\n // }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n if (this.form.controls.is_recurrent.value && \n this.form.controls.recurrence_exceptions.value.length) {\n const id = this.form.controls.id.value;\n if (id && this.form.controls.action?.value === 'edit') { \n this.handleEditConflicts(id);\n } else {\n this.event.emit({ type: 'next', step: 'recurrence' });\n } \n } else {\n const space_list = this.form.value.space_list;\n const catering_order = this.form.controls.catering.value;\n const has_catering_order = catering_order && catering_order.length > 0;\n \n if (space_list && space_list.length === 1 && has_catering_order) {\n const selected_space = space_list[0];\n if (!selected_space.has_catering) {\n this.openNoCateringModal();\n return;\n }\n }\n \n this.emitNextEvent();\n }\n }\n \n private openNoCateringModal() {\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n this.emitNextEvent();\n }\n if (event.reason === 'close') {\n }\n })\n );\n \n this.noCateringDialogRef.afterClosed().subscribe(() => this.unsub('no-catering-modal'));\n }\n \n private emitNextEvent() {\n if (this.booking && this.booking.occurrence_edits && this.booking.occurrence_edits.length) {\n this.event.emit({ type: 'next', step: 'changes' });\n } else {\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'search' });\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id));\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public sortByRecurrenceAvailability() {\n this.space_list.sort((a, b)=>{\n const a_availability = (a.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/a.recurrence_availability.length\n const b_availability = (b.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/b.recurrence_availability.length\n return b_availability - a_availability\n })\n }\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld)=>bld.value) \n \n });\n }\n\n public setDefaultBuilding(){\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n public clearList(){\n this.space_list = [];\n this.savedSelection = [];\n this.spaces.setValue([]);\n }\n\n public triggerSearch = () =>{\n if(this.savedSelection.length){\n this.change$.next(this.savedSelection)\n }else{\n // disabled for CNG-645\n // this.space_list = []\n }\n }\n\n public handleEditConflicts = (id: string) =>{\n /** When editing, compare exceptions with the original ocurrence list */\n const recurrence_exceptions = this.form.controls.recurrence_exceptions;\n let occurrences_org: Array\n let booking_org: Booking;\n\n this._booking_state.bookings.subscribe(bookings => {\n booking_org = bookings.filter((booking) => booking.id === id)[0]\n occurrences_org = booking_org.occurrence_details.map((ocurr)=>\n ocurr.start_epoch\n )\n })\n\n const { hours, minutes } = new DateTZ({ date: booking_org.start_epoch * 1000, is_local_tz: false, building_tz: booking_org.timezone});\n const { hours: to_hours, minutes: to_minutes } = this.form.controls.dateTz.value;\n const new_conflicts = hours === to_hours && minutes === to_minutes\n ? recurrence_exceptions.value.filter((date: number)=> occurrences_org.includes(date))\n : recurrence_exceptions.value.filter((date: number)=> !occurrences_org.includes(date));\n\n if(new_conflicts.length){\n recurrence_exceptions.setValue([...new_conflicts])\n this.event.emit({ type: 'next', step: 'recurrence' });\n }else{\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n // Property to filter spaces based on the search query\n get filteredSpaces() {\n if (!this.space_list) {\n return [];\n }\n\n // Filter spaces based on the searchQuery\n return this.space_list.filter((space) => {\n let spaceName = space.simple_name || space.settings?.room_name || space.local_name;\n return spaceName.toLowerCase().includes(this.searchQuery.toLowerCase());\n });\n }\n\n removeSpace(spaceToRemove: Space): void {\n // Filter out the space to remove from the current list of selected spaces\n const updatedSpaces = this.spaces.value.filter(space => space.id !== spaceToRemove.id);\n this.spaces.setValue(updatedSpaces);\n //[Deprecated]If this is the last space being unselected, include spaces from all levels in space_list(available spaces)\n // if (this.spaces.value.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n }\n \n}\n","
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n {{ space?.simple_name || space[0]?.simple_name }}\n \n \n \n \n \n
\n
\n \n
\n \n \n
\n

Original Selection

\n \n
\n \n
\n
\n\n\n

All Available Rooms

\n \n \n \n \n
\n
\n
\n \n Back\n \n \n Next\n \n
\n
\n
\n\n
\n
\n
\n \n
\n
\n Checking space availability...\n
\n
\n
\n
\n\n
\n
\n
\n \n
\n
\n No results available, please select another office\n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { BookingAction, SeriesAction, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-booking-space-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class BookingSpaceItemComponent extends BaseDirective {\n /** Space to display */\n @Input() public space: Space;\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** Whether multiple spaces are able to be selected */\n @Input() public multi: boolean;\n\n @Input() isCloning: boolean;\n /** Emitter for select actions on the */\n @Output() public select = new EventEmitter();\n\n /** Whether space image should be displayed */\n public get show_image() {\n return this._service.setting('app.space_display.show_images');\n }\n\n /** Whether this space is selected */\n public get selected(): boolean {\n /* istanbul ignore else */\n if (!this.form && this.space) {\n return false;\n }\n\n return (this.form.controls.space_list && !!(this.form.controls.space_list.value || []).find((space) => space.id === this.space.id));\n // return (this.form.controls.space_list && !!(this.form.controls.space_list.value.id === this.space.id));\n }\n\n public get is_hidden(): boolean {\n return false;\n }\n\n /** Whether space is booked by request */\n public get is_request(): boolean {\n return false;\n }\n\n public get availableOccurrences(): number {\n if(this.space && this.space.recurrence_availability) {\n return this.space.recurrence_availability.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this.space.recurrence_availability.length;\n }\n\n /** Display location of the space */\n public get location(): string {\n /* istanbul ignore else */\n if (!this.space) {\n return 'Unable to determine location';\n }\n const level = this.space.level;\n const bld = this._org.buildings.find((building) => building.id === level.building_id);\n return `${bld ? bld.name + ', ' : ''}${level.name}`;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n public selectSpace() {\n if(this.form.controls.is_recurrent.value){\n const spaceConflicts = this.space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n }\n this.select.emit();\n }\n\n public disableSelect(): boolean {\n if (\n this.form.controls.action.value === SeriesAction.CLONE\n && this.availableOccurrences === 0\n ) {\n return true;\n }\n\n if (\n this.form.controls.action.value === BookingAction.CLONE\n && (this.space as any).bookable === false\n ) {\n return true;\n }\n\n return false;\n }\n}\n","
\n
\n
\n
\n
{{ space.local_name }}
\n
\n
{{ location }}
\n
\n \n {{ space.capacity || '0' }}\n
\n
\n \n Available for {{ availableOccurrences }} out of {{ totalOccurrences }} occurrences\n
\n \n
\n \n {{ multi ? (selected ? 'Remove' : 'Select') : is_request ? 'Request' : 'Book' }}\n \n
\n\n","import { Component, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { setRecurrenceStartsTime } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DateTime } from 'luxon';\nimport { CateringDropComponent } from '@mckinsey-converge/ui';\nimport { ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'booking-spaces-form',\n templateUrl: './form.component.html',\n styleUrls: ['./form.component.scss']\n})\nexport class BookingSpaceFlowFormComponent {\n /** Booking form fields */\n @Input() public form: FormGroup;\n /** Whether form is not the first page in the flow */\n @Input() public can_return: boolean = false;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n @ViewChild('container', { static: true }) private container: ElementRef;\n\n constructor(private _dialog: MatDialog, private cdRef: ChangeDetectorRef) {}\n\n /** Move flow to next step */\n public next(): void {\n if (this.form.controls?.is_recurrent?.value) {\n setRecurrenceStartsTime(this.form);\n }\n \n this.form.markAllAsTouched();\n this.form.updateValueAndValidity();\n \n if (this.form.controls?.attendees?.value?.some(item => item.name.length > 50)) {\n const attendeesControl = this.form.get('attendees');\n attendeesControl.setErrors({\n customError: 'Attendee name cannot be more than 50 characters',\n });\n }\n \n // Check if booking is outside catering hours and 'Need catering?' is selected\n const isOutsideCateringHours = this.checkIfOutsideCateringHours();\n const hasCatering = this.form.controls?.has_catering?.value;\n const cateringOrders = this.form.controls?.catering?.value;\n \n if (isOutsideCateringHours && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Open the dialog\n const dialogRef = this._dialog.open(CateringDropComponent, {\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n // User confirmed to remove catering\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n // Update validity\n this.form.updateValueAndValidity();\n // Proceed to next step if form is valid\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n }\n } else {\n // User chose to go back, do not proceed\n // Optionally, scroll to the relevant field\n if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n });\n } else {\n // Proceed as usual\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n } else if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n }\n \n\n private checkIfOutsideCateringHours(): boolean {\n const dateTz = this.form.controls?.dateTz?.value;\n const duration = this.form.controls?.duration?.value;\n \n if (dateTz && duration) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n \n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } else {\n // If date or duration is not set, assume not outside catering hours\n return false;\n }\n }\n \n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'form' });\n }\n\n /** Reset form to initial state */\n public resetForm(): void {\n this.event.emit({ type: 'reset', step: 'form' });\n }\n}\n","
\n
\n
\n \n
\n
\n \n Back\n \n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { BookingSpaceFlowFormComponent } from './booking-modal/form/form.component';\nimport { BookingCateringComponent } from './booking-modal/catering/catering.component';\nimport { BookingFindSpaceComponent } from './booking-modal/find-space/find-space.component';\nimport { BookingSpaceFiltersComponent } from './booking-modal/find-space/filters/filters.component';\nimport { BookingSpaceItemComponent } from './booking-modal/find-space/item/item.component';\nimport { BookingCateringOrderListComponent } from './booking-modal/catering/order-list/order-list.component';\nimport { BookingModalComponent } from './booking-modal/booking-modal.component';\nimport { BookingCateringOrderDetailsComponent } from './booking-modal/catering/order-details/order-details.component';\nimport { CateringOrderListItemComponent } from './booking-modal/catering/order-list/item/item.component';\nimport { CateringMenuCategoryComponent } from './booking-modal/catering/order-details/category/category.component';\nimport { DeleteConfirmModalComponent } from './delete-confirm-modal/delete-confirm-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { UiModule } from '@mckinsey-converge/ui';\n\n\n@NgModule({\n declarations: [\n BookingSpaceFlowFormComponent,\n BookingCateringComponent,\n BookingFindSpaceComponent,\n BookingSpaceFiltersComponent,\n BookingSpaceItemComponent,\n BookingCateringComponent,\n BookingCateringOrderListComponent,\n BookingModalComponent,\n BookingCateringOrderDetailsComponent,\n CateringOrderListItemComponent,\n CateringMenuCategoryComponent,\n DeleteConfirmModalComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n UiModule\n ],\n exports: [\n BookingCateringOrderDetailsComponent\n ]\n})\nexport class BookingsModule {\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-delete-confirm-modal',\n templateUrl: './delete-confirm-modal.component.html',\n styleUrls: ['./delete-confirm-modal.component.scss']\n})\nexport class DeleteConfirmModalComponent {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: boolean;\n /** Whether delete action succeeded */\n public success: boolean;\n}\n","\n
\n
\n \n
\n
\n

Are you sure you want to delete this meeting?

\n

\n This will permanently delete the booking and all details from the host and attendees\n calendars.\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
Deleting meeting...
\n
\n
\n
\n\n
\n

Booking Permanently deleted

\n
\n
\n","import { NgModule } from '@angular/core';\nimport { MeetingDetailsModalComponent } from './meeting-details-modal/meeting-details-modal.component';\nimport { PrivateDetailsModalComponent } from './meeting-details-modal/private-details-modal/private-details-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsDisplayComponent } from './meeting-details-modal/details/details.component';\nimport { MeetingRecurringDetailsDisplayComponent } from './meeting-details-modal/recurring-details/recurring-details.component';\nimport { MeetingDetailsRequirementsComponent } from './meeting-details-modal/requirements/requirements.component';\nimport { MeetingCateringDetailsComponent } from './meeting-details-modal/catering/catering.component';\nimport { MeetingPrivateDetailsComponent } from './meeting-details-modal/private-details/private-details.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n declarations: [\n MeetingDetailsModalComponent,\n PrivateDetailsModalComponent,\n MeetingDetailsDisplayComponent,\n MeetingRecurringDetailsDisplayComponent,\n MeetingDetailsRequirementsComponent,\n MeetingCateringDetailsComponent,\n MeetingPrivateDetailsComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n ScrollingModule\n ],\n exports: []\n})\nexport class CalendarModule {\n}\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, NgZone, ChangeDetectorRef } from '@angular/core';\nimport { first, map, take, takeWhile } from 'rxjs/operators';\n\nimport { Booking, BookingStateService, BookingsPaginatedService, BookingsService, OrganisationService, User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { UserStoreState, selectCurrentUser } from '@mckinsey-converge/user';\nimport { Store } from '@ngrx/store';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { getListOfDateFormat, formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n@Component({\n\tselector: 'day-view-approvals-view',\n\ttemplateUrl: './approvals-view.component.html',\n\tstyleUrls: ['./approvals-view.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewApprovalsComponent extends BaseDirective implements OnInit, OnDestroy {\n\t/** List of spaces to check for pending approvals */\n\t// public space_list: string[] = [];\n\t/** Whether the pending bookings are being loaded */\n\tpublic loading: boolean = true;\n\t/** Whether an event action is in progress */\n\t// public waiting_on_event: boolean;\n\t/** Observable for tentative events */\n\n\tpublic inputText: string = '';\n\n\tpublic incommingRequests: Booking[] = [];\n\tpublic sortOrderByOptions: { display: string; value: string; meta: {}; }[];\n\tpublic selectedSort: { display: string; value: string; meta: {}; } = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\n\tpublic isClosed: boolean = false;\n\tpublic updatedRequest: Booking[] = [];\n\n\t/** Display value for the active date */\n\t// public get date_display(): string {\n\t// \treturn 'Today';\n\t// }\n\n\tpublic currentUser: User;\n\n\tconstructor(\n\t\tprivate _org: OrganisationService,\n\t\tprivate _bookings_service: BookingsPaginatedService,\n\t\tprivate store: Store,\n\t\tprivate _bookings: BookingsService,\n\t\tprivate _booking_state_service: BookingStateService,\n\t\tprivate _zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef) {\n\t\tsuper();\n\t}\n\n\tpublic ngOnInit(): void {\n\t\tthis.subscription('currentUser', this.store.select(selectCurrentUser)\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe((user: User) => {\n\t\t\t\t// Once we know we have the user loaded\n\t\t\t\tthis.currentUser = new User(user);\n\t\t\t\tthis.getHoldingBay();\n\t\t\t})\n\t\t);\n\n\t\tthis.subscription(\n\t\t\t'building',\n\t\t\tthis._org.listen('active_building').subscribe((_) => this.currentUser && this.getHoldingBay() )\n\t\t);\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis.interval('holdingBay', () => {\n\t\t\t\t// update every 30 seconds.\n\t\t\t\tthis.getHoldingBay();\n\t\t\t}, 30 * 1000);\n\t\t});\n\n\t\tthis.sortOrderByOptions = [\n\t\t\t{ display: 'Soonest booking', value: 'soonest', meta: {} },\n\t\t\t{ display: 'Latest booking', value: 'latest', meta: {} },\n\t\t\t{ display: 'Newest request creation date', value: 'newest_date', meta: {} },\n\t\t\t{ display: 'Oldest request creation date', value: 'oldest_date', meta: {} }\n\t\t];\n\n\t\tthis.selectedSort = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\t}\n\n\tpublic getHoldingBay() {\n\t\tif (!this._org.building || !this.currentUser) {\n\t\t\treturn;\n\t\t}\n\n\n\n\t\tthis.subscription('holdingBay', this._bookings_service.getHoldingBay(\n\t\t\t{\n\t\t\t\t'email': this.currentUser.email,\n\t\t\t\t'building_zone': this._org.building.id,\n\t\t\t}\n\t\t\t).subscribe((res) => {\n\t\t\t\t// Check if room object is missing 'room.building' for CNG-513\n\t\t\t\tconst isMissingRoom = res?.results?.some(bkng => !bkng.room?.building?.name) || false;\n\t\t\t\t\n\t\t\t\tconst hasInvalidEndDateInMasterBookings = res?.results\n\t\t\t\t?.filter(bkng => bkng.recurrence_type === 'master') \n\t\t\t\t.some(bkng => {\n\t\t\t\t// Check for invalid endDateString for CNG-503\n\t\t\t\t const date = new Date(bkng.endDateString);\n\t\t\t\t return isNaN(date.getTime());\n\t\t\t\t}) || false;\n\n\t\t\t\t// Run updateRoomList() to get room info\n\t\t\t\tif (isMissingRoom || hasInvalidEndDateInMasterBookings) {\n\t\t\t\t\t// this._booking_state_service.updateRoomList();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst masterIds = [];\n\t\t\t\tconst filterMasterBookings = res.results?.filter(bkng => {\n\n\t\t\t\t\tif(bkng.recurrence_type === 'master' ) {\n\t\t\t\t\t\tmasterIds.push(bkng.recurrence_master_id);\n\t\t\t\t\t}\n\t\t\t\t\treturn bkng.recurrence_type === null || bkng.recurrence_type === 'master';\n\t\t\t\t}) || [];\n\n\t\t\t\tconst filterStandardBookings = res.results?.filter(bkng => bkng.recurrence_type === 'occurrence' \n\t\t\t\t \t&& bkng.status === 'tentative' \n\t\t\t\t\t&& !masterIds.includes(bkng.recurrence_master_id) // edited from staff , need approval\n\t\t\t\t) || [];\n\n\t\t\t\tconst filterStandardAndMasterBookings = [...filterMasterBookings, ...filterStandardBookings ];\n\t\t\t\tlet expiredBkngs = [];\n\t\t\t\tconst pendingBkngs = filterStandardAndMasterBookings?.filter(bkng => (bkng.timeBasedStatusLabel !== 'expired_yesterday') ? true : !expiredBkngs.push(bkng) ) || [];\n\t\t\t\texpiredBkngs.length && this.declineExpiredBookings(expiredBkngs);\n\n\t\t\t\tthis.updatedRequest = cloneDeep(pendingBkngs);\n\t\t\t\t// const request = cloneDeep(this.updatedRequest);\n\t\t\t\tthis.searchRequest();\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.incommingRequests = [];\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t/* istanbul ignore next */\n\t/**\n\t * Track by function for ngFor optimisation\n\t * @param index Index of the item\n\t * @param item Data associated with the item at the given index\n\t */\n\tpublic trackByFn(index: number, item: Booking) {\n\t\treturn item.id || index;\n\t}\n\n\t/**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic selectOrderBy(sortingValue: { display: string; value: string; meta: {}; }) {\n\t\tthis.selectedSort = sortingValue;\n\t\tthis.searchRequest();\n\t}\n\n\t/**\n\t * Function apply order by sorting method to incomming requests for approval\n\t * @param requests\n\t */\n\tpublic applyOrderBy(requests: Booking[]): void {\n\t\tconst items = cloneDeep(requests);\n\t\tswitch (this.selectedSort.value) {\n\t\t\tcase 'soonest':\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t\tcase 'latest':\n\t\t\t\titems.sort((a, b) => b.start_epoch - a.start_epoch );\n\t\t\t\tbreak\n\t\t\tcase 'newest_date':\n\t\t\t\titems.sort((a, b) => b.created_epoch - a.created_epoch )\n\t\t\t\tbreak;\n\t\t\tcase 'oldest_date':\n\t\t\t\titems.sort((a, b) => a.created_epoch - b.created_epoch )\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.incommingRequests = items;\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\tpublic totalCateringItems(booking: Booking) {\n\t\tlet num = 0;\n\t\tbooking.catering.forEach(el => el?.items.forEach(item => num += item.amount ) );\n\t\treturn num;\n\t}\n\n\tpublic searchRequest(value?: string) {\n\t\tconst searchText = this.inputText.toLowerCase();\n\n\t\t\tconst filtered = this.updatedRequest.filter( (el) => {\n\t\t\tconst { room, organiser, booked_by, booker, booking_type, attendees, date_string, startDateTz, start_time, end_time, creationDateTz } = el;\n\n\t\t\treturn room?.name?.toLowerCase().includes(searchText) || /// input text inlcudes room name\n\t\t\t\troom?.local_name?.toLowerCase().includes(searchText) || /// input text inlcudes room local name\n\t\t\t\troom?.street_and_city?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.building?.address?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.level.name?.toLowerCase().includes(searchText) || /// input text inlcudes room level\n\n\t\t\t\torganiser?.name?.toLowerCase().includes(searchText) || ///input text inlcudes host name\n\t\t\t\t(booked_by && booked_by['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booked by name\n\t\t\t\t(booker && booker['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booker name\n\t\t\t\tbooking_type?.toLowerCase().includes(searchText)\t||\n\t\t\t\tattendees?.some(att => att?.name?.toLowerCase().includes(searchText)) || ///input text inlcudes attendees name\n\n\t\t\t\tdate_string?.toLowerCase().includes(searchText) || /// date_string == '06 Mar 2023'\n\t\t\t\tformatDateWithSuffix(date_string).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\tformatDateWithSuffix(creationDateTz.formatDate('dd MMM yyyy')).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\t//searchText.includes(startDateTz?.date?.day?.toString()) || /// day 06/6\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthLong) || /// monthLong == 'March'\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthShort) || /// monthShort == 'Mar'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayLong.toLowerCase()) || /// weekdayLong == 'Monday'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayShort.toLowerCase()) || /// weekdayShort == 'Mon'\n\n\n\t\t\t\tgetListOfDateFormat().some(format => startDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\t\t\t\tgetListOfDateFormat().some(format => creationDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\n\t\t\t\tstart_time?.toLowerCase().includes(searchText) ||\n\t\t\t\tend_time?.toLowerCase().includes(searchText)\n\n\n\t\t\t});\n\n\t\t\tthis.applyOrderBy(filtered);\n\t}\n\n\tpublic declineExpiredBookings(expiredBkngs: Booking[] ) {\n\t\t// console.log(expiredBkngs);\n\t\tthis._bookings.declineMultiple(expiredBkngs).subscribe(resArray => this.cdRef.detectChanges(),\n\t\t(error) => {\n\t\t\tconsole.log(error);\n\t\t\tthis.cdRef.detectChanges();\n\t\t});\n\n\t}\n\n}\n","
\n
\n \n\n
\n Order by: {{selectedSort.display}}\n
\n \n
\n
\n\n \n
{{sorting.display}}
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n close\n
\n
No meetings pending approval
\n
\n
\n","import { Component, Input, Output, EventEmitter, NgZone, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, ViewEncapsulation, SimpleChanges, HostListener } from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective, shorterBuildingDateFormatString } from '@mckinsey-converge/base';\nimport { Booking, CateringCategory, CateringItem, SpacesService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DatePipe } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TooltipPosition } from \"@mckinsey-converge/ui\";\n\nconst STATES: { [id: string]: string } = {};\n\n@Component({\n selector: 'approvals-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n // encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(200, style({ opacity: 1, height: '*' })),\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(200, style({ opacity: 0, height: 0 })),\n ]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DatePipe],\n})\nexport class DayViewApprovalsEventComponent extends BaseDirective implements OnInit {\n /** Event to display */\n @Input() event: Booking;\n @Input() totalCateringItems: number;\n /** Event emitter for event actions */\n @Output() acting = new EventEmitter();\n\n /** Whether approval action is being processed */\n public loading: boolean;\n /** Whether event details are shown */\n public shown: boolean;\n /* Booking type : Internal, External, Interview... */\n public bookingType: string;\n /* Booking date */\n public date: string;\n /* Booking creation date */\n public creationDate: string;\n /* Office address */\n public officeAddress: string;\n\n public showCateringNote: boolean = false;\n\n public showEquipmentNote: boolean = false;\n\n /** Whether the meeting has catering attached */\n public has_catering: boolean;\n public cateringNote: string = '';\n public equipmentNote: string = '';\n public cateringOrderItems: number = 0;\n\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /* Reccurance period */\n public recurrence_period: string;\n\n /** Requested booking start time */\n public requestedDateTz: DateTZ;\n /** Requested booking end time */\n public requestedEndDateTz: DateTZ;\n public specific_occurances;\n public recurrenceExceptions: any[] = [];\n\n /** Type of event */\n public get start(): string {\n return this.event.startDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** Type of event */\n public get end(): string {\n return this.event.endDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** View booking details */\n public view() {\n const room_id = Object.keys(this.event.approval_status)[0] || '';\n const space = this._spaces.find(room_id) || this.event.room;\n this.timeout(\n 'view',\n () => {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space,\n booking: new Booking({ ...this.event.toApiJSON(), room_id, room: space }),\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this._service.set('CONCIERGE.day_view.viewing', this.event);\n },\n 50\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_sevice: BookingStateService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _zone: NgZone,\n private cdRef: ChangeDetectorRef,\n private datePipe: DatePipe\n ) {\n super();\n }\n ngOnInit(): void {\n this.cateringOrderItems = 0;\n this.updateData();\n }\n\n public updateData() {\n const type = this.event.booking_type;\n this.bookingType = `${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n const catering: readonly CateringOrder[] = this.event.catering;\n this.has_catering = !!catering.find(\n (order) => this.event.space.email === order.location_id\n );\n this.cateringNote =\n this.event.notes.filter((el) => el.type === 'catering')[0]?.message || '';\n this.equipmentNote =\n this.event.notes.filter((el) => el.type === 'equipment')[0]?.message || '';\n\n const createdDate = this.event.creationDateTz.formatDate('dd MMM yyyy');\n const createdTime = this.event.creationDateTz.formatDate('h:mm a').toLocaleLowerCase();\n this.creationDate = `${formatDateWithSuffix(createdDate)}, ${createdTime}`;\n this.date = formatDateWithSuffix(this.event.date_string);\n this.officeAddress = `${this.event.room.building?.name} ${this.event.room.level.name}, ${this.event.space.building?.city}`;\n // `${this.event.room.building?.name} ${this.event.room.level.name} ${this.event.space.building?.city}`;\n this.isRecurrentBooking = this.event.is_recurrent && this.event.recurrence_type !== 'occurrence';\n this.recurrence_period = this.event.recurrence_period;\n this.specific_occurances = this.event.occurrence_details?.filter(ocurrence => ocurrence.id !== this.event.id).map((item)=>{\n let date = item.start_epoch * 1000;\n let specificDates = new DateTZ({date, is_local_tz: false, building_tz: this.event.timezone});\n return shorterBuildingDateFormatString(specificDates).slice(3);\n })\n this.recurrenceExceptions = this?.event?.recurrence_exceptions?.map((item)=>{\n let date = new Date(item * 1000);\n return this.datePipe.transform(date, 'dd MMM yyyy');\n }) || [];\n this.cdRef.detectChanges();\n }\n\n public get eventTitle() {\n return `${this.event.title}_${this.event.created_epoch}_${this.event.start_time}`\n }\n\n /**\n * Approve the meeting for the set room\n */\n public accept(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Approve Meeting',\n content: `Approve ${this.event.organiser.name}'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${this.event.length_string} on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const event = this.event.toJSON();\n const bookingOptions = {\n concierge: true,\n host: this.event.organiser.email,\n room_email: this.event.space?.email,\n icaluid: this.event.icaluid,\n start: event.start,\n end: event.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n } \n this._bookings\n .accept(this.event.id, bookingOptions)\n .then(\n (acceptedBooking) => {\n this._service.notifySuccess('Meeting approved.');\n this.event.status = BOOKING_STATUS.approved;\n STATES[this.event.id] = BOOKING_STATUS.approved;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error approving meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n /**\n * Decline meeting for the set room\n */\n public decline(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Decline Meeting',\n content: `Decline ${\n this.event.organiser.name || this.event.organiser\n }'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${\n this.event.length_string\n } on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_busy' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const booking = this.event.toJSON();\n this.loading = true;\n const bookingOptions = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: this.event.space?.email,\n icaluid: booking.icaluid,\n start: booking.start,\n end: booking.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n }\n this._bookings\n .decline(booking.id, bookingOptions)\n .then(\n () => {\n this._service.notifySuccess('Meeting declined.');\n this.event.status = BOOKING_STATUS.declined;\n STATES[this.event.id] = BOOKING_STATUS.declined;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error declining meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // console.log('CHANGES: ',changes);\n this.updateData();\n this.cdRef.detectChanges();\n }\n\n public isConflictWithOccurences() {\n const conflicts = this.event?.room?.totalOccurrences - this.event?.room?.availableOccurrences;\n return { is_conflict: !!conflicts, total_Conflicts: conflicts };\n }\n\n public get dateString(): string {\n if (!this.event.dateString) return '';\n return this.event.dateBuildingString.slice(3);\n }\n\n /**\n */\n public get endDateString(): string {\n if (!this.event.endDateString) {\n return '';\n }\n else if(this.event.recurrence_period === 'list' && this.event.recurrence_type === 'master'){\n const occurrence_details = this.event.occurrence_details && this.event.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.event.id);\n const endDate = this.event.recurrenEndFromOcurrences(occurrence_details);\n return shorterBuildingDateFormatString(endDate).slice(3);\n } else\n return this.event.endDateString.slice(3);\n }\n\n public get timeString(): string {\n if(!this.event.start_time) return '';\n return `${this.event.start_time} - ${this.event.end_time} `;\n }\n\n getTooltipText() {\n return this.specific_occurances;\n }\n}\n","
\t\n\t
\n\t\t\n\t\t
{{ event.recurrence_type === 'occurrence' ? 'Occurrence from a recurring series ' : 'Recurring Series' }}
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
{{ event.space?.global_name ? event.space.local_name : '' }}
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{equipmentNote}}
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{totalCateringItems}} items in catering order\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
{{ bookingType }}
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t {{ date }} \n\t\t\t\t {{ event.all_day ? 'All Day' : start + ' - ' + end }} \n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
Specific Dates
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{{ this.recurrence_period | titlecase }}\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
Conflict Dates
\n\t\t\t\t\t\t\t\t\t\t
{{date}}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{{dateString}} - {{endDateString}}\n\t\t\t\t\t
\n\t
{{timeString}}
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{ officeAddress }}\n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t {{ event.organiser?.name }}\n\t\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t\t\t\t\n\t\t\t{{ event.attendees.length }} \n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
{{ item.name }}
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n\t\t
\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t {{ event.creator?.name }}\n\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t Requested on {{ creationDate }}\n\t\t
\n\t
\n\t\n
\n\n","import {\n Component,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first, take } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport {\n ApplicationService,\n BookingStateService,\n BookingStoreState,\n BuildingLevel,\n OrganisationService,\n selectBookingByIdResultsFromState,\n User,\n Booking,\n SpacesService,\n Space,\n isIncludes,\n searchRoomsAndBookings\n} from '@mckinsey-converge/data-common';\n\nimport {\n AlertMode, DropdownOpion,\n} from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { select, Store } from '@ngrx/store';\nimport { BuildingStoreState } from 'libs/buildings/src';\nimport { clearBookingByIdResults, loadBookingsWithQuery, MyBookingsStoreState } from '@mckinsey-converge/bookings';\nimport { Subscription } from 'rxjs';\n\nexport type RoomBookingStoreState = BookingStoreState & BuildingStoreState & MyBookingsStoreState & UserStoreState;\n\n@Component({\n selector: 'a-day-view',\n templateUrl: './day-view.component.html',\n styleUrls: ['./day-view.component.scss']\n})\nexport class DayViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected type */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n /** Whether to show only items with a setup and/or breakdown time */\n public only_overflow: boolean;\n /** List of legend keys to show */\n public legend: HashMap = {};\n /** List of legend keys to show */\n public legend_list: string[] = [];\n /** List of available legend keys */\n public legend_keys: Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true }\n ];\n\n public banner_mode = AlertMode.Warning\n public showBanner = true;\n public undo_banner_mode = AlertMode.Error;\n public has_access: boolean;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n\t\tprivate spaceTypesSubscription: Subscription;\n\n event_list: Booking[] = [];\n\tsearchStr: any;\n\tfoundSearchLength: number = 0;\n\tsearchedCounter: any = 1;\n\tshowSrchWarning: boolean;\n\ttotalFoundItem: number = 0;\n spaces: Space[] = [];\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private store: Store,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Day View';\n\n if( this._service.get('active_legends') !== null && this._service.get('active_legends').hasOwnProperty('length')) {\n this.legend_keys = this._service.get('active_legends');\n }\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n \n\n\t\t\t\tthis._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n\t\t\t\t\t\t\t\t\t\tthis.dateTz = new DateTZ({\n\t\t\t\t\t\t\t\t\t\t\tdate: this.dateTz.ms,\n\t\t\t\t\t\t\t\t\t\t\tis_local_tz: false,\n\t\t\t\t\t\t\t\t\t\t\tbuilding_tz: this.timezone,\n\t\t\t\t\t\t\t\t\t\t});\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.initSpace();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n\t\t\t\t\t\t\t\t\t\tthis.levels.sort((a, b) =>\n\t\t\t\t\t\t\t\t\t\tb.name.localeCompare(a.name, undefined, {\n\t\t\t\t\t\t\t\t\t\t\t\tnumeric: true,\n\t\t\t\t\t\t\t\t\t\t\t\tignorePunctuation: true,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t);\n\n \n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n \n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'day_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return;\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n\n this.configureIfLinksFromEmail();\n\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...this.filterEvents(list)];\n\n })\n );\n\n \n }\n\n public initSpace() {\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.active_level ? this._org.building.id : this.active_level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0 && _.bookable);\n\n })\n );\n }\n\n private filterEvents(list): Booking[] {\n const bookings = list;\n const filterd_booking = bookings.filter((event) => {\n const ignore = event.is_recurrent && event.recurrence_type === 'master';\n return ( !ignore );\n });\n\n return filterd_booking || [];\n }\n\n\n\n searchBooking(value) {\n\n // Resetting warning flag\n this.showSrchWarning = false;\n\n // Converting search value to lower case for case-insensitive comparison\n const searchValue = value.toLowerCase().trim();\n \n // Combining event list and space arrays into one arrya for searchig \n // const allItems = [...this.event_list, ...this.spaces];\n\n // Filter spaces based on active_type\n const filteredSpaces = this.spaces.filter(space => {\n if (!this.active_type) {\n return true; // Include all spaces if no active type is set\n }\n if (this.active_type.startsWith('zone')) {\n return space.zones.includes(this.active_type); // Check zones if active type starts with 'zone'\n }\n return space.room_type === this.active_type; // Otherwise, check room_type\n });\n \n // Combine filtered spaces and events into one array for searching\n const allItems = [...this.event_list, ...filteredSpaces];\n\n // Filtering the combine array to find matching room or booking \n const filteredItems = searchRoomsAndBookings(allItems, searchValue, true);\n \n // Updating the total number of found items in serach\n this.totalFoundItem = filteredItems.length;\n\n // Setting showSrchWarning flag if no result were found \n this.showSrchWarning = !this.totalFoundItem;\n\n // Updating lenght of found items for later use\n this.foundSearchLength = this.totalFoundItem - 1;\n\n\n if(this.searchStr !== value) {\n // Setting the first found as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[0]);\n // Resetting the search counter\n this.searchedCounter = 0;\n }\n else {\n // Handling case where seached string is the same as previou one \n // Incrementing search counter, loopoing back to 0 if it exceed the length of found items\n this.searchedCounter = ( this.searchedCounter < this.foundSearchLength ) ? this.searchedCounter + 1 : 0\n // Setting the next found items as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[this.searchedCounter]);\n }\n // Storing the current search string for future camparison\n this.searchStr = value;\n\n }\n\n\n public configureIfLinksFromEmail() {\n /**\n * https://acaprojects.atlassian.net/browse/MCK-2055\n * Load booking with id received from email link to concierge and setup configuration to open booking detail dialog on day view\n * Will work with both formatted URL's\n * http://localhost:4200/#/day-view?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n * http://localhost:4200/#/day-view/zone-1FUT0pxu12s?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n */\n const bookingId = this._route.snapshot.queryParams['view'];\n if(bookingId) {\n this.subscription('currentUser', this.store.select(selectCurrentUser).pipe(take(1))\n .subscribe((user: User | undefined) => {\n // Once we know we have the user loaded.\n this.store.dispatch(loadBookingsWithQuery({ 'id': bookingId, 'target': 'bookingById', 'offset': 0 }));\n }));\n\n this.store.dispatch(clearBookingByIdResults())\n\n this.subscription('bookingResults', this.store.pipe( select(selectBookingByIdResultsFromState) ).pipe(first(_ => !!_ && !!_.success))\n .subscribe(next => {\n const booking = next.success ? next.success?.[0] : null;\n if (booking && booking.room) {\n const levelId = this._route.snapshot.params.hasOwnProperty('level');\n\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(booking.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n\n this.updateDateTz(booking.startDateTz)\n this._booking_state_service.setDate(booking.startDateTz);\n this._booking_state_service.setZone(booking.level_zone);\n if(!levelId ) {\n this._router.navigate(['/day-view', booking.level_zone], { queryParams: { view: bookingId }, replaceUrl: true });\n }\n }\n }));\n }\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n\t\t\t\tif (this.spaceTypesSubscription) {\n\t\t\t\t\tthis.spaceTypesSubscription.unsubscribe();\n\t\t\t\t}\n this._service.set('CONCIERGE.day_view.viewing', []);\n }\n\n\n // Fires for the big blue new booking button\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.initSpace();\n this._router?.url?.includes('/day-view') && this._router.navigate(['/day-view', this.active_level]);\n }\n\n public updateLegend(mobile: boolean = false) {\n if (mobile) {\n this.legend_list = this.legend_keys.reduce((list, key) => {\n if (key.active) list.push(key.id);\n return list;\n }, []);\n\t\t\tthis._service.set('active_legends', this.legend_keys);\n }\n this.legend = this.legend_keys.reduce((map, key) => {\n map[key.id] = this.legend_list.includes(`${key.id}`);\n return map;\n }, {});\n\n this._booking_state_service.setFilters({\n ...this._booking_state_service.filters,\n hide_type: Object.keys(this.legend).filter((i) => this.legend[i] === false) as any\n });\n }\n\n updateSpaceSelection(){ \n this._service.set('active_type', this.active_type);\n }\n\n public onOnlySetupBreakdownChanged(toggle: MatSlideToggleChange): void {\n this._service.set('APP.breakdown', toggle.checked)\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._service.get('undo').next(null);\n this._booking_state_service.attentToDelete(booking, action, true);\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public hideBanner() {\n this.showBanner = false;\n }\n\n public hideUndo() {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n
\n \n
\n \n 1\"\n appearance=\"outline\"\n >\n \n \n {{ level?.name }}\n \n \n \n \n \n \n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
{{ totalFoundItem }}
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tNo search found!\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\n\n
\n \n
\n \n
\n
\n
\n\n \n \n \n
\n \n Only Setup/Breakdown\n \n
\n
\n\n \n {{ level?.name }}\n \n\n\n \n {{ type?.name }}\n \n\n\n
\n \n
\n
{{ key?.name }}
\n
\n
\n
\n
\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { DayViewComponent } from './day-view.component';\nimport { DayViewTimelineComponent } from './timeline/timeline.component';\nimport { DayViewApprovalsComponent } from './approvals-view/approvals-view.component';\nimport { DayViewApprovalsEventComponent } from './approvals-view/event/event.component';\nimport { DayViewSpaceComponent } from './space/space.component';\nimport { DayViewSpaceEventComponent } from './space/event/event.component';\n\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { FormsModule } from '@angular/forms';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: DayViewComponent },\n { path: ':level', component: DayViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n DayViewComponent,\n DayViewTimelineComponent,\n DayViewApprovalsComponent,\n DayViewApprovalsEventComponent,\n DayViewSpaceComponent,\n DayViewSpaceEventComponent\n ],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class DayViewModule {}\n","import {\n Component,\n OnInit,\n Input,\n OnChanges,\n SimpleChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space, BOOKING_STATUS, CloseDialogService, DialogIds } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/** Details about the associated event overlapping with other events */\nexport interface IEventOverlap {\n /** Index of this item with the overlapping items */\n index: number;\n /** Total number of items overlapping with this one */\n total: number;\n}\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'day-view-space-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewSpaceEventComponent extends BaseDirective implements OnInit, OnChanges {\n /** Event to display */\n @Input() public booking: Booking;\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Space associated with the booking */\n @Input() public space: Space;\n /** Whether the item is a fixed size */\n @Input() public fixed: boolean;\n /** Overlap details for the booking */\n @Input() public overlap: IEventOverlap;\n /** Whether an action is being processed for this booking */\n @Input() public loading: boolean;\n /** Emitter for the current position of the booking within the timeline */\n @Output() public position = new EventEmitter<{ top: number; height: number }>();\n\n /** Position of the booking start time in the day */\n public top: number;\n /** Position of the booking relative to overlapping bookings */\n public left: number;\n /** Height based of the duration of the booking */\n public height: number;\n /** Size of the booking when overlapping with other bookings */\n public width: number;\n /** Offset from the booking's top that the setup time starts */\n public overflow_top: number;\n /** Offset from the booking's bottom that the breakdown time ends */\n public overflow_bottom: number;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _router: Router,\n private cdRef: ChangeDetectorRef,\n private closeDialogService: CloseDialogService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public get local_id(): string {\n return this.booking.icaluid.substr(0, 6);\n }\n\n /** Type of booking */\n public get type(): string {\n return this.booking.getType();\n }\n\n /** Period that the booking will occur during the day */\n public get period(): string {\n // the booking time is being pass in as the local timezone version.\n return this.booking.time_period;\n }\n\n /** Number attendees expected to turn up to the booking */\n public get expected(): number {\n const expected = this.booking.expected_attendees;\n return this.space ? expected[this.space.email] || 0 : 0;\n }\n\n /** Whether the meeting has catering attached */\n public get has_catering(): boolean {\n return !!this.order;\n }\n\n public get order(): CateringOrder {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp.length && orders.push(_temp[0]);\n });\n return orders[0];\n // this.booking.catering.find((order) => order.location_id === this.space.email);\n }\n\n /** View booking details */\n public view(event: Event) {\n \n this.cdRef.detach(); // Detach change detection before the dialog opens. \n\n const dialogRef = this._dialog.open(MeetingDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.closeDialogService.registerDialog(DialogIds.MeetingDetails, dialogRef);\n dialogRef?.afterClosed().subscribe(_ => {\n this.cdRef.reattach(); // Reattach change detection after the dialog closes.\n\n this.calculatePosition();\n this.cdRef.detectChanges();\n });\n }\n\n /** Whether booking is active */\n public get active(): boolean {\n const booking = this._service.get('CONCIERGE.day_view.viewing');\n return !booking || booking.id === this.booking.id;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.booking || changes.overlap || changes.dateTz) {\n this.calculatePosition();\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking_details = this.booking.toApiJSON();\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking_details));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n\n /**\n * View catering order for the booking\n */\n public viewOrder(order: CateringOrder) {\n /* istanbul ignore else */\n if (this.booking && this.booking.catering) {\n /* istanbul ignore else */\n if (localStorage) {\n this.storeOrder(order);\n }\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: this.booking.id, view: order.id },\n });\n }\n }\n\n /** Calculate the position */\n private calculatePosition() {\n /* istanbul ignore else */\n if (this.booking) {\n const overlap = this.overlap || { index: 0, total: 1 };\n const shown_date = this.dateTz.startOfValue('day');\n const date = this.booking.startDateTz.startOfValue('minute');\n const end = this.booking.endDateTz.startOfValue('minute');\n const from_previous_day = !date.isSameDate(shown_date, 'day');\n if (end.isBeforeDate(shown_date, 'day')) { // Hide booking if not on shown date\n this.top = -100;\n this.height = 1;\n return;\n }\n\n //R-- Stragest thing, but one time this was logging bookings form different timezones?\n // this.dateTz.logDateTz('calculatePosition this.dateTz')\n // this.booking.startDateTz.logDateTz('calculatePosition this.booking.startDateTz')\n\n const start = from_previous_day ? 0 : Math.abs(+date.dateDiff(shown_date, 'hours', 'hours').toFixed(3));\n const duration = Math.min(\n this.booking.duration,\n Math.abs(shown_date.dateDiff(date.addValue({ minutes: this.booking.duration }), 'minutes'))\n );\n this.top = Math.max(0, (start / 24) * 100);\n this.height = Math.min(\n 100 - this.top,\n this.fixed ? duration / 60 : (duration / 60 / 24) * 100\n );\n this.position.emit({ top: this.top, height: (duration / 60 / 24) * 100 });\n this.width = Math.min(100, 100 / overlap.total + 5);\n this.left = Math.min(100 - this.width, this.width * overlap.index - 5 * overlap.index);\n this.overflow_top =\n ( (this.booking.room_setup || this.booking.setup[this.space.email])\n ? ( ( this.booking.room_setup || this.booking.setup[this.space.email]) / 60) / duration\n : -0.1) * 100;\n this.overflow_bottom =\n ( ( this.booking?.room_breakdown || this.booking.breakdown[this.space.email])\n ? ( (this.booking?.room_breakdown || this.booking.breakdown[this.space.email]) / 60) / duration\n : -0.1) * 100;\n if (this.booking.all_day) {\n this.top = 0;\n this.height = 100;\n }\n }\n }\n}\n","\n \n \n \n 50 ? ' low' : '')\"\n [style.z-index]=\"(overlap?.index || 0) + 2\"\n (click)=\"view($event)\"\n >\n
\n
{{ booking.all_day ? 'All Day' : period }}
\n
\n \n\n \n \n
\n
\n
\n
\n \n {{booking?.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
\n
Host: 
\n
\n {{ booking.organiser?.name || booking.organiser }}\n
\n
\n \n
Booked by: 
\n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n \n
{{ booking.title }}
\n
\n
\n
\n {{ booking.attendees ? booking.attendees.length || 'No' : 'No' }} Attendee{{\n booking.attendees?.length === 1 ? '' : 's'\n }}{{ expected ? '(' + expected + ' Expected)' : '' }}\n
\n
\n
0\">\n
\n Company: {{ booking.company.length }}\n
\n
\n \n
Welcomed by: {{ booking.organiser?.name || booking.organiser }}
\n \n
\n
Catered
\n
\n \n \n \n \n \n\n","import {\n Component,\n OnChanges,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n OnInit,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { CdkDragMove, CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nimport { IEventOverlap } from './event/event.component';\nimport { BaseDirective, closestToTimeSlotTz, Identity } from '@mckinsey-converge/base';\nimport { OrganisationService, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { DayViewSettings } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\n\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'day-view-space',\n templateUrl: './space.component.html',\n styleUrls: ['./space.component.scss'],\n})\nexport class DayViewSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** List of space dropzones connected to */\n @Input() public space_list: string[];\n /** Date to display events for */\n @Input() public dateTz: DateTZ;\n /** Space to display events for */\n @Input() public space: Space;\n /** Scroll value of the day view */\n @Input() public scroll: number;\n /** Only show events with setup and/or breakdown times */\n @Input() public overflow_only: boolean;\n /** Mapping of whether to show events with a given legend id */\n @Input() public legend: HashMap = {};\n /** Scroll value to add to drop placeholders */\n @Input('scrollTop') public scroll_top: number;\n /** Last update time of the displayed bookings */\n @Input('lastUpdate') public last_update: number;\n\n @Input() public eventMovingLoader : HashMap = {};\n /** Emitter for whether the space column is in view */\n @Output() public inView = new EventEmitter();\n /** Emitter for whether an event is being dragged */\n @Output() public dragging = new EventEmitter();\n /** Emitter for whether an event is being dropped and moving in progress */\n @Output() public moving = new EventEmitter<{}>();\n /** List of bookings for the current date and space */\n public event_list: Booking[] = [];\n /** Mapping of event IDs to overlap details */\n public overlap_details: HashMap = {};\n /** Mapping of positions of event in the day */\n public position_list: HashMap<{ top: number; height: number }> = {};\n /** Override for mapped position */\n public top: number;\n /** Client Rectangle for the container element box */\n public box: ClientRect;\n /** Whether the space list is in view */\n public in_view: boolean;\n /** ID of the booking with an action processing */\n public override_state: string;\n /** Map of bookings to whether they are loading */\n public loading: HashMap = {};\n /** Settings for day view */\n public settings: DayViewSettings = {} as any;\n\n /** Container element for the component contents */\n @ViewChild('view', { static: true }) private view: ElementRef;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _bookings: BookingsService,\n private _dialog: MatDialog,\n private cdr: ChangeDetectorRef,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n /** Events to display for the active date */\n public events: Booking[] = []\n\n public ngOnInit(): void {\n this.events = this.filterEvents();\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.settings = this._service.setting('app.day_view') || {};\n this.subscription(\n 'breakdown',\n this._service\n .listen('APP.breakdown')\n .subscribe((state) => {\n this.overflow_only = state;\n this.events = [...this.filterEvents()];\n })\n );\n this.subscription(\n 'legend',\n this._service\n .listen('CONCIERGE.legend')\n .subscribe((state) => (this.legend = state || {}))\n );\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...list];\n this.events = [...this.filterEvents()];\n this.cdr.detectChanges();\n })\n );\n this.checkInView();\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.scroll) {\n this.checkInView();\n }\n if (changes.space) {\n this.event_list = [...this.event_list];\n this.timeout('in_view', () => this.checkInView(), 100);\n }\n /* istanbul ignore else */\n if (changes.last_update) {\n this.timeout('update_overlaps', () => this.calculateOverlaps(), 1000);\n }\n }\n\n // private filterEvents(): Booking[] {\n // if (this.space) {\n // const bookings = this.event_list;\n // const list = bookings.filter((event) => {\n // if (this.override_state && this.override_state === event.icaluid) {\n // this.loading[event.id] = true;\n // }\n\n // const ignore = event.is_recurrent && event.recurrence_type === 'master';\n // const roomemail = event.room.filter(rm => rm.email === this.space.email)[0];\n\n // return (\n // !ignore &&\n // event.room.some(room => room.email.includes(this.space.email)) &&\n // (!this.overflow_only ||\n // event.setup[event.room.map(room => room.email)] ||\n // event.breakdown[event.room.map(room => room.email)])\n // );\n // }).map(e => new Booking({...e.toJSON()}) );\n\n // return list;\n // }\n // return [];\n // }\n\n private filterEvents(): Booking[] {\n if (!this.space) {\n return [];\n }\n \n return this.event_list.filter((event) => {\n // Mark as loading if override state matches.\n if (this.override_state && this.override_state === event.icaluid) {\n this.loading[event.id] = true;\n }\n \n const isRecurrentMaster = event.is_recurrent && event.recurrence_type === 'master';\n const isRoomEmailMatch = event.multi_rooms.some(room => room.email === this.space.email);\n \n // Determine if the event should be included based on setup or breakdown conditions.\n const isIncludedInSetupOrBreakdown = event.multi_rooms.some(room => {\n return event.room_setup || event.room_breakdown || event.setup[room.email] || event.breakdown[room.email];\n });\n \n return !isRecurrentMaster && isRoomEmailMatch && (!this.overflow_only || isIncludedInSetupOrBreakdown);\n }).map(event => new Booking({...event.toJSON()}));\n }\n\n /* istanbul ignore next */\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n\n /**\n * Calculate to overlap details for the booking events on the space\n */\n private calculateOverlaps() {\n const events = this.events.sort(\n (a, b) =>\n a.startDateTz.ms - b.startDateTz.ms ||\n a.duration - b.duration ||\n (a.title || '').localeCompare(b.title || '')\n );\n events.forEach((i) => (this.overlap_details[i.id] = { index: 0, total: 1 }));\n for (const bkn of events) {\n const bkn_start = bkn.startDateTz.startOfValue('minute');\n const bkn_end = bkn.endDateTz.startOfValue('minute');\n let count = 1;\n let index = 0;\n const collisions: Booking[] = [];\n for (const cmp of events) {\n /* istanbul ignore else */\n if (bkn.id !== cmp.id) {\n const cmp_start = cmp.startDateTz.startOfValue('minute');\n const cmp_end = cmp.endDateTz.startOfValue('minute');\n /* istanbul ignore else */\n if (\n bkn_start.isSameDate(cmp_start, 'minute') ||\n (bkn_start.isAfterDate(cmp_start) && bkn_start.isBeforeDate(cmp_end)) ||\n bkn_end.isSameDate(cmp_end, 'minute') ||\n (bkn_end.isAfterDate(cmp_start) && bkn_end.isBeforeDate(cmp_end))\n ) {\n count++;\n collisions.push(bkn);\n /* istanbul ignore else */\n if (\n events.findIndex((i) => i.id === bkn.id) >\n events.findIndex((i) => i.id === cmp.id)\n ) {\n index++;\n }\n }\n }\n }\n this.overlap_details[bkn.id] = { index: Math.max(0, index), total: count };\n }\n }\n\n /**\n * Check whether the space column is with the view of the\n */\n private checkInView() {\n /* istanbul ignore else */\n if (this.view && this.view.nativeElement) {\n const el = this.view.nativeElement;\n this.in_view =\n el.offsetLeft + this.scroll >= -240 &&\n el.offsetLeft + this.scroll <= window.innerWidth;\n this.inView.emit(this.in_view);\n }\n }\n\n /**\n * Initialise drag events\n */\n public initDrag() {\n this.box = this.view.nativeElement.getBoundingClientRect();\n this.dragging.emit(true);\n }\n\n /**\n * Cleanup after drag\n */\n public endDrag() {\n this.timeout('end_drag', () => (this.top = 0), 10);\n this.dragging.emit(false);\n }\n\n /**\n * Update top position of the dragged event placeholder\n * @param booking Booking being dragged\n * @param event Drag event\n */\n public updateDragTop(event: CdkDragMove) {\n /* istanbul ignore else */\n if (event.delta.y) {\n const y = event.pointerPosition.y;\n const top = (y - this.box.top - this.scroll_top) / this.box.height;\n const top_minutes = (Math.round((top * 24 * 60) / 15) * 15) / 60;\n this.top = (top_minutes / 24) * 100;\n\n }\n }\n\n /**\n * Handle drop event\n * @param event\n */\n public drop(event: CdkDragDrop<{ top: number; list: Booking[] }>): void {\n const id = event.item.element.nativeElement.id;\n const booking = event.previousContainer.data.list.find((i) => i.id === id);\n /* istanbul ignore else */\n if (!booking) {\n return;\n }\n const top = event.previousContainer.data.top;\n const new_start = Math.round(((top || 0) / 100) * 24 * 60);\n const old_date = booking.startDateTz;\n const new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n const start_epoch = new_date.seconds;\n const end_epoch = new_date.addValue({ minutes: booking.duration }).seconds;\n const now = DateNow(new Date());\n /* istanbul ignore else */\n // Prevent moving event into past\n if (now.startOfValue('minute').ms > new_date.ms) {\n this.handleDropError(booking.id, 'Meetings cannot be moved into the past');\n return;\n }\n if (now.startOfValue('minute').ms > booking.endDateTz.ms) {\n this.handleDropError(booking.id, 'Only future meetings can be moved');\n return;\n }\n if(booking.is_multiroom){\n this.handleDropError(booking.id, 'Multiroom meetings cannot be moved using drag and drop');\n return;\n }\n // Check for collisions\n this.loading[booking.id] = true;\n this.override_state = booking.icaluid;\n this.moving.emit({ isMoving:true, movingId:booking.id} );\n let room = booking.space;\n let message = `Update ${booking.organiser.name}'s meeting in \"${ booking.space.local_name }\" from ${ old_date.formatDate('h:mma') } to ${new_date.formatDate('h:mma')}`;\n let success = `Successfully updated meeting time from ${old_date.formatDate( 'h:mma' )} to ${new_date.formatDate('h:mma')}`;\n /* istanbul ignore else */\n if (event.container !== event.previousContainer) {\n // Same room\n room = this._spaces.find(event.container.id.replace('space-col-', '')) || room;\n message = `Move ${booking.organiser.name}'s meeting in \"${booking.space.local_name}\" to \"${ room.local_name }\" at ${new_date.formatDate('h:mma')}`;\n success = `Successfully moved booking to \"${room.local_name}\" at ${new_date.formatDate('h:mma')}`;\n }\n /* istanbul ignore else */\n // Check if booking has a change\n // if (room === booking.space && new_date.isSameDate(old_date, 'month')) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const room_list = [room];\n // Check if booking is already in the room\n const room_count = room_list.reduce((a, v) => a.add(v.id), new Set()).size;\n /* istanbul ignore else */\n // if (room_count < room_list.length) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const new_booking = new Booking({\n ...booking.toJSON(),\n start_epoch,\n end_epoch,\n room: room_list[0],\n multi_rooms: room_list\n });\n \n // Check if catering needs be dropped to comply with catering hours\n let cateringWillBeDropped = false;\n if (booking.has_catering && booking.catering && booking.catering.length > 0) {\n const isOutsideCatering = this.isOutsideCateringHours(new_date, new_booking.duration);\n const roomDoesNotHaveCatering = !new_booking.space.has_catering;\n if (isOutsideCatering || roomDoesNotHaveCatering) {\n cateringWillBeDropped = true;\n message += `
Note: Moving this booking will remove the catering order because `;\n \n if (isOutsideCatering && roomDoesNotHaveCatering) {\n message += `the new time falls outside of catering hours and the new room does not support catering.`;\n } else if (isOutsideCatering) {\n message += `the new time falls outside of catering hours.`;\n } else if (roomDoesNotHaveCatering) {\n message += `the new room does not support catering.`;\n }\n message += ``;\n }\n }\n \n this.checkCollisions(\n room_list,\n new_date,\n new_booking.duration,\n new_booking.icaluid\n ).then(\n () => {\n this.moveBooking(message, new_booking, cateringWillBeDropped).then(\n (_) => {\n this.override_state = null;\n this.moving.emit({ isMoving:false, movingId:booking.id} );\n this._service.notifySuccess(success);\n },\n (err) => this.handleDropError(new_booking.id, `Error: ${err}`)\n );\n },\n () => this.handleDropError(new_booking.id, 'Updated meeting time clashes with another')\n );\n }\n\n public isOutsideCateringHours(startDateTime: DateTZ, duration: number): boolean {\n const startDateTimeLuxon = DateTime.fromMillis(startDateTime.ms, { zone: startDateTime.building_tz });\n const endDateTimeLuxon = startDateTimeLuxon.plus({ minutes: duration });\n \n const bookingDate = startDateTimeLuxon.startOf('day');\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTimeLuxon <= dayStartAt7am || startDateTimeLuxon >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } \n\n /**\n * Check if there are any booking collisions with the new booking time\n * @param spaces\n * @param dateTz\n * @param duration\n */\n private checkCollisions(\n spaces: Space[],\n dateTz: DateTZ,\n duration: number,\n ignore?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n this._spaces\n .available({\n room_ids: spaces.map((i) => i.id).join(','),\n dateTz,\n duration,\n ignore,\n hide_bookings: true,\n })\n .then(\n (list) => {\n list.length === spaces.length ? resolve() : reject();\n },\n () => reject()\n );\n });\n }\n\n /**\n * Handle errors from drop move logic\n * @param id Booking ID\n * @param message Error description\n */\n private handleDropError(id: string, message: string) {\n this.loading[id] = false;\n this.override_state = null;\n\t\t\t\tthis.moving.emit({ isMoving:false, movingId:id} );\n this._service.notifyError(message);\n }\n\n /**\n * Update booking\n * @param confirm_msg\n * @param new_booking\n */\n private moveBooking(confirm_msg: string, new_booking: Booking, cateringWillBeDropped: boolean = false): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Update meeting',\n content: confirm_msg,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n if (cateringWillBeDropped) {\n // Remove catering orders\n new_booking.catering = [];\n }\n this._bookings.save(new_booking).then(\n (bkn: Booking) => {\n this._booking_state_service.replace(bkn);\n resolve(bkn);\n },\n (err) => {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n this.override_state = null;\n reject(err)\n }\n );\n } else {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n }\n ref.close(event.reason);\n })\n );\n ref.afterClosed().subscribe((reason?:string) => { \n reason !== 'done' ? this.moving.emit({ isMoving:false, movingId:new_booking.id} ) : null;\n this.unsub('confirm');\n });\n });\n }\n\n public checkAvailabilityOnGivenTime(selectedBlockStart, selectedBlockEnd) {\n const runningBookings =\n this.events?.filter((bks) => {\n const startEpoch = new DateTZ({\n date: bks.start_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const endEpoch = new DateTZ({\n date: bks.end_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const hasValidBreakdown: boolean =\n bks.breakdown &&\n Object.values(bks.breakdown).some((value) => value !== null);\n if (selectedBlockStart.ms === endEpoch && hasValidBreakdown) {\n return true;\n } else\n return (\n (selectedBlockStart.ms >= startEpoch && selectedBlockStart.ms < endEpoch) ||\n (selectedBlockEnd.ms > startEpoch && selectedBlockEnd.ms < endEpoch)\n );\n }) || [];\n return !!runningBookings.length;\n }\n\n\t\t/** Whether booking has been ended */\n public expired(booking): boolean {\n\t\t\treturn booking.timeBasedStatusLabel === 'done';\n\t\t}\n\n\n\t\tgridBookingOnClick(event: any, space: Space) {\n\n // if(!event.target.classList.contains('block') )\n // return;\n\n\t\t\tconst box = this.view.nativeElement.getBoundingClientRect();\n\t\t\tconst y = event.y;\n\n\t\t\tconst top = (y - box.top - 22) / box.height;\n\t\t\tconst top_minutes = Math.round((top * 24 ) * 100) / 100; //Math.round(top * 24 );\n\t\t\tconst topMinutes = (top_minutes / 24) * 100;\n\t\t\tconst new_start = Math.round(((topMinutes || 0) / 100) * 24 * 60) ;\n\t\t\tconst old_date = this._booking_state_service.booking_date;\n\n\t\t\tconst new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n\t\t\tconst timezone = this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone')\n\t\t\tconst closestDateTz = closestToTimeSlotTz(new DateTZ({ date: new_date.ms, is_local_tz: true, building_tz: timezone }), +30)\n\n\t\t\tconst isConflict = this.checkAvailabilityOnGivenTime(closestDateTz, closestDateTz.addValue({ minutes: 60 }));\n\t\t\tif(isConflict) {\n\t\t\t\t// this._service.notifyError('Meetings cannot be create into the past');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst now = DateNow(new Date());\n\t\t\t// Prevent moving event into past\n\t\t\tif (now.startOfValue('minute').ms > closestDateTz.ms) {\n\t\t\t\t\tthis._service.notifyError('Meetings cannot be created into the past');\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst form_data = {\n\t\t\t\tdateTz : closestDateTz,\n\t\t\t\tstartDateTz : closestDateTz,\n\t\t\t\tstart_epoch : closestDateTz.seconds,\n\t\t\t\tendDateTz : closestDateTz.addValue({ minutes: 60 }),\n\t\t\t\tend_epoch : closestDateTz.addValue({ minutes: 60 }).seconds,\n\t\t\t\ttimezone : timezone,\n\t\t\t\troom: space\n\t\t\t}\n\t\t\tconst booking\t=\tnew Booking(form_data);\n\t\t\tthis._dialog.open(BookingModalComponent, {\n\t\t\t\tdata: {\n\t\t\t\t\ttimezone: timezone,\n\t\t\t\t\tbooking: booking,\n\t\t\t\t\tisFromGrid: true\n\t\t\t\t },\n\t\t\t\tautoFocus: false,\n\t\t\t\tbackdropClass: 'mck-modal-backdrop',\n\t\t\t});\n\t\t}\n}\n","\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n \n\t\t\t\t\t\n
\n
\n \n
\n
\n
\n \n\n\n","import {\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges,\n ViewChild, NgZone, DoCheck, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { filter, first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { HashMap, Identity } from '@mckinsey-converge/base';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { isToday } from 'date-fns';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\n\n\nconst UPDATE_INTERVAL = 10;\n\n@Component({\n selector: 'day-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewTimelineComponent\n extends BaseDirective\n implements OnInit, OnChanges, OnDestroy\n{\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** List of shown legend items */\n @Input() public legend: HashMap = {};\n /** Whether to show only items with a setup and/or breakdown time */\n @Input() public overflow_only: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n\n @Input() undo_action;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n /** Top value of the content scroll */\n public scroll_top: number = 0;\n /** Left value of the content scroll */\n public scroll_left: number = 0;\n /** Offset of the scroll value when starting a drag */\n public scroll_offset: number = 0;\n /** List of spaces to display for */\n public spaces: Space[] = [];\n /** List of spaces to display for */\n public filtered_spaces: Space[] = [];\n /** Mapping of space ids to whether they are in view */\n public in_view: { [id: string]: boolean } = {};\n /** Percent of the day that is now */\n public now: number;\n /** Currently active hour of the day */\n public active_hour: string;\n /** Mapping of spaces loading booking date */\n public loading_space: { [id: string]: boolean } = {};\n /** Booking ID to open modal for */\n public view_id: string;\n /** Last update time for the space bookings */\n public last_update: number = 0;\n /** Whether an event is being dragged */\n public is_dragging: boolean;\n /** Client rectangle for the scroll area */\n public box: ClientRect;\n /** Whether to show the holding bay */\n public show_holding_bay: boolean = true;\n\n public space_zones: string[] = [];\n\n public is_today: boolean = this.isToday();\n public modalInitialized = false;\n\n /** Scrollable area of the day view */\n @ViewChild('scroll_area', { static: true }) private scroll_area: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScroll: CdkVirtualScrollViewport;\n isEventMoving: boolean = false;\n bookingEl: any;\n timeoutID: any;\n column: any;\n\n /** Update scroll box when the window is resized */\n @HostListener('window:resize')\n public onResize() {\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n public get is_loading() {\n return this._booking_state_service.loading;\n }\n\n public isToday() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }),\n 'day'\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _renderer: Renderer2,\n private _dialog: MatDialog,\n private _zone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n super();\n }\n\n public get holding_bay(): Space {\n const bld = this._org.building;\n /* istanbul ignore else */\n if (bld && bld.holding_bay) {\n return this._spaces.find(bld.holding_bay);\n }\n return null;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n this._zone.runOutsideAngular(() => {\n this.interval('time', () => this.updateTime(), 15 * 1000);\n });\n // R--- return to see if the booking service needs updating\n this.subscription(\n 'dateTz',\n this._booking_state_service.dateTz.subscribe((dateTz) => {\n // const dateTz = new DateTZ({date});\n this.dateTz = dateTz;\n })\n );\n });\n });\n this.is_today = this.isToday();\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n })\n );\n\n }\n\n ngAfterViewInit() {\n const d2 = this._renderer.createElement('div');\n this._renderer.addClass(d2, 'adjustable-room-block-2');\n this.virtualScroll.elementRef && this._renderer.appendChild(this.virtualScroll.elementRef.nativeElement, d2);\n }\n\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.level && this._org.building) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.updateTime();\n this.initSpaces();\n }\n if (changes.space_type) {\n this.initSpaces();\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n public init() {\n this._service.title = 'Day View';\n this.subscription(\n 'viewing',\n this._service\n .listen('CONCIERGE.day_view.viewing')\n .subscribe((event) => this.scrollIntoView(event) )\n );\n // Subscribe to route query changes\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view') || localStorage.getItem('CONCIERGE.view_booking')) {\n this.view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_booking');\n const spaceJson = localStorage.getItem('CONCIERGE.view_booking_space');\n /* istanbul ignore else */\n if (details) {\n const space: Space | undefined = spaceJson\n ? new Space(JSON.parse(spaceJson))\n : undefined;\n const booking = new Booking({ ...JSON.parse(details), room: space });\n if(!this.modalInitialized) {\n this.modalInitialized = true;\n this.view(booking, space);\n localStorage.removeItem('CONCIERGE.view_booking');\n localStorage.removeItem('CONCIERGE.view_booking_space');\n }\n }\n }\n })\n );\n // this._zone.runOutsideAngular(() => {\n // this.interval(\n // 'scroll',\n // () => {\n // /* istanbul ignore else */\n // if (this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n // }\n // },\n // 1000\n // );\n // });\n /* istanbul ignore else */\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n /**\n * Update scroll parameters to match the change in the scroll position\n * @param event\n */\n public updateScroll(event) {\n this.scroll_top = event.target.scrollTop;\n this.scroll_left = event.target.scrollLeft;\n }\n\n\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n\n /** Update the now line position */\n private updateTime() {\n const now = new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n });\n this.now = (now.dateHour + now.minutes / 60) / 24;\n this.active_hour = now.startOfValue('hour').formatDate('HH:mm');\n this.is_today = this.isToday();\n this.cdr.detectChanges();\n }\n\n /**\n * View booking details\n * @param booking Booking to view the details of\n * @param space Space that's selected.\n */\n private view(booking: Booking, space?: Space) {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space: space || booking.space,\n booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.view_id = null;\n }\n\n\n /**\n * Scroll booking to the event on the day view\n * @param booking Booking to scroll into view\n */\n private scrollIntoView(searchData: Booking | Space ) {\n if (searchData && this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n this.column && this._renderer.removeClass(this.column, 'wild');\n\n /** Select space column element using space id in search data - \n * space.id if seach data is space object or data.space.id if search data is booking object\n * \n */\n const spaceId = searchData['space'] ? searchData['space'].id : searchData.id;\n const element: HTMLDivElement = this.scroll_area['elementRef']\n .nativeElement.querySelector(`#space-col-${spaceId}`);\n\n\n this.column = element;\n\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n if(searchData['space'] && searchData['space'].id) \n this.bookingEl = element?.querySelector(`#${searchData.id}`)?.querySelector('.event-container');\n\n\n /* istanbul ignore else */\n if (element) {\n this.timeoutID && clearTimeout(this.timeoutID);\n this._renderer.addClass(element, 'wild');\n this.bookingEl && this._renderer.addClass(this.bookingEl, 'wild');\n const scroll_box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n\n let date_percent;\n if(searchData['space'] && searchData['space'].id) {\n date_percent = Math.abs(\n searchData['startDateTz'].dateDiff(\n searchData['startDateTz'].startOfValue('day'),\n 'minutes'\n )\n ) / (24 * 60);\n }\n \n\n const box = element.getBoundingClientRect();\n const left = box.left - scroll_box.left + this.scroll_area['elementRef'].nativeElement.scrollLeft - 500;\n const top = (searchData['space'] && searchData['space'].id) ? \n this.scroll_area['elementRef'].nativeElement.scrollHeight * date_percent - 10 :\n 0\n\n\n this.scroll_area['elementRef'].nativeElement.scrollTo({\n left: left,\n top: top,\n behavior: 'smooth',\n });\n\n this.timeoutID = setTimeout(()=> {\n element && this._renderer.removeClass(element, 'wild');\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n }, 3000);\n }\n }\n }\n\n /**\n * Setup an auto-scroll for the display view\n * @param x\n * @param y\n */\n public scrollView(x: number, y: number) {\n /* istanbul ignore else */\n if (x || y) {\n this.scroll_area['elementRef'].nativeElement.scrollTop += y || 0;\n this.scroll_area['elementRef'].nativeElement.scrollLeft += x || 0;\n /* istanbul ignore else */\n if (\n (y &&\n this.scroll_area['elementRef'].nativeElement.scrollTop >=\n this.scroll_area['elementRef'].nativeElement.scrollHeight) ||\n (x &&\n this.scroll_area['elementRef'].nativeElement.scrollLeft >=\n this.scroll_area['elementRef'].nativeElement.scrollWidth) ||\n (y && this.scroll_area['elementRef'].nativeElement.scrollTop <= 0) ||\n (x && this.scroll_area['elementRef'].nativeElement.scrollLeft <= 0)\n ) {\n this.clearInterval('auto_scroll');\n }\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n }\n }\n\n public clearSelected() {\n this._service.set('CONCIERGE.day_view.viewing', null);\n }\n\n public cancelScroll() {\n this.clearInterval('auto_scroll');\n }\n\n public dragChange(is_dragging: boolean) {\n if (is_dragging) {\n this.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop; \n this.subscription(\n 'listen_move',\n this._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n const position = { x: event.clientX, y: event.clientY };\n const y = position.y > this.box.bottom - this.box.height * 0.05\n ? 1\n : position.y < this.box.top + this.box.height * 0.05\n ? -1\n : 0;\n const x = position.x > this.box.right - this.box.width * 0.05\n ? 1\n : position.x < this.box.left + this.box.height * 0.05\n ? -1\n : 0;\n this.scrollView(x * 5, y * 5);\n this._zone.runOutsideAngular(() => {\n this.interval('auto_scroll', () => {\n return this.scrollView(x * 40, y * 40) \n }, 15);\n });\n this.cdr.detectChanges();\n })\n );\n this.clearInterval('bookings');\n } else {\n this.cancelScroll();\n this.unsub('listen_move');\n }\n }\n\n private initSpaces() {\n const holding_bay = this.holding_bay;\n this.filtered_spaces = this.spaces.filter(\n (i) =>\n ( ( !this.space_type || i.zones.indexOf(this.space_type) >=0 ) || ( [i.room_type].indexOf(this.space_type) >= 0) ) &&\n (!holding_bay || i.id !== holding_bay.id) &&\n i.bookable\n );\n this.filtered_spaces.sort((a, b) => a.local_name.localeCompare(b.local_name));\n this.space_zones = this.spaces.map((i) => `space-col-${i.id}`);\n }\n\n\n\n\t\tpublic onEventDragging(isDragging: boolean): void {\n\t\t\t// Check if dragging is initiated\n\t\t\tif (isDragging) {\n\t\t\t\t// Store the current scroll position\n\t\t\t\tthis.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop;\n\t\t\t\t// Subscribe to mouse move events\n\t\t\t\tthis.subscribeToMouseMove();\n\t\t\t\t// Clear existing interval for bookings\n\t\t\t\tthis.clearInterval('bookings');\n\t\t\t} else {\n\t\t\t\t// Cancel scroll operation\n\t\t\t\tthis.cancelScroll();\n\t\t\t\t// Unsubscribe from mouse move events\n\t\t\t\tthis.unsubscribeFromMouseMove();\n\t\t\t}\n\t}\n\n\t// Subscribe to mouse move events and handle scroll logic\n\tprivate subscribeToMouseMove(): void {\n\t\tthis.subscription(\n\t\t\t'listen_move',\n\t\t\tthis._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n\t\t\t\t// Get mouse position\n\t\t\t\tconst position = { x: event.clientX, y: event.clientY };\n\t\t\t\t// Calculate scroll direction based on mouse position\n\t\t\t\tconst [x, y] = this.calculateScrollDirection(position);\n\t\t\t\t// Scroll the view based on calculated direction\n\t\t\t\tthis.scrollView(x * 5, y * 5);\n\t\t\t\t// Run auto-scroll logic\n\t\t\t\tthis.runAutoScroll(x, y);\n\t\t\t\t// Detect changes to update the view\n\t\t\t\tthis.cdr.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t// Calculate scroll direction based on mouse position\n\tprivate calculateScrollDirection(position: { x: number, y: number }): [number, number] {\n\t\tconst tolerance = 0.05;\n\t\tconst x = this.calculateDirection(position.x, this.box.left, this.box.right, tolerance);\n\t\tconst y = this.calculateDirection(position.y, this.box.top, this.box.bottom, tolerance);\n\t\treturn [x, y];\n\t}\n\n\t// Calculate direction based on mouse position and element boundaries\n\tprivate calculateDirection(pos: number, min: number, max: number, tolerance: number): number {\n\t\tif (pos > max - this.box.width * tolerance) {\n\t\t\t\treturn 1; // Scroll right\n\t\t} else if (pos < min + this.box.width * tolerance) {\n\t\t\t\treturn -1; // Scroll left\n\t\t} else {\n\t\t\t\treturn 0; // Do not scroll\n\t\t}\n\t}\n\n\t// Run auto-scroll logic\n\tprivate runAutoScroll(x: number, y: number): void {\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis.interval('auto_scroll', () => this.scrollView(x * 10, y * 10), 10);\n\t\t});\n\t}\n\n\t// Unsubscribe from mouse move events\n\tprivate unsubscribeFromMouseMove(): void {\n\t\tthis.unsub('listen_move');\n\t}\n\n public movingEvent(booking) {\n this.isEventMoving = booking.isMoving;\n this.loading_space[booking.movingId] = booking.isMoving;\n \n }\n\n}\n\n","
\n\t
\n\t\t\t\n\t
\n\n\t
\n\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
Time
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ timeslot.name }}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ room.local_name }}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\tCapacity - {{ room.capacity || '0' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{ room.capacity === 1 ? 'person' : 'people' }}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\n
\n
\n
Incoming Booking Requests
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\t
\n\t\t\t
Moving meeting
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\t
\n
\n","import { Component, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'meeting-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class MeetingCateringDetailsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public orders = [];\n\n /** Total cost of all the orders */\n public get total(): number {\n let total = 0;\n this.orders.forEach((order) => (total += order.total));\n return total;\n }\n\n public get total_edited(): boolean {\n return this.booking.edits.some((_) => this.orders.some((o) => o.id === _));\n }\n\n /** Charge code for orders in the active space */\n public get charge_code(): string {\n return (this.orders.length ? this.orders[0].charge_code : '') || '';\n }\n\n /** Currency symbol for orders in active space */\n public get symbol(): string {\n const space = this.space || { level: { building_id: '' } };\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n /** Notes for orders in active space */\n public get notes(): string {\n if (this.orders.length) {\n const note = this.booking.notes.find(\n (note) =>\n note.type === 'catering' &&\n // note.space === this.space.email &&\n this.booking.multi_rooms.some(room => room.email === note.space) &&\n note.author === this.booking.creator.name\n );\n return note ? note.message : '';\n } else {\n return '';\n }\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n constructor(\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router\n ) {\n super();\n }\n\n public ngOnInit() {\n this._updateOrders();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.booking) {\n this._updateOrders();\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toApiJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n }\n\n /** Open modal to edit catering details for booking */\n public editMeetingCatering() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n only_catering: true,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n\n /**\n * View catering order for the event\n */\n public viewOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n if (!booking || !order) return;\n /* istanbul ignore else */\n if (localStorage) this.storeOrder(order);\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: booking.id, view: order.id },\n });\n this._dialog.closeAll();\n }\n\n /** List of orders for this booking and space */\n private _updateOrders() {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp[0] && orders.push(..._temp);\n });\n orders = orders.map((order) => {\n let ord = order.toJSON();\n ord.booking = this.booking; // R--- check this change works\n return new CateringOrder(ord);\n });\n this.orders = orders;\n }\n}\n","
Catering
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n {{ total / 100 | currency: symbol }}\n
\n
\n
\n \n
\n {{ charge_code }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n\n
<No Catering Orders>
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingAction, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration } from '@mckinsey-converge/base';;\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'meeting-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss'],\n})\nexport class MeetingDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Mapping of edited fields */\n\n @Output() updateBooking = new EventEmitter();\n\n @Output() public event = new EventEmitter();\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n\n public edited: HashMap = {};\n\n /** Display string for the locations in the booking */\n public get location(): string {\n // Ensure both this.booking.room and this.space are treated as arrays\n let rooms: Space[] = [];\n \n if (Array.isArray(this.booking.multi_rooms) && this.booking.multi_rooms.length > 0) {\n rooms = this.booking.multi_rooms;\n } else if (Array.isArray(this.space) && this.space.length > 0) {\n rooms = this.space;\n }\n \n // Map each room to its local_name and join these names with a comma\n return rooms.map(room => room.local_name).join(', ');\n }\n\n /** Display string for the booking duration */\n public get duration() {\n return this.booking ? humaniseDuration(this.booking.duration) : '1 hour';\n }\n\n /** Display string for attendees in booking */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n\n /** Display string for attendees in booking */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('dd MMM yyyy')} ${this.booking.startDateTz.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get end_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration})\n return `${end_.formatDate('dd MMM yyyy,')} ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get attendees() {\n return this.booking.attendees.map((person) => person.name).join('\\n');\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done';\n }\n\n public bookingDetails: BookingDetailInfo;\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n Object.values(this.booking.edits || []).forEach(i => {\n this.edited[i] = true;\n });\n this.setDetails();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n /**\n * Function to set details of the booking, can take advantage to one time assignment and set tmeplate properties to avoid template conditions and function calls\n */\n setDetails() {\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public editMeeting() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n action: BookingAction.EDIT\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Booking Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name || booking.organiser.email }}\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ location }}\n
\n \n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ duration }}\n
\n
\n
\n \n
\n {{ attendees }}\n
\n
\n
0\">\n \n
\n {{ this.booking.company.join(', ') }}\n
\n
\n
\n \n
\n No\n
\n
\n
\n \n
\n
\n
\n\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\n\nimport { Booking, BookingAction } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingsService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { DeleteConfirmModalComponent } from '../../bookings/delete-confirm-modal/delete-confirm-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\nexport interface MeetingDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-meeting-details-modal',\n templateUrl: './meeting-details-modal.component.html',\n styleUrls: ['./meeting-details-modal.component.scss'],\n})\nexport class MeetingDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for the loading state */\n public loading: string;\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /** Handler for request errors */\n /** Whether the meeting is approved or not */\n public isApproved = false;\n public isMasterApproved = false;\n\n public master_booking: any;\n \n private _on_error = (message) => (err) => {\n this._service.notifyError(`${message}. Error: ${err.message || err}`);\n this.setLoading(null);\n };\n\n /** Booking to view details */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n public set booking(booking: Booking) {\n this._data.booking = booking;\n // if space selected no longer exists on booking change, pick first one.\n if (this._data.booking.room?.id && this._data.booking.room.id !== this._data.space?.id) {\n this._data.space = this._data.booking.room;\n }\n }\n\n /** Space to display booking details for */\n public get space(): Space {\n return this._data.space;\n }\n\n /** Type of meeting */\n public get type(): string {\n return this.booking.getType();\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: MeetingDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n if (!this.booking) {\n this._dialog_ref.close();\n return;\n }\n\n if (this.booking.is_recurrent) {\n if (this.booking.recurrence_type === 'master') {\n // If the booking is recurrent and of type 'master', use it directly\n this.isRecurrentBooking = this.booking.is_recurrent;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n } else if (this.booking.recurrence_type === 'occurrence') {\n // If the booking is recurrent and of type 'occurrence', find the master booking\n this.subscription(\n 'detail_bookings',\n this._booking_state_service.bookings.subscribe(async (bookings) => {\n this.master_booking = bookings.find((bkn) => {\n return (\n this.booking.recurrence_master_id === bkn.recurrence_master_id &&\n bkn.recurrence_type === 'master'\n );\n }) || await this._bookings.show(this.booking.recurrence_master_id);\n\n this.isApproved =\n this.booking.status === 'accepted' ||\n this.booking.status === 'approved';\n this.isMasterApproved =\n this.master_booking?.status === 'accepted' ||\n this.master_booking?.status === 'approved';\n\n // show Accept Series button for an occurrence only if it is not accepted yet and master booking is also not approved\n this.isRecurrentBooking =\n (this.master_booking?.is_recurrent &&\n !this.isApproved &&\n !this.isMasterApproved) ??\n false;\n if (this.isRecurrentBooking) {\n this.booking = this.master_booking;\n }\n })\n );\n }\n } else {\n // If the booking is not recurrent, use it directly\n this.isRecurrentBooking = false;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n }\n\n public setLoading(state: string) {\n this.loading = state;\n this._dialog_ref.disableClose = !!this.loading;\n }\n\n public acceptMeeting() {\n this.setLoading('Accepting meeting...');\n const event = this.booking.toJSON();\n\n let acceptOptions = {\n concierge: true,\n host: this.booking.organiser.email,\n room_email: this.space.email,\n icaluid: this.booking.icaluid,\n start: event.start,\n end: event.end,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings.accept(this.booking.id, acceptOptions).then(() => {\n this._service.notifySuccess('Meeting approved.');\n this.booking.status = BOOKING_STATUS.approved;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.approved });\n }, this._on_error('Apologies, Unable to approve! This time slot has been booked recently by another user, please try booking another one.'));\n }\n\n public declineMeeting() {\n this.setLoading('Declining meeting...');\n\n let declineOptions = {\n booking_id: this.booking.id,\n organiser: this.booking.organiser.email,\n icaluid: this.booking.icaluid,\n start: this.booking.startDateTz.seconds,\n end: this.booking.endDateTz.seconds,\n room_email: this.space.email,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings\n .decline(this.booking.id, declineOptions)\n .then(() => {\n this._service.notifySuccess('Meeting declined.');\n this.booking.status = BOOKING_STATUS.declined;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.declined });\n }, this._on_error('Unable to declining meeting, please try another one.'));\n }\n\n /** Open modal to confirm deletion of booking */\n public confirmDeleteMeeting() {\n const ref = this._dialog.open(DeleteConfirmModalComponent);\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'action') {\n ref.componentInstance.loading = true;\n const success = await this.deleteMeeting().catch(\n this._on_error('Error deleting booking')\n );\n ref.componentInstance.loading = false;\n ref.componentInstance.success = !!success;\n setTimeout(() => {\n ref.close();\n }, 3000);\n }\n })\n );\n }\n\n /** Open model to cloning a booking */\n public cloningMeeting(): void {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.booking,\n action: BookingAction.CLONE,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /** Delete booking */\n private async deleteMeeting(opts: { series?: boolean } = {}) {\n this.setLoading('Deleting meeting...');\n await this.booking.delete(opts);\n this._service.notifySuccess('Successfully deleted booking');\n this.event.emit({ reason: 'action', metadata: 'removed' });\n this._dialog_ref.afterClosed().subscribe((_) => this.setLoading(null));\n this._dialog_ref.close();\n this._service\n .get('undo')\n .next({ action: opts && opts.series ? 'series' : 'booking', booking: this.booking });\n return true;\n }\n\n /** Update booking requirements */\n public async updateRequirements(form: FormGroup) {\n this.setLoading('Updating requirements...');\n const value = form.value;\n const booking_data = this.booking.toJSON();\n const booking = new Booking({\n ...booking_data,\n ...value,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n booking.room_setup = 900;\n booking.room_breakdown = 900;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n\t\t\t\t\t\t\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\t\t\t\t\t\tthis._booking_state_service.bookings.subscribe((res) => {\n\t\t\t\t\t\t\tconst booking = res.find((book) => this.booking.id === book.id);\n\t\t\t\t\t\t\tthis.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n\t\t\t\t\t\t});\n this._service.notifySuccess('Successfully updated requirements');\n }\n this.setLoading(null);\n }\n\n public async updateBooking(form) {\n this.setLoading('Updating booking...');\n /* const value = form.value;\n const booking_data = this.booking.toJSON();\n const startDateTz = form.controls.dateTz.value;\n const endDateTz = startDateTz.addValue({ minutes: value.duration });\n const booking = new Booking({\n ...booking_data,\n ...value,\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating booking`))) as any;\n */\n // if (new_booking) {\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated booking');\n // }\n this.setLoading(null);\n }\n\n public async updateBreakdown(event) {\n this.setLoading('Updating requirements...');\n /*const booking_data = this.booking.toJSON();\n const _booking = new Booking({\n ...booking_data,\n setup: event.setup,\n breakdown: event.breakdown,\n notes: event.notes,\n });\n const new_booking: Booking = (await this._bookings\n .save(_booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n this._service.notifySuccess('Successfully updated requirements');\n }*/\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated requirements');\n this.setLoading(null);\n }\n}\n","
\n
{{ booking.time_period }}
\n
\n \n {{booking.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
{{ booking?.title }}
\n
\n \n
\n
\n\n \n\n\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { UsersService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { humaniseDuration } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, BookingNote } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface PrivateDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-private-details-modal',\n templateUrl: './private-details-modal.component.html',\n styleUrls: ['./private-details-modal.component.scss'],\n})\nexport class PrivateDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form Fields for private details */\n public form: FormGroup;\n /** Whether changes are being saved */\n public loading: boolean;\n /** List of available durations for setup and breakdown */\n public available_durations: Identity[] = new Array(5)\n .fill(0)\n .map((_, i) => ({ id: i * 15 * 60, name: humaniseDuration(i * 15) || '0 minutes' }));\n\n public get booking(): Booking {\n return this._data.booking;\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: PrivateDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const note = this.booking.notes.find(\n (note) => note.type === 'private'//&& note.space === this._data.space.email\n ) || { message: '' };\n this.form = new FormGroup({\n setup: new FormControl(this.booking.room_setup || this.booking.setup[this._data.space.email] || 0),\n breakdown: new FormControl( this.booking.room_breakdown || this.booking.breakdown[this._data.space.email] || 0),\n notes: new FormControl(note.message),\n });\n }\n\n public saveChanges() {\n const now = new DateTZ();\n if (this.form.dirty) {\n const old_notes = this.booking.notes.filter(\n (note) => !(note.type === 'private') // && note.space === this._data.space.email\n );\n const notes = [\n ...old_notes,\n {\n type: 'private',\n date: now.ms,\n message: this.form.value.notes,\n author: this._users.current.name,\n space: this._data.space.email,\n } as BookingNote,\n ];\n const value = this.form.value;\n const setup = { ...this.booking.setup };\n Object.keys(setup).forEach((k) => setup[k]= value.setup );\n setup[this._data.space.email] = value.setup;\n const breakdown = { ...this.booking.breakdown };\n Object.keys(breakdown).forEach((k) => breakdown[k]= value.breakdown );\n breakdown[this._data.space.email] = value.breakdown;\n const room_setup = value.setup;\n const room_breakdown = value.breakdown;\n\n const new_booking = new Booking({\n ...this.booking.toJSON(),\n setup,\n breakdown,\n room_setup,\n room_breakdown,\n notes,\n });\n this.loading = true;\n this._dialog_ref.disableClose = true;\n this._bookings.save(new_booking).then(\n (booking) => {\n\n const bkn = new Booking({ ...this.booking, ...booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\n this.event.emit({ reason: 'done', metadata: {setup, breakdown, notes} });\n this._dialog_ref.close();\n },\n (err) => {\n this._dialog_ref.disableClose = false;\n this.loading = false;\n }\n );\n } else {\n this._dialog_ref.close();\n }\n }\n}\n","
\n
Edit Private Details
\n \n
\n\n
\n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
Updating private details...
\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration, BaseDirective, DialogEvent } from '@mckinsey-converge/base';;\nimport { PrivateDetailsModalComponent } from '../private-details-modal/private-details-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-private-details',\n templateUrl: './private-details.component.html',\n styleUrls: ['./private-details.component.scss'],\n})\nexport class MeetingPrivateDetailsComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public get setup(): string {\n let setup = this.booking?.room_setup || this.booking.setup[this.space.email];\n return setup ? humaniseDuration(setup / 60) : '';\n }\n\n public get breakdown(): string {\n let breakdown = this.booking.room_breakdown ||this.booking.breakdown[this.space.email];\n return breakdown ? humaniseDuration(breakdown / 60) : '';\n }\n\n public get notes() {\n // return (this.booking.notes.find(note => note.type === 'private' && note.space === this.space.email) || {}).message;\n return (this.booking.notes.find(note => note.type === 'private' ) || {}).message;\n }\n\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n ngOnInit(): void {\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n public openPrivateDetailsModal() {\n const dialogRef = this._dialog.open(PrivateDetailsModalComponent, {\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Private Details\n
\n
\n
\n \n
\n {{ setup }}\n
\n
\n
\n \n
\n {{ breakdown }}\n
\n
\n
\n \n
\n {{ notes || '<No Notes>' }}\n
\n
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingStateService, SeriesAction, RecurrencePeriod, BookingsService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\n@Component({\n selector: 'meeting-recurring-details',\n templateUrl: './recurring-details.component.html',\n styleUrls: ['./recurring-details.component.scss'],\n})\nexport class MeetingRecurringDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** helper for setLoading state of the parent modal */\n @Output() public confirmDelete: EventEmitter<{ series?: boolean}> = new EventEmitter<{}>();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n private _recurrence_endTz: DateTZ;\n private _recurrence_startTz: DateTZ;\n private _recurrence_period: RecurrencePeriod;\n private _recurrence_interval: number;\n private _occurrence_details: { id: string, start_epoch: number, dateTz?: DateTZ }[];\n private _specific_dates: boolean = false;\n private _master_booking: Booking;\n public expired_ocurrences: Array = [];\n\n constructor(\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n private _bookings: BookingsService\n ) {\n super()\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'detail_bookings',\n this._booking_state.bookings.subscribe(async (bookings) => {\n\n const booking = bookings.find(bkn => { \n if(this.booking.recurrence_type === 'master')\n return bkn.recurrence_master_id === this.booking.icaluid;\n else \n return bkn.icaluid === this.booking.icaluid ;\n }) || this.booking;\n // if (!booking && this.booking.recurrence_type !== 'master') {\n // return;\n // }\n \n\n this.master_booking = ( this.booking.recurrence_type === 'occurrence' && booking\n ? bookings.filter(bkg => bkg.id === booking.recurrence_master_id)\n : this.booking.recurrence_type === 'master' ? [this.booking] \n : booking \n ? [booking]\n : []\n )?.shift();\n\n if (!this.master_booking) {\n this.master_booking = await this._bookings.show(booking.recurrence_master_id);\n this._booking_state.add(this.master_booking);\n }\n\n this.recurrence_endTz = this.master_booking.recurrenEndFromOcurrences(this.master_booking.occurrence_details);\n this.recurrence_startTz = new DateTZ({date: this.master_booking.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone});\n this.recurrence_period = this.master_booking.recurrence_period;\n this.recurrence_interval = this.master_booking.recurrence_interval;\n this.occurrence_details = this.master_booking.occurrence_details && this.master_booking.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.master_booking.id)\n .map(ocurrence => ({ ...ocurrence, start_epoch: ocurrence.start_epoch * 1000, dateTz: new DateTZ({ date: ocurrence.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone }) }));\n const occurrence_ids = this.master_booking?.occurrence_details.map(ocurr => ocurr.id) || []\n this.expired_ocurrences = bookings.filter(booking => {\n if(occurrence_ids.includes(booking.id)){\n const building_tz = this.master_booking.timezone\n const date = (booking.start_epoch * 1000) + (booking.duration * 60000)\n const start = new DateTZ({date, is_local_tz: false, building_tz})\n const now = DateNow(new Date()).toZone(building_tz)\n return now.isAfterDate(start, 'minute')\n }\n return false\n })\n })\n );\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public set recurrence_startTz(date: DateTZ) {\n this._recurrence_startTz = date\n }\n\n public get recurrence_startTz():DateTZ {\n return this._recurrence_startTz\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date\n }\n\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz\n }\n\n public set recurrence_period(period: RecurrencePeriod) {\n this._recurrence_period = period;\n }\n\n public get recurrence_period():RecurrencePeriod {\n return this._recurrence_period;\n }\n\n public set recurrence_interval(interval: number) {\n this._recurrence_interval = interval;\n }\n\n public get recurrence_interval():number {\n return this._recurrence_interval;\n }\n\n public set occurrence_details(occurrences: { id: string, start_epoch: number }[]) {\n this._occurrence_details = occurrences;\n }\n\n public get occurrence_details(): { id: string, start_epoch: number }[] {\n return this._occurrence_details;\n }\n\n public set specific_dates(val: boolean) {\n this._specific_dates = val;\n }\n\n public get specific_dates(): boolean {\n return this._specific_dates;\n }\n\n public set master_booking(bkng: Booking) {\n this._master_booking = bkng;\n }\n\n public get master_booking():Booking {\n return this._master_booking;\n }\n\n public toggleSpecificDates() {\n this.specific_dates = !this.specific_dates;\n }\n\n public async editSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(true), //we want to send the master booking since it's the one with all of the series data\n action: SeriesAction.EDIT,\n timezone: localStorage.getItem('CONCIERGE.timezone')\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n }); \n }\n\n public async cloneSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(),\n action: SeriesAction.CLONE\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public async cancelSeries() {\n this.confirmDelete.emit({ series: true });\n }\n}\n","
\n
\n
\n
\n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Days' : 'Day'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Weeks' : 'Week'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Months' : 'Month'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs on\n
\n
\n
\n
{{ occurrence.dateTz.formatDate('dd MMM yyyy') }}
\n
\n
\n
\n
\n
\n
\n \n
\n
\n\n \n \n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport {\n Booking,\n generateBookingForm\n} from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { RequirementDetailsModalComponent, RequirementDetailsModalData } from '@mckinsey-converge/legacy-overlays';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-details-requirements',\n templateUrl: './requirements.component.html',\n styleUrls: ['./requirements.component.scss'],\n})\nexport class MeetingDetailsRequirementsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Emitter for changes to the booking */\n @Output() public bookingChange = new EventEmitter();\n /** Emitter for updating booking */\n @Output() public event = new EventEmitter();\n public roomNames: string;\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Requirement notes */\n public get notes(): string {\n const note = this.booking.notes.find(\n (note) => note.type === 'equipment' && this.space.email === note.space\n );\n return (note ? note.message : '') || '';\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n public get headcount(): any{\n const temp = this.booking.multi_rooms.filter(room => room.email === this.space.email)[0]['email'];\n return this.booking.headcount || this.booking.expected_attendees[temp];\n }\n\n constructor(private _dialog: MatDialog, private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void {\n this.roomNames = this.booking.local_room_name;\n }\n\n /** Open modal for adding equipment requirements to booking */\n public openEquipmentDetailsModal() {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n const ref = this._dialog.open<\n RequirementDetailsModalComponent,\n RequirementDetailsModalData\n >(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: form.controls.space_list.value,\n notes_field: form.controls.notes,\n codes_field: form.controls.equipment_codes,\n head_counts_field: form.controls.expected_attendees,\n standalone: true\n }\n });\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.close();\n this.event.emit(form);\n }\n })\n );\n }\n}\n","
\n Room Requirements\n
\n
\n
\n
\n
\n
\n {{ roomNames || space.local_name }}\n
\n \n
\n
\n
\n \n
\n \n {{\n headcount\n }}\n
\n
\n
\n \n
\n {{\n booking.equipment_code || (booking.equipment_codes || {})[\n space.email || booking.room.email\n ] || 'No Charge Code'\n }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n","import { Component, Input, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { map } from 'rxjs/operators';\n\nimport { Booking, Space } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nimport { timePeriodsIntersect } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-day-display',\n templateUrl: './day-display.component.html',\n styleUrls: ['./day-display.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewDayDisplayComponent extends BaseDirective {\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** List of spaces to display bookings for */\n @Input() public spaces: Space[];\n /** Whether the date set is today */\n public isToday: boolean = false;\n /** List of bookings for this date */\n public readonly booking_list = this._booking_state_service.filtered_week.pipe(\n map((bookings) => {\n const date = this.dateTz.startOfValue('day');\n /**\n * Before the dateTz refactor timePeriodsIntersect would show bookings on the wrong day\n * because this.dateTz did not have the building timezone\n */\n return bookings.filter((booking) => {\n const ignore = booking.is_recurrent && booking.recurrence_type === 'master';\n return (\n !ignore &&\n // this.spaces.find((space: Space) => space.email === booking.room.email) &&\n // Check if any room in booking.multi_rooms satisfies the condition with any space in this.spaces\n booking.multi_rooms.some(room => \n this.spaces.find((space: Space) => space.email === room.email)\n ) &&\n timePeriodsIntersect(\n date.ms,\n date.endOfValue('day').ms,\n booking.startDateTz.ms,\n booking.endDateTz.ms\n )\n );\n });\n })\n );\n\n /** Display string for the set date */\n public get date_display(): string {\n return this.dateTz.formatDate('EEE, dd MMM yyyy');\n }\n\n constructor(private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.dateTz) {\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.dateTz.building_tz })\n this.isToday = this.dateTz.isSameDate(now, 'day');\n }\n if (changes.spaces) {\n this.timeout('changed', () => this._booking_state_service.setFilters(this._booking_state_service.filters), 100);\n }\n }\n\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n}\n","
\n
{{ date_display }}
\n
Today
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
No events for {{ date_display }}
\n
\n
\n","import { Component, Input, ChangeDetectionStrategy, OnInit, ChangeDetectorRef} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\n@Component({\n selector: 'week-view-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewItemComponent implements OnInit{\n @Input() public event: Booking;\n\n public type: string = '';\n\n constructor(private _dialog: MatDialog) {}\n\n public ngOnInit() {\n this.type = this.event.getType();\n }\n\n /**\n * Open modal to view bookings details\n */\n public viewMeetingDetails() {\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: this.event.space,\n booking: this.event\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n })\n }\n}\n","\n
\n
{{ event.all_day ? 'All Day' : event.time_period }}
\n
\n \n \n
\n
\n
\n
\n \n
{{ event.organiser?.name }}
\n
\n
\n \n
\n {{ event.space?.local_name || event.local_room_name }}\n
\n
\n
\n \n
{{ event.attendees?.length || '0' }}
\n
\n
0\">\n \n
{{ event.company.length }}
\n
\n
\n\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class WeekViewTimelineComponent extends BaseDirective implements OnInit {\n /** Timestamp of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** Whether weekends are displayed */\n @Input() public weekends: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n /** List of dates to display */\n public dateListTz: DateTZ[] = [];\n /** List of spaces to display bookings for */\n public space_list: Space[] = [];\n\n constructor(private _spaces: SpacesService, private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingWeek();\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n });\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz || changes.weekends || changes.level || changes.space_type) {\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n /**\n * Generate list of dates to display\n * @param dateTz Currently selected date\n * @param weekends Whether weekends should be included\n */\n private generateDatesTz(dateTz: DateTZ, weekends: boolean = false): DateTZ[] {\n const list: DateTZ[] = [];\n // start of day takes midnight to the previous day issue\n let day = dateTz.addValue({ minutes: 5 }).startOfValue('day');\n let start = day.startOfValue('week');\n let end = start.endOfValue('week').addValue({ minutes: 15 });\n while (start.isBeforeDate(end)) {\n if ((start.dateWeekday !== 6 && start.dateWeekday !== 7) || weekends) {\n list.push(start);\n }\n start = start.addValue({ days: 1 });\n }\n\n return list;\n }\n \n}\n","
\n
\n \n
\n \n
\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Identity } from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { Booking, BookingsService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService, BuildingLevel } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AlertMode } from '@mckinsey-converge/ui';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { Subscription } from 'rxjs/internal/Subscription';\n\n@Component({\n selector: 'a-week-view',\n templateUrl: './week-view.component.html',\n styleUrls: ['./week-view.component.scss'],\n})\nexport class WeekViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** Whether weekends are displayed */\n public weekend: boolean;\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected level */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n public banner_mode = AlertMode.Error;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n public get building() {\n return this._org.building;\n }\n\n public has_access: boolean;\n private spaceTypesSubscription: Subscription;\n \n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n\n this._service.title = 'Week View';\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if(!this.has_access) return\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = (building.levels[0] || { id: '' }).id;\n this.updateLevel();\n }\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n this.levels.sort((a, b) => b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n }));\n\n //\n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'week_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n if (this.spaceTypesSubscription) {\n this.spaceTypesSubscription.unsubscribe();\n }\n }\n\n updateSpaceSelection(){\n this._service.set('active_type', this.active_type);\n }\n\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this._router?.url?.includes('/week-view') && this._router.navigate(['/week-view', this.active_level]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public hideBanner() {\n this.undo_action = null;\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._booking_state_service.attentToDelete(booking, action, true);\n this._service.get('undo').next(null);\n this.undo_action = null;\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n}\n","
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n 1\" appearance=\"outline\">\n \n \n {{ level?.name }}\n \n \n \n 1\" appearance=\"outline\">\n \n \n {{ type?.name }}\n \n \n \n \n Show Weekends\n \n
\n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { WeekViewComponent } from './week-view.component';\nimport { WeekViewTimelineComponent } from './timeline/timeline.component';\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { WeekViewDayDisplayComponent } from './day-display/day-display.component';\nimport { WeekViewItemComponent } from './day-display/item/item.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: WeekViewComponent },\n { path: ':level', component: WeekViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [WeekViewComponent, WeekViewTimelineComponent, WeekViewDayDisplayComponent, WeekViewItemComponent],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class WeekViewModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Building, CateringMenuService, CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { BehaviorSubject } from 'rxjs';\nimport { CateringStorage } from 'src/app/catering/catering.storage';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss']\n})\nexport class CateringComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Name of the page to display */\n public page: string;\n /** Filter string for searching */\n public search_str: string;\n /** Toggle for new category modal */\n public category: number = 0;\n /** Toggle for new package modal */\n public package: number = 0;\n /** Number of categories being displayed */\n public length: number;\n /** Order type to filter by */\n public order_type: string = '';\n\n public orderDetailsExpanded = new BehaviorSubject(false);\n\n public has_access: boolean;\n menuWithOthers: any[]=[];\n allCategories: any[] = [\n { display: 'All orders', value: '', meta: { childItems: [] } },\n { display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n { display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n ];\n otherCategories: any[];\n public isClosed: boolean = false;\n\n public selectedSort: { display: string; value: string; meta: {}; } = { display: 'All orders', value: '', meta: { childItems: [] } };\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService,\n private cateringStorage: CateringStorage,\n private _menu: CateringMenuService,\n ) {\n super();\n this.orderDetailsExpanded.next(cateringStorage.orderDetails);\n }\n\n\n public ngOnInit(): void {\n\n\n\n this.subscription('orderDetailsExpand', this.orderDetailsExpanded.subscribe(value => {\n this.cateringStorage.orderDetails = value;\n }));\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.category = 0;\n this._service.title = 'Catering';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('page')) {\n this.page = params.get('page');\n }\n })\n );\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id }\n });\n })\n );\n });\n\n\n\n }\n\n\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n\n\n public mainCategorySelected(event, sortingValue) {\n if(!event.target.classList.contains('child')) {\n this.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n }\n\t}\n public selectSubcategory(event, sortingValue) {\n\t\tthis.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n\t}\n\n public loadAllCategory() {\n\n // this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n // this.length.emit(this.catering_menu.length);\n const filtered_menu = this.filter(this.catering_menu);\n\n this.otherCategories = filtered_menu.filter(mailEl => {\n\n var isThere = mailEl.items.filter(subEl => {\n if(subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\") {\n\n this.menuWithOthers.push({ value: subEl.name.toLowerCase(), display: subEl.name, meta: { parent: mailEl.name.toLowerCase() } })\n }\n return subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\";\n } );\n return !!isThere.length;\n });\n this.otherCategories.map(el => this.allCategories.push({ display: el.name, value: el.name.toLowerCase(), meta: { childItems: [] } }) );\n\n this.menuWithOthers.forEach(el => {\n this.allCategories.forEach(e => {\n if(e.value === el.meta.parent){\n e.meta['childItems'].push(el);\n }\n \t})\n });\n\n\n // console.log(this.allCategories);\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadAllCategory()\n );\n // this.loading = false;\n }\n );\n }\n\n\n\n\n public get timezone() {\n return this._org.building.timezone;\n }\n\n}\n","
\n\t\n\t
\n\t\t\t\n\t
\n\t
\n\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{{selectedSort.display}}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
{{mainCaterory.display}}
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tOrder Details\n\t\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

Catering Orders

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tView catering orders and their statuses upon arrival\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n Route,\n RouterModule\n} from '@angular/router';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport { CateringComponent } from './catering.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { CateringOrdersComponent } from './orders/orders.component';\nimport { CateringMenuComponent } from './menu/menu.component';\nimport { CateringMenuItemListComponent } from './menu/item-list/item-list.component';\nimport { CateringCategoryModalComponent } from './overlays/category-modal/category-modal.component';\nimport { CateringGroupModalComponent } from './overlays/group-modal/group-modal.component';\nimport { CateringItemModalComponent } from './overlays/item-modal/item-modal.component';\nimport { CateringOrdersItemComponent } from './orders/item/item.component';\nimport { OrderDetailsModalComponent } from './overlays/order-details-modal/order-details-modal.component';\nimport { OrderDetailsItemsComponent } from './overlays/order-details-modal/items/items.component';\nimport { OrderBookingDetailsComponent } from './overlays/order-details-modal/booking-details/booking-details.component';\nimport { OrderDetailsNotesComponent } from './overlays/order-details-modal/messages/messages.component';\nimport { CateringStorage } from './catering.storage';\nimport { CateringMenuOrderComponent } from './menu/item/item.component';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { BookingsModule } from '../bookings/bookings.module';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: CateringComponent },\n { path: ':page', component: CateringComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n CateringComponent,\n CateringOrdersComponent,\n CateringMenuComponent,\n CateringMenuItemListComponent,\n CateringCategoryModalComponent,\n CateringGroupModalComponent,\n CateringItemModalComponent,\n CateringOrdersItemComponent,\n OrderDetailsModalComponent,\n OrderDetailsItemsComponent,\n OrderBookingDetailsComponent,\n OrderDetailsNotesComponent,\n CateringMenuOrderComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n LegacyOverlaysModule,\n BaseModule,\n BookingsModule,\n UiModule\n ],\n providers: [CateringStorage],\n exports: [BaseModule]\n})\nexport class CateringModule {\n}\n","import { LocalStorageWrapper } from '@mckinsey-converge/storage';\n\nexport class CateringStorage extends LocalStorageWrapper {\n\n private static orderDetailsKey = 'order-details';\n\n constructor() {\n super('CATERING');\n }\n\n public set orderDetails(value: boolean) {\n this.setValue(CateringStorage.orderDetailsKey, value + '');\n }\n\n public get orderDetails(): boolean {\n const value = this.getValue(CateringStorage.orderDetailsKey);\n return value === 'true';\n }\n\n public removeOrderDetails() {\n this.removeValue(CateringStorage.orderDetailsKey);\n }\n}\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu-item-list',\n templateUrl: './item-list.component.html',\n styleUrls: ['./item-list.component.scss'],\n})\nexport class CateringMenuItemListComponent extends BaseDirective implements OnChanges {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Toggle for new groups */\n @Input() public package: number;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _dialog: MatDialog, private _org: OrganisationService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.package && this.package) {\n this.openGroupModal();\n }\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({\n parent_id: this.category.id,\n zones: [this.building.id],\n });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: this.category },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'category_modal',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.category.items.findIndex(\n (item) => event.metadata.id === item.id\n );\n if (index >= 0) {\n (this.category.items as any[]).splice(index, 1, event.metadata);\n } else {\n (this.category.items as any[]).push(event.metadata);\n }\n }\n })\n );\n }\n}\n","
\n \n
\n \n
\n
\n
\n\n
\n
\n \n
\n
No packages or sub-categories for {{ category.name }}
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { CateringComponent } from '../../catering.component';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { CateringItemModalComponent } from '../../overlays/item-modal/item-modal.component';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class CateringMenuOrderComponent extends BaseDirective {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Parent of the item being displayed */\n @Input() public parent: CateringCategory;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n public get symbol(): string {\n return this.building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _org: OrganisationService,\n private _menu_items: CateringItemsService,\n private _menu_categories: CateringCategoriesService\n ) {\n super();\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({ parent_id: this.item.id, zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: group.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(group, event.metadata);\n }\n })\n );\n }\n\n public openItemModal(item?: CateringItem) {\n /* istanbul ignore else */\n if (!item) {\n item = new CateringItem({ parent_id: this.item.id });\n }\n const ref = this._dialog.open(CateringItemModalComponent, {\n data: { item, parent: item.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(item, event.metadata);\n }\n })\n );\n }\n\n private updateItemList(old_item: CateringItem | CateringCategory, new_item: HashMap) {\n const item =\n old_item instanceof CateringCategory\n ? new CateringCategory(new_item)\n : new CateringItem(new_item);\n if (old_item.id) {\n const index = this.parent.items.findIndex((itm) => itm.id === old_item.id);\n (this.parent.items as any[]).splice(index, 1, item);\n (this.parent as any).items = [...this.parent.items];\n } else {\n (this.item.items as any[]).push(item);\n }\n }\n\n public deleteItem() {\n const type =\n this.item.is_category\n ? this.item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item';\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: `Delete catering ${type}`,\n content: `Are you sure you want to delete the catering ${type} \"${\n this.item.name\n }\"?
${\n this.item instanceof CateringCategory\n ? 'Any children items or groups will be immediately deleted'\n : ''\n }`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${type}...`;\n let e = null;\n let service =\n this.item.is_category\n ? this._menu_categories\n : this._menu_items;\n await service.delete(this.item.id).catch((err) => e = err || 'Error');\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n } else {\n this._service.notifyError(`Error deleting ${type}.`);\n }\n }\n });\n }\n}\n","
\n
\n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n\n \n \n \n \n \n
\n \n
\n Edit\n {{\n item.items.length || item.is_category\n ? subitem\n ? 'Group'\n : item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item'\n }}\n
\n
\n \n \n
\n","import { Component, OnInit, Input, SimpleChanges, EventEmitter, Output } from '@angular/core';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringCategoryModalComponent } from '../overlays/category-modal/category-modal.component';\nimport { HashMap, DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class CateringMenuComponent extends BaseDirective implements OnInit {\n /** Filter string for catering items */\n @Input() public search: string;\n /** Opens new category modal on change */\n @Input() public category: number;\n /** Opens new category modal on change */\n @Input() public package: number;\n /** Emitter for changes to the length of catering categories */\n @Output() public length = new EventEmitter();\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n /** Filtered list of top level catering categories */\n public filtered_menu: CateringCategory[] = [];\n /** Whether menu details are being loaded */\n public loading: boolean;\n /** Index of the active tab */\n public index: number = 0;\n /** Map of indexes to package open state */\n public state: HashMap = {};\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService, private _menu: CateringMenuService, private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.set('DELETED.menu', '');\n this.subscription('deleted', this._service.listen('DELETED.menu').subscribe(id => this.removeFromMenu(id)));\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe((_) => {\n this.index = 0;\n this.catering_menu = [];\n this.filtered_menu = [];\n this.loadCateringMenu();\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.search) {\n this.filtered_menu = this.filter(this.catering_menu);\n }\n if (changes.category && this.category) {\n this.openCategoryModal();\n }\n if (changes.package) {\n this.state[this.index] = this.package;\n }\n }\n\n public openCategoryModal(category?: CateringCategory) {\n /* istanbul ignore else */\n if (!category) {\n category = new CateringCategory({ zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringCategoryModalComponent, { \n data: { category }, \n autoFocus: false,\n backdropClass: 'mck-modal-backdrop', \n });\n this.subscription('category_modal', ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.catering_menu.findIndex(item => event.metadata.id === item.id);\n if (index >= 0) {\n this.catering_menu.splice(index, 1, event.metadata);\n this.index = index;\n } else {\n this.index = this.catering_menu.length;\n this.catering_menu.push(event.metadata);\n }\n }\n }));\n }\n\n /**\n * Remove item from the menu\n * @param id ID of the item to remove\n * @param list Menu items and categories\n */\n private removeFromMenu(id: string, list: CateringCategory[] = this.catering_menu, depth: number = 0) {\n if (list.length === 0 || depth > 4) { return false; }\n const found = list.findIndex(item => item.id === id);\n if (found >= 0) {\n list.splice(found, 1);\n return true;\n } else {\n for (const item of list) {\n if (this.removeFromMenu(id, item.items as any, depth + 1)) { return true; }\n }\n }\n return false;\n }\n\n private loadCateringMenu(): void {\n /* istanbul ignore else */\n if (this.building) {\n this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n this.length.emit(this.catering_menu.length);\n this.filtered_menu = this.filter(this.catering_menu);\n this.loading = false;\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadCateringMenu()\n );\n this.loading = false;\n }\n );\n }\n }\n\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n}\n","
\n \n \n \n \n
\n
{{category?.name}}
\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Loading menu for {{ building?.name }}
\n
\n
\n\n
\n
\n \n
\n
No menu categories for {{ building?.name }}
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\n\nimport {\n CateringOrder,\n CateringOrderStatus,\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Identity, HashMap } from '@mckinsey-converge/base';\nimport { MatDialog } from '@angular/material/dialog';\nimport { OrderDetailsModalComponent } from '../../overlays/order-details-modal/order-details-modal.component';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-catering-orders-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringOrdersItemComponent implements OnChanges {\n /** Catering order details to display */\n @Input() public order: CateringOrder;\n /** Search filter string */\n @Input() public search: string;\n /** Whether order items should be shown */\n @Input()\n public show_items: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** Whether status is being updated */\n public loading: boolean;\n /** Mapping of items to the option selections */\n public readonly item_details: HashMap<{ amount: number, details: string }> = {};\n\n public showIndividualItem : boolean = false;\n\n public get search_matches(): HashMap {\n const map = {};\n const filter = this.search.toLowerCase();\n this.order.items.forEach((item) => {\n map[item.id] = item.name.toLowerCase().indexOf(filter) >= 0;\n });\n return map;\n }\n\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status) || ({} as any);\n }\n\n public get space(): Space {\n return this._spaces.find(this.order.location_id);\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.active_status = this.order.status;\n this.updateItemDetails();\n }\n this.showIndividualItem = this.show_items;\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this.order.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this.order.id),\n 1,\n new CateringOrder({ ...this.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n }\n this.loading = false;\n }\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(): void {\n const dialogRef = this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: this.order,\n booking: this.order.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n private updateItemDetails() {\n for (const item of this.order.items) {\n if ((item as any).items) {\n const items = [];\n for (const sub_item of (item as any).items) {\n if (!sub_item.items.length && sub_item.amount) {\n items.push(sub_item)\n } else {\n for (const sub_sub_item of sub_item.items) {\n if (sub_sub_item.amount) {\n items.push(sub_sub_item)\n }\n }\n }\n }\n this.item_details[item.id] = {\n amount: items.length,\n details: `[${items.map(i => i.name).join(']\\n[')}]`\n };\n }\n }\n }\n\n public expandMore() {\n this.showIndividualItem = !this.showIndividualItem\n }\n}\n","
\n
\n
\n \n
\n
{{ order.deliver_at }}
\n
{{ space?.local_name || space?.simple_name || space?.settings?.room_name}}
\n
{{ order.booking?.organiser.name }}
\n
\n (K) Kitchen
\n (P) Pantry\n
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n\n
\n \n
\n \n
\n
\n
{{ item.name }}
\n \n {{ item_details[item.id]?.amount }}\n { item_details[item.id]?.amount, plural, =1 { Option } other { Options } }\n
\n
x {{ item.amount }}
\n
\n
\n \n \n\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { combineLatest, Subject } from 'rxjs';\nimport { filter, first, map } from 'rxjs/operators';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrderDetailsModalComponent } from '../overlays/order-details-modal/order-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'a-catering-orders',\n templateUrl: './orders.component.html',\n styleUrls: ['./orders.component.scss'],\n})\nexport class CateringOrdersComponent extends BaseDirective implements OnInit, OnChanges {\n /** Search filter string */\n @Input() public search: string = '';\n /** Currently selected date */\n @Input() public date: number;\n /** Type of order to show */\n @Input() public type: '' | 'Pantry' | 'Kitchen';\n\t\t@Input() public otherCategories: any[];\n @Input() public orderDetailsExpanded: boolean;\n\n\t\tpublic bookings = [];\n\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n /** List of catering orders for the selected date */\n public readonly orders = this._booking_state_service.filtered.pipe(\n map((bookings) => {\n let list: CateringOrder[] = [];\n bookings.forEach((booking, i) => {\n const catering = [...booking.catering]\n .map((order) => new CateringOrder({\n ...order,\n booking_date: booking.date,\n booking\n }));\n list = list.concat(catering);\n });\n list.sort((a, b) => a.booking_date - b.booking_date);\n return list;\n })\n );\n /** List of catering orders for the selected date */\n public filtered_orders = combineLatest([this.search$, this.orders]).pipe(\n map(([search, [...orders]]) => this.filter([...orders] || [], search || ''))\n );\n\n public display_orders: CateringOrder[] = [];\n /** Whether catering orders are loading */\n public readonly loading = this._booking_state_service.loading;\n\n /** Display string for the currenly selected date */\n public get date_display(): string {\n // R--- check if input can be changed since there is isSameDate calculations\n const date = new DateTZ({date: this.date});\n const now = DateNow(new Date())\n return now.isSameDate(date, 'day') ? 'Today' : date.formatDate('dd MMM yyyy');\n }\n\n /** Active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _dialog: MatDialog\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .pipe(filter((bld) => !!bld))\n .subscribe(() => {\n this._booking_state_service.setZone(this._org.building.id);\n })\n );\n this.subscription(\n 'orders',\n this.filtered_orders.subscribe((orders) => {\n this.display_orders = orders.sort((a ,b) => {\n const date = new DateTZ({date: a.booking.date}).formatDate('yyyy/MM/dd');\n\n return Date.parse(`${date} ${a.deliver_at_time.slice(0, -2)} ${a.deliver_at_time.slice(-2)}`) - Date.parse(`${date} ${b.deliver_at_time.slice(0, -2)} ${b.deliver_at_time.slice(-2)}`)\n }\n )})\n )\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view')) {\n const view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_order');\n const booking_details = localStorage.getItem('CONCIERGE.view_booking');\n /* istanbul ignore else */\n if (details) {\n const booking = new Booking(JSON.parse(booking_details));\n const order = new CateringOrder(JSON.parse(details));\n order.booking = booking;\n this.viewOrderDetails(order);\n localStorage.removeItem('CONCIERGE.view_order');\n localStorage.removeItem('CONCIERGE.view_booking');\n }\n }\n })\n );\n this.search$.next(this.search);\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.search || changes.type) {\n this.search$.next(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, order: CateringOrder) {\n return order ? order.id : index;\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(order: CateringOrder): void {\n this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: order,\n booking: order.booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /**\n * Filter list to find matching items\n * @param list List of orders to filter\n * @param search Filter string\n\t\t * TO DO : refactor ==>\n */\n private filter(list: CateringOrder[], search: string = '') {\n\t\t\t// Create a deep clone of the original list to avoid modifying the original data\n\t\t\tconst orders = cloneDeep(list);\n\t\t\t// Determine the filter criteria based on the search string or predefined type\n\t\t\tconst filter = search !== '' ? search.toLowerCase() : this.type ? this.type : '';\n\n\t\t\t// Check if 'otherCategories' is defined and if there are matching categories\n\t\t\tconst isOtherCategory = this.otherCategories ? this.otherCategories.filter(el => el.name.toLowerCase() === filter) : [];\n\t\t\tlet orderList = [];\n\n\t\t\t// If there are matching 'otherCategories', filter orders accordingly\n\t\t\tif(isOtherCategory.length) {\n\t\t\t\tconst result = this.filterOrdersByCategory([...orders], isOtherCategory[0]).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n\t\t\t\treturn orderList;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// No matching 'otherCategories', filter orders based on the general criteria\n\t\t\t\torderList = list;\n\t\t\t\tif(filter !== '') {\t\n\t\t\t\t\tconst result = this.filterOrdersByCategoryType([...orders], filter).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n // If no orders match the category type, attempt to search by item names, booker or room name\n if (orderList.length === 0) {\n const itemSearchResults = this.filterOrdersByItemName([...orders], filter);\n orderList = [...itemSearchResults];\n }\n\t\t\t\t}\n\t\t\t\treturn orderList;\n\t\t\t}\n }\n\n private filterOrdersByItemName(orders: CateringOrder[], search: string): CateringOrder[] {\n const filteredOrders: CateringOrder[] = [];\n \n orders.forEach(order => {\n const matchingItems = this.findItemsMatchingSearch(order.items, search);\n // Check if the order's location or organiser name matches the search\n const locationMatches = order.location?.toLowerCase().includes(search);\n const organiserMatches = order.booking?.organiser?.name?.toLowerCase().includes(search);\n \n if (matchingItems.length > 0 || locationMatches || organiserMatches) {\n const newOrder = new CateringOrder({\n ...order,\n items: matchingItems.length > 0 ? matchingItems : order.items,\n });\n filteredOrders.push(newOrder);\n }\n });\n \n return filteredOrders;\n }\n \n private findItemsMatchingSearch(items: any, search: string): any[] {\n const matchingItems = [];\n \n items.forEach(item => {\n let itemMatches = false;\n \n // Check if the item's name matches the search\n if (item.name?.toLowerCase().includes(search)) {\n itemMatches = true;\n }\n \n // Recursively check sub-items\n let subItems = [];\n if (item.items && item.items.length > 0) {\n subItems = this.findItemsMatchingSearch(item.items, search);\n if (subItems.length > 0) {\n itemMatches = true;\n }\n }\n \n if (itemMatches) {\n // If item matches, include it in the results\n const newItem = {\n ...item,\n items: subItems.length > 0 ? subItems : item.items,\n };\n matchingItems.push(newItem);\n }\n });\n return matchingItems;\n }\n\n\t\t// Function to filter orders based on specified categories\n\t\tfilterOrdersByCategory(orders, categories) {\n\t\t\tconst filteredOrders = [];\n\t\t\n\t\t\tfunction findMatchingOrders(order, categories) {\n\t\t\t\tif (order.items) {\n\t\t\t\t\tconst matchingItems = order.items.filter(item => {\n\t\t\t\t\t\tconst categoryName = findCategoryName(item.name, categories);\n\t\t\t\t\t\treturn categoryName !== null;\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif (matchingItems.length > 0) {\n\t\t\t\t\t\tfilteredOrders.push({ ...order, items: matchingItems });\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\torder.items.forEach(subOrder => findMatchingOrders(subOrder, categories));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\torders.forEach(order => findMatchingOrders(order, categories));\n\n\t\t\t// Function to find the category name for a given item name within the specified categories\n\t\t\tfunction findCategoryName(itemName, categories) {\n\t\t\t\tif(categories?.items !== undefined) {\n\t\t\t\t\tfor (const category of categories.items) {\n\t\t\t\t\t\tif (category.name === itemName) {\n\t\t\t\t\t\t\treturn category.name;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\tif (category.items) {\n\t\t\t\t\t\t\tconst subCategoryName = findCategoryName(itemName, category);\n\t\t\t\t\t\t\tif (subCategoryName) {\n\t\t\t\t\t\t\t\treturn subCategoryName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\n\t\t\treturn filteredOrders;\n\t\t}\n\n\t\t// Function to filter orders based on specified category type\n\t\tfilterOrdersByCategoryType(orders, categoryType) {\n\n\t\t\tconst filteredOrders = [];\n\n\t\t\tfunction filterMatchingItems(items) {\n return items\n .map(item => {\n if (item.catering_type === categoryType) {\n return { ...item };\n } else if (item.items) {\n const filteredSubItems = filterMatchingItems(item.items);\n if (filteredSubItems.length > 0) {\n return { ...item, items: filteredSubItems };\n } else {\n return null;\n }\n } else {\n return null;\n }\n })\n .filter(item => item !== null);\n }\n \n\t\t\torders.forEach(order => {\n\t\t\t\tconst filteredItems = filterMatchingItems([order]);\n\t\t\t\tif (filteredItems.length > 0) {\n\t\t\t\t\tfilteredOrders.push({ ...order , items: filteredItems[0].items});\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t\treturn filteredOrders;\n\t\t\t\n\t\t}\n\t\t\n}\n\nfunction flatten(arr) {\n\treturn arr.reduce(function (flat, toFlatten) {\n\t\treturn flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);\n\t}, []);\n}\n","
\n \n
\n
\n
\n
Time
\n
Location
\n
Host
\n
Package Types
\n
Status
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders for {{ date_display }}
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\nimport { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent, CONFIRM_METADATA } from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringCategoryModalData {\n /** Category to edit */\n category: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-category-modal',\n templateUrl: './category-modal.component.html',\n styleUrls: ['./category-modal.component.scss'],\n})\nexport class CateringCategoryModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n\n public get category(): CateringCategory {\n return this._data.category;\n }\n\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n public disabled: boolean = true\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringCategoryModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n admin_only: new FormControl(this.category.admin_only),\n restricted_from: new FormControl(this.category.restricted_from, Validators.pattern('[-_0-9]*')),\n });\n\n this.form.get('admin_only').setValue(this.form.get('admin_only').value ?? false);\n this.form.get('restricted_from').setValue(this.form.get('restricted_from').value ?? 0);\n\n if (!this.category.id) {\n this.disabled = false\n } else {\n this.form.valueChanges.subscribe(val => {\n for(let key of Object.keys(val)){\n if(this.category[key] !== val[key]){\n this.disabled = false\n return\n }\n this.disabled = true\n }\n });\n }\n\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Category`,\n content: `Are you sure you want to delete this Category? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting Category...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const category = new CateringCategory(this.category);\n const data = { ...category.toJSON(), ...this.form.value };\n \n /* Keep the \"stock\" status as true for main categories when adding or updating to avoid problems.\n The problem occurs when the top-level category is marked as \"out of stock\" if all items within it are out of stock. \n Then, if the items become available again, the top-level category stays marked as \"out of stock,\" even if subcategories and items are in stock.\n */\n data.out_of_stock = false; \n const request = category.id\n ? this._menu_categories.update(category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = category.items\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
{{ category.id ? 'Edit' : 'Add' }} category
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n Name*\n \n \n A valid name is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n Only numbers are allowed(0-999)\n \n
\n
\n \n Disable\n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, EventEmitter, Output } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\nimport { UploadManager } from '@acaprojects/ngx-uploads';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringGroupModalData {\n group: CateringCategory;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-group-modal',\n templateUrl: './group-modal.component.html',\n styleUrls: ['./group-modal.component.scss'],\n})\nexport class CateringGroupModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n { id: 'none', name: 'Other' },\n ];\n\n /** Category being edit/created */\n public get category(): CateringCategory {\n return this._data.group;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n /** Image URL for the category */\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n /** Whether category is a package */\n public get package(): boolean {\n return this.form.controls.package.value;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringGroupModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.category.price\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n catering_type: new FormControl(this.category.catering_type, [Validators.required]),\n package: new FormControl(this.category.package || false),\n must_select: new FormControl(this.category.must_select),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.category.minimum_quantity),\n maximum_quantity: new FormControl(this.category.maximum_quantity),\n order_anytime: new FormControl(this.category.order_anytime),\n out_of_stock: new FormControl(this.category.out_of_stock),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete ${this.category.package ? 'Package' : 'Sub-Category'}`,\n content: `Are you sure you want to delete this ${\n this.category.package ? 'Package' : 'Sub-Category'\n }? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${\n this.category.package ? 'Package' : 'Sub-Category'\n }...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = {\n ...(this.category instanceof CateringCategory\n ? this.category.toJSON()\n : this.category),\n ...this.form.value,\n parent_categories: [this.parent.id],\n };\n //if sub-category/item becomes non-package then mark it in stock \n data.out_of_stock = !data.package ? false : data.out_of_stock;\n data.price = data.unit_price;\n const request = this.category.id\n ? this._menu_categories.update(this.category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = this.category.items\n this.event.emit({ reason: 'done', metadata: new CateringCategory(item) });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
\n {{ category.id ? 'Edit' : 'Add' }} {{ package ? 'package' : 'sub-category' }}\n
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n \n
{{ parent.name }}
\n
\n
\n Package\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n \n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\nimport {\n CONFIRM_METADATA, ConfirmModalComponent,\n} from '@mckinsey-converge/legacy-overlays';\nimport { mergeCateringItemWithFormData } from '@mckinsey-converge/data-common';\n\nexport interface CateringItemModalData {\n item: CateringItem;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-item-modal',\n templateUrl: './item-modal.component.html',\n styleUrls: ['./item-modal.component.scss'],\n})\nexport class CateringItemModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n ];\n\n /** Category being edit/created */\n public get item(): CateringItem {\n return this._data.item;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_items: CateringItemsService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringItemModalData,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.item.price\n this.form = new FormGroup({\n name: new FormControl(this.item.name, [Validators.required]),\n description: new FormControl(this.item.description),\n catering_type: new FormControl(this.item.catering_type, [Validators.required]),\n supplier_cost: new FormControl(this.item.supplier_cost),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.item.minimum_quantity),\n maximum_quantity: new FormControl(this.item.maximum_quantity),\n order_anytime: new FormControl(this.item.order_anytime),\n out_of_stock: new FormControl(this.item.out_of_stock),\n allergy: new FormControl(this.item.allergy),\n parent_categories: new FormControl([this._data.parent.id]),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Item`,\n content: `Are you sure you want to delete this item?`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting item...`;\n let e = null;\n await this._menu_items.delete(this.item.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = mergeCateringItemWithFormData(this.item, this.form.value).toJSON();\n const request = this.item.id\n ? this._menu_items.update(this.item.id, data)\n : this._menu_items.add(data);\n request.then(\n (item) => {\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.item.id ? 'updating' : 'creating'} item. Error: ${\n err.message || err\n }`,\n ),\n );\n }\n }\n}\n","
\n
{{ item.id ? 'Edit' : 'Add' }} catering item
\n \n
\n\n
\n
\n
\n \n
{{ parent.name }}
\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-booking-details',\n templateUrl: './booking-details.component.html',\n styleUrls: ['./booking-details.component.scss'],\n})\nexport class OrderBookingDetailsComponent {\n /** Email of the order space */\n @Input() public space: Space;\n /** Booking details to display */\n @Input() public booking: Booking;\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Display startDateTZ and endDateTZ time only time */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mm a')}`;\n }\n\n /** Display startDateTZ time only time */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('h:mm a')}`;\n }\n\n /** Store booking details to be used in another component */\n public storeBooking() {\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(this.booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(this.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n}\n","
\n Meeting Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name }}\n
\n
\n
\n \n
\n {{ space?.name }}\n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ booking.attendees?.length || '0' }}({{ booking.expected_attendees[space?.email] || 0 }} expected)\n
\n
\n
\n\n View on Day View\n\n","import { Component, Input } from '@angular/core';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'order-details-items',\n templateUrl: './items.component.html',\n styleUrls: ['./items.component.scss'],\n})\nexport class OrderDetailsItemsComponent extends BaseDirective {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Whether order is being edited */\n public editing: boolean;\n /** Whether order is being updated */\n public loading: boolean;\n\n /** List of items in the order */\n public get items(): CateringCategory[] {\n return this.order.items as any;\n }\n\n constructor(\n private _service: ApplicationService, \n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,) {\n super();\n }\n\n public editOrder() {\n this.editing = true;\n }\n\n /** Handle changes to catering order */\n public async handleOrderEvent(order: CateringOrder) {\n /* istanbul ignore else */\n if (order) {\n const orders = [...this.booking.catering];\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n this.loading = true;\n const new_booking = new Booking({ ...this.booking.toJSON(), catering: orders });\n const booking = await this._bookings\n .save(new_booking)\n .catch((err) =>\n this._service.notifyError(\n `Error unable to update order. Error: ${err.message || err}`\n )\n );\n if (booking) {\n this._booking_state_service.replace(booking);\n this.booking = booking;\n this.order = order;\n this.editing = false;\n }\n this.loading = false;\n }\n }\n}\n","
\n {{ editing ? 'Edit Order' : 'Order Details' }}\n
\n
\n \n
\n
\n
{{ item.name }}
\n
x{{ item.amount }}
\n
\n \n \n
\n
{{ sub_item.name }}
\n \n \n
\n
{{ sub_sub_item.name }}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n
\n
\n\n\n
\n
\n \n
\n
\n No items in order\n
\n
\n
\n\n
\n
\n \n
\n
\n Updating order\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { UsersService, BookingNote } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-details-notes',\n templateUrl: './messages.component.html',\n styleUrls: ['./messages.component.scss'],\n})\nexport class OrderDetailsNotesComponent implements OnInit {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Emitter for changes to the active booking */\n @Output() public bookingChange = new EventEmitter();\n /** Contents of the new private note */\n public new_note: string;\n /** Whether a note is being added */\n public loading: boolean;\n\n /** List of notes for catering order space */\n public get notes(): BookingNote[] {\n const notes = this.booking.notes.filter((note) => {\n return (\n (note.type === 'catering' || note.type === 'catering-private') &&\n note.space === this.order.location_id &&\n (!note.order_id || note.order_id === this.order.id)\n );\n });\n notes.forEach((note) => {\n // Use the booking timezone to make the note date TZ aware since the native format is not.\n const date = new DateTZ({date: note.date, is_local_tz: false, building_tz: this.booking.timezone })\n note.time = date.formatDate('dd MMM, h:mma');\n });\n return notes;\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _users: UsersService\n ) {}\n\n ngOnInit(): void {}\n\n /**\n * Add note for catering order\n */\n public async addNote() {\n /* istanbul ignore else */\n if (this.booking && this.new_note) {\n const user = this._users.current;\n const notes = this.booking.notes;\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.booking.timezone })\n const date = now.startOfValue('minute');\n const new_notes = [\n ...notes,\n {\n type: 'catering-private',\n date: date.ms,\n author: user.name,\n order_id: this.order.id,\n space: this.order.location_id,\n message: this.new_note,\n time: date.formatDate('h:mma'),\n },\n ];\n const pending_booking = new Booking({ ...this.booking.toJSON(), notes: new_notes });\n this.loading = true;\n const new_booking: Booking = (await this._bookings\n .save(pending_booking)\n .catch((err) => {\n this._service.notifyError(\n `Failed to add note to order meeting. Error: ${err.message || err}`\n );\n this.loading = false;\n throw err;\n })) as any;\n this.booking = new_booking;\n if (new_booking) {\n this._booking_state.replace(new_booking);\n }\n this.order.booking = new_booking;\n this.bookingChange.emit(new_booking);\n this.loading = false;\n this.new_note = '';\n }\n }\n}\n","
\n Private Notes\n
\n
\n \n
\n
{{ item.message }}
\n
\n
{{ item.author }}
\n
\n
{{ item.time }}
\n
\n
\n
\n
\n
\n \n \n \n \n
\n \n
\n
\n\n
\n
\n \n
\n
\n No private notes for order\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { CateringOrder, CateringOrderStatus } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { SpacesService } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\nexport interface OrderDetailsModalData {\n /** Order to display details for */\n order: CateringOrder;\n /** Booking associated with catering order */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-order-details-modal',\n templateUrl: './order-details-modal.component.html',\n styleUrls: ['./order-details-modal.component.scss'],\n})\nexport class OrderDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether status is being updated */\n public loading: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** List of available order statuses */\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n public booking: Booking;\n\n /** Order to display */\n public get order(): CateringOrder {\n return this._data.order;\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status);\n }\n\n /** Space associated with the order */\n public get space(): Space {\n return this._spaces.find(this._data.order.location_id);\n }\n\n /** Details about the delivery time */\n public get delivery_date(): DateTZ {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time });\n }\n\n /** Details about the delivery_at time */\n public get delivery_at(): string {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time }).formatDate('h:mm a');\n }\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n @Inject(MAT_DIALOG_DATA) private _data: OrderDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.active_status = this._data.order.status;\n this.booking = new Booking(this._data.booking)\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this._data.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this._data.order.id),\n 1,\n new CateringOrder({ ...this._data.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking: any = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this._data.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n this.booking = updated_booking;\n }\n this.loading = false;\n\n }\n }\n}\n","\n\n
\n
\n
\n
{{ space?.name }} ({{ space?.local_name}})
\n
({{delivery_date?.ms | date:'mediumDate':timezone }}) To be delivered at {{ delivery_at }}
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'access-denied',\n templateUrl: './access-denied.component.html',\n styleUrls: ['./access-denied.component.scss']\n})\nexport class AccessDenied {\n\n constructor() {}\n\n}\n","
\n \n

Oooops - sorry! You don’t have access to this page.

\n

Please contact help desk or continue to Converge for room booking.

\n
\n","import { Component, OnInit } from '@angular/core';\n\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLinkInternal, ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss']\n})\nexport class SidebarComponent implements OnInit {\n\n /** Currently active building */\n public get active_building(): Building {\n return this._org.building;\n }\n public set active_building(building: Building) {\n this._org.building = building;\n }\n\n /** List of available menu items */\n public get menu_items(): ApplicationLinkInternal[] {\n return this._service.setting('app.general.menu.items') || [];\n }\n\n /** Logo for the application organisation */\n public get logo(): ApplicationIcon {\n return this._service.setting('app.logo_light');\n }\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings || [];\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService) {}\n\n ngOnInit(): void {}\n}\n","
\n {{ logo.content }}\n \n
\n
\n \n
\n
\n
\n \n
\n
{{ item.name }}
\n
\n \n
\n
1\">\n \n \n \n {{ building.name }}\n \n \n \n
\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { BookingStateService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, getTimezoneOffsetString, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-topbar-header',\n templateUrl: './topbar-header.component.html',\n styleUrls: ['./topbar-header.component.scss'],\n})\nexport class TopbarHeaderComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Currently building timezone */\n @Input() public timezone: string;\n /** Currently active zone */\n @Input() public zone: string;\n /** Whether to show new item button */\n @Input() public show_add_item = false;\n /** Whether to show the events for the active month */\n @Input() public show_events: boolean = false;\n /** Emitter for changes selected date */\n @Output() public dateChangeTz = new EventEmitter();\n /** Emitter for add item button */\n @Output() public event = new EventEmitter();\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n public event_map: { [date: string]: number };\n\n public fromDateTz = DateNow().subtractValue({ months: 6 });\n\n public get now() {\n return DateNow();\n }\n\n /** Display string for the currently selected date */\n public get tz(): string {\n return getTimezoneOffsetString(this.timezone_value);\n }\n\n public get timezone_value() {\n return localStorage.getItem('CONCIERGE.timezone') || this.timezone || this.now.building_tz;\n }\n\n public get is_today() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone_value,\n }),\n 'day'\n );\n }\n\n constructor(private _bookings: BookingStateService, private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // CONCIERGE.date: Get the localstorage date and timezone when changing pages.\n const date = +localStorage.getItem('CONCIERGE.date') || this.now.ms;\n \n /* istanbul ignore else */\n if (date && (date !== this.dateTz.ms || this.timezone_value !== this.dateTz.building_tz)) {\n // CONCIERGE.date Reapply the localstorage date and timezone when changing pages.\n this.timeout(\n 'init',\n () => {\n this.dateTz = new DateTZ({\n date,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n this.updateDate();\n },\n 10\n );\n }\n this.subscription(\n 'events',\n this._bookings._noOfMeetings.subscribe((list) => {\n this.event_map = {};\n this.event_map = list[0];\n })\n );\n }\n\n public noOfCount(event) {\n // Disabling bellow until find more reliable way to call as it is been called multiple times on hover/click\n // this._bookings.getDailyMeetingCount();\n // event.stopPropogation();\n }\n\n /**\n * Change the selected date with the arrow controls\n *\n */\n public changeDate(value: number) {\n let date = new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n date = date.addValue({ days: value });\n this.dateTz = date;\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n /**\n * Change the selected date with the calendar widget\n *\n */\n public applyDatePickerValue(dateInputTz: DateTZ) {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(dateInputTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n this.closeDatePicker();\n }\n\n public updateDate() {\n this.timeout('update_date', () => this._bookings.setDate(this.dateTz));\n }\n\n /** Reset date to the current date */\n public resetDate() {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(this.now).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n public closeDatePicker() {\n this.updateDate();\n }\n\n /** New Item button click */\n public newItem(): void {\n this.event.emit('new_item');\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n

Today

\n

{{ dateTz.ms | date: 'mediumDate':tz }}

\n
\n \n
\n
\n \n \n
\n
\n
\n","import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { first } from 'rxjs/operators';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n})\nexport class LoginComponent extends BaseDirective implements OnInit {\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n /** Whether the user credentials are being checked */\n public loading: boolean;\n /** Form fields for the login form */\n public form: FormGroup;\n\n /** Password field element */\n @ViewChild('pass_field', { static: true }) private pwd_field: ElementRef;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n this.loading = true;\n this.form = new FormGroup({\n username: new FormControl('', [Validators.required]),\n password: new FormControl('', [Validators.required]),\n });\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.loading = false;\n this.logo = this._service.setting('app.logo_light') || { type: 'icon' };\n });\n }\n\n /** Perform user login */\n public login() {\n this.loading = true;\n const form = this.form.value;\n this._users\n .login(\n {\n username: form.username,\n password: form.password,\n },\n { form: true }\n )\n .then(\n () => this.loading = false,\n () => {\n this.loading = false;\n this.form.controls.password.setErrors({ check: true });\n }\n );\n }\n}\n","
\n
\n
\n
\n
\n {{ logo.content }}\n \n
\n
\n
\n \n
\n \n Username:\n \n \n \n Username is required\n \n
\n
\n \n Password:\n \n \n \n Invalid username or password\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Converge is loading
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { first } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ReportDetails } from '../reports.component';\nimport { Report } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ReportsService } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-report-display',\n templateUrl: './report-display.component.html',\n styleUrls: ['./report-display.component.scss'],\n})\nexport class ReportDisplayComponent implements OnInit, OnChanges {\n /** Details about the report being requested */\n @Input() public report: ReportDetails;\n /** Start date for the generated report */\n public start_date: number;\n /** End date for the generated report */\n public end_date: number;\n /** List of report data entries */\n public report_data: Report;\n /** Whether report data is loading */\n public loading: boolean;\n /** List of selected locations */\n public locations: Building[] = [{} as any];\n /** Multiple Locations? */\n public multipleLocations: boolean = false;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n @Output() locationChanged = new EventEmitter();\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _reports: ReportsService,\n private _router: Router\n ) {}\n\n public ngOnInit(): void {\n // R--- TODO no prams present for timezone\n const now = DateNow();\n this.start_date = now.startOfValue('day').ms;\n this.end_date = now.endOfValue('day').ms;\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.locations = [this._org.building];\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.report) {\n this.report_data = null;\n }\n if (this.locations.length > 1) {\n this.locations = [this.locations[0]];\n }\n }\n\n /* function runs on location change from on-page dropdown(not from sidebar) */\n public onLocationChange(data: any) {\n this.locationChanged.emit(this.locations[0]);\n }\n\n /**\n * Ensure Space Time Continuum\n */\n public checkDates(new_date: number) {\n if (this.start_date > this.end_date) {\n // R--- TODO no prams present for timezone\n const date = new DateTZ({ date: new_date });\n this.start_date = date.startOfValue('day').ms;\n this.end_date = date.endOfValue('day').ms;\n }\n }\n\n /**\n * Generate report\n */\n public generateReport() {\n /* istanbul ignore else */\n if (this.report) {\n this.loading = true;\n this.report_data = null;\n const date = toMiddayUTC(new DateTZ({ date: this.start_date })).toZone(\n this.locations[0]?.timezone\n );\n const end_date = toMiddayUTC(new DateTZ({ date: this.end_date })).toZone(\n this.locations[0]?.timezone\n );\n this._reports\n .show(this.report.id, {\n date: date.formatDate('yyyy-MM-dd'),\n start_date: date.startOfValue('day').seconds,\n end_date: end_date.endOfValue('day').seconds,\n zone_ids: this.locations.map((i) => i.id).join(','),\n })\n .then(\n (report) => {\n const zone_ids = this.locations.map((i) => i.id).join(',');\n if (this.report.id === 'day' && this.locations[0]?.city !== 'Dallas') {\n this.loading = false;\n this._service.notifyError(\n `Day View is currently available for Dallas only`\n );\n } else {\n this.loading = false;\n this.report_data = new Report({ ...report, type: this.report.id });\n }\n },\n (err) => {\n this.loading = false;\n this._service.notifyError(\n `Error generating report. Error: ${err.message || err}`\n );\n }\n );\n }\n }\n\n public downloadReport() {\n /* istanbul ignore else */\n if (this.report_data) {\n const date = new DateTZ({ date: this.start_date });\n this.report_data.downloadCSV(\n `${this.report.name.split(' ').join('_').toLowerCase()}+${date.formatDate(\n 'yyyy-MM-dd'\n )}.csv`\n );\n }\n }\n}\n","
\n
\n
\n \n \n \n
\n
to
\n
\n \n \n
\n
\n
\n 1\">\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
\n {{\n report_data ? 'No entries for selected date' : 'Press generate above to view report'\n }}\n
\n
\n
\n\n
\n
\n \n
\n
Loading report...
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ReportDetails } from '../reports.component';\n\n\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'newlineToBR',\n pure: true // Set pure to true to ensure it's a stateless pipe\n})\nexport class NewlineToBRPipe implements PipeTransform {\n transform(value: string): string {\n if (typeof value !== 'string' || !value.includes('\\n')) {\n // If the value is not a string or doesn't contain newline characters, return it as is\n return value;\n }\n return value.replace(/\\n/g, '
').replace(/\\s/g, \"\\u00A0\");\n }\n}\n\n@Component({\n selector: 'a-report-table',\n templateUrl: './report-table.component.html',\n styleUrls: ['./report-table.component.scss'],\n})\nexport class ReportTableComponent implements OnChanges {\n /** List of report table data */\n @Input() public list: HashMap[] = [];\n /** Map of details for report */\n @Input() public details: ReportDetails;\n\n public fields: string[] = [];\n public sortField: string = '';\n public sortOrder: 'asc' | 'desc' = 'asc';\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.list && this.list && this.list.length) {\n this.fields = Object.keys(this.list[0]).filter(i => this.details.hide_fields.indexOf(i) < 0);\n }\n }\n\n public toggleSort(field: string) {\n if (this.isSortingDisabled(field)) {\n return; // Disable sorting for specific fields\n }\n\n if (this.sortField === field) {\n this.sortOrder = this.sortOrder === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortField = field;\n this.sortOrder = 'asc';\n }\n\n this.sortTable(field);\n }\n\n private sortTable(field: string) {\n const sortedList = [...this.list].sort((a, b) => {\n let aValue = a[field];\n let bValue = b[field];\n\n const dateWithTimeRegex = /\\d{1,2} \\w{3,4} \\d{4} -\\s+\\d{1,2}:\\d{2} (AM|PM)/;\n\n if (\n typeof aValue === 'string' &&\n dateWithTimeRegex.test(aValue) &&\n typeof bValue === 'string' &&\n dateWithTimeRegex.test(bValue)\n ) {\n aValue = this.parseDateString(aValue);\n bValue = this.parseDateString(bValue);\n }\n\n if (aValue < bValue) {\n return this.sortOrder === 'asc' ? -1 : 1;\n } else if (aValue > bValue) {\n return this.sortOrder === 'asc' ? 1 : -1;\n } else {\n return 0;\n }\n });\n\n this.list = sortedList;\n }\n\n private parseDateString(dateString: string): Date {\n const [datePart, timePart] = dateString.split(' - ');\n const formattedDate = `${datePart} ${timePart}`;\n return new Date(formattedDate);\n }\n\n public isSortingDisabled(field: string): boolean {\n // Disable sorting for specific fields\n const disabledFields = ['recurr', 'cancelled_by', 'all_day'];\n return disabledFields.includes(field);\n }\n}\n","\n \n \n \n \n \n \n\n \n \n
\n {{ key | replace }} \n \n \"Unsorted\"\n \"Ascending\"\n \"Descending\"\n \n \n {{ element[key] }}\n \n \n \n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { ApplicationIcon, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ReportDetails {\n /** ID associated with the report */\n id: string;\n /** Name of the report */\n name: string;\n /** Shortened name of the report */\n short_name: string;\n /** More details about the report */\n description: string;\n /** Fields to hide on the UI */\n hide_fields: string[];\n /** Icon to display for report */\n icon: ApplicationIcon;\n /** Multiselect Locations */\n multi_locations: boolean;\n}\n\n@Component({\n selector: 'a-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss'],\n})\nexport class ReportsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active report */\n public active_report: string;\n\n public has_access: boolean;\n\n public location: any;\n\n /** List of available reports to display */\n public reports: ReportDetails[] = [\n {\n id: 'bookings',\n name: 'Aggregate Bookings Report',\n short_name: 'Bookings',\n description: 'Generate comprehensive reports on various aspects of bookings',\n hide_fields: ['room_email'],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: false,\n },\n {\n id: 'catering',\n name: 'Aggregate Charge Back Report',\n short_name: 'Catering',\n description: 'View confirmed catering report or mark up unconfirmed catering',\n hide_fields: ['room_email'],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'audit',\n name: 'Audit',\n short_name: 'audit',\n description: '',\n hide_fields: [],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: true,\n }\n ];\n\n public get the_report(): ReportDetails {\n return this.reports.find((report) => report.id === this.active_report);\n }\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Reports';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('report')) {\n this.active_report = params.get('report');\n }\n })\n );\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.location = this._org.building;\n this.has_access = building ? true : false;\n\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n }\n })\n );\n });\n }\n\n public updateReport() {\n this._router.navigate(['/reports', this.active_report]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public onLocationChanged(location: any) {\n this.location = location;\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n this._router.navigate([`/reports/${this.active_report}`]);\n } else {\n // add day view to reports array\n this.reports = [\n ...this.reports,\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n ];\n }\n }\n}\n","
\n \n
\n \n
\n
\n
\n 1\" appearance=\"outline\">\n \n \n {{ report.name }}\n \n \n \n
\n
\n
\n \n
\n
\n \n
\n

{{ report.short_name }}

\n
\n
{{ report.description }}
\n \n
\n
\n \n
\n
\n
\n
\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Route, RouterModule } from '@angular/router';\n\nimport { ReportsComponent } from './reports.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { ReportDisplayComponent } from './report-display/report-display.component';\nimport { ReportTableComponent, NewlineToBRPipe} from './report-table/report-table.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: ReportsComponent },\n { path: ':report', component: ReportsComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [ReportsComponent, ReportDisplayComponent, ReportTableComponent, NewlineToBRPipe],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule]\n})\nexport class ReportsModule { }\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-bulk-qr-overlay',\n templateUrl: './bulk-qr-overlay.component.html',\n styleUrls: ['./bulk-qr-overlay.component.scss'],\n})\nexport class BulkQrOverlayComponent implements OnInit {\n @Input() itemsCheckboxes: any[];\n @Input() qrCodeUrls: any[];\n @Output() selectItemChange: EventEmitter = new EventEmitter();\n @Output() selectAllChange: EventEmitter = new EventEmitter();\n @Input() isOpen: boolean;\n @Input() selectAll: boolean;\n @Output() downloadQrCodeRequested: EventEmitter = new EventEmitter();\n @Output() cancelClick: EventEmitter = new EventEmitter();\n @Input() newArr: any[];\n @Input() allLevels: any;\n @Output() qrCodeUrlsChange: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public onSubmit(str: string) {\n this.qrCodeUrlsChange.emit(this.qrCodeUrls); // Emit the updated qrCodeUrls array\n this.downloadQrCodeRequested.emit();\n if (str === 'room') {\n this.qrTabClick({ index: 0 });\n } else if (str === 'level') {\n this.qrTabClick({ index: 1 });\n }\n }\n\n public onCancel(str: string) {\n // Handle cancel button logic for rooms here (reset the form)\n if (str === 'level') {\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...{ checked: false }, ...{ isLevel: false } };\n });\n }\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.selectAll = false;\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.cancelClick.emit();\n }\n\n public onSelectAllChange(str: string) {\n for (const checkbox of this.itemsCheckboxes) {\n checkbox.checked = this.selectAll;\n }\n if (str === 'room') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, roomname, level }) => ({\n url: window.location.origin + '/staff/#/home?id=' + id,\n roomname: roomname,\n level: level\n }));\n } else if (str === 'level') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, building_id, name }) => ({\n url: window.location.origin + '/staff/#/home?zone_id=' + building_id + '&floor=' + id,\n name: name,\n }));\n }\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n\n public onSelectItemChange(e: any, item: any) {\n if (e.checked && !item.isLevel) {\n //If room selected, push it to qrCodeUrls array\n let checkedRoomObj = {\n url: window.location.origin + '/staff/#/home?id=' + item.id,\n roomname: item.roomname,\n level: item.level,\n };\n this.qrCodeUrls.push(checkedRoomObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else if (e.checked && item.isLevel) {\n //If levels selected, push it to qrCodeUrls array\n let checkedLevelObj = {\n url:\n window.location.origin +\n '/staff/#/home?zone_id=' +\n item.building_id +\n '&floor=' +\n item.id,\n name: item.name,\n };\n this.qrCodeUrls.push(checkedLevelObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else {\n // If unselected, find the index of the checked Obj in qrCodeUrls array based on room/level name\n const index = item.isLevel\n ? this.qrCodeUrls.findIndex((obj) => obj.name === item.name)\n : this.qrCodeUrls.findIndex((obj) => obj.roomname === item.roomname);\n // If the object is found, remove it from the array using splice\n if (index !== -1) {\n this.qrCodeUrls.splice(index, 1);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n }\n }\n\n isAnyItemSelected(): boolean {\n return this.itemsCheckboxes.some((checkbox) => checkbox.checked);\n }\n\n public qrTabClick(e: any) {\n let checkedFlag = { checked: false };\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.itemsCheckboxes = [];\n this.selectAll = false;\n\n if (e.index === 0) {\n //rooms tab\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: false } };\n });\n } else if (e.index === 1) {\n //levels tab\n Object.assign(this.itemsCheckboxes, this.allLevels);\n this.itemsCheckboxes = this.itemsCheckboxes.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: true } };\n });\n }\n }\n}\n","\n
Print QR codes
\n\n\n \n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n Inject,\n} from '@angular/core';\nimport { BaseDirective, DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService, OrganisationService, SpacesService } from '@mckinsey-converge/data-common';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ResizeService, ReadLocalPicService } from '../services/';\nimport { RequiredFileType, RoomPhotoDiamension } from '../util/room-admin-utility';\nimport { HttpEventType, HttpHeaders, HttpClient} from '@angular/common/http';\nimport * as cloneDeep from 'lodash/cloneDeep';\n// import { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\nimport { of, Observable, forkJoin } from \"rxjs\";\nimport { catchError, tap, toArray } from 'rxjs/operators';\nimport { ComposerService } from '@placeos/composer';\nimport { IconComponent } from '@mckinsey-converge/legacy-ui';\n\n@Component({\n selector: 'app-manage-photos',\n templateUrl: './manage-photos.component.html',\n styleUrls: ['./manage-photos.component.scss'],\n\t\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManagePhotosComponent extends BaseDirective implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n\n\t\t public canvas: HTMLCanvasElement;\n\t\t public context: any;\n\t\t public imageInitial = null;\n\t\t public imageToModify = null;\n\n\t\t public photoArray: Array = []; // array hold images to display (uploaded or to be upload)\n\t\t public photoUploadArray: Array = []; // array hold image to upload\n\n\t\t public uploadProgress:number;\n\t\t public uploadError: boolean = false;\n\t\t public uploadingStatus: string = 'Uploading...';\n\t\t public room: any;\n\t\t public resizedFiles = [];\n\t\t public requiredFileType = RequiredFileType;\n\t\t public count: any = 0;\n\t\t public total: number = 0;\n\t\t public failedNo: string;\n\t\t// isImageToModify: boolean;\n\n\n constructor(\n\t\t\tprivate _composer: ComposerService,\n\t\t\t@Inject(MAT_DIALOG_DATA) private _data: any,\n\t\t\tpublic resizeService: ResizeService,\n\t\t\tprivate readLocalPicService: ReadLocalPicService,\n\t\t\tprivate _spaces: SpacesService,\n\t\t\tprivate cdRef: ChangeDetectorRef,\n\t\t\tprivate _service: ApplicationService,\n\t\t\tprivate httpClient?: HttpClient,\n\t\t\t) {\n\t\t\tsuper();\n }\n \n\n public ngOnInit() {\n \tthis.photoArray = cloneDeep(this._data?.photos);\n\t\tthis.room = this._data?.room\n }\n\n\t\t\n\n\t\tpublic\tonFileSelected (event , indexToReplace?) {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.context = this.canvas.getContext('2d');\n\t\t\tconst ext = RequiredFileType.split(',');\n\t\t\tconst files = event instanceof Array ? event : [...new Set(event.target.files)].filter((f:File) => ext.includes(f.type));\n\t\t\tconst unusedIdx = indexToReplace!==undefined ? 1 : (3 - this.photoArray.length);\n\t\t\tfiles.splice(0,unusedIdx).forEach( file => {\n\n\t\t\t\tthis.readLocalPicService.readFileInput(file).then((base64Img) => {\n\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\tasync function (that) {\n\n\t\t\t\t\t\t\tawait that.resizeService.resizeImage(base64Img, {width: RoomPhotoDiamension.width, height: RoomPhotoDiamension.height, outputFormat: 'image/png', })\n\t\t\t\t\t\t\t\t\t\t.then(function (imgResized) {\n\n\t\t\t\t\t\t\t\t\t\t\tthat.resizeService.createImage(imgResized).then(function (image) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.clearRect(0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.width = image.width;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.height = image.height;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.drawImage( image, 0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement = that.canvas.toDataURL('image/png');\n\t\t\t\t\t\t\t\t\t\t\t\tif(indexToReplace!==undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst index = that.photoArray.length+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tthat.cdRef.detectChanges();\n\n\t\t\t\t\t\t\t\t\t\t\t\t// indexToReplace!==undefined ? that.photoArray.splice(indexToReplace, 1, { path : dataURL} ) : that.photoArray.push({ path: dataURL });\n\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while creating image : ', error);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while resizing image : ', error);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}, 0, this );\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.log('ERROR while Read local pic :', error);\n\t\t\t\t});\n\n\t\t\t})\n\n\t\t}\n\n\n\t\tupload() {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.uploadProgress = 1;\n\t\t\tlet obs: Observable[] = [];\n\t\t\tthis.count = 0;\n\t\t\tthis.total = this.photoUploadArray.length;\n\t\t\t\n\t\t\t// for (var i = 0; i < this.photoUploadArray.length; i++)\n\t\t\tthis.photoUploadArray.forEach(( img, i) =>{ \n\t\t\t\tconst formData = new FormData();\n\t\t\t\tconst file = this.readLocalPicService.b64toFile(img.path);\n\n\t\t\t\tformData.append( \"file\", file, `${this.room.email.split('@')[0]}-part-${img.index}.png`);\n\t\t\t\t\n\t\t\t\tobs.push(this.uploadSpacePhotos('photos', formData).pipe( catchError(err => of(err.status))) ) ;\n\n\t\t\t}) \n\n\t\t\t\n\n\t\t\tthis.subscription(`uploadPhotosSub$`, forkJoin(obs.map(o => o.pipe( \n\t\t\t\t\ttap(item => this.updateProgressMeter(item)), \n\t\t\t\t\t// toArray() \n\t\t\t\t)))\n\t\t\t\t.subscribe(event => {\n\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tevent.forEach((res ,i ) => {\n\t\t\t\t\t\t\t\tif(res?.message === 'File uploaded successfully!') {\n\n\t\t\t\t\t\t\t\t\tthis.uploadError = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tconst suffixes = ['', 'st','nd','rd'];\n\t\t\t\t\t\t\t\t\tthis.failedNo = `${i+1}${suffixes[i+1]}`;\n\t\t\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(i === (this.photoUploadArray.length-1)) {\n\t\t\t\t\t\t\t\t\tthis.photoUploadArray = [];\n\t\t\t\t\t\t\t\t\tthis.uploadingStatus = 'Complete';\n\t\t\t\t\t\t\t\t\tthis.event.emit(this._data.photos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror => {\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\tconsole.log('Error while uploadig room photos: ', error) ;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tprivate updateProgressMeter(item) {\n\t\t\tif(item?.message === 'File uploaded successfully!') {\n\t\t\t\tthis.count++;\n\t\t\t\tthis.uploadProgress = this.total > 0 ? Math.round((this.count / this.total) * 100) : 0;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t}\n\t\t}\n\t\n\t\n\t\treset() {\n\t\t\tthis.uploadProgress = null;\n\t\t\tthis.cdRef.detectChanges();\n\t\t}\n\n\t\tpublic timestamp (photo) {\n\t\t\treturn photo?.index ? '' : `?${(new Date()).getTime()}`;\n\t\t}\n\n\n\t\t/**\n\t\t * update function version -2 - returns observable instead of promise...\n\t\t * @param form_data data to be update \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\t public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/${apiSubRoute}`;\n\t\t\tconst body = form_data;\n\t\n\t\t\tconst token = this._composer.auth.token; //sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n\n\t\tpublic deletePhoto(i: number) {\n\t\t\tconst index = this.photoArray[i].index;\n\t\t\tconst photoName = index ? `${this.room.email.split('@')[0]}-part-${index}.png` : this.photoArray[i].path.split('rooms/')[1];\n\n\t\t\tthis.photoArray.splice(i, 1); \n\t\t\tthis.photoUploadArray.splice(i, 1);\n\n\t\t\tthis.deleteSpacePhotos(i, false, {photo_name: [ photoName ]}).subscribe( val => {\n\t\t\t\tconsole.log(val);\n\t\t\t\tthis._service.notifySuccess('Successfully deleted!');\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tconsole.log('Error while deleting room photos: ', error) ;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t}\n\n\n\t\t/**\n\t\t * \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\tpublic deleteSpacePhotos(index: number, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/delete`;\n\t\t\tconst body = query_params;\n\t\n\t\t\tconst token = this._composer.auth.token; \n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n}\n","
\n
\n
{{ room?.roomname }}
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n
\n\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Selected photos ({{ photoArray.length }}/3)\n\t\t\t\t\tRequired photo parameters: landscape orientation, W 400x H 225 pixels, format PNG or WEBP\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tRoom photo #{{i+1}}\n\t\t\t\t\t\t{{ room.email.split('@')[0] }}-part-{{i+1}}.png \n\t\t\t\t\t\tRatio: 400x225\n\t\t\t\t\t
\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\tDrag & drop or\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{uploadingStatus}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{failedNo}} Photo failed to upload successfully. Please try again.\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n \n
","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RoomAdminComponent } from './room-admin.component';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\n\nconst routes: Routes = [\n { path: '',\n children: [\n { path: '', component: RoomAdminComponent },\n {\n path: 'room-details', \n component: RoomDetailsWrapperComponent\n }\n ]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class RoomAdminRoutingModule { }\n\n\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n DEFAULT_BOOKING_DURATION,\n rulesForSpace,\n SpacesService,\n User,\n} from '@mckinsey-converge/data-common';\nimport {\n OrganisationService,\n ApplicationService,\n BuildingLevel,\n} from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { first, take } from 'rxjs/operators';\nimport { Identity, BaseDirective, closestToTimeSlotTz } from '@mckinsey-converge/base';\nimport { Store } from '@ngrx/store';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { RoomAdminService } from './services/room-admin.service';\nimport jsPDF, { RGBAData } from 'jspdf';\nimport { Hash } from 'crypto';\n\n@Component({\n selector: 'app-room-admin',\n templateUrl: './room-admin.component.html',\n styleUrls: ['./room-admin.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomAdminComponent extends BaseDirective implements OnInit {\n public spaces: Space[] = [];\n public newArr: any[];\n public location: string;\n public isOpen = false;\n\n public itemsCheckboxes = [\n {\n label: '',\n checked: false,\n id: '',\n building_id: '',\n name: '',\n email: '',\n roomname: '',\n isLevel: false,\n },\n ];\n\n public qrCodeUrls = [];\n\n public selectAll: boolean = false;\n\n public allLevels: any; //need this for populating levels in bulk-qr-overlay component\n\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n\n /** ID of the active level */\n @Input() public level: string;\n\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n /** ID of the currently selected level */\n public active_level = '';\n\n /** List of legend keys to show */\n public legend_list: string[] = [];\n\n /** List of available legend keys */\n public readonly legend_keys: readonly Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true },\n ];\n\n public detailsViewIndex = 0;\n\n public rowInfo = [];\n\n public has_access: boolean;\n currentUser: User;\n public enableOverlay = false;\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _router: Router,\n private _booking_state_service: BookingStateService,\n private store: Store,\n private cdref: ChangeDetectorRef,\n private roomAdminService: RoomAdminService\n ) {\n super();\n }\n\n public eventFromChild(data: number) {\n this.detailsViewIndex = data;\n }\n\n public passRowToDetailsView(data: []) {\n this.rowInfo = data;\n }\n\n public returnToRoomAdmin(data: number) {\n this.detailsViewIndex = data;\n this.updatePayload();\n this.cdref.detectChanges();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Room Administration';\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.updateLevel();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(\n building.levels\n );\n this.levels.sort((a, b) =>\n b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n })\n );\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n this._org.space_types\n );\n })\n );\n });\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.enableOverlay = true;\n this._spaces.queryRooms({zone_ids: this._org.building.id }).subscribe(\n (res) => {\n const list = res.map((i) => this._spaces.process(i));\n this._router.navigate(['/room-admin']);\n this.detailsViewIndex = 0;\n this.updatePayload([...list]);\n });\n }\n\n public updatePayload(spaces?) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n /** TO DO : remove _space.filter use */\n this.spaces = spaces ? [...spaces] : this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.location = this._org.building.name;\n const roomDataSource = [];\n for (let i = 0; i < this.spaces.length; i++) {\n if (this.spaces[i].map_id) {\n\n roomDataSource.push({\n roomname: this.spaces[i].local_name,\n roomnum: this.spaces[i].map_id,\n level: this.spaces[i].level.short_name,\n capacity: this.spaces[i].capacity,\n roomtype: this.spaces[i].internal_or_external,\n bookable: this.spaces[i].bookable,\n settings: this.spaces[i].settings,\n equipment: this.spaces[i]?.equipment,\n room_style: this.spaces[i]?.room_style,\n email: this.spaces[i].email,\n roomobject: this.spaces[i],\n id: this.spaces[i].id,\n building: this.spaces[i].building,\n });\n }\n }\n\n this.newArr = [...roomDataSource]; // to make sure tabe is up to date\n\n let checkedFlag = { checked: false };\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag };\n });\n this.allLevels = this._org.building.levels;\n this.enableOverlay = false;\n this.cdref.detectChanges();\n }\n\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public bg_click_close() {\n this.isOpen = false;\n this.qrCodeUrls = [];\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.cdref.detectChanges();\n }\n\n public onQrCodeUrlsChange(newUrls: any[]) {\n this.qrCodeUrls = newUrls;\n }\n\n public downloadQrCode() {\n /**\n * Use the same array of selected rooms/levels for qr code to iterate\n */\n this.roomAdminService.doc = new jsPDF();\n let isRoom: boolean;\n this.qrCodeUrls.forEach((item, i) => {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector(`.qr-code${i} img`);\n let imageData: any = null;\n if (item.roomname) {\n isRoom = true;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.roomname, false, item.level); // roomname should be room name for rooms or [Level ] for levels\n } else if (item.name) {\n isRoom = false;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.name, true, ''); // roomname should be room name for rooms or [Level ] for levels\n }\n // Add generated qr code image to the pdf\n switch ((i + 1) % 4) {\n case 1:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n break;\n case 2:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 5, 100, 100);\n break;\n case 3:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 130, 100, 100);\n break;\n case 0:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 130, 100, 100);\n this.roomAdminService.doc.addPage();\n break;\n }\n });\n this.roomAdminService.doc.save(`${this.location} - ${isRoom ? `rooms.pdf` : `levels.pdf`}`);\n }\n}\n","
\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n

Room Administration

\n
\n
\n
\n
\n
\n
\n

Showing {{ this.location }} Rooms ({{ newArr?.length }})

\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n \n
\n
\n\n
\n\t\n
\n\n
\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RoomAdminRoutingModule } from './room-admin-routing.module';\nimport { RoomAdminComponent } from './room-admin.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { RoomsTableComponent } from './rooms-table/rooms-table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { RoomDetailsComponent } from './room-details/room-details.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { QRCodeModule } from 'angularx-qrcode';\nimport { OverlayModule} from '@angular/cdk/overlay';\nimport { MatTabsModule} from '@angular/material/tabs';\nimport { RoomAdminService } from './services/room-admin.service';\nimport { BulkQrOverlayComponent } from './bulk-qr-overlay/bulk-qr-overlay.component';\nimport { IconComponent, LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\nimport { ManagePhotosComponent } from './manage-photos/manage-photos.component';\nimport { ResizeService, ReadLocalPicService } from './services/';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { ComposerModule } from '@placeos/composer';\nimport { FileDragNDropDirective } from './util/file-drag-n-drop.directive';\n\n\n\n@NgModule({\n declarations: [RoomAdminComponent, RoomsTableComponent, RoomDetailsComponent, RoomDetailsWrapperComponent, BulkQrOverlayComponent, ManagePhotosComponent, FileDragNDropDirective],\n imports: [\n CommonModule,\n RoomAdminRoutingModule,\n SharedContentModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatExpansionModule,\n FormsModule,\n ReactiveFormsModule,\n MatSnackBarModule,\n QRCodeModule,\n LegacyUiModule,\n OverlayModule,\n MatTabsModule,\n UiModule,\n LegacyOverlaysModule,\n MatProgressBarModule,\n ComposerModule\n ],\n providers: [\n ResizeService,\n ReadLocalPicService,\n RoomAdminService\n ],\n})\nexport class RoomAdminModule { }\n","import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'room-details-wrapper',\n template: `\n
\n \n \n
\n
\n
\n
\n \n
\n

Room Administration > Room Detail

\n

Room detail

\n
\n
\n
\n
\n \n
\n
\n
\n `,\n styleUrls: ['./room-details-wrapper.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsWrapperComponent implements OnInit {\n public rowInfo: any;\n \n\n\n constructor(\n private cd: ChangeDetectorRef,\n private _router: Router,\n ) {\n if(this._router.getCurrentNavigation() !== null && this._router.getCurrentNavigation().extras['state']?.details) {\n this.rowInfo = this._router.getCurrentNavigation().extras['state']?.details;\n }\n else {\n this._router.navigate(['room-admin']);\n }\n }\n\n public ngOnInit(): void {\n this.cd.detectChanges();\n }\n\n public getToRoomList() {\n this._router.navigate(['room-admin'])\n }\n\n}","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { SpacesService, noWhitespaceValidator, OrganisationService, SpaceEquipments, SpaceStyles, setupRoomImages, ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DropdownOpion, CngSelectData } from '@mckinsey-converge/ui';\nimport { roomTypeOptions, roomSubsetOptions, roomVisibilityOptions, canteringAvailabilityOptions, room, RoomSubset } from '../util/room-admin-utility';\nimport jsPDF from 'jspdf';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ManagePhotosComponent } from '../manage-photos/manage-photos.component';\nimport { BaseDirective, DialogEvent, SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n\n\n@Component({\n selector: 'app-room-details',\n templateUrl: './room-details.component.html',\n styleUrls: ['./room-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsComponent extends BaseDirective implements OnInit {\n public reactiveForm: FormGroup;\n public room: room;\n public rowInfoData: any;\n public doc: jsPDF;\n public cityname: string;\n\n public roomTypeDD: CngSelectData;\n public roomSubsetDD: CngSelectData;\n public roomVisibilityDD: CngSelectData;\n public canteringAvailabilityDD: CngSelectData;\n\t\tpublic givenRoomType: any = 'internal';\n\t\tpublic givenRoomSubType: any = 'conference';\n\t\tpublic givenCateringAvailability: any;\n\t\tpublic uploadedPhotos : Array = [];\n\t\tpublic roomSubsetOptions:RoomSubset;\n\n @Input() set rowInfo(value: any) {\n this.rowInfoData = value;\n }\n @Input() set location(value: string) {\n this.cityname = value;\n }\n\n @Output('parentFun') parentFun: EventEmitter = new EventEmitter();\n\t\tpublic loadImages = new BehaviorSubject([]);\n\n public disableButtons = false;\n public enableOverlay = false;\n public windowLocation = location;\n\n\t// Set to a config once we know where the files are hosted.\n public rootFolderURL = 'assets/img/rooms/';\n\t\tpublic foundImages: SpaceImageObject[] = [];\n\t\tpublic roomImages: SpaceImageObject[] = [];\n\n\n\t\tpublic get roomImagesFileSlug(): string {\n\t\t\treturn this.rowInfoData.email.split('@')[0];\n\t\t}\n\n constructor(\n private _spaces: SpacesService,\n private cd: ChangeDetectorRef,\n private _snackBar: MatSnackBar,\n private _router: Router,\n\t\tprivate _dialog: MatDialog,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _org:OrganisationService,\n\t\tprivate _service: ApplicationService,\n ) {\n\t\t\t\tsuper();\n this.room = {} as room;\n }\n\n public ngOnInit(): void {\n this.doc = new jsPDF();\n history.pushState({}, '');\n\n this.cityname = this?.rowInfoData?.building?.city;\n\n\t\t\t\tconst internalSubSet: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('internal_room_types');\n\t\t\t\tconst externalSubset: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('external_room_types');\n\t\t\t\tthis.roomSubsetOptions = {internal: internalSubSet, external: externalSubset};\n\n\t\t\t\tconst internal_or_external = this.rowInfoData?.roomobject?.internal_or_external; // ( this.rowInfoData?.roomobject?.filters?.external ? 'external' : 'internal') || this.rowInfoData?.settings;\n\n\t\t\t\tif(internal_or_external) {\n\t\t\t\t\tthis.givenRoomType = typeof(internal_or_external) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof(internal_or_external.value) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: internal_or_external.value.value; // temporary fix\n\t\t\t\t}\n\t\t\t\tconst roomSubType = this.rowInfoData?.roomobject?.room_type;\n\t\t\t\tthis.givenRoomSubType = Array.isArray(roomSubType) && roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? roomSubType[0]\n\t\t\t\t\t\t\t\t\t\t: Array.isArray(roomSubType) && !roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? 'conference'\n\t\t\t\t\t\t\t\t\t\t: roomSubType || 'conference';\n\t\t\t\tthis.givenCateringAvailability = this.rowInfoData?.roomobject?.filters?.catering ? 'yes-onsite' : 'no';\n\n\n\t\t\t\tthis.rowInfoData && this.setAllDropdowns(this.rowInfoData);\n\n\n this.reactiveForm = new FormGroup({\n\n roomname: new FormControl(this.rowInfoData.roomname, [\n Validators.required,\n Validators.maxLength(250),\n Validators.minLength(1),\n Validators.pattern('[^=`~!#$%*{};\\'\"]*'),\n noWhitespaceValidator,\n ]),\n\n city: new FormControl({ value: this.cityname, disabled: true }, []),\n level: new FormControl({ value: this.rowInfoData.level, disabled: true }, []),\n roomnumber: new FormControl({ value: this.rowInfoData.roomnum, disabled: true }, []),\n\n\n\n\n internal_or_external: new FormControl( this.givenRoomType , []),\n\t\t\t\t\t\troom_type: new FormControl( this.givenRoomSubType, [] ),\n\n capacity: new FormControl(this.rowInfoData.capacity.toString(), [\n Validators.required,\n Validators.maxLength(250),\n Validators.pattern(/^(?!0+$)[0-9]{1,10}$/),\n ]),\n\n\n roomvisibility: new FormControl(this.rowInfoData.bookable),\n\t\t\t\t\t\tcatering: new FormControl(this.rowInfoData?.roomobject?.filters?.catering || false),\n\n\t\t\t\t\t\t// equipment_code === booking charge code ! if possible change equipment_code key to booking_charge_code\n\t\t\t\t\t\tequipment_code: new FormControl( this.rowInfoData?.roomobject?.filters?.equipment_code || false), // || this.rowInfoData?.settings['equipment_code']\n\t\t\t\t\t\tcharge_code: new FormControl(this.rowInfoData?.roomobject?.filters?.charge_code || false), // || this.rowInfoData.settings.charge_code\n\n vc: new FormControl(this.isFeatureChecked('vc')),\n conference_phone: new FormControl(this.isFeatureChecked('conference_phone')),\n wireless_content_sharing: new FormControl( this.isFeatureChecked('wireless_content_sharing')),\n flipchart: new FormControl(this.isFeatureChecked('flipchart')),\n glassboard: new FormControl(this.isFeatureChecked('glassboard')),\n whiteboard: new FormControl(this.isFeatureChecked('whiteboard')),\n natural_light: new FormControl(this.isFeatureChecked('natural_light')),\n boardroom: new FormControl(this.isFeatureChecked('boardroom')),\n cocktail: new FormControl(this.isFeatureChecked('cocktail')),\n theatre: new FormControl(this.isFeatureChecked('theatre')),\n workshop: new FormControl(this.isFeatureChecked('workshop')),\n u_shape: new FormControl(this.isFeatureChecked('u_shape')),\n miscellaneous: new FormControl(this.isFeatureChecked('miscellaneous')),\n });\n\n\n\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\n\t\t\t\t\tthis.subscription(\n\t\t\t\t\t\t'found_images',\n\t\t\t\t\t\tthis.loadImages.subscribe((imgArr: SpaceImageObject[]) => {\n\t\t\t\t\t\t\tthis.roomImages = imgArr;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}));\n\n }\n\n\n\n public isFeatureChecked(param: string) {\n switch (param) {\n case 'vc': {\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData.roomobject['filters']?.vc;\n }\n case 'natural_light': {\n return this.rowInfoData.roomobject['filters']?.natural_light; // || this.rowInfoData['settings']?.natural_light;\n }\n default: {\n // const { extra_features } = this.rowInfoData['settings'];\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData['room_style']?.includes(param); //extra_features && extra_features?.includes(param) ||\n }\n }\n }\n\n get capacity() {\n\t\t\treturn this.reactiveForm.get('capacity');\n }\n\n get roomname() {\n\t\t\treturn this.reactiveForm.get('roomname');\n }\n\n public onSubmit(formValue: any) {\n\t\t\tlet roomObject = Object.assign({}, this.rowInfoData.roomobject);\n\n\t\t\tconst allowed_keys = [\n\t\t\t\t\t'edge_id',\n\t\t\t\t\t'name',\n\t\t\t\t\t'description',\n\t\t\t\t\t'email',\n\t\t\t\t\t'equipment',\n\t\t\t\t\t'capacity',\n\t\t\t\t\t'filters',\n\t\t\t\t\t'features',\n\t\t\t\t\t'bookable',\n\t\t\t\t\t'installed_ui_devices',\n\t\t\t\t\t'zones',\n\t\t\t\t\t'modules',\n\t\t\t\t\t'room_type',\n\t\t\t\t\t'room_style',\n\t\t\t\t\t'settings',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'support_url',\n\t\t\t\t\t'version',\n\t\t\t\t\t'id',\n\t\t\t];\n\n\t\t\t// this is to filter unwanted keys and make the request body match room model\n\t\t\troomObject = Object.keys(roomObject)\n\t\t\t\t\t.filter((key) => allowed_keys.includes(key))\n\t\t\t\t\t.reduce((obj, key) => {\n\t\t\t\t\t\t\tobj[key] = roomObject[key];\n\t\t\t\t\t\t\treturn obj;\n\t\t\t\t\t}, {});\n\n\n\t\t\t// roomObject.settings.room_name = formValue.roomname;\n\t\t\troomObject.simple_name = formValue.roomname;\n\n\t\t\tif(formValue.internal_or_external) {\n\t\t\t\t// roomObject.settings.internal_or_external = formValue.internal_or_external;\n\t\t\t\troomObject.filters['external'] = formValue.internal_or_external === 'external';\n\t\t\t}\n\t\t\troomObject.room_type = formValue.room_type;\n\t\t\troomObject.capacity = parseInt(formValue.capacity);\n\n\t\t\troomObject.bookable = formValue.roomvisibility;\n\t\t\t// roomObject.settings['equipment_code'] = formValue.equipment_code;\n\t\t\troomObject.filters['equipment_code'] = formValue.equipment_code;\n\n\t\t\t// roomObject.settings['catering'] = formValue.catering\n\t\t\troomObject.filters['catering'] = formValue.catering;\n\t\t\t// roomObject.settings['charge_code'] = formValue.charge_code;\n\t\t\troomObject.filters['charge_code'] = formValue.charge_code;\n\n\n\n\t\t\t// roomObject.features = getExtraFeatures();\n\t\t\t// roomObject.settings.extra_features = getExtraFeatures();\n\t\t\troomObject.filters.vc = formValue.vc;\n\t\t\t// roomObject.settings.vc = formValue.vc;\n\t\t\t// roomObject.settings.natural_light = formValue.natural_light;\n\t\t\troomObject.filters['natural_light'] = formValue.natural_light;\n\t\t\tgetExtraFeatures();\n\n\t\t\tfunction getExtraFeatures() {\n\t\t\t\t\tconst excludeFromExtraFeatures = ['capacity','charge_code','internal_or_external', 'roomvisibility', 'roomname', 'equipment_code', 'catering', 'room_type'];\n\t\t\t\t\t// let features = '';\n\n\t\t\t\t\tObject.keys(formValue).forEach((element) => {\n\t\t\t\t\t\t\tconst isEqAndDetail = formValue[element];\n\t\t\t\t\t\t\t// console.log(SpaceEquipments[element]);\n\t\t\t\t\t\t\tif (!excludeFromExtraFeatures.includes(element) && isEqAndDetail) {\n\t\t\t\t\t\t\t\t\t// features += ` ${element}`;\n\n\t\t\t\t\t\t\t\t\tif(SpaceEquipments[element]!==undefined && !roomObject?.equipment.includes(element) ) {\n\t\t\t\t\t\t\t\t\t\troomObject?.equipment.push(element);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t else if( SpaceStyles[element]!==undefined && !roomObject?.room_style.includes(element) ){\n\t\t\t\t\t\t\t\t\t\t roomObject.room_style.push(element);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t} else if(!isEqAndDetail) {\n\t\t\t\t\t\t\t\t// roomObject.features = roomObject.features.replace(element, '');\n\t\t\t\t\t\t\t\troomObject.equipment = SpaceEquipments[element]!==undefined ? roomObject.equipment.filter((value)=>value!=element) : roomObject.equipment;\n\t\t\t\t\t\t\t\troomObject.room_style = SpaceStyles[element]!==undefined ? roomObject.room_style.filter((value)=>value!=element) : roomObject.room_style;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// return features;\n\t\t\t}\n\n\t\t\tconst body = roomObject;\n\n\t\t\tif (this.reactiveForm.invalid) {\n\t\t\t\t\tfor (const control of Object.keys(this.reactiveForm.controls)) {\n\t\t\t\t\t\t\tthis.reactiveForm.controls[control].markAsTouched();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\tthis.disableButtons = true;\n\t\t\t\t\tthis.enableOverlay = true;\n\n\t\t\t\t\tthis._spaces.updateSpace(this.rowInfoData.id, body).subscribe(\n\t\t\t\t\t\t\t(data: any) => {\n\t\t\t\t\t\t\t\t\tthis.updateAllRooms(); // TO DO: this call enabled to pull all updated rooms to use on day/week view, In future remove this call here and day/week view should handle it there\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.reactiveForm.markAsPristine();\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t\t\tthis._service.notifySuccess('Operation Successful!');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\t\t\t\tthis._service.notifyError('There was an error');\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.room = this.reactiveForm.value;\n }\n\n public updateAllRooms(): void {\n\t\t // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n\t\t const option = {\n zone_ids: this._org.building.id\n }\n this._spaces.query(option, true).then(() => { }).catch(() => {});\n }\n\n public onCancel() {\n\t\t\tthis._router.navigate(['room-admin']);\n }\n\n\n\n\n\t\tpublic setAllDropdowns(rowInfoData) {\n\t\t\t// const {internal_or_external} = rowInfoData?.settings;\n\t\t\t// const roomType = typeof(internal_or_external) === 'string' ? internal_or_external : internal_or_external.value;\n\n\t\t\tthis.roomTypeDD = {\n\t\t\t\tddBoxClass: 'room-type',\n\t\t\t\toptions: roomTypeOptions,\n\t\t\t\tdefaultSelected: roomTypeOptions.filter(el => el.value === this.givenRoomType )[0],\n\t\t\t\tonChangeCallback: this.roomTypeChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomSubsetDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'room-subset',\n\t\t\t\t\toptions: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()],\n\t\t\t\t\tdefaultSelected: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()].filter(el => el.value === this.givenRoomSubType )[0],\n\t\t\t\t\tonChangeCallback: this.roomTypeSubsetChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomVisibilityDD = {\n\t\t\t\t\tddBoxClass: 'room-visibility',\n\t\t\t\t\toptions: roomVisibilityOptions,\n\t\t\t\t\tdefaultSelected: roomVisibilityOptions.filter(el => el.value === rowInfoData?.bookable.toString())[0],\n\t\t\t\t\tonChangeCallback: this.roomVisibilityChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.canteringAvailabilityDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'catering-availability',\n\t\t\t\t\toptions: canteringAvailabilityOptions,\n\t\t\t\t\tdefaultSelected: canteringAvailabilityOptions.filter(el => el.value === this.givenCateringAvailability )[0],\n\t\t\t\t\tonChangeCallback: this.roomCateringChanged.bind(this)\n\t\t\t};\n\t\t}\n\n /**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic roomTypeChanged(type: DropdownOpion) {\n\t\t\tthis.reactiveForm.controls.internal_or_external.setValue(type.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\n\t\t\tif(!this.roomSubsetDD.disabled) {\n\t\t\t\tthis.roomSubsetDD.options = this.roomSubsetOptions[type.value.toString()];\n this.roomSubsetDD.defaultSelected = type.value === this.givenRoomType ? this.roomSubsetDD.options.filter(el => el.value === this.givenRoomSubType )[0] : this.roomSubsetOptions[type.value.toString()][0];\n\t\t\t\tthis.reactiveForm.controls.room_type.setValue(this.roomSubsetDD.defaultSelected.value);\n\t\t\t}\n\t\t\tthis.reactiveForm.markAsDirty();\n\t\t\tthis.cdRef.detectChanges();\n\t}\n\tpublic roomTypeSubsetChanged(subset: DropdownOpion ) {\n\t\t\t// console.log(subset);\n\t\t\tthis.reactiveForm.controls.room_type.setValue(subset.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomVisibilityChanged(visibility: DropdownOpion) {\n\t\tthis.reactiveForm.controls.roomvisibility.setValue(visibility.value==='true');\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomCateringChanged(isCatering: DropdownOpion) {\n\t\tthis.reactiveForm.controls.catering.setValue(!(isCatering.value==='no'));\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img): string | HTMLCanvasElement | HTMLImageElement {\n\t\t\t// TO DO : move to enum/utility file, while room detail more editable field developement\n\t\t\tconst width = 500;\n\t\t\tconst height = 550;\n\t\t\tconst arcY = 300;\n\t\t\tconst arc_X_Center = width/2;\n\t\t\tconst otrRadius = arc_X_Center - 2 ;\n\t\t\tconst whtRadius = otrRadius - 12;\n\t\t\tconst innrRadius = otrRadius - 15;\n\n\t\t\tconst canvas: HTMLCanvasElement = document.createElement('canvas');\n\t\t\tcanvas.setAttribute('width', width.toString());\n\t\t\tcanvas.setAttribute('height', height.toString());\n\t\t\tconst ctx = canvas.getContext('2d');\n\n\t\t\tctx.strokeStyle = \"transparent\";\n\t\t\tctx.moveTo(arc_X_Center, 0);\n\t\t\tctx.lineTo(arc_X_Center, height);\n\t\t\tctx.stroke();\n\n\t\t\tctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.textAlign = \"center\";\n\t\t\tctx.fillText(this.rowInfoData?.roomname , arc_X_Center, 20);\n\n\t\t\t//oputer arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//inner white arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//second inner arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t// header text\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.font = '44px Bower';\n\t\t\tctx.fillText('Book Me', arc_X_Center, 166);\n\n\t\t\t//centeral rectangle\n\t\t\tctx.fillRect(137, 187, 225, 225);\n\t\t\t//fill central rectangle with color\n\t\t\tctx.fillStyle = '#FFFFFF';\n\n\t\t\t// fill text at the bottom\n\t\t\tctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.fillText('in Converge', arc_X_Center, 470);\n\n\t\t\t// draw QR code image into center of canvas\n\t\t\timg !== null && ctx.drawImage(img, 137, 187);\n\n\t\t\t// create data url\n\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement =\n\t\t\tcanvas.toDataURL('image/png');\n\t\t\treturn dataURL;\n }\n\n /**\n * Function downloadQRPdf\n * download generated QR code to the local system\n */\n public downloadQRPdf(roomid?: string): void {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector('.qr-code img');\n let imageData = this.drawCanvas(qrcode);\n // Add generated qr code image to the pdf\n this.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 5, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 3, 130, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 130, 100, 100);\n // this.doc.addImage(imageData, \"JPEG\", 10, 10); // left commented for alignment reference later in future\n // doc.addPage();\n\t\t\t\t// this.openQRInConverge();\n this.doc.save(`${this.rowInfoData.id}.pdf`);\n }\n\n /**\n * Not in use but keeping for future use\n * Function openQRInConverge\n * Open QR code in seperate tab\n */\n public openQRInConverge(): void {\n const qrcode = document.querySelector('.qr-code img');\n const dataURL = this.drawCanvas(qrcode);\n const win = window.open();\n win &&\n win.document.write(\n '
\\\n\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t
'\n );\n }\n\n\t\t/** Open modal for adding equipment requirements to booking */\n\t\tpublic openManagePhotosModal() {\n\t\t\tconst equipment_ref = this._dialog.open(ManagePhotosComponent, {\n\t\t\t\tmaxWidth: '95vw',\n\t\t\t\twidth: '70em',\n\t\t\t\tdata: {\n\t\t\t\t\tphotos: this.roomImages,\n\t\t\t\t\troom: this.rowInfoData\n\t\t\t\t\t}\n\t\t\t});\n\t\t\tthis.subscription(\n\t\t\t\t'equipments_modal_events',\n\t\t\t\tequipment_ref.componentInstance.event.subscribe((event: any) => {\n\t\t\t\t\t/* istanbul ignore else */\n\n\t\t\t\t\t\t// this.uploadedPhotos = event;\n\t\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\t\t\t\t\t\t//equipment_ref.close();\n\n\t\t\t\t})\n\t\t\t);\n\t\t\tequipment_ref.afterClosed().subscribe(() => {\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\tthis.unsub('equipments_modal_events')\n\t\t\t});\n\t\t}\n\n\n\t\tpublic get timestamp () {\n\t\t\treturn (new Date()).getTime()\n\t\t}\n\n\n}\n","
\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{ \troomname.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.maxlength \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters' \n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t ? 'Some special characters and are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t:\troomname.errors?.whitespace\n\t\t\t\t\t\t\t\t\t\t\t\t? 'Only spaces are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'System generated name '+ roomname.value + ' (can not be changed)' }} \t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {{\n\t\t\t\t\t\t\t\t\t\t\t\tcapacity.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.maxlength\n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t\t? 'Zero, letters and special characters are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t   Booking charge code required \n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t   Catering charge code required \n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Room equipment and detail \n\t\t\t\t\t\t\n\t\t\t\t\t\t

Room Equipment

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Video Conference (VC)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Conference phone

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Wireless content sharing

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Flipchart

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Glassboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Whiteboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

Room Detail

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Room with window only (natural light)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Boardroom room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Cocktail room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Theatre room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Workshop room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

U shape room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Miscellaneous

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\n\t\t
\n\t
\n\n\t\n\t\n\n\t
\n\t\n
\n\n
\n\t
\n\t\tRoom URL\n\t\t
\n\t\t\t{{ windowLocation.origin }}/staff/#/home?id={{ rowInfoData.id }}\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\n\t
\n\t\n\t
\n\t\t\n\t
\n
\n\n
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n\n","import { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { map } from 'rxjs/operators';\nimport { Observable, of as observableOf, merge } from 'rxjs';\nimport { Component, OnInit, Input, Injectable } from '@angular/core';\n\n\n// data model \nexport interface RoomsTableItem {\n roomname: string;\n roomnum: string;\n level: string;\n capacity: number;\n roomtype: string;\n bookable: boolean;\n}\n\n// sample data\nconst EXAMPLE_DATA: RoomsTableItem[] = [\n {\n roomname: 'test',\n roomnum: '02',\n level: '01',\n capacity: 4,\n roomtype: 'internal',\n bookable: true,\n}\n];\n\n/**\n * Data source for the RoomsTable view. This class should\n * encapsulate all logic for fetching and manipulating the displayed data\n * (including sorting, pagination, and filtering).\n */\n\n// convert this class into service and use provider:root\n@Injectable({\n providedIn: 'root',\n})\nexport class RoomsTableDataSource extends DataSource {\n data: RoomsTableItem[] = EXAMPLE_DATA;\n paginator: MatPaginator;\n sort: MatSort;\n\n\n constructor(public datatwo: RoomsTableItem[],\n ) {\n super();\n this.data = datatwo;\n }\n\n /**\n * Connect this data source to the table. The table will only update when\n * the returned stream emits new items.\n * @returns A stream of the items to be rendered.\n */\n \n \n connect(): Observable {\n // Combine everything that affects the rendered data into one update\n // stream for the data-table to consume.\n\n const dataMutations = [\n observableOf(this.data),\n this.paginator.page,\n this.sort.sortChange\n ];\n\n return merge(...dataMutations).pipe(map(() => {\n return this.getPagedData(this.getSortedData([...this.data]));\n }));\n }\n\n /**\n * Called when the table is being destroyed. Use this function, to clean up\n * any open connections or free any held resources that were set up during connect.\n */\n disconnect() {}\n\n /**\n * Paginate the data (client-side). If you're using server-side pagination,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getPagedData(data: RoomsTableItem[]) {\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.splice(startIndex, this.paginator.pageSize);\n }\n\n /**\n * Sort the data (client-side). If you're using server-side sorting,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getSortedData(data: RoomsTableItem[]) {\n if (!this.sort.active || this.sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const isAsc = this.sort.direction === 'asc';\n switch (this.sort.active) {\n case 'roomname': return compare(a.roomname, b.roomname, isAsc);\n case 'roomnum': return compare(+a.roomnum, +b.roomnum, isAsc);\n case 'level': return compare(+a.level, +b.level, isAsc);\n case 'capacity': return compare(+a.capacity, +b.capacity, isAsc);\n case 'roomtype': return compare(a.roomtype, b.roomtype, isAsc);\n case 'bookable': return compare(+a.bookable, +b.bookable, isAsc);\n default: return 0;\n }\n });\n }\n}\n\n\n/** Simple sort comparator for example ID/Name columns (for client-side sorting). */\nfunction compare(a: string | number, b: string | number, isAsc: boolean) {\n return (a < b ? -1 : 1) * (isAsc ? 1 : -1);\n}\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n SimpleChanges,\n} from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTable } from '@angular/material/table';\nimport { RoomsTableDataSource, RoomsTableItem } from './rooms-table-datasource';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'app-rooms-table',\n templateUrl: './rooms-table.component.html',\n styleUrls: ['./rooms-table.component.scss'],\n})\nexport class RoomsTableComponent extends BaseDirective implements AfterViewInit, OnInit {\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n @ViewChild(MatTable) table: MatTable;\n dataSource: RoomsTableDataSource;\n\n constructor(private _org: OrganisationService,\n private _router: Router,\n private route: ActivatedRoute,\n private cdref: ChangeDetectorRef,) {\n super();\n }\n\n public formattedInputValue: [];\n\n @Input() set inputValue(value: []) {\n this.formattedInputValue = value;\n }\n\n @Output() private onDetailsClick = new EventEmitter();\n\n @Output() public rowClicked = new EventEmitter<[]>();\n\n /** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */\n // tslint:disable-next-line: max-line-length\n public displayedColumns = [\n 'roomname',\n 'roomnum',\n 'level',\n 'capacity',\n 'roomtype',\n 'bookable',\n 'details',\n ];\n\n public detailsViewIndex = 0;\n\n public _onDetailsClick(index: number) {\n this.onDetailsClick.emit(index);\n }\n\n public ngOnInit() {\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n }\n public ngOnChanges(changes: SimpleChanges): void {\n // console.log(changes);\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n if(!changes.inputValue.firstChange) {\n this.dataSource.sort = this.sort;\n this.dataSource.paginator = this.paginator;\n this.table.dataSource = this.dataSource;\n this.paginator.firstPage();\n this.cdref.detectChanges();\n }\n\n }\n\n // ngAfterViewInit heavy on performance, figure out api\n // function that gives callback after html loads\n // eg, onchange, check mat table documentation\n\n public ngAfterViewInit() {\n // this.dataSource.sort = this.sort;\n // this.dataSource.paginator = this.paginator;\n // this.table.dataSource = this.dataSource;\n // this.paginator.firstPage();\n }\n\n public getRecord(row: []) {\n const navigationExtras = {\n relativeTo:this.route,\n skipLocationChange: true ,\n state: {\n details: { ...row }\n }\n }\n this._router.navigate(['room-details'], navigationExtras)\n }\n}\n","
\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
Room Name{{ row.roomname }}Room Number{{ row.roomnum }}Level{{ row.level }}Capacity{{ row.capacity }}Room Type\n Internal\n External\n Room visibility\n Bookable\n Non Bookable\n \n \n
\n\n \n \n
\n","export * from './resize.service';\nexport * from './read-local-pic.service';\n// export * from './room-admin.service';","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\n\nexport class ReadLocalPicService {\n /**\n * eventErrorDecoder\n * @param event \n * @returns errorMessage\n */\n private eventErrorDecoder(event: any): string {\n let errorMessage = null;\n\n switch (event.target.error.code) {\n case event.target.error.NOT_FOUND_ERR:\n errorMessage = 'NOT_FOUND_ERR';\n break;\n case event.target.error.SECURITY_ERR:\n errorMessage = 'SECURITY_ERR';\n break;\n case event.target.error.ABORT_ERR:\n errorMessage = 'ABORT_ERR';\n break;\n case event.target.error.NOT_READABLE_ERR:\n errorMessage = 'NOT_READABLE_ERR';\n break;\n case event.target.error.ENCODING_ERR:\n errorMessage = 'ENCODING_ERR';\n break;\n case event.target.error.NO_MODIFICATION_ALLOWED_ERR:\n errorMessage = 'NO_MODIFICATION_ALLOWED_ERR';\n break;\n case event.target.error.INVALID_STATE_ERR:\n errorMessage = 'INVALID_STATE_ERR';\n break;\n case event.target.error.SYNTAX_ERR:\n errorMessage = 'SYNTAX_ERR';\n break;\n case event.target.error.INVALID_MODIFICATION_ERR:\n errorMessage = 'INVALID_MODIFICATION_ERR';\n break;\n case event.target.error.QUOTA_EXCEEDED_ERR:\n errorMessage = 'QUOTA_EXCEEDED_ERR';\n break;\n case event.target.error.TYPE_MISMATCH_ERR:\n errorMessage = 'TYPE_MISMATCH_ERR';\n break;\n case event.target.error.PATH_EXISTS_ERR:\n errorMessage = 'PATH_EXISTS_ERR';\n break;\n default:\n errorMessage = 'Unknown Error: ' + event.target.error.code;\n break;\n }\n return errorMessage;\n }\n\n /**\n * \n * @param inputFile \n * @returns \n */\n async readFileInput(inputFile: any): Promise {\n return new Promise((resolve, reject) => {\n if (!inputFile ) {\n reject('No file selected');\n } else {\n if (\n !(window.File && window.FileReader && window.FileList && window.Blob)\n ) {\n reject('Your browser does not support reading files');\n }\n\n const reader = new FileReader();\n reader.onload = (e: any) => {\n resolve(e.target.result);\n };\n reader.onabort = (e: any) => {\n reject(\n 'Failed to convert file to base64img, aborted: ' +\n this.eventErrorDecoder(e)\n );\n };\n reader.onerror = (e: any) => {\n reject(\n 'Failed to convert file to base64img, error: ' +\n this.eventErrorDecoder(e)\n );\n };\n\n reader.readAsDataURL(inputFile);\n }\n });\n }\n\n\n b64toFile(dataURI): File {\n // convert the data URL to a byte string\n const byteString = atob(dataURI.split(',')[1]);\n\n // pull out the mime type from the data URL\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]\n\n // Convert to byte array\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n // new File\n // Create a blob that looks like a file.\n const blob = new File([ab],'room-photo.png', { 'type': mimeString });\n // blob['lastModifiedDate'] = (new Date()).toISOString();\n // blob['name'] = 'file';\n \n // Figure out what extension the file should have\n // switch(blob.type) {\n // case 'image/jpeg':\n // blob['name'] += '.jpg';\n // break;\n // case 'image/png':\n // blob['name'] += '.png';\n // break;\n // }\n // cast to a File\n return blob;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResizeService {\n private mainCanvas: HTMLCanvasElement;\n\n private isCanvasSupported(): boolean {\n const canvas = document.createElement('canvas');\n return !!(canvas.getContext && canvas.getContext('2d'));\n }\n\n /**\n * Create image on the fly using Image class \n * @param src \n * @param crossOrigin \n * @returns image\n */\n async createImage(\n src: string,\n crossOrigin?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n const img = new Image();\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.onload = () => {\n resolve(img);\n };\n\n img.onerror = (err) => {\n reject(err);\n };\n\n img.src = src;\n });\n }\n\n /**\n * Resize canvas - create canvas on the fly draw image with given diamension\n * @param cnv \n * @param width \n * @param height \n * @returns temp canvas instance\n */\n resizeCanvas(\n cnv: HTMLCanvasElement,\n width: number,\n height: number\n ): HTMLCanvasElement {\n if (!width || !height) {\n return cnv;\n }\n\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n const cnx = tmpCanvas.getContext('2d');\n cnx.drawImage(cnv, 0, 0, tmpCanvas.width, tmpCanvas.height);\n return tmpCanvas;\n }\n\n /**\n * Resize image \n * @param src \n * @param options \n * @returns \n */\n async resizeImage(src: string, options: any): Promise {\n if (!this.isCanvasSupported()) {\n throw new Error('Canvas is not supported on your browser');\n }\n if (!options || !src) {\n throw new Error('Missing argument when calling resizeImage function');\n }\n //Config options\n options = {\n height: options.height\n ? options.height\n : options.width\n ? null\n : options.size\n ? null\n : 1024,\n width: options.width\n ? options.width\n : options.height\n ? null\n : options.size\n ? null\n : 1024,\n size: options.size ? options.size : 500,\n sizeScale: options.sizeScale ? options.sizeScale : 'ko',\n step: options.step ? options.step : 3,\n outputFormat: options.outputFormat ? options.outputFormat : 'image/jpeg',\n crossOrigin: options.crossOrigin ? options.crossOrigin : null,\n };\n\n try {\n const img = await this.createImage(src, options.crossOrigin); // read image first by given base64 or blob image\n\n if (options.height || options.width) {\n // resize image as per height and width\n return this.resizeImageWidthHeight(\n img,\n options.width,\n options.height,\n options.step,\n options.outputFormat\n );\n } else if (options.size) {\n if (typeof options.sizeScale === 'string') {\n switch (options.sizeScale.toLowerCase()) {\n case 'ko':\n options.size *= 1024;\n break;\n case 'mo':\n options.size *= 1024 * 1024;\n break;\n case 'go':\n options.size *= 1024 * 1024 * 1024;\n break;\n }\n }\n return this.resizeImageBySize(img, options.size, options.outputFormat); //resize by size in diamension ration\n } else {\n throw new Error('Missing option to resize the image');\n }\n } catch (err) {\n throw new Error(err);\n }\n }\n\n /**\n * ResizeImageWidthHeight - Create canvas - draw image if given height and with OR use image original diamensions\n * and draw image data url\n * @param image \n * @param width \n * @param height \n * @param step \n * @param outputFormat \n * @returns \n */\n resizeImageWidthHeight(\n image: HTMLImageElement,\n width: number,\n height: number,\n step: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n\n if (!width && !height) {\n width = image.width;\n height = image.height;\n } else if (!width && height) {\n width = (height / image.height) * image.width;\n } else if (width && !height) {\n height = (width / image.width) * image.height;\n }\n\n const pixelStepWidth = image.width === width || !step ? 0 : (image.width - width) / step;\n const pixelStepHeight = image.height === height || !step ? 0 : (image.height - height) / step;\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n for (let i = 1; i < step; i++) {\n const newWidth = image.width - pixelStepWidth * i;\n const newHeight = image.height - pixelStepHeight * i;\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, newWidth, newHeight);\n }\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, width, height);\n\n return this.mainCanvas.toDataURL(outputFormat);\n }\n\n /**\n * resizeImageBySize - resize image by given size in ration \n * \n * @param image \n * @param targetSize \n * @param outputFormat \n * @returns \n */\n resizeImageBySize(\n image: HTMLImageElement,\n targetSize: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n\n let tmpResult = this.mainCanvas.toDataURL(outputFormat);\n let result = tmpResult;\n\n const sizeOfTheImage = this.calulateImageSize(tmpResult, outputFormat);\n let divideStrategy = Math.max(\n 1,\n Math.min(sizeOfTheImage / targetSize, 200)\n );\n\n let iteratorLimit = 20;\n while (sizeOfTheImage > targetSize && iteratorLimit !== 0) {\n iteratorLimit--;\n\n const newImageSize = {\n width: this.mainCanvas.width / divideStrategy,\n height: this.mainCanvas.height / divideStrategy,\n };\n const canvas = this.resizeCanvas(\n this.mainCanvas,\n newImageSize.width,\n newImageSize.height\n );\n\n tmpResult = canvas.toDataURL(outputFormat);\n const sizeOfTheImageTmp = this.calulateImageSize(tmpResult, outputFormat);\n\n if (sizeOfTheImageTmp / targetSize < 0.5 || sizeOfTheImageTmp === 0) {\n divideStrategy = divideStrategy / 2;\n if (divideStrategy < 1) {\n iteratorLimit = 0;\n }\n } else {\n this.mainCanvas = canvas;\n result = tmpResult;\n }\n\n this.mainCanvas = canvas;\n }\n\n return result;\n }\n\n calulateImageSize(imgString: string, outputFormat: string): number {\n switch (outputFormat) {\n case 'image/jpeg':\n outputFormat = 'image/jpg';\n break;\n default:\n outputFormat = 'image/jpg';\n break;\n }\n return Math.max(\n 0,\n Math.round(\n ((imgString.length - ('data:' + outputFormat + ';base64,').length) *3) / 4 \n )\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport jsPDF from 'jspdf';\n@Injectable({ \n providedIn: 'root' \n}) \nexport class RoomAdminService { \n \n public doc = new jsPDF();\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img, name, isForLevels = false, level): string | HTMLCanvasElement | HTMLImageElement {\n // TO DO : move to enum/utility file, while room detail more editable field developement \n const width = 500;\n const height = 550;\n const arcY = 300;\n const arc_X_Center = width/2;\n const otrRadius = arc_X_Center - 2 ;\n const whtRadius = otrRadius - 12;\n const innrRadius = otrRadius - 15;\n \n const canvas: HTMLCanvasElement = document.createElement('canvas');\n canvas.setAttribute('width', width.toString());\n canvas.setAttribute('height', height.toString());\n const ctx = canvas.getContext('2d');\n \n ctx.strokeStyle = \"transparent\";\n ctx.moveTo(arc_X_Center, 0);\n ctx.lineTo(arc_X_Center, height);\n ctx.stroke(); \n \n ctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.textAlign = \"center\"; \n ctx.fillText( isForLevels ? name : name + ' (L-' + level + \")\", arc_X_Center, 20 ); \n\n //oputer arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n //inner white arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#FFFFFF';\n ctx.fill();\n ctx.stroke();\n \n //second inner arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n // header text\n ctx.fillStyle = '#FFFFFF';\n ctx.font = '44px Bower';\n ctx.fillText( isForLevels ? 'Book a room' : 'Book Me', arc_X_Center, 166);\n \n //centeral rectangle\n ctx.fillRect(137, 187, 225, 225);\n //fill central rectangle with color\n ctx.fillStyle = '#FFFFFF';\n \n // fill text at the bottom\n ctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.fillText('in Converge', arc_X_Center, 470);\n \n // draw QR code image into center of canvas\n img !== null && ctx.drawImage(img, 137, 187);\n \n // create data url\n const dataURL: string | HTMLCanvasElement | HTMLImageElement =\n canvas.toDataURL('image/png');\n return dataURL;\n }\n \n}","import { Directive, HostListener, HostBinding, Output, EventEmitter, Input } from '@angular/core';\nimport { RequiredFileType } from './room-admin-utility';\n\n@Directive({\n selector: '[fileDragDrop]'\n})\n\nexport class FileDragNDropDirective {\n //@Input() private allowed_extensions : Array = ['png', 'jpg', 'bmp'];\n @Output() private filesChangeEmiter : EventEmitter = new EventEmitter();\n //@Output() private filesInvalidEmiter : EventEmitter = new EventEmitter();\n @HostBinding('style.background') private background = ''; //'#eee';\n @HostBinding('style.border') private borderStyle = '2px solid'; //'2px dashed';\n @HostBinding('style.border-color') private borderColor = '#E6E6E6';\n @HostBinding('style.border-radius') private borderRadius = '1px';\n\n constructor() { }\n\n @HostListener('dragover', ['$event']) public onDragOver(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = 'lightgray';\n this.borderColor = 'cadetblue';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('dragleave', ['$event']) public onDragLeave(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('drop', ['$event']) public onDrop(evt){\n evt.preventDefault();\n evt.stopPropagation();\n const ext = RequiredFileType.split(',');\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n // debugger;\n let files = [...new Set(evt.dataTransfer.files)].filter((f:File) => ext.includes(f.type)); //evt.dataTransfer.files;\n // let valid_files : Array = files;\n this.filesChangeEmiter.emit(files);\n }\n}","import { DropdownOpion } from '@mckinsey-converge/ui';\n\nexport interface RoomSubset {\n\tinternal: DropdownOpion[];\n\texternal: DropdownOpion[];\n}\n\nexport interface room {\n\troomname: string;\n\troomnumber: number;\n\tcity: string;\n\tlevel: number;\n\tcapacity: number;\n\troomtype: string;\n\troomvisibility: boolean;\n\tvc: boolean;\n\tconference_phone: boolean;\n\twireless_content_sharing: boolean;\n\tflipchart: boolean;\n\tglassboard: boolean;\n\twhiteboard: boolean;\n\tnatural_light: boolean;\n\tboardroom: boolean;\n\tcocktail: boolean;\n\ttheatre: boolean;\n\tworkshop: boolean;\n\tushape: boolean;\n\tmiscellaneous: boolean;\n}\n\nexport const roomTypeOptions: DropdownOpion[] = [\n { display: 'Internal', value: 'internal', meta: {} },\n { display: 'External', value: 'external', meta: {} },\n\t]\n\nexport const roomSubsetOptions: RoomSubset = {\n\t'external': [\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t],\n\t'internal': [\n\t\t{ display: 'Meeting', value: 'meeting', meta: {} },\n\t\t{ display: 'Partner', value: 'partner', meta: {} },\n\t\t{ display: 'Phonebooth', value: 'phonebooth', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t]\n}\n\nexport const roomVisibilityOptions: DropdownOpion[] = [\n\t{ display: 'Bookable', value: 'true', meta: {} },\n\t{ display: 'Non-bookable', value: 'false', meta: {} },\n]\n\nexport const canteringAvailabilityOptions: DropdownOpion[] = [\n\t{ display: 'Yes - Onsite', value: 'yes-onsite', meta: {} },\n\t// { display: 'Yes - Offsite', value: 'yes-offsite', meta: {} },\n\t{ display: 'No', value: 'no', meta: {} },\n]\n\nexport const RoomPhotoDiamension = {\n\twidth: 400,\n\theight: 225\n}\n\nexport const RequiredFileType = 'image/png,image/jpg,image/jpeg,image/webp';\n\nexport function timestamp(){ \n\treturn (new Date()).getTime(); \n} \n","import {\n NgModule,\n Type\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { EditorModule } from '@tinymce/tinymce-angular';\nimport { ComposerModule } from '@placeos/composer';\n\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CdkTableModule } from '@angular/cdk/table';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\nimport { APipesModule } from '@acaprojects/ngx-pipes';\nimport { ACustomEventsModule } from '@acaprojects/ngx-custom-events';\nimport { LoginComponent } from '../login/login.component';\nimport { TopbarHeaderComponent } from '../components/topbar-header/topbar-header.component';\n\nimport {\n CdkDropListScrollContainer,\n ReplacePipe\n} from '@mckinsey-converge/base';\nimport { SidebarComponent } from '../components/sidebar/sidebar.component';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { AccessDenied } from '../components/access-denied/access-denied.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst COMPONENTS: Type[] = [\n LoginComponent,\n TopbarHeaderComponent,\n SidebarComponent,\n AccessDenied\n];\n\nconst DIRECTIVES: Type[] = [\n CdkDropListScrollContainer\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\nconst CDK_MODULES: any[] = [\n ScrollingModule,\n DragDropModule,\n CdkTableModule\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n ...DIRECTIVES,\n ReplacePipe\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n APipesModule,\n ACustomEventsModule,\n RouterModule,\n EditorModule,\n ComposerModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n UiModule\n ],\n exports: [\n APipesModule,\n ACustomEventsModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...COMPONENTS,\n ...DIRECTIVES,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n ReplacePipe\n ]\n})\nexport class SharedContentModule {\n}\n","import { Component, OnInit } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLoadingState, LoadingState } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-shell-wrapper',\n templateUrl: './shell.component.html',\n styleUrls: ['./shell.component.scss'],\n})\nexport class ShellWrapperComponent extends BaseDirective implements OnInit {\n /** Loading state of the application */\n public loading_state: ApplicationLoadingState;\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n /** Whether the user needs to login */\n public get show_login(): boolean {\n return !this._users.is_logged_in;\n }\n\n /** Whether a module is still loading data */\n public get is_loading(): boolean {\n if (this.loading_state) {\n for (const mod in this.loading_state) {\n if (this.loading_state[mod] && this.loading_state[mod].state === 'loading') {\n return true;\n }\n }\n }\n return false;\n }\n\n /** List of modules with a loading state */\n public get loading_state_list(): LoadingState[] {\n const list: LoadingState[] = [];\n for (const mod in this.loading_state) {\n if (this.loading_state[mod]) {\n list.push(this.loading_state[mod]);\n }\n }\n return list;\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'loading',\n this._service.listen('loading').subscribe((loading) => {\n this.loading_state = loading;\n })\n );\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.logo = this._service.setting('app.logo_dark') || { type: 'icon' };\n });\n }\n}\n","\n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n \n
\n
Converge is loading
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseClass, Identity } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-event-form',\n templateUrl: './event-form.component.html',\n styleUrls: ['./event-form.component.scss'],\n})\nexport class EventFormComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Booking details to display */\n @Input() public form: FormGroup;\n\n /** List of attendees in the booking */\n public attendees: User[] = [];\n\n constructor() {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.event || changes.form) {\n this.attendees = this.form?.value.attendees || [];\n this.subscription(\n 'attendees',\n this.form\n .get('attendees')\n ?.valueChanges.subscribe((l) => (this.attendees = l || []))\n );\n }\n }\n\n public addVisitor() {\n const list = this.form.controls.attendees.value;\n const visitor = new User({ visitor: true, external: true, email: '' })\n list.push(visitor);\n //** Create visitor form group */\n const visitorFG = this.createVisitor(visitor);\n //** Push to visitor form array */\n this.getVisitors.push(visitorFG);\n this.form.controls.attendees.setValue(list);\n this.form.markAsDirty();\n }\n\n /**\n * Create visitor form group\n */\n createVisitor(visitor) {\n return new FormGroup({\n name: new FormControl(visitor.name, {validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(visitor.email, { validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n /** Replace visitor with updated values */\n public replaceVisitor(item: User, index: number) {\n const attendees = this.attendees;\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n attendees.splice(actualIndex, 1, item);\n this.form.controls.attendees.setValue(attendees);\n this.form.markAsDirty();\n }\n\n\n /** Remove visitor from attendee list */\n public removeVisitor(item: User, index: number) {\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n const attendees = this.attendees.filter((_, i) => i !== actualIndex);\n this.form.controls.attendees.setValue(attendees);\n \n if (index > -1) {\n this.getVisitors.removeAt(index);\n }\n this.form.markAsDirty();\n }\n\n /**\n * Get the visitor form array \n */\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n public trackByFn(index: number, item: Identity) {\n return index;\n }\n\n getFilteredAttendees() {\n return this.attendees.filter(item => item.external || item.visitor);\n }\n \n getFormControl(i: number) {\n return this.getVisitors.at(i);\n }\n}\n","
\n
\n
\n
\n \n
\n
{{ event.start_time }} - {{ event.duration > 0 ? event.end_time : '' }}
\n
\n
S
\n
{{ event.organiser?.name }}
\n
\n
\n \n \n \n Title is required\n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n \n
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-form',\n templateUrl: './visitor-form.component.html',\n styleUrls: ['./visitor-form.component.scss'],\n})\nexport class VisitorFormComponent extends BaseDirective {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Emitter for changes to the person */\n @Output() public personChange = new EventEmitter();\n /** Form fields for visitor details */\n // public form: FormGroup;\n @Input() public form: FormGroup\n\n constructor(private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void { \n this.form.valueChanges.subscribe( values => {\n this.person = new User({ ...values, visitor: true, external: true });\n this.personChange.emit(this.person);\n })\n }\n\n \n}\n","
\n \n
\n
\n
\n
\n \n \n \n Name is required\n \n
\n
\n \n \n \n A valid email address is required\n \n
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, Validators, FormControl, FormBuilder, FormArray } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nexport interface VisitorsFormModalData {\n /** Details of visitor listing */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-visitors-form-modal',\n templateUrl: './visitors-form-modal.component.html',\n styleUrls: ['./visitors-form-modal.component.scss'],\n})\nexport class VisitorsFormModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for visitor booking */\n public form: FormGroup;\n /** Display string for the loading state */\n public loading: string;\n attendeesStatus: boolean = true;\n\n /** Visitor booking data */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Whether form fields contain an attendee */\n public get has_attendees() {\n return (\n this.form &&\n this.form.controls.attendees.value &&\n this.form.controls.attendees.value.length\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n private fb: FormBuilder,\n @Inject(MAT_DIALOG_DATA) private _data: VisitorsFormModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this.form = new FormGroup({\n title: new FormControl(this.booking.title, [Validators.required]),\n attendees: new FormControl([...this.booking.attendees], [Validators.minLength(1)]),\n visitors: this.fb.array([])\n });\n if (this.booking.id) {\n this.form.controls.title.disable();\n }\n\n /** \n * Create visitor form for existing visitors\n */\n this.booking.attendees.forEach( (el) => {\n if(el.external || el.visitor) {\n const visitorFG = this.createVisitor(el.name, el.email);\n this.getVisitors.push(visitorFG);\n // (this.form.controls.visitors).markAsTouched();\n }\n });\n }\n\n createVisitor(name, email) {\n return new FormGroup({\n name: new FormControl(name, { validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(email, {validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n /** Delete visitor booking */\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: 'Delete meeting',\n content: 'Are you sure you wish to delete this meeting?',\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n /* istanbul ignore else */\n if (this.booking.id) {\n this.loading = 'Deleting visitor booking...';\n this._dialog_ref.disableClose = true;\n this.booking.delete().then(\n () => {\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess('Successfully removed visitors.');\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to remove visitors. Error: ${err.message || err}`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n }\n ref.close();\n })\n );\n }\n\n /** Save changes to visitor booking */\n public save() {\n this.timeout('save', () => {\n this.loading = 'Saving visitor booking...';\n this.form.markAllAsTouched();\n this._dialog_ref.disableClose = true;\n /* istanbul ignore else */\n if (this.form.dirty && this.form.valid) {\n const attendees = this.form.controls.attendees.value;\n for (const attendee of attendees) {\n if (!attendee.email) {\n attendee.email = `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`;\n }\n }\n const new_booking = new Booking({ ...this.booking.toJSON(), ...this.form.value });\n this._bookings.save(new_booking).then(\n (bkn) => {\n this.event.emit({ reason: 'done', metadata: bkn });\n this._service.notifySuccess(\n this.booking.id\n ? 'Successfully updated visitors.'\n : 'Successfully added visitors.'\n );\n this._booking_state.replace(new Booking({ ...this.booking, ...bkn.toApiJSON() }));\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to ${this.booking.id ? 'update' : 'add'} visitors. Error: ${\n err.message || err\n }`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n else {\n this.loading = null;\n this._dialog_ref.disableClose = false;\n this._dialog_ref.close();\n }\n });\n }\n}\n","
\n
{{ booking.id ? 'Edit' : 'New' }} Visitors
\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from '../../overlays/visitors-form-modal/visitors-form-modal.component';\nimport { BaseClass, unique } from '@mckinsey-converge/base';;\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-booking',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class VisitorBookingItemComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Whether attendee list should be shown */\n public show_attendees: boolean;\n /** Whether all the attendees have checked in */\n public checked_in: boolean = false;\n /** Whether all attendees are being checked in */\n public loading: boolean;\n\n public matched_attendees = [];\n\n /** Whether event will start soon or has started */\n public get upcoming() {\n const status = this.event.timeBasedStatusLabel;\n return status === 'upcoming' || status === 'in_progress';\n }\n\n /** Display string for checkin statuses of all attendees */\n public get status(): string {\n const { checked_in, count } = this.checkedInStatus();\n return `${checked_in} / ${count}`;\n }\n\n\n /** Whether user is a match for */\n public is_match(person: any): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n !search ||\n person.name.toLowerCase().indexOf(search) >= 0 ||\n person.email.toLowerCase().indexOf(search) >= 0\n );\n }\n\n constructor(private _service: ApplicationService, private _bookings: BookingsService, private _dialog: MatDialog) {\n super();\n }\n\n public checkedInStatus() {\n const checked_in_users = this.event.checkInsArray;\n return this.event.attendees.reduce(\n (counts, user) => {\n /* istanbul ignore else */\n if (user.external) {\n counts.count++;\n /* istanbul ignore else */\n if (checked_in_users.indexOf(user.email) >= 0) {\n counts.checked_in++;\n }\n }\n return counts;\n },\n { checked_in: 0, count: 0 }\n );\n }\n\n /**\n * Checkin the attendee\n */\n public async checkin() {\n this.loading = true;\n const value = await this._bookings\n .checkin(this.event.id, {\n host_email: this.event.organiser.email,\n attendees: unique(this.event.attendees.map(user => ({ name: user.name, email: user.email }))),\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n })\n .catch((err) => {\n this._service.notifyError(`Error checking in all attendees for booking. Error: ${err.message || err}`);\n });\n if (value) {\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins: value.check_ins\n });\n this.checked.emit();\n }\n this.loading = false;\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n const subject = encodeURIComponent(\n `${this.event.title}\" at ${this.event.start_time}, ${this.event.date_string}`\n );\n return `mailto:${this.event.attendees.filter(user => !user.email.includes('@guest'))\n .map((user) => user.email)\n .join(',')}?Subject=${subject}\"`;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.search) {\n if (!this.search) this.show_attendees = false;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n this.timeout('on_search', () => this.show_attendees = !!this.search, 50);\n }\n if (changes.event) {\n const { checked_in, count } = this.checkedInStatus();\n this.checked_in = checked_in >= count;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n }\n }\n\n public openEditModal() {\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking: this.event,\n },\n }\n );\n }\n}\n","
\n
\n
\n \n
\n
\n \n {{ event.start_time }}\n - {{ event.duration > 0 ? event.end_time : '' }}\n \n All Day\n
\n
\n
{{ event.organiser?.name }}
\n
\n
{{ event.company.length }}
\n
{{ event.title }}
\n
{{ event.multi_rooms?.simple_name || event.local_room_name }}
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n \n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, convertTimezonedTimestampToLocalDateTz} from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'visitor-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class VisitorTimelineComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Filter string */\n @Input() public search: string;\n /** Whether all bookings should be shown */\n @Input() public show_all: boolean;\n /** List of visitor bookings for the current date */\n public bookings: Booking[] = [];\n /** List of filtered bookings */\n public filtered_bookings: Booking[] = [];\n /** Whether visitor list is loading */\n public loading: boolean;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n\n public get nowTz(){\n return DateNow(new Date())\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _bookings: BookingStateService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._bookings.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .subscribe((_) => {\n this.search$.next(`${this.dateTz.ms}|${_.id}`);\n this._bookings.setZone(_.id);\n })\n );\n this.subscription(\n 'bookings',\n this._bookings.filtered.subscribe((list) => this.updateEvents(list))\n );\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz) {\n this.search$.next(`${this.dateTz.ms}`);\n }\n /* istanbul ignore else */\n if (changes.search || changes.show_all) {\n this.filtered_bookings = this.filter(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, booking: Booking) {\n return booking.id;\n }\n\n public resetPolling() {\n this.interval(\n 'update_bookings',\n () => this.search$.next(`${this.dateTz.ms}|${this.nowTz.ms}`),\n 30 * 1000\n );\n }\n\n /** Filter the visitor bookings */\n public filter(str: string = '') {\n const search = str.toLowerCase();\n return this.bookings\n .filter((booking) => {\n return (\n booking.attendees.find(\n (user) =>\n user.name.toLowerCase().indexOf(search) >= 0 ||\n user.email.toLowerCase().indexOf(search) >= 0\n ) ||\n booking.title.toLowerCase().includes(search) ||\n booking.local_room_name.toLowerCase().includes(search)\n );\n })\n .filter((bkn) => (this.show_all ? true : bkn.has_visitors));\n }\n\n private updateEvents(list: Booking[]) {\n const unsorted_bookings = list.filter(\n (bkn) =>\n !bkn.declined &&\n bkn.room.zones.includes(this._org.building.id)\n );\n const bookings = unsorted_bookings.sort((a, b) => {\n if (a.date === b.date) {\n if (a.creator.name === b.creator.name) {\n return a.space.name > b.space.name ? 1 : -1;\n }\n return a.creator.name > b.creator.name ? 1 : -1;\n }\n return a.date > b.date ? 1 : -1;\n })\n this.bookings = bookings;\n this.filtered_bookings = this.filter(this.search);\n }\n}\n","
\n
\n \n
\n
\n
\n
Time
\n
Host
\n
Company
\n
Title
\n
Location
\n
Status
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
\n No visitors {{ search ? 'matching ' + '\"' + search + '\"' : '' }} for {{ date_display }}\n
\n
\n
\n","import { Component, Input, SimpleChanges, Renderer2, ElementRef, OnChanges, Output, EventEmitter} from '@angular/core';\n\nimport { BookingCheckinParams, User } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor',\n templateUrl: './visitor.component.html',\n styleUrls: ['./visitor.component.scss'],\n})\nexport class VisitorComponent implements OnChanges {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Status of the visitor */\n public status: string;\n /** Whether attendee is being checked in */\n public loading: boolean;\n\n /** Whether attendee is late */\n public get late() {\n return this.event.timeBasedStatusLabel === 'in_progress' && this.person.external;\n }\n\n /** Whether attendee has checked in */\n public get approved() {\n return this.event.checkInsArray.includes(this.person.email);\n }\n\n /** Whether user is a match for */\n public get is_match(): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n this.person.name.toLowerCase().indexOf(search) >= 0 ||\n this.person.email.toLowerCase().indexOf(search) >= 0 ||\n this.event.title.toLowerCase().indexOf(search) >= 0 ||\n this.event.local_room_name.toLowerCase().indexOf(search) >= 0\n );\n }\n\n public get invalid_email(): boolean {\n return !this.person.email || this.person.email.includes('@guest.mckinsey.com');\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n return `mailto:${this.person.email}?subject=\"${this.event.title}\"%20at%20${\n this.event.start_time\n },%20${this.event.date_string}${\n this.event.organiser.email.toLowerCase() !== this.person.email\n ? '&cc=' + this.event.organiser.email\n : ''\n }`;\n }\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _bookings: BookingsService,\n private _service: ApplicationService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.search) {\n if (this.search && !this.is_match) {\n this._renderer.addClass(this._element.nativeElement, 'not-match');\n } else {\n this._renderer.removeClass(this._element.nativeElement, 'not-match');\n }\n }\n }\n\n /**\n * Checkin the attendee\n */\n public checkin() {\n this.loading = true;\n const fields: BookingCheckinParams= {\n host_email: this.event.organiser.email,\n attendees: [{ name: this.person.name, email: this.person.email }],\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n };\n this._bookings.checkinIndividualVisitor(this.event.id, fields).subscribe(result => {\n const check_ins = {...result.check_ins};\n check_ins[this.person.email] = true;\n this.event.check_ins = result.check_ins;\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins,\n });\n this.checked.emit();\n this.loading = false;\n }); \n }\n\n\n public get companyString(){\n return this.person.external ? this.event.company.join(',') : 'Mckinsey'\n }\n}\n","\n \n\n
\n
\n
{{ person?.name || person?.email }}
\n
\n
{{ companyString }}
\n
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-visitors',\n templateUrl: './visitors.component.html',\n styleUrls: ['./visitors.component.scss'],\n})\nexport class VisitorsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Search filter string */\n public search_str: string;\n /** Whether all bookings should be listed */\n public show_all: boolean;\n\n public get has_visitor_space(): boolean {\n const building = this._org.building;\n return building && !!this._spaces.find(building.visitor_space || building.holding_bay);\n }\n\n public has_access: boolean;\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Visitors';\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building')?.subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id },\n });\n })\n );\n })\n }\n\n public newVisitorMeeting() {\n const now = DateNow(new Date());\n const date = now.setValue({ minute: Math.ceil(now.minutes / 5) * 5 });\n const building = this._org.building;\n const space = this._spaces.find(building.visitor_space || building.holding_bay);\n const booking = new Booking({ \n start_epoch: date.seconds,\n end_epoch: date.addValue({ minutes: 60 }),\n room: space\n });\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking,\n },\n }\n );\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n \n \n \n
\n \n All meetings\n \n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Route, RouterModule } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { VisitorsComponent } from './visitors.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { VisitorTimelineComponent } from './timeline/timeline.component';\nimport { VisitorBookingItemComponent } from './timeline/item/item.component';\nimport { VisitorComponent } from './timeline/visitor/visitor.component';\nimport { VisitorsFormModalComponent } from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { EventFormComponent } from './overlays/visitors-form-modal/event-form/event-form.component';\nimport { VisitorFormComponent } from './overlays/visitors-form-modal/visitor-form/visitor-form.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: VisitorsComponent },\n { path: ':level', component: VisitorsComponent },\n { path: '**', redirectTo: '' },\n];\n\n@NgModule({\n declarations: [\n VisitorsComponent,\n VisitorTimelineComponent,\n VisitorBookingItemComponent,\n VisitorComponent,\n VisitorsFormModalComponent,\n EventFormComponent,\n VisitorFormComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n ],\n})\nexport class VisitorsModule {}\n","import { EnvironmentData } from '@mckinsey-converge/environment';\n\nexport const environment: EnvironmentData = {\n production: true,\n hmr: false,\n heap_io_id: 91016686,\n};\n","/**\n * GENERAL APPLICATION SETTINGS\n */\nimport { SettingsData } from '@mckinsey-converge/data-common';\n\nconst general = {\n menu: {\n items: [\n {\n name: 'Day View',\n route: '/day-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'wb_sunny',\n },\n },\n {\n name: 'Week View',\n route: '/week-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'date_range',\n },\n },\n {\n name: 'Catering',\n route: '/catering',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'room_service',\n },\n },\n {\n name: 'Visitors',\n route: '/visitors',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'face',\n },\n },\n {\n name: 'Reports',\n route: '/reports',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'warning',\n },\n },\n {\n name: 'Room Admin',\n route: '/room-admin',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'settings',\n }\n },\n ],\n copyright: 'PlaceOS',\n },\n};\n/*=========================*\\\n|| BOOKING FLOW SETTINGS ||\n\\*=========================*/\nconst booking = {\n booking_types: [\n { name: 'Internal', id: 'internal' },\n { name: 'External', id: 'external' },\n ],\n show_fields: [\n 'attendees',\n 'body',\n 'catering',\n 'dateTz',\n 'duration',\n 'organiser',\n 'title',\n 'type',\n 'all_day',\n 'has_catering',\n 'is_recurrent',\n 'company',\n 'is_multiroom',\n 'merged'\n ],\n html_body: false,\n multiple_spaces: true,\n desk_start: 9,\n};\n\n/*=========================*\\\n|| DAY VIEW SETTINGS ||\n\\*=========================*/\nconst day_view = {\n dragdrop: true,\n};\n\n/*=========================*\\\n|| VISITORS SETTINGS ||\n\\*=========================*/\nconst visitors = {};\n\n/*=========================*\\\n|| REPORTS SETTINGS ||\n\\*=========================*/\nconst reports = {};\n/**\n * ROOT APPLICATION SETTINGS\n */\nconst app = {\n title: 'McKinsey Concierge',\n description: 'McKinsey Concierge UI written with Angular Framework',\n short_name: 'CONCIERGE',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: '#0a0d2e',\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: '',\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/concierge/'\n },\n general,\n booking,\n day_view,\n visitors,\n reports,\n};\n\n/**\n * ROOT SETTIGNS\n */\nexport const DEFAULT_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/concierge',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false,\n },\n app,\n mock: false,\n frontend: 'concierge',\n};\n","\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"],"sourceRoot":"webpack:///"} \ No newline at end of file +{"version":3,"sources":["/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/angular-animations.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/animations.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/cdk-drop-list-scroll-container.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/general.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/image.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/numbers-only.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/replace.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.reducer.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/buildings/src/lib/buildings.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/api.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/app.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base-api.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking-filter.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.data.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.selectors.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/room-results/room-results.viewmodel.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking-state.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.types.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookings.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookingsPaginated.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/space.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-categories.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-category.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-item.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-items.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-menu.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-notes.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-order.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/close-modal-dialog-service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/collapse-accordion-service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/data-common.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/hotkeys.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/building.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/level.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/paginated.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/recurrence/recurrence.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/report.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/reports.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/service-manager.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/settings.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/spaces.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spec-helpers.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/users.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/validation.utilities.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/lib/date-tz.class.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/version.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/legacy-overlays.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/hover-class.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/legacy-ui.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.model.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.selectors.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/effects.testing.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/rooms/src/lib/rooms.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/localstorage.wrapper.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/storage.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/alert-banner/alert-banner.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/auto-complete-chip-select-item.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/groupHeader.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/base-template.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/dropdown-trigger-for.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/collapse-header/collapse-header.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.service.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-date-picker/date-tz-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-duration-field/date-tz-duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-time-field/date-tz-time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/duration-field/duration-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/error-message/error-message.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/calendar-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/chevron-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/close/close-icon.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/informational-image/informational-image.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/label/label.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/legend-dropdown/legend-dropdown.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/mck-date-picker/mck-date-picker.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal-button-row/modal-button-row.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal/modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/filter.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/sanitise.pipe.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/radio-select/radio-select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select-option/select-option.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/selected-chip-count/selected-chip-count.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/spacer/spacer.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/switch-group/switch-group.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/time-field/time-field.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/toggle/toggle.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.directive.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.enums.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/types.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/ui.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/utils/time.utils.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.html","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/index.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.actions.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.effects.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.module.ts","/home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.reducer.ts","./$_lazy_route_resource lazy namespace object","./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/bookings/booking-modal/booking-modal.component.ts","./src/app/bookings/booking-modal/booking-modal.component.html","./src/app/bookings/booking-modal/catering/catering.component.ts","./src/app/bookings/booking-modal/catering/catering.component.html","./src/app/bookings/booking-modal/catering/order-details/category/category.component.ts","./src/app/bookings/booking-modal/catering/order-details/category/category.component.html","./src/app/bookings/booking-modal/catering/order-details/order-details.component.ts","./src/app/bookings/booking-modal/catering/order-details/order-details.component.html","./src/app/bookings/booking-modal/catering/order-list/item/item.component.ts","./src/app/bookings/booking-modal/catering/order-list/item/item.component.html","./src/app/bookings/booking-modal/catering/order-list/order-list.component.ts","./src/app/bookings/booking-modal/catering/order-list/order-list.component.html","./src/app/bookings/booking-modal/find-space/filters/filters.component.ts","./src/app/bookings/booking-modal/find-space/filters/filters.component.html","./src/app/bookings/booking-modal/find-space/find-space.component.ts","./src/app/bookings/booking-modal/find-space/find-space.component.html","./src/app/bookings/booking-modal/find-space/item/item.component.ts","./src/app/bookings/booking-modal/find-space/item/item.component.html","./src/app/bookings/booking-modal/form/form.component.ts","./src/app/bookings/booking-modal/form/form.component.html","./src/app/bookings/bookings.module.ts","./src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.ts","./src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.html","./src/app/calendar/calendar.module.ts","./src/app/calendar/day-view/approvals-view/approvals-view.component.ts","./src/app/calendar/day-view/approvals-view/approvals-view.component.html","./src/app/calendar/day-view/approvals-view/event/event.component.ts","./src/app/calendar/day-view/approvals-view/event/event.component.html","./src/app/calendar/day-view/day-view.component.ts","./src/app/calendar/day-view/day-view.component.html","./src/app/calendar/day-view/day-view.module.ts","./src/app/calendar/day-view/space/event/event.component.ts","./src/app/calendar/day-view/space/event/event.component.html","./src/app/calendar/day-view/space/space.component.ts","./src/app/calendar/day-view/space/space.component.html","./src/app/calendar/day-view/timeline/timeline.component.ts","./src/app/calendar/day-view/timeline/timeline.component.html","./src/app/calendar/meeting-details-modal/catering/catering.component.ts","./src/app/calendar/meeting-details-modal/catering/catering.component.html","./src/app/calendar/meeting-details-modal/details/details.component.ts","./src/app/calendar/meeting-details-modal/details/details.component.html","./src/app/calendar/meeting-details-modal/meeting-details-modal.component.ts","./src/app/calendar/meeting-details-modal/meeting-details-modal.component.html","./src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.ts","./src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.html","./src/app/calendar/meeting-details-modal/private-details/private-details.component.ts","./src/app/calendar/meeting-details-modal/private-details/private-details.component.html","./src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.ts","./src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.html","./src/app/calendar/meeting-details-modal/requirements/requirements.component.ts","./src/app/calendar/meeting-details-modal/requirements/requirements.component.html","./src/app/calendar/week-view/day-display/day-display.component.ts","./src/app/calendar/week-view/day-display/day-display.component.html","./src/app/calendar/week-view/day-display/item/item.component.ts","./src/app/calendar/week-view/day-display/item/item.component.html","./src/app/calendar/week-view/timeline/timeline.component.ts","./src/app/calendar/week-view/timeline/timeline.component.html","./src/app/calendar/week-view/week-view.component.ts","./src/app/calendar/week-view/week-view.component.html","./src/app/calendar/week-view/week-view.module.ts","./src/app/catering/catering.component.ts","./src/app/catering/catering.component.html","./src/app/catering/catering.module.ts","./src/app/catering/catering.storage.ts","./src/app/catering/menu/item-list/item-list.component.ts","./src/app/catering/menu/item-list/item-list.component.html","./src/app/catering/menu/item/item.component.ts","./src/app/catering/menu/item/item.component.html","./src/app/catering/menu/menu.component.ts","./src/app/catering/menu/menu.component.html","./src/app/catering/orders/item/item.component.ts","./src/app/catering/orders/item/item.component.html","./src/app/catering/orders/orders.component.ts","./src/app/catering/orders/orders.component.html","./src/app/catering/overlays/category-modal/category-modal.component.ts","./src/app/catering/overlays/category-modal/category-modal.component.html","./src/app/catering/overlays/group-modal/group-modal.component.ts","./src/app/catering/overlays/group-modal/group-modal.component.html","./src/app/catering/overlays/item-modal/item-modal.component.ts","./src/app/catering/overlays/item-modal/item-modal.component.html","./src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.ts","./src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.html","./src/app/catering/overlays/order-details-modal/items/items.component.ts","./src/app/catering/overlays/order-details-modal/items/items.component.html","./src/app/catering/overlays/order-details-modal/messages/messages.component.ts","./src/app/catering/overlays/order-details-modal/messages/messages.component.html","./src/app/catering/overlays/order-details-modal/order-details-modal.component.ts","./src/app/catering/overlays/order-details-modal/order-details-modal.component.html","./src/app/components/access-denied/access-denied.component.ts","./src/app/components/access-denied/access-denied.component.html","./src/app/components/sidebar/sidebar.component.ts","./src/app/components/sidebar/sidebar.component.html","./src/app/components/topbar-header/topbar-header.component.ts","./src/app/components/topbar-header/topbar-header.component.html","./src/app/login/login.component.ts","./src/app/login/login.component.html","./src/app/reports/report-display/report-display.component.ts","./src/app/reports/report-display/report-display.component.html","./src/app/reports/report-table/report-table.component.ts","./src/app/reports/report-table/report-table.component.html","./src/app/reports/reports.component.ts","./src/app/reports/reports.component.html","./src/app/reports/reports.module.ts","./src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.ts","./src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.html","./src/app/room-admin/manage-photos/manage-photos.component.ts","./src/app/room-admin/manage-photos/manage-photos.component.html","./src/app/room-admin/room-admin-routing.module.ts","./src/app/room-admin/room-admin.component.ts","./src/app/room-admin/room-admin.component.html","./src/app/room-admin/room-admin.module.ts","./src/app/room-admin/room-details/room-details-wrapper.component.ts","./src/app/room-admin/room-details/room-details.component.ts","./src/app/room-admin/room-details/room-details.component.html","./src/app/room-admin/rooms-table/rooms-table-datasource.ts","./src/app/room-admin/rooms-table/rooms-table.component.ts","./src/app/room-admin/rooms-table/rooms-table.component.html","./src/app/room-admin/services/index.ts","./src/app/room-admin/services/read-local-pic.service.ts","./src/app/room-admin/services/resize.service.ts","./src/app/room-admin/services/room-admin.service.ts","./src/app/room-admin/util/file-drag-n-drop.directive.ts","./src/app/room-admin/util/room-admin-utility.ts","./src/app/shared/shared.module.ts","./src/app/shell/shell.component.ts","./src/app/shell/shell.component.html","./src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.ts","./src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.html","./src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.ts","./src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.html","./src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.ts","./src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.html","./src/app/visitors/timeline/item/item.component.ts","./src/app/visitors/timeline/item/item.component.html","./src/app/visitors/timeline/timeline.component.ts","./src/app/visitors/timeline/timeline.component.html","./src/app/visitors/timeline/visitor/visitor.component.ts","./src/app/visitors/timeline/visitor/visitor.component.html","./src/app/visitors/visitors.component.ts","./src/app/visitors/visitors.component.html","./src/app/visitors/visitors.module.ts","./src/environments/environment.ts","./src/environments/settings.ts","./src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wIAAwC;AACxC,0IAAwC;;;;;;;;;;;;;;;ACDxC,kJAAiF;AAEpE,kCAA0B,GAAG,oBAAO,CAAC,MAAM,EAAE;IACtD,uBAAU,CAAC,QAAQ,EAAE;QACjB,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAChC,oBAAO,CAAC,GAAG,EAAE,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;KACnD,CAAC;IACF,uBAAU,CAAC,QAAQ,EAAE;QACjB,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAClC,oBAAO,CAAC,GAAG,EAAE,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;KACjD,CAAC;CACL,CAAC,CAAC;AAEU,sCAA8B,GAAG,oBAAO,CAAC,MAAM,EAAE;IAC1D,kBAAK,CAAC,MAAM,EAAE,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACjD,kBAAK,CAAC,MAAM,EAAE,kBAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/C,uBAAU,CAAC,eAAe,EAAE,oBAAO,CAAC,eAAe,CAAC,CAAC;CACxD,CAAC,CAAC;;;;;;;;;;;;;;;ACjBH,0HAAyC;AACzC,kIAA+C;;AAE/C,MAGa,gBAAgB;;AAH7B,4CAGgC;oDAAnB,gBAAgB;+GAAhB,gBAAgB,kBAFlB,CAAC,qBAAY,CAAC;wFAEZ,gBAAgB,cAFjB,qBAA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ACV,CAAC;AAEF;;GAEG;AACU,wBAAgB,GAA6B;IACtD,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE;QACN,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,KAAK;KACrB;IACD,GAAG;IACH,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,WAAW;CACxB,CAAC;;;;;;;;;;;;;;;AC7JF,0HAA+C;AAI/C,iHAAyD;;;AAEzD,IAAI,yBAAW,CAAC,UAAU,EAAE;IAC1B,qBAAc,EAAE,CAAC;CAClB;AAED,qCAAwB,gBAAgB,+BAAW;KAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","file":"main-es2015.js","sourcesContent":["export * from './lib/animations.module';\nexport * from './lib/angular-animations'\n","import { trigger, transition, style, animate, state } from '@angular/animations';\n\nexport const ANIMATION_SHOW_ENTER_LEAVE = trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(300, style({ opacity: 1, height: '*' }))\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(300, style({ opacity: 0, height: 0 }))\n ])\n]);\n\nexport const ANIMATION_SHOW_CONTRACT_EXPAND = trigger('show', [\n state('show', style({ opacity: 1, height: '*' })),\n state('hide', style({ opacity: 0, height: 0 })),\n transition('show <=> hide', animate('200ms ease-in'))\n]);\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class AnimationsModule {}\n","export * from './lib/base.module';\nexport * from './lib/types.utilities';\nexport * from './lib/general.utilities';\nexport * from './lib/base.class';\nexport * from './lib/base.directive';\nexport * from './lib/date.utils'\nexport * from './lib/date.spec-helpers'\nexport * from './lib/replace.pipe'\nexport * from './lib/cdk-drop-list-scroll-container.directive'\nexport * from './lib/image.directive';\n","import { Subscription, BehaviorSubject } from \"rxjs\";\n\nexport class BaseClass {\n /** Store for named timers */\n protected _timers: { [name: string]: number } = {};\n /** Store for named intervals */\n protected _intervals: { [name: string]: number } = {};\n /** Store for named subscription unsub callbacks */\n protected _subscriptions: { [name: string]: (Subscription | (() => void)) } = {};\n /** Subject which stores the initialised state of the object */\n protected readonly _initialised = new BehaviorSubject(false);\n\n /** Observable of the initialised state of the object */\n public get initialised(): BehaviorSubject {\n return this._initialised;\n }\n /** Whether the object has been initialised */\n public get is_initialised(): boolean {\n return this._initialised.getValue();\n }\n\n protected destroy() {\n for (const key in this._timers) {\n if (this._timers.hasOwnProperty(key)) {\n this.clearTimeout(key);\n }\n }\n for (const key in this._intervals) {\n if (this._intervals.hasOwnProperty(key)) {\n this.clearInterval(key);\n }\n }\n for (const key in this._subscriptions) {\n if (this._subscriptions.hasOwnProperty(key)) {\n this.unsub(key);\n }\n }\n }\n\n /**\n * Creates a named timer\n * @param name Name of the timer\n * @param fn Callback function for the timer\n * @param delay Callback delay\n */\n protected timeout(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearTimeout(name);\n this._timers[name] = setTimeout(() => {\n fn();\n this._timers[name] = null;\n }, delay);\n } else {\n throw new Error(\n name ? 'Cannot create named timeout without a name' : 'Cannot create a timeout without a callback'\n );\n }\n }\n\n /**\n * Clears the named timer\n * @param name Timer name\n */\n protected clearTimeout(name: string) {\n if (this._timers[name]) {\n clearTimeout(this._timers[name]);\n this._timers[name] = null;\n }\n }\n\n /**\n * Creates a named interval\n * @param name Name of the interval\n * @param fn Callback function for the interval\n * @param delay Callback delay\n */\n protected interval(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearInterval(name);\n this._intervals[name] = setInterval(() => fn(), delay);\n } else {\n throw new Error(\n name ? 'Cannot create named interval without a name' : 'Cannot create a interval without a callback'\n );\n }\n }\n\n /**\n * Clears the named interval\n * @param name Timer name\n */\n protected clearInterval(name: string) {\n if (this._intervals[name]) {\n clearInterval(this._intervals[name]);\n this._intervals[name] = null;\n }\n }\n\n /**\n * Store named subscription\n * @param name Name of the subscription\n * @param unsub Unsubscribe callback or Subscription object\n */\n protected subscription(name: string, unsub: Subscription | (() => void)) {\n this.unsub(name);\n this._subscriptions[name] = unsub\n }\n\n /**\n * Call unsubscribe callback with the given name\n * @param name\n */\n protected unsub(name: string) {\n if (this._subscriptions && this._subscriptions[name]) {\n this._subscriptions[name] instanceof Subscription\n ? (this._subscriptions[name] as Subscription).unsubscribe()\n : (this._subscriptions[name] as any)();\n this._subscriptions[name] = null;\n }\n }\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\n\n@Directive({\n selector: 'a-very-basic-component-base-that-should-not-be-used'\n})\nexport class BaseDirective extends BaseClass implements OnDestroy {\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NumbersOnlyDirective } from './numbers-only.directive';\n\n@NgModule({\n imports: [CommonModule,],\n declarations: [\n NumbersOnlyDirective\n ],\n exports: [\n NumbersOnlyDirective\n ]\n})\nexport class BaseModule {\n}\n","import {\n Directive,\n Input,\n Renderer2,\n SimpleChanges,\n OnChanges,\n ContentChildren,\n QueryList,\n AfterContentInit\n} from '@angular/core';\nimport { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport { BaseDirective } from './base.directive';\n\nexport enum ScrollDirection {\n NONE,\n X,\n Y,\n BOTH\n}\n\n@Directive({\n selector: '[cdkDropList][scrollContainer]'\n})\nexport class CdkDropListScrollContainer extends BaseDirective\n implements OnChanges, AfterContentInit {\n /** Direction of scroll to determine updating the position of the drop list */\n @Input() direction: ScrollDirection = ScrollDirection.X;\n /** Name of the scroll container for the list */\n @Input() scrollContainer: string;\n /** Scroll container element */\n public element: HTMLElement;\n /** Last scroll position */\n public last_scroll: { x: number; y: number } = { x: 0, y: 0 };\n\n /** Draggable children elements */\n @ContentChildren(CdkDrag) private items: QueryList;\n\n constructor(private _cdkDropList: CdkDropList, private _renderer: Renderer2) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.scrollContainer && this.scrollContainer) {\n this.element = this._cdkDropList.element.nativeElement.closest(\n this.scrollContainer\n ) as HTMLElement;\n }\n }\n\n public ngAfterContentInit(): void {\n this.subscription(\n 'drag_items',\n this.items.changes.subscribe((items: QueryList) => {\n const list = items.toArray();\n list.forEach((i, index) => {\n this.subscription(\n `list-item-${index}`,\n this._renderer.listen(i.element.nativeElement, 'mousedown', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'mouseup', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n this.subscription(\n `list-item-touch-${index}`,\n this._renderer.listen(i.element.nativeElement, 'touchstart', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'touchend', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n });\n })\n );\n }\n\n /** Start listing for scroll events on the container */\n public onDrag() {\n if (this.element) {\n this.subscription(\n 'scroll',\n this._renderer.listen(this.element, 'scroll', () => this.updateListPosition())\n );\n }\n }\n\n /** Stop listening for scroll events on the container */\n public onDrop() {\n this.unsub('scroll');\n }\n\n /**\n * Forcefully update the position data of the drop list\n */\n private updateListPosition() {\n this.timeout(\n 'update_positions',\n () => {\n const scroll = { x: this.element.scrollLeft, y: this.element.scrollTop };\n if (\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.Y) &&\n scroll.y !== this.last_scroll.y) ||\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.X) &&\n scroll.x !== this.last_scroll.x)\n ) {\n (this._cdkDropList._dropListRef as any)._cacheOwnPosition();\n (this._cdkDropList._dropListRef as any)._siblings.forEach(i =>\n i.isReceiving() ? i._cacheOwnPosition() : null\n );\n }\n this.last_scroll = scroll;\n },\n 50\n );\n }\n}\n","import MockDate from 'mockdate';\n\n/**\n * August 13, 2020 at 7:22:12 UTC\n */\nconst initialTime = 1597346532 * 1000;\n\nexport const mockDate = (timeOverride = initialTime) => MockDate.set(new Date(timeOverride));\n\nexport const resetDate = () => MockDate.reset();\n","import { DateNow, DateTZ } from '@mckinsey-converge/date-tz'\nimport { DateTime } from 'luxon';\nimport * as dayjs from 'dayjs';\nimport {\n dayJsHoursMinutes,\n dayJsTimeFormatString,\n} from './general.utilities';\n\n/**\n * Allows you to split up durations into a group.\n */\nexport interface DurationGroup {\n /**\n * Step amount to generate between start and max.\n */\n step: number;\n /**\n * Where to start in minutes.\n */\n start: number;\n /**\n * Where to end in minutes.\n */\n max: number;\n}\n\n/**\n * Find the multiple of `stepMinute` which is closest to the 'minutes' property of the given date.\n * @param date - Any Lexon date.\n * @param stepMinute - The number of minutes between one timeslot and the next. Integer value\n * 1 to 59, inclusive.\n */\n// R--- depreciate this one\nexport const closestToTimeSlot = (date: DateTime, stepMinute: number, start: number = 0) : DateTime => {\n return date.set({ millisecond: 0, second: 0, minute: Math.ceil(date.minute / stepMinute) * stepMinute })\n .plus({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\nexport const closestToTimeSlotTz = (dateTz: DateTZ, stepMinute: number, start: number = 0) : DateTZ => {\n return dateTz.setValue({ millisecond: 0, second: 0, minute: Math.ceil(dateTz.minutes / stepMinute) * stepMinute })\n .addValue({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as hrs, or minutes as mins\n */\nexport function durationHumanized(duration: number, short: boolean = false): string {\n if (!duration || duration < 0) {\n return '';\n }\n const h = Math.floor(duration / 60);\n let d = `${h >= 1 ? h + (short ? ' hr' : ' hour' + (h === 1 ? '' : 's')) : ''}`;\n if (duration % 60 !== 0) {\n if (d) {\n d += short ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${m >= 1 ? m + (short ? ' min' : ' minute' + (m === 1 ? '' : 's')) : ''}`;\n }\n return d;\n}\n\nexport const weekDayMonthYearFormat = (date: DateTZ): string => date.formatDate('ccc dd MMM yyyy');\n\n/**\n * Tries to extract best-fit input\n * @return undefined if not valid. otherwise if good\n */\nexport const extractDateFromInput = (input: string,\n checkHour,\n startDate: dayjs.Dayjs): dayjs.Dayjs | undefined => {\n // check if input has am/pm or normal 24 hour time.\n // let date = dayjs(input, 'HH:mm');\n // let date = dayjs(input, 'h:mma');\n let date = dayjs(input, dayJsTimeFormatString());\n if (!date.isValid()) {\n // patch if time is in format xx:x to assume you meant xx:x0\n let cleanedInput = input;\n const times = input.split(':');\n if(!input){\n return undefined\n }\n if (times.length === 2) {\n if (times[1].length === 1) {\n cleanedInput = `${times[0]}:${times[1]}0`;\n }\n }\n // may be other input, lets try next value (without am/pm)\n date = dayjs(cleanedInput, dayJsHoursMinutes());\n // might be just purely an hour\n if (!date.isValid() && checkHour) {\n date = dayjs(input, 'H');\n }\n }\n // We expect input times to be in the future. If now is in the afternoon, this\n // simple block will ensure the returned date is also in the afternoon.\n //\n // NB: dayjs parses times as morning by default.\n if (date.isValid()) {\n // Move to the selected start date\n date = date.month(startDate.month()).date(startDate.date()).year(startDate.year());\n if (startDate.hour() > date.hour() && date.date() === startDate.date()) {\n date = date.set('hour', date.hour() + 12);\n }\n }\n\n return date.isValid() ? date : undefined;\n};\n\n\n/**\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 3. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n * @param step The step between time slots.\n * @param input The input text.\n */\nexport const nearestStepToInput = (\n step: number,\n input: string,\n currentStartDate: number,\n start: number = 0\n): string => {\n let date = extractDateFromInput(input, false, dayjs(currentStartDate));\n if (date) {\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, step, start);\n return closestDate.toFormat(dayJsHoursMinutes());\n } else {\n return input;\n }\n};\n/**\n * Similiar to {@link nearestStepToInput} instead:\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds which duration group is closest to the currentStartDate. If not found\n * return vanilla text.\n * 3. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 4. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n */\nexport const nearestDurationToInput = (durationGroups: DurationGroup[],\n currentStartDate: number,\n value: string): string => {\n\n let date = extractDateFromInput(value, false, dayjs(currentStartDate));\n\n if (!date) {\n // Check if the input is a duration \n const duration = parseInt(value);\n if (typeof (duration) === 'number' && value.indexOf(':') === -1 && duration > 12) {\n date = dayjs(currentStartDate).add(duration, 'm');\n }\n }\n\n if (date) {\n const minutes = date.diff(currentStartDate, 'minute');\n const closestDurationGroup = durationGroups.find(d => {\n return (minutes <= d.max);\n });\n if (closestDurationGroup) {\n const offset = [closestDurationGroup].reduce((previousValue, currentValue) => {\n return previousValue + currentValue.start;\n }, 0);\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, closestDurationGroup.step, 0);\n return closestDate.toFormat(dayJsHoursMinutes());\n }\n }\n\n return value;\n};\n\nexport const resetSecondsOnTimestamp = (timestamp: number) => {\n return DateTime.fromMillis(timestamp).set({ second: 0, millisecond: 0 }).toMillis();\n}\n\nexport const formatDateWithSuffix = (date: string): string => {\n const dateObj = new Date(date);\n const day = dateObj.getDate();\n const month = dateObj.toLocaleString(\"default\", { month: \"short\" });\n const year = dateObj.getFullYear();\n return `${day}${nthNumber(day)} ${month} ${year}`; //this.event.date_string;\n}\n\nconst nthNumber = (number) => {\n return number > 0\n ? [\"th\", \"st\", \"nd\", \"rd\"][\n (number > 3 && number < 21) || number % 10 > 3 ? 0 : number % 10\n ]\n : \"\";\n};\n\nexport const getListOfDateFormat = () => {\n return [\t\n 'MMMM dd y', \t//March 07 2023\n 'MMM dd, y',\t//Mar 07 2023\n 'MMMM dd',\t\t//March 07\n 'MMM dd', \t\t//Mar 07\n 'MM dd', \t\t//03 07\n\n 'MM-dd-yy',\t\t//03-07-23\n 'MM-dd-yyyy',\t//03-07-2023\n 'MMMM-dd-yyyy', //March-07-2023\n 'MMMM-dd-yy',\t//March-07-23\n\n 'MMMM-dd',\t\t//March-07\n 'MMM-dd',\t\t//Mar-07\n \n 'MMM-dd-y',\t\t//Mar-07-2023\n\n 'MM/dd',\t\t//03/07\n 'MM/dd/yy',\t\t//03/07/23\n 'MM/dd/yyyy',\t//03/07/2023\n \n 'dd/MM',\t\t//07/03\n 'dd/MM/yy',\t\t//07/03/23\n 'dd/MM/yyyy',\t//07/03/2023\n \n 'dd-MMMM',\t\t//07-March\n 'dd MMMM',\t\t//07 March\n 'dd-MMM',\t\t//07-Mar\n 'dd MMM',\t\t//07 Mar\n\n 'dd-MM-y',\t\t//07-03-23\n 'dd MMMM yy',\t//07 March 23\n \n 'dd/MMM/y',\t //07/Mar/2023\n 'dd/MMMM/y', //07/March/2023\n 'dd/MMM/yy', //07/Mar/23\n 'dd/MMMM/yy', //07/March/23\n \n\n 'dd-MMMM-yy',\t//07-March-23\n 'dd-MMM-yy',\t//07-Mar-23\n 'dd-MM-yy',\t\t//07-03-23\n 'MMMM-dd-yy',\t//March-07-23\n 'MMM-dd-yy',\t//Mar-07-23\n\n 'MMMM dd yy',\t//March 07 23\n 'MMM dd, yy',\t//Mar 07 23\n 'MM dd, yy',\t//03 07 23\n\n 'dd MMMM y',\t//07 March 2023\n 'dd MMM, y',\t//07 Mar 2023\n 'dd MM, yy',\t//07 03, 23\n 'dd-MMM-y',\t//07-Mar-2023\n\n 'h:mm a', // 3:30 pm\n 'h:mma' // 3:30 pm\n\n ];\n}","import { HashMap, Point } from './types.utilities';\n\nimport * as dayjs from 'dayjs';\nimport * as utc from 'dayjs/plugin/utc';\nimport * as timezone from 'dayjs/plugin/timezone';\nimport * as isToday from 'dayjs/plugin/isToday';\nimport * as weekday from 'dayjs/plugin/weekday';\nimport * as customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n// TODO: this is not the best place to import this timezone addition\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isToday);\ndayjs.extend(weekday);\ndayjs.extend(customParseFormat);\n\n/** Available console output streams. */\nexport type ConsoleStream = 'debug' | 'warn' | 'log' | 'error' | 'info';\n\n/**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\nexport function log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false,\n app_name: string = 'STAFF'\n) {\n if ((window as any).debug || force) {\n const colors: string[] = [\n 'color: #E91E63',\n 'color: #3F51B5',\n 'color: default',\n ];\n if (args) {\n console[stream](\n `%c[${app_name}]%c[${type}] %c${msg}`,\n ...colors,\n args\n );\n } else {\n console[stream](`%c[${app_name}]%c[${type}] %c${msg}`, ...colors);\n }\n }\n}\n\n/**\n * Get item from the nested object\n * @param keys List of sub-keys to search for\n * @param map Object to search\n */\n export function getItemWithKeys(keys: string[], map: HashMap) {\n const key = keys[0];\n if (map && key in map) {\n return keys.length > 1\n ? getItemWithKeys(keys.slice(1), map[key] || {})\n : map[key];\n }\n return null;\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the platform is a mobile device.\n */\nexport function isMobileDevice(): boolean {\n const r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;\n return !!navigator.userAgent.match(r);\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Mobile Safari.\n */\nexport function isMobileSafari(): boolean {\n const agent = navigator.userAgent;\n return !!(\n agent.match(/iPhone|iPad|iPod/) &&\n agent.match(/AppleWebKit/) &&\n !agent.match('CriOS')\n );\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Android Chrome.\n */\nexport function isAndroidChrome(): boolean {\n const agent = navigator.userAgent;\n return !!(agent.match(/Android/) && agent.match(/Chrome/));\n}\n\n/**\n * Generate string representation of a number with zeros padding the length\n * @param value Number to pad with zeros\n * @param length Length of the resulting string\n */\nexport function padZero(value: number, length: number): string {\n let str = value.toString();\n while (str.length < length) {\n str = '0' + str;\n }\n return str;\n}\n\n/**\n * Remove duplicates from the given array\n * @param array List of items to remove duplicates from\n * @param key Key on array objects to compare for uniqueness\n */\nexport function unique(array: T[], key: keyof T | undefined = undefined) {\n return array.filter(\n (el, pos, arr) =>\n el &&\n arr.indexOf(\n key\n ? arr.find((i) => i && i[key] === el[key])\n : arr.find((i) => i === el)\n ) === pos\n );\n}\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as h\n */\nexport function humaniseDuration(durationInput: number, size: string = 'long') {\n const duration = Math.floor(durationInput);\n if (!duration || duration < 0) {\n return '';\n }\n let singular = false;\n let format = { hours: ' hour', minutes: ' minute' };\n switch (size) {\n case 'medium':\n format = { hours: 'hr', minutes: 'min' };\n break;\n case 'short':\n format = { hours: 'h', minutes: 'm' };\n singular = true;\n break;\n }\n const h = Math.floor(duration / 60);\n let d = `${\n h >= 1\n ? h +\n (singular ? format.hours : format.hours + (h === 1 ? '' : 's'))\n : ''\n }`;\n if (duration % 60 !== 0) {\n if (d) {\n d += singular ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${\n m >= 1\n ? m +\n (singular\n ? format.minutes\n : format.minutes + (m === 1 ? '' : 's'))\n : ''\n }`;\n }\n return d;\n}\n\n/**\n * Get a filtered list of items\n * @param filter Value to filter on\n * @param items List of results to filter\n * @param fields Fields to check for matches on each item\n */\nexport function filterList(\n filter: string,\n items?: T[],\n fields: string[] = ['id']\n): T[] {\n let results: any[];\n // Tokenise filter string\n const filters = (filter || '').toLowerCase().split(' ');\n const list = {};\n for (const f of filters) {\n /* istanbul ignore else */\n if (f) {\n /* istanbul ignore else */\n if (!list[f]) {\n list[f] = 0;\n }\n list[f]++;\n }\n }\n // Group similar tokens\n const parts = [];\n for (const f in list) {\n /* istanbul ignore else */\n if (list.hasOwnProperty(f)) {\n parts.push({ word: f, count: list[f], regex: new RegExp(f, 'gi') });\n }\n }\n parts.sort(\n (a, b) => b.word.length - a.word.length || a.word.localeCompare(b.word)\n );\n const item_list = JSON.parse(JSON.stringify(items || []));\n /* istanbul ignore else */\n if (filter) {\n results = item_list.filter((item) => {\n let match_count = 0;\n item.match_index = 65535;\n item.match = '';\n const field_list = {};\n // Initialise field match variables\n for (const f of fields) {\n field_list[f] = {\n value: (item[f] || '').toLowerCase(),\n index: 65536,\n matched: 0,\n };\n }\n // Search for matches with the tokenised filter string\n for (const i of parts) {\n /* istanbul ignore else */\n if (i.word) {\n // Check fields for matches\n for (const f of fields) {\n const field = field_list[f];\n const index = field.value.indexOf(i.word);\n field.index = index < field.index ? index : field.index;\n field.matches = (\n field.value.match(i.regex) || []\n ).length;\n field.value = field.value.replace(i.regex, ' ');\n }\n // Update token match count\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.matches >= i.count) {\n match_count++;\n // Update field matches\n let changed = 0;\n const tokens = (\n item[`match_${f}`] ||\n item[f] ||\n ''\n ).split(' ');\n for (const k of tokens) {\n /* istanbul ignore else */\n if (changed >= i.count) {\n break;\n }\n /* istanbul ignore else */\n if (\n k.toLowerCase().indexOf(i.word) >= 0 &&\n k.indexOf('`') < 0\n ) {\n tokens[tokens.indexOf(k)] = k.replace(\n i.regex,\n '`$&`'\n );\n changed++;\n }\n }\n item[`match_${f}`] = tokens.join(' ');\n break;\n }\n }\n }\n }\n // Get field with the most relevent match\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.index < item.match_index && field.index >= 0) {\n item.match_index = field.index;\n item.match = f;\n }\n }\n return (\n item.match_index >= 0 &&\n item.match &&\n match_count >= parts.length\n );\n });\n } else {\n results = item_list;\n }\n // Sort by order of relevence then name\n results.sort((a, b) => {\n const diff = a.match_index - b.match_index;\n return diff === 0 ? a.name.localeCompare(b.name) : diff;\n });\n return results;\n}\n\n/**\n * Convert a match string from `filterList` to renderable HTML\n * @param str Match string to change\n */\nexport function matchToHighlight(str: string): string {\n /* istanbul ignore else */\n if (str) {\n str = str.replace(\n /\\`[a-zA-Z0-9\\@\\.\\_]*\\`/g,\n '$&'\n );\n str = str.replace(/\\`/g, '');\n }\n return str;\n}\n\n/**\n * Convert time string to ms from UTC epoch for today\n * @param time Time string in the format `HH:mm`\n */\nexport function timeToDate(time: string): number {\n const parts = time.split(':');\n const date = DateNow(new Date())\n .setValue({\n hour: +parts[0],\n minute: +parts[1],\n })\n .startOfValue('minute');\n return date.ms;\n}\n\n/**\n * Generate a random number\n * @param ceil Biggest value to generate not inclusive\n * @param floor Smallest value to generate. Defaults to 0\n */\nexport function randomInt(ceil: number, floor: number = 0) {\n return Math.floor(Math.random() * (ceil - floor)) + floor;\n}\n\n/**\n * Get time format string for locale\n * @param isLowerCaseAmPm - if true, we use lowercase for am/pm.\n */\nexport function timeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const hoursMinutes = (): string => (is24HourTime() ? 'HH:mm' : 'h:mma');\n\nexport function dayJsTimeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const dayJsHoursMinutes = (): string =>\n is24HourTime() ? 'HH:mm' : 'h:mm';\n\n/**\n * Converts a timeZone name into a date object.\n * @param timeZoneName - name of timezone\n */\nexport const timezoneNameToDate = (\n timeZoneName: string | undefined\n): DateTZ | undefined => {\n let zone: DateTZ | undefined;\n if (timeZoneName) {\n try {\n zone = DateNow(new Date()).toZone(timeZoneName);\n } catch (e) {\n // invalid timezone. Suppress logs here.\n // console.error(e);\n }\n }\n return zone;\n};\n\nexport const timezoneDisplay = (date: DateTZ) =>\n !!date ? `${date.formatDate('ZZZZ')}` : '';\nexport const gmtOffsetDisplay = (date: DateTZ) =>\n !!date ? `(GMT${date.formatDate('ZZ')})` : '';\n\n/**\n * Returns a full time with timezone.\n * @param date\n */\nexport function timeWithZoneFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${timezoneDisplay(date)}`;\n}\n\nexport function timeWithGmtOffsetFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(date)}`;\n}\n\n/**\n * Returns a full start end range.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}`;\n}\n\n/**\n * Returns a full start end range with timezone.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeWithZoneFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(startDateTz)}`;\n}\n\n/**\n * Returns a full date with weekday day month year.\n * @param date\n * @param comma optional boolean to display a comma after the month\n */\nexport function dateLocalFormatString(date: DateTZ, comma?: boolean): string {\n if (comma) {\n return date.formatLocalDate('cccc d MMMM, yyyy');\n }\n return date.formatLocalDate('cccc d MMMM yyyy');\n}\n\nexport function dateBuildingFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('cccc d MMMM, yyyy');\n }\n return date.formatDate('cccc d MMMM yyyy');\n}\n\nexport function shorterLocalDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatLocalDate('ccc d MMM, yyyy');\n }\n return date.formatLocalDate('ccc d MMM yyyy');\n}\n\nexport function shorterBuildingDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('ccc d MMM, yyyy');\n }\n return date.formatDate('ccc d MMM yyyy');\n}\n\n/** Whether locale string is displayed in 24 hour time */\nexport function is24HourTime(): boolean {\n const date = new Date();\n const localeString = date\n .toLocaleTimeString(\n document.querySelector('html').getAttribute('lang') ||\n navigator.language\n )\n .toLowerCase();\n return localeString.indexOf('am') < 0 && localeString.indexOf('pm') < 0;\n}\n\n/* istanbul ignore next */\n/**\n * Downloads a file to the users computer with the given filename and contents\n * @param filename Name of the file to download\n * @param contents Contents of the file to download\n */\nexport function downloadFile(filename: string, contents: string) {\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' +\n encodeURIComponent('\\uFEFF' + contents)\n );\n element.setAttribute('download', filename);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\n/**\n * Parse raw CSV data into a JSON object\n * @param csv CSV data to parse\n */\nexport function csvToJson(csv: string) {\n const lines = csv.split('\\n');\n let fields = lines.splice(0, 1)[0].split(',');\n fields = fields.map((v) => v.replace('\\r', ''));\n const list: any[] = [];\n for (const line of lines) {\n let parts = line.split(',');\n parts = parts.map((v) => v.replace('\\r', ''));\n /* istanbul ignore else */\n if (parts.length >= fields.length) {\n const item: any = {};\n for (let i = 0; i <= parts.length; i++) {\n let part = null;\n part = parts[i];\n /* istanbul ignore else */\n if (part !== undefined) {\n item[(fields[i] || '').split(' ').join('_').toLowerCase()] =\n part;\n }\n }\n list.push(item);\n }\n }\n\n return list;\n}\n\n/**\n * Convert javascript array to CSV string\n * @param json Javascript array to convert\n */\nexport function jsonToCsv(json: HashMap[]) {\n /* istanbul ignore else */\n if (json instanceof Array && json.length > 0) {\n const keys = Object.keys(json[0]);\n const valid_keys = keys.filter((key) => json[0].hasOwnProperty(key));\n return `${valid_keys.join(',')}\\n${json\n .map((item) =>\n valid_keys\n .map((key) => {\n return typeof item[key] !== 'boolean'\n ? `\"${item[key] || ''}\"`\n : item[key];\n })\n .join(',')\n )\n .join('\\n')}`;\n }\n return '';\n}\n\n/* istanbul ignore next */\n/**\n * detect IE\n * returns version of IE or false, if browser is not Internet Explorer\n */\nexport function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n/**\n * Grab point details from mouse or touch event\n * @param event Event to grab details from\n */\nexport function eventToPoint(event: MouseEvent | TouchEvent): Point {\n if (!event) {\n return { x: -1, y: -1 };\n }\n if (event instanceof MouseEvent) {\n return { x: event.clientX, y: event.clientY };\n } else {\n return event.touches && event.touches.length > 0\n ? { x: event.touches[0].clientX, y: event.touches[0].clientY }\n : { x: -1, y: -1 };\n }\n}\n\n/* istanbul ignore next */\n/**\n * Flatten nested array\n * @param an_array Array to flatten\n */\nexport function flatten(an_array: T[]) {\n const stack = [...an_array];\n const res = [];\n while (stack.length) {\n // pop value from stack\n const next = stack.pop();\n if (Array.isArray(next)) {\n // push back array items, won't modify the original input\n stack.push(...next);\n } else {\n res.push(next);\n }\n }\n // reverse to restore input order\n return res.reverse();\n}\n\nconst seed = xmur3('PlaceOS');\nconst rand = sfc32(0x9e3779b9, 0x243f6a88, 0xb7e15162, seed());\n\nexport function predictableRandomInt(ceil: number = 100, floor: number = 0) {\n return Math.floor(rand() * (ceil - floor)) + floor;\n}\n\n// https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript\nfunction xmur3(str) {\n for (var i = 0, h = 1779033703 ^ str.length; i < str.length; i++)\n (h = Math.imul(h ^ str.charCodeAt(i), 3432918353)),\n (h = (h << 13) | (h >>> 19));\n return function () {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n}\n\nfunction sfc32(a, b, c, d) {\n return function () {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n var t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n\nexport function isLessThanBreakpoint(breakpoint: number): boolean {\n if (window) {\n return window.innerWidth < breakpoint;\n }\n return false;\n}\n\nexport function toTitleCase(str: string): string {\n return typeof str === 'string'\n ? str\n .toLowerCase()\n .split(' ')\n .map(function (word) {\n return word.replace(word[0], word[0].toUpperCase());\n })\n .join(' ')\n : '';\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\nimport { SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n@Directive({\n selector: 'a-very-basic-component-image-that-should-not-be-used'\n})\nexport class ImageDirective extends BaseClass implements OnDestroy {\n public foundImages?: SpaceImageObject[];\n public loadImages?: BehaviorSubject\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import {\n Directive,\n ElementRef,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=number], input[numbersOnly]'\n})\nexport class NumbersOnlyDirective {\n\n constructor(private _el: ElementRef) {\n }\n\n @HostListener('input', ['$event']) onInputChange(event) {\n const initalValue = this._el.nativeElement.value;\n this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');\n if (initalValue !== this._el.nativeElement.value) {\n event.stopPropagation();\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'replace'\n})\nexport class ReplacePipe implements PipeTransform {\n\n transform(value: string, from: string = '_', to: string = ' '): string {\n return (value|| '').split(from).join(to);\n }\n}\n","export * from './lib/bookings.module';\nexport * from './lib/bookings.actions'\nexport * from './lib/bookings.reducer'\nexport * from './lib/bookings.types'\nexport * from './lib/bookings.utils'\n","\nimport { IBookingQueryOptions, PaginatedBooking } from '@mckinsey-converge/data-common';\nimport { \n createLoadingAction\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n MyBookingsState,\n MyBookingsStoreState,\n} from './bookings.types';\nimport {\n createAction,\n props\n} from '@ngrx/store';\n\nexport const bookingStateSelector = (state: MyBookingsStoreState) => state.bookings;\n\nexport const loadBookingsWithQuery = createAction('[Bookings] Load Bookings with query', props());\n\nexport const loadHomepageBookingsResults = createLoadingAction('HomepageBookings', 'homepage');\n\nexport const loadUpcomingBookingsResults = createLoadingAction('UpcomingBookings', 'upcoming');\n\nexport const loadPastBookingsResults = createLoadingAction('PastBookings', 'past');\n\nexport const loadCancelledBookingsResults = createLoadingAction('CancelledBookings', 'cancelled');\n\nexport const loadBookingByIdResults = createLoadingAction('BookingById', 'bookingById');\n\nexport const clearBookingByIdResults = createAction('[BookingById] Clear Booking Data');\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType\n} from '@ngrx/effects';\nimport {\n IBookingQueryOptions,\n BookingsPaginatedService\n} from '../../../data-common/src/lib/bookings';\nimport {\n createLoadingEffect,\n LoadingAction\n} from '@mckinsey-converge/loading';\nimport {\n loadHomepageBookingsResults,\n loadPastBookingsResults,\n loadUpcomingBookingsResults,\n loadCancelledBookingsResults,\n loadBookingsWithQuery,\n loadBookingByIdResults\n} from './bookings.actions';\nimport { mergeMap } from 'rxjs/operators';\nimport {\n\n} from './bookings.utils';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Injectable()\nexport class BookingsEffects {\n constructor(private actions: Actions,\n private bookingService: BookingsPaginatedService) {\n }\n\n @Effect()\n public afterBookingsRequestResultsLoadOthersEffect = this.actions.pipe(\n ofType(loadBookingsWithQuery),\n mergeMap((action: LoadingAction) => {\n const date = new DateTZ({date: action.from})\n const yourBookingsRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.subtractValue({ minutes: 5 }).seconds}`,\n },\n include_rooms: true\n };\n const upcomingRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.seconds}`,\n },\n include_rooms: true\n };\n const pastRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n end_epoch: `<${date.seconds}`,\n },\n include_rooms: true\n };\n const cancelledRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: true,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n },\n include_rooms: true\n };\n const byIdRequest = {\n email: action.email,\n id: action.id,\n pagination: true,\n limit: 1,\n include_rooms: true\n };\n\n const effects = [];\n switch(action.target) {\n case 'upcoming':\n effects.push(loadUpcomingBookingsResults.request(upcomingRequest));\n break;\n case 'past':\n effects.push(loadPastBookingsResults.request(pastRequest));\n break;\n case 'cancelled':\n effects.push(loadCancelledBookingsResults.request(cancelledRequest));\n break;\n case 'bookingById':\n effects.push(loadBookingByIdResults.request(byIdRequest));\n break\n case 'homepage':\n effects.push(loadHomepageBookingsResults.request(yourBookingsRequest));\n // effects.push(loadPastBookingsResults.request(pastRequest));\n break\n default:\n }\n return effects;\n })\n );\n\n @Effect()\n public loadHomepageBookingsResultsEffect = createLoadingEffect(this.actions, loadHomepageBookingsResults,\n (action) => this.bookingService.userBookings(action, `homepage-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadUpcomingBookingsResultsEffect = createLoadingEffect(this.actions, loadUpcomingBookingsResults,\n (action) => this.bookingService.userBookings(action, `upcoming-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n \n @Effect()\n public loadPastBookingsResultsEffect = createLoadingEffect(this.actions, loadPastBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `past-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadCancelledBookingsResultsEffect = createLoadingEffect(this.actions, loadCancelledBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `cancelled-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadBookingByIdResultsEffect = createLoadingEffect(this.actions, loadBookingByIdResults,\n (action) => \n this.bookingService.userBookings(action, `bookingById-${action.id}`));\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { bookingsReducer } from './bookings.reducer';\nimport { BookingsEffects } from './bookings.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n EffectsModule.forFeature([BookingsEffects]),\n StoreModule.forFeature('bookings', bookingsReducer)\n ]\n})\nexport class BookingsModule {\n}\n","import { LoadingModel } from '@mckinsey-converge/loading';\nimport {\n createReducer,\n on\n} from '@ngrx/store';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n clearBookingByIdResults,\n} from './bookings.actions';\nimport { MyBookingsState } from './bookings.types';\n \nimport { \n BookingFormState,\n clearBookingFormData,\n clearRoomFilters,\n openBookingSurvey,\n storeBookingFormData,\n storeRoomFilters\n} from '@mckinsey-converge/data-common';\n\n\nexport const initialBookingsState: MyBookingsState = {\n query: LoadingModel.empty(),\n homepage: LoadingModel.empty(),\n upcoming: LoadingModel.empty(),\n past: LoadingModel.empty(),\n cancelled: LoadingModel.empty(),\n bookingById: LoadingModel.empty(),\n};\n\nexport const bookingsReducer = createReducer(initialBookingsState,\n on(clearBookingByIdResults, (state: MyBookingsState) => ({\n ...state,\n bookingById: LoadingModel.empty(),\n }) as MyBookingsState),\n ...loadHomepageBookingsResults.ons,\n ...loadUpcomingBookingsResults.ons,\n ...loadPastBookingsResults.ons,\n ...loadCancelledBookingsResults.ons,\n ...loadBookingByIdResults.ons,\n );\n\n\n\n export const initialBookingFormState: BookingFormState = {\n activeFormFilters: []\n };\n \n export const bookingFormReducer = createReducer(initialBookingFormState,\n on(storeBookingFormData, (state: BookingFormState, action) => {\n return {\n ...state,\n activeForm: {\n ...state.activeForm,\n ...action.payload\n }\n } as BookingFormState;\n }),\n on(clearBookingFormData, state => ({\n ...state,\n activeForm: undefined\n }) as BookingFormState),\n on(openBookingSurvey, state => ({\n ...state,\n bookingCompleted: new Date()\n }) as BookingFormState),\n on(storeRoomFilters, (state: BookingFormState, action) => {\n return {\n ...state,\n activeFormFilters: action.payload\n } as BookingFormState;\n }),\n on(clearRoomFilters, (state: BookingFormState) => ({\n ...state,\n activeFormFilters: initialBookingFormState.activeFormFilters\n }) as BookingFormState)\n );\n \n","import { Booking } from '@mckinsey-converge/data-common';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport const mapBookingToSelectOption = (booking?: Booking): SelectOption => booking ? ({\n value: booking.id,\n display: booking.name\n}) : undefined;\n","import { \n createLoadingAction,\n} from '../../../loading/src/lib/loading.actions';\nimport {\n Building,\n BuildingCity,\n} from '../../../data-common/src/lib/organisation/building.class';\nimport {\n BuildingLevel,\n} from '../../../data-common/src/lib/organisation/level.class'\nimport {\n Organisation,\n} from '../../../data-common/src/lib/organisation/organisation.class'\nimport { createSelector } from '@ngrx/store';\nimport {\n BuildingState,\n BuildingStoreState\n} from './buildings.types';\n\nexport const loadBuildings = createLoadingAction('Buildings', 'data');\n\nexport const buildingStateSelector = (state: BuildingStoreState) => state.buildings;\n\nexport const selectLoadBuildingsSuccess = createSelector(buildingStateSelector, loadBuildings.selectors.optionalSuccess);\n\n/**\n * Groups buildings by city\n */\nexport const selectBuildingOptionsGroupedByCity = createSelector(loadBuildings.selectors.optionalSuccess, (success) => {\n if (success) {\n const mapped = new Map();\n success.forEach(s => {\n const found = Array.from(mapped.keys()).find(c => c.name === s.city);\n let list = found ? mapped.get(found) : undefined;\n if (!list) {\n list = [];\n mapped.set({\n name: s.city,\n timezone: s.timezone\n }, list);\n }\n list.push(s);\n });\n return mapped;\n }\n return new Map();\n});\n\nexport const selectLevelByZoneId = createSelector(selectLoadBuildingsSuccess,\n (buildings, param: string) => {\n if (buildings) {\n return buildings.map(b => b.levels.find((l: BuildingLevel) => l.id === param))\n ?.[0] ?? undefined;\n }\n return undefined;\n });\n","export * from './lib/data-common.module';\nexport * from './lib/booking';\nexport * from './lib/bookings';\nexport * from './lib/catering';\nexport * from './lib/location';\nexport * from './lib/organisation';\nexport * from './lib/spaces';\nexport * from './lib/users';\nexport * from './lib/app.service';\nexport * from './lib/hotkeys.service';\nexport * from './lib/base.service';\nexport * from './lib/base-api.class';\nexport * from './lib/reports'\nexport * from './lib/service-manager.class';\nexport * from './lib/settings.service';\nexport * from './lib/spec-helpers';\nexport * from './lib/settings.interfaces';\nexport * from './lib/validation.utilities';\nexport * from './lib/status.interfaces';\nexport * from './lib/recurrence/recurrence.utils';\nexport * from './lib/close-modal-dialog-service';\nexport * from './lib/validation.utilities';\nexport * from './lib/collapse-accordion-service';","import { HashMap } from '@mckinsey-converge/base';\n\n/**\n * Convert map into a query string\n * @param map Key value pairs to convert\n */\nexport function toQueryString(map: HashMap) {\n let str = '';\n if (map) {\n for (const key in map) {\n if (map.hasOwnProperty(key) && map[key] !== undefined && map[key] !== null) {\n str += `${(str ? '&' : '')}${key}=${map[key]}`;\n }\n }\n }\n return str;\n}\n","import {\n ApplicationRef,\n Injectable,\n NgZone,\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { take, first } from 'rxjs/operators';\n\nimport { ComposerService } from '@placeos/composer';\nimport { PlaceOSOptions } from '@placeos/ts-client';\nimport { HeapIoService } from '@acaprojects/ngx-heap-io';\n\nimport {\n BehaviorSubject,\n Observable,\n Subject\n} from 'rxjs';\n\nimport {\n ApplicationLoadingState,\n BaseClass,\n ConsoleStream,\n log\n} from '@mckinsey-converge/base';\nimport { SettingsService } from './settings.service';\n\nimport { HotkeysService } from './hotkeys.service';\nimport {\n ApplicationIcon,\n ComposerSettings\n} from './settings.interfaces';\nimport { EnvironmentService } from '../../../environment/src/lib/environment.service'; // '@mckinsey-converge/environment';\nimport {\n Store\n} from '@ngrx/store';\nimport { selectCurrentUser } from '../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../user/src/lib/user.types';\nimport { Booking } from './bookings';\nimport { filter } from 'rxjs/operators';\nimport { SnackBarService } from '../../../ui/src/lib/custom-snackbar-component/custom-snackbar-component.service';\n\ndeclare global {\n interface Window {\n application: ApplicationService;\n mock: {\n enabled: boolean;\n backend: any;\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApplicationService extends BaseClass {\n /** Map of state variables for Service */\n protected _subjects: {\n [key: string]: BehaviorSubject | Subject;\n } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n _kioskFormFilter: boolean;\n\n constructor(\n public store: Store,\n public analytics: HeapIoService,\n private _app_ref: ApplicationRef,\n private _zone: NgZone,\n private _title: Title,\n private _settings: SettingsService,\n private _hotkeys: HotkeysService,\n private _composer: ComposerService,\n private _snackbar: MatSnackBar,\n private _environment: EnvironmentService,\n private snack: SnackBarService\n\n ) {\n super();\n this.set('system', null);\n this.set('title', 'Home');\n this.set('loading', {});\n this.set('CONCIERGE.day_view.viewing', null);\n this.set('undo', new BehaviorSubject<{\n action: 'series' | 'booking',\n booking: Booking\n } | null>(null));\n\n this.set('APP.breakdown', false);\n\n this._app_ref.isStable.pipe(first(_ => _)).subscribe(() => {\n this._zone.run(() => {\n this.log('APP', `Application has stablised.`);\n this.waitForSettings();\n });\n });\n }\n\n public set kioskFormFilter(isIt: boolean) {\n this._kioskFormFilter = isIt;\n }\n\n public get kioskFormFilter():boolean {\n return this._kioskFormFilter \n }\n\n /** Analytics service */\n public get Analytics() {\n return {};\n }\n\n /** Hotkeys service */\n public get Hotkeys() {\n return this._hotkeys;\n }\n\n /**\n * Get a setting from the settings service\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n return this._settings.get(key);\n }\n\n /**\n * Title of the page\n */\n public set title(value: string) {\n const title_suffix = this.setting('app.title');\n this.set('title', value);\n this._title.setTitle(`${value ? value + ' | ' : ''}${title_suffix}`);\n }\n\n /**\n * Title of the page\n */\n public get title(): string {\n return this._title.getTitle();\n }\n\n /** Root API Endpoint */\n public get endpoint() {\n return `/api/staff/`;\n }\n\n /** Root API Endpoint for engine */\n public get engine_endpoint() {\n return this._composer.auth.api_endpoint + '/';\n }\n\n /** Whether settings has been loaded */\n public get has_settings(): boolean {\n return this._settings.is_initialised;\n }\n\n /**\n * Create notification popup\n * @param type CSS Class to add to the notification\n * @param message Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n * @param icon Icon to render to the left of the notification message\n */\n public notify(\n type: string,\n message: string,\n action: string = 'OK',\n on_action?: () => void,\n icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'info'\n }\n ): void {\n this.openSnack(message, type);\n // const snackbar_ref = this._snackbar.open(message, action, {\n // panelClass: [type],\n // duration: 5000\n // });\n // this.subscription(\n // 'snackbar_close',\n // snackbar_ref.afterDismissed().subscribe(() => {\n // this.unsub('snackbar_close');\n // this.unsub('notify');\n // })\n // );\n // if (action) {\n // on_action = on_action || (() => snackbar_ref.dismiss());\n // this.subscription(\n // 'notify',\n // snackbar_ref.onAction().subscribe(() => on_action())\n // );\n // }\n }\n\n public openSnack(message, type) {\n this.snack.openSnackBar(message, type, 5000);\n }\n \n /**\n * Create success notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifySuccess(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'done'\n };\n this.notify('success', msg, action, on_action, icon);\n }\n\n /**\n * Create error notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyError(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'error'\n };\n this.notify('error', msg, action, on_action, icon);\n }\n\n /**\n * Create warning notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyWarn(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'warning'\n };\n this.notify('warn', msg, action, on_action, icon);\n }\n\n /**\n * Create info notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyInfo(msg: string, action?: string, on_action?: () => void): void {\n this.notify('info', msg, action, on_action);\n }\n\n /**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\n public log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false\n ): void {\n log(type, msg, args, stream, force);\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n return this._subjects[name] && this._subjects[name] instanceof BehaviorSubject\n ? (this._subjects[name] as BehaviorSubject).getValue()\n : null;\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n public set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /** Wait for settings to be initialised before setting up the application */\n private waitForSettings() {\n // Wait until the settings have loaded before initialising\n this._settings.initialised.pipe(first(_ => _)).subscribe(() => this.init());\n }\n\n /**\n * Initialise application services\n */\n private init(): void {\n this.setupComposer();\n this.subscription('currentUser', this.store.select(selectCurrentUser)\n .pipe( filter(user => user !== undefined) )\n .pipe(take(1))\n .subscribe((user: any) => {\n // Once we know we have the user loaded.\n this.setupAnalytics(user?.fmno);\n })\n );\n this._composer.initialised.pipe(first(_ => _)).subscribe(() => {\n this._initialised.next(true);\n });\n // Add service to window if in debug mode\n if (window.debug) {\n window.application = this;\n }\n }\n\n /**\n * Initialise the composer library comms\n */\n private setupComposer(): void {\n this.log('SYSTEM', 'Setup up composer...');\n const loading: ApplicationLoadingState = this.get('loading');\n loading.composer = {\n message: 'Initialising service connection',\n state: 'loading'\n };\n this.set('loading', loading);\n // Get application settings\n const settings: ComposerSettings = this._settings.get('composer') || {};\n const protocol = settings.protocol || location.protocol;\n const host = settings.domain || location.hostname;\n const port = settings.port || location.port;\n const url = settings.use_domain ? `${protocol}//${host}:${port}` : location.origin;\n const route = host.includes('localhost') && port === '4200' ? '' : settings.route || '';\n const mock =\n this._settings.get('mock') ||\n location.href.includes('mock=true') ||\n localStorage.getItem('mock') === 'true';\n // Generate configuration object\n const config: PlaceOSOptions = {\n scope: 'public',\n host: `${host}:${port}`,\n auth_uri: `${url}/auth/oauth/authorize`,\n token_uri: `${url}/auth/token`,\n redirect_uri: `${location.origin}${route}/oauth-resp.html`,\n handle_login: !settings.local_login,\n mock\n };\n this._composer.setup(config);\n loading.composer = {\n message: 'Initialising service connection',\n state: 'complete'\n };\n this.set('loading', loading);\n }\n\n private setupAnalytics(fmno: string) {\n this.log('HEAP', `Loading heap ${this._environment?.heap_io_id}`);\n // Default Heap app ID via the default setting\n const heapIo = this._settings.get('app.heap_io');\n if (this._environment?.heap_io_id) {\n // Apply Heap app ID via the environmental setting\n heapIo.app_id = this._environment.heap_io_id;\n }\n if (heapIo) {\n this.analytics.load(heapIo);\n if (fmno) {\n this.analytics.identify(fmno);\n }\n } else {\n this.log('HEAP', `Heap could not be found for the current frontend ${this._settings.frontend}`);\n }\n }\n\n}\n","import { Subject } from 'rxjs';\n\nimport {\n BaseClass,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n ServiceLike,\n ServiceManager\n} from './service-manager.class';\n\nexport type ApiEventType = 'value_change' | 'item_saved' | 'reset' | 'other';\n\nexport interface ApiEvent {\n type: ApiEventType;\n metadata: T;\n}\n\n\nexport class BaseDataClass extends BaseClass {\n /** Subject for emitting events on the object */\n protected readonly event_subject = new Subject();\n /** Observable for events on this object */\n public readonly events = this.event_subject.asObservable();\n /** Unique Identifier of the object */\n public readonly id: string;\n /** Human readable name of the object */\n public readonly name: string;\n /** Email address associated with the object */\n public readonly email: string;\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(BaseDataClass);\n }\n\n constructor(raw_data: HashMap) {\n super();\n this.id = raw_data.id || raw_data.zone_id || raw_data.email || '';\n this.name = raw_data.name || '';\n this.email = `${raw_data.email || ''}`.toLowerCase();\n }\n\n /**\n * Save pending changes to server\n */\n public save(): Promise {\n if (this._service) {\n const form = this.toJSON();\n return new Promise((resolve, reject) => {\n const promise = this.id\n ? this._service.update(this.id, form)\n : this._service.add(form);\n promise.then(\n (d) => {\n this.event_subject.next({ type: 'item_saved', metadata: d });\n resolve(d);\n },\n (_) => reject(_)\n );\n });\n } else {\n Promise.reject('No service to process request');\n }\n }\n\n /**\n * Delete this item from the server\n */\n public delete(): Promise {\n if (this.id) {\n return this._service.delete(this.id);\n }\n }\n\n /**\n * Run task for this item on the service\n * @param task_name Name of the task\n * @param parameters Parameters to pass to the task request\n */\n public runTask(task_name: string, parameters: HashMap): Promise {\n if (this.id) {\n return this._service.task(this.id, task_name, parameters);\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: BaseDataClass): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._service;\n delete obj._changes;\n delete obj.event_subject;\n delete obj.events;\n // Remove parent private members\n delete obj._timers;\n delete obj._intervals;\n delete obj._subscriptions;\n delete obj._server_names;\n delete obj._initialised;\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substring(1)] || key.substring(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): BaseDataClass {\n return new BaseDataClass(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): BaseDataClass {\n return new BaseDataClass({ ...this, id: null, email: null });\n }\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseDataClass } from './base-api.class';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class BaseAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = typeof query_params.cache !== 'boolean' ? query_params.cache || 1000 : 1000;\n typeof query_params.cache !== 'boolean' && delete query_params.cache;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n // Bring back once implemented in the API\n // if (this.settingsService.concierge) {\n // query = query + '&check_access=true';\n // }\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: T[] | HashMap[] = [];\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n result =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryObsr(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );;\n }\n\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse | HashMap[]{\n let result: IEngineResponse | HashMap[] =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n return result;\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryRoomsForQR(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url);\n }\n \n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public \n task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * V-2\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public taskObsr( \n id: string, \n task_name: string, \n form_data: HashMap = {}, \n method: 'post' | 'get' = 'post' ):Observable{\n const query = toQueryString(this.injectConcierge(form_data));\n let engine = false;\n let cache = 1000;\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n\n const request = method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n \n return request;\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param id url id with respect to update api\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public updateObsr(id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n \n return this.http.put(url, body)\n .pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) \n ),\n catchError((error: any, result?: T) => {\n console.log(error);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n return of(error as T);\n })\n );\n\n }\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${apiSubRoute}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n\n const token = sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\n const headers = new HttpHeaders({\n 'Authorization': `Bearer ${token}`,\n });\n \n const requestOptions = { headers: headers };\n\n // return this.httpClient.post(url, body, {\n // ...requestOptions \n // });\n\n return this.http.post(url, body);\n\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { Building } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { User } from '../users';\nimport { Space } from '../spaces';\nimport { SpaceBookingRuleOptions } from '../spaces/space.class';\nimport {\n BookingFormData,\n} from './booking.form.data';\nimport { statusFromBookings } from '../bookings/booking.utilities';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { SpaceStatus } from '../bookings/space.types';\nimport { SpaceFeatures } from '../spaces/space.class';\nimport { HashMap } from 'libs/base/src/lib/types.utilities';\n\nexport const spaceExtraFeatureToDisplayName = (feature: SpaceFeatures) => {\n switch (feature) {\n case SpaceFeatures.VideoConference:\n return 'Video conference (VC)';\n case SpaceFeatures.ConferencePhone:\n return 'Conference phone';\n case SpaceFeatures.WirelessContentSharing:\n return 'Wireless content sharing';\n case SpaceFeatures.FlipChart:\n return 'Flip chart';\n case SpaceFeatures.Glassboard:\n return 'Glassboard';\n case SpaceFeatures.ElectronicWhiteboard:\n return 'Whiteboard';\n case SpaceFeatures.ConferenceRoom:\n return 'Conference';\n case SpaceFeatures.TeamRoom:\n return 'Team';\n case SpaceFeatures.PartnerOffice:\n return 'Partner';\n case SpaceFeatures.PhoneBooth:\n return 'Phone booth';\n case SpaceFeatures.NaturalLight:\n return 'Room with window only (natural light)';\n case SpaceFeatures.BoardRoom:\n return 'Boardroom room style';\n case SpaceFeatures.CocktailRoom:\n return 'Cocktail room style';\n case SpaceFeatures.TheatreRoom:\n return 'Theatre room style';\n case SpaceFeatures.WorkshopRoom:\n return 'Workshop room style';\n case SpaceFeatures.UShapeRoom:\n return 'U Shape room style';\n case SpaceFeatures.Miscellaneous:\n return 'Miscellaneous room style'\n case SpaceFeatures.Catering:\n return 'Rooms with catering';\n // TODO: add any special display handling here.\n default:\n return feature;\n }\n};\n\n\nexport const instantBookOption: SelectOption = {\n value: 'instant-book',\n display: 'Listing you can book without waiting for a host approval',\n shortDisplay: 'Instant book'\n};\nexport const instantBookOptions: SelectOption[] = [\n instantBookOption\n];\n\nexport const mapSpaceFeaturesToSelectOption = (f: SpaceFeatures): SelectOption => {\n const display = spaceExtraFeatureToDisplayName(f);\n return ({\n value: f,\n display,\n // Useful for long text, like that of the instant-book\n // option.\n //\n // We do not expect this option object to be modified\n // at any further point before it appears on screen -\n // although that may change in future releases.\n shortDisplay: display\n });\n};\n\nexport const roomEquipmentRequiredOptions: SelectOption[] = [\n SpaceFeatures.VideoConference,\n SpaceFeatures.ConferencePhone,\n SpaceFeatures.WirelessContentSharing,\n SpaceFeatures.FlipChart,\n SpaceFeatures.Glassboard,\n SpaceFeatures.ElectronicWhiteboard\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const internalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.PartnerOffice,\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom,\n SpaceFeatures.PhoneBooth\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const externalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomDetailsRequired: SelectOption[] = [\n SpaceFeatures.NaturalLight,\n SpaceFeatures.BoardRoom,\n SpaceFeatures.CocktailRoom,\n SpaceFeatures.TheatreRoom,\n SpaceFeatures.WorkshopRoom,\n SpaceFeatures.UShapeRoom,\n SpaceFeatures.Miscellaneous\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomCateringAvailable: SelectOption[] = [\n SpaceFeatures.Catering,\n].map(mapSpaceFeaturesToSelectOption);\n\n/**\n * Defines the reason by which spaces are filtered out / missing.\n */\nexport enum SpaceFilterReason {\n /**\n * Spaces were shown and not all filtered out.\n */\n None = 'None',\n\n /**\n * If room filters are applied to the set of rooms,\n * and rooms are available if not applied by filtering.\n */\n Filters = 'Filters',\n\n /**\n * We check office rules first to determine if its been filtered.\n */\n OfficeRules = 'OfficeRules',\n\n /**\n * Fallback as the end case if no results are found.\n */\n DateTime = 'DateTime',\n\n /**\n * In case there are no results for a buiding but there are other office buidings in the same city.\n */\n AlternateBuildingsFound = 'AlternateBuildingsFound',\n\n /**\n * If room is non-bookable in the system\n */\n NonBookable = 'NonBookable'\n}\n\nexport interface FilteredSpaces {\n spaces: Space[] | undefined;\n reason: SpaceFilterReason;\n statusMap: HashMap;\n specificReason?: SpaceFilterReason;\n}\n\n/**\n * Filter spaces by filters locally. TBD in the future for real API pagination.\n *\n * @param formFilters - the set of filters to apply on the list of spaces.\n * @param spaces - the list of spaces to filter\n * @param activeForm - the landing page set of filters.\n * @param buildings - the list of buildings loaded, used to retrieve building-specific booking rules.\n * @param currentUser - the current user\n */\nexport const filterSpacesByAppliedFilters = (\n formFilters: SelectOption[],\n spaces: Space[] | undefined, // the resultshere are raw JSON Spaces, not an array of the Space class\n activeForm: BookingFormData,\n buildings: Building[] = [],\n currentUser: User | undefined,\n isStaffMap: boolean = false): FilteredSpaces => {\n const instantBook: boolean = formFilters.some(f => f.value === instantBookOption.value);\n const onlyCatering: boolean = formFilters.some(f => f.value === SpaceFeatures.Catering);\n // Drop incompatible spaces. If no filters were given, just return the array unchanged.\n const featureFilters = formFilters.filter(filter => ![instantBookOption.value, SpaceFeatures.Catering].includes(filter.value));\n const formFiltersEmpty = featureFilters.length === 0;\n\n // R--- refactor activeForm? Only after forms can handle dateTz\n // Blocked by date time input refactor\n const options: SpaceBookingRuleOptions = {\n duration: activeForm.duration,\n host: currentUser,\n dateTz: activeForm.dateTz,\n };\n let rulesCount = 0;\n let ruleReason = '';\n let excludedByFiltersCount = 0;\n const statusMap: HashMap = {};\n // console.group();\n const filteredSpaces = spaces?.map(space => space instanceof Space ? space : new Space(space)).filter(raw_space => {\n const space = new Space(raw_space); // Construct the full fledged space\n const building = buildings.find(b => space.zones.includes(b.id));\n const rules = rulesForSpace({\n time: options?.dateTz?.ms,\n duration: options.duration,\n user: options.host,\n rules: building?.booking_rules,\n space\n });\n ruleReason = rules.reason;\n let valid = !rules.hide;\n if (!valid) {\n rulesCount++;\n return false;\n }\n\n\n // Check for all the form filters ( except 'catering' )\n let hasAllFeatures: boolean;\n const internalRoomTypeFilters = [\n 'conference',\n 'meeting_room',\n 'partner',\n 'phone_booth',\n 'team_room',\n ];\n\n if (featureFilters.length === 0) {\n hasAllFeatures = true;\n } else if(featureFilters.every(f => internalRoomTypeFilters.includes(f.value))) { // If all featureFilters(selected filters) are present in internalRoomTypeFilters, make the filtering inclusive(return on first true) \n hasAllFeatures = featureFilters.some(f => space.featuresArray.includes(f.value));\n } else { // If any featureFilters(selected filters) are not present in internalRoomTypeFilters, make the filtering exclusive(return on first false)\n hasAllFeatures = featureFilters.every(f => space.featuresArray.includes(f.value));\n }\n\n const canBook = instantBook ? space.bookable : true;\n const matchesType = activeForm?.bookingType?.value === 'allRooms'\n ? true\n : space?.internal_or_external?.length\n ? space.internal_or_external === activeForm?.bookingType?.value\n : true;\n valid = valid && matchesType && (formFiltersEmpty || hasAllFeatures) && canBook;\n let hasCatering = building?.has_catering;\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n // need the room catering to override.\n if (onlyCatering && !hasCatering) {\n valid = false;\n // console.log('Excluded by Catering');\n }\n\n // count this space if the only reason it can't be shown is because one of the filters excluded it\n if (!hasAllFeatures) {\n valid = false;\n // console.log('Excluded by Status');\n }\n\n const status = statusFromBookings(\n space.bookings.length ? space.bookings.map(b => new Booking(b)) : space.settings.bookings.map(b => new Booking(b)),\n space.bookable && !rules.hide,\n !rules.auto_approve,\n activeForm.dateTz,\n space\n );\n\n // only compute room availability here right now if instant book option is chosen and room still valid.\n if (instantBook && valid) {\n valid = status.status === SpaceStatus.Available;\n if (!valid) console.group('Excluded by Status');\n \n }\n\n\n /** \n * If there are rooms that are recurring but not available at all during the queried times, we filter them out from the results displayed on the page.\n * The \"Available\" status indicates whether a room can be booked during the queried times.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\n if(activeForm.is_recurrent && !space.availableOccurrences && !isStaffMap) {\n valid = false;\n }\n /** */\n\n // cache space status\n if (valid) {\n if(activeForm.is_recurrent && space.availableOccurrences && space.availableOccurrences<= space.totalOccurrences) {\n // space is available and requested for recurrence booking and few occurences are available to book then let the space select/bookable from map with limited availability\n statusMap[space.id] = !rules.auto_approve ? SpaceStatus.Requestable : SpaceStatus.Available;\n }else\n {\n statusMap[space.id] = status.status;\n }\n \n } else {\n excludedByFiltersCount++;\n }\n // console.log('Valid:', valid);\n return valid;\n });\n\n const buildingsInSameCity = buildings.filter(\n (_) =>activeForm?.location!==undefined && activeForm?.location?.length && _.city === activeForm?.location[0]?.meta?.building?.city\n ) || [];\n const alternateBuildings = buildingsInSameCity.filter(building =>\n !activeForm.location.some(locationItem =>\n locationItem.meta?.building?.id === building.id\n )\n );\n\n // console.groupEnd();\n let reason, specificReason = SpaceFilterReason.None;\n // console.log('Spaces:', filteredSpaces?.length, excludedByFiltersCount, rulesCount, ruleReason)\n if (filteredSpaces?.length === 0) {\n if (excludedByFiltersCount > 0 && (!formFiltersEmpty || onlyCatering)) {\n reason = SpaceFilterReason.Filters;\n } else if (rulesCount > 0) {\n reason = SpaceFilterReason.OfficeRules;\n } else if(alternateBuildings){\n reason = SpaceFilterReason.AlternateBuildingsFound;\n }\n else {\n reason = SpaceFilterReason.DateTime;\n }\n\n if (ruleReason === SpaceFilterReason.OfficeRules) {\n specificReason = SpaceFilterReason.OfficeRules;\n }\n }\n\n return { spaces: filteredSpaces, reason, statusMap, specificReason };\n};\n","import { BookingFormData } from './booking.form.data';\nimport {\n createAction,\n props\n} from '@ngrx/store';\nimport { Payload } from '../../../../loading/src/lib/loading.actions';;\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\n\nexport const storeBookingFormData = createAction('[BookingForm] Store Form Data',\n props>>());\n\nexport const clearBookingFormData = createAction('[BookingForm] Clear Form Data');\n\nexport const storeRoomFilters = createAction('[BookingForm] Store Room Filters',\n props[]>>());\n\nexport const clearRoomFilters = createAction('[BookingForm] Clear Room Filters');\n\nexport const openBookingSurvey = createAction('[BookingSurvey] Open Survey Modal');\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { RoomQueryOptions } from '../../../../rooms/src/lib/rooms.types';\nimport { User } from '../users/user.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { Building } from '../organisation';\n\nexport const DEFAULT_BOOKING_DURATION = 30;\n\nexport const internalBookingTypeOption = {\n value: 'internal',\n display: 'Internal',\n};\n\nexport const allBookingTypeOption = {\n value: 'allRooms',\n display: 'All Rooms',\n};\n\nexport const bookingTypeOptions: SelectOption[] = [\n internalBookingTypeOption,\n {\n value: 'external',\n display: 'External',\n }\n];\n\nexport const defaultRoomSizeOption = {\n value: '2',\n display: '3-9 People',\n};\n\nexport const roomSizeOptions: SelectOption[] = [\n {\n value: '1',\n display: '1-2 People',\n },\n defaultRoomSizeOption,\n {\n value: '3',\n display: '10+ People',\n }\n];\n\nexport const roomSizeOptionsKiosk: SelectOption[] = [\n ...roomSizeOptions,\n {\n value: '4',\n display: 'All Rooms',\n },\n];\n\nexport const roomCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 1;\n case '2':\n return 3;\n case '3':\n return 10;\n case '4':\n return null;\n }\n};\n\nexport const roomMaxCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 2;\n case '2':\n return 9;\n default:\n return null;\n }\n};\n\nexport interface BookingFormData {\n // R--- off the rails, define these \"any's\"\n id?: string;\n location: SelectOption[];\n dateTz: DateTZ;\n /**\n * Duration, in minutes.\n */\n duration: number;\n bookingType: SelectOption;\n roomSize: SelectOption;\n selectedRoom?: any;\n organiser?: SelectOption;\n title?: string;\n attendees?: any[];\n code?: string;\n notes?: string;\n head_count?: number;\n creator?: User;\n company?: any[];\n //Recurrence fields\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array;\n recurrence_exceptions?: Array; //SHOULD BE DATETZ\n recurrence_days?: Array;\n timezone?: string;\n offset?: number;\n buildings?: Building[];\n is_recurrent?: boolean;\n is_multiroom?: boolean;\n merged?: boolean;\n action?: string; // helping to set staff app recurring action flag for edit/clone in the active form\n ignore?: string; // helping while editing - recurring series rooms search api call\n bookable?: boolean; // set while editing - recurring series rooms search api call\n occurrence_edits?: string[];\n opt_out?:boolean;\n nextBusinessDay?: boolean; // set property if user room selection from next business day section on result page\n outlook_opt_out?:boolean;\n expanded_section_ids?: string[]; // set property if user room selection from next business day section on result page\n resultLoaded?: number; // set property if user room selection from any section on result page after clicking load more button\n}\n\n/**\n * Converts form data into API query parameters.\n */\nexport const roomFormDataToQuery = (\n data: BookingFormData\n): RoomQueryOptions => {\n // remove all buildings chip from query\n const filteredLocationIds = data?.location\n .filter((l) => l.groupChild)\n .map((l) => l.value)\n .join(',');\n return {\n dateTz: data?.dateTz,\n duration: data?.duration,\n locations: filteredLocationIds,\n capacity: roomCapacityToValue(data?.roomSize?.value),\n capacity_max: roomMaxCapacityToValue(data?.roomSize?.value),\n\n is_recurrent: data?.is_recurrent,\n is_multiroom: data?.is_multiroom,\n merged: data?.merged,\n recurrence_period: data?.recurrence_period,\n recurrence_interval: data?.recurrence_interval,\n recurrence_endTz: data?.recurrence_endTz,\n recurrence_count: data?.recurrence_count,\n recurrence_starts: data?.recurrence_starts,\n recurrence_exceptions: data?.recurrence_exceptions, //SHOULD BE DATETZ\n recurrence_days: data?.recurrence_days,\n timezone: data?.timezone,\n offset: data?.offset,\n buildings: data?.buildings,\n bookable: data?.bookable,\n ignore: data?.ignore\n };\n};\n","import { BookingFormState } from './booking.form.types';\nimport {\n DEFAULT_BOOKING_DURATION,\n defaultRoomSizeOption,\n internalBookingTypeOption\n} from './booking.form.data';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nconst now = DateNow(new Date())\n\nexport const defaultTestBookingForm = (): BookingFormState => ({\n activeForm: {\n dateTz: now,\n duration: 2 * DEFAULT_BOOKING_DURATION,\n location: [],\n bookingType: internalBookingTypeOption,\n roomSize: defaultRoomSizeOption\n },\n activeFormFilters: []\n});\n","import { createSelector } from '@ngrx/store';\nimport {\n RoomStoreState\n} from '../../../../rooms/src/lib/rooms.types';\nimport {\n loadLaterThatDayResults,\n loadNextDayResults,\n loadRoomsForResults,\n roomStateSelector,\n loadByIdResults,\n loadDiffSizeResults,\n loadRoomsForResultsMap\n} from '../../../../rooms/src/lib/rooms.actions';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n bookingStateSelector\n} from '../../../../bookings/src/lib/bookings.actions';\nimport { Building } from '../organisation/building.class';\nimport { BuildingStoreState } from '../../../../buildings/src/lib/buildings.types';\nimport { selectLoadBuildingsSuccess } from '../../../../buildings/src/lib/buildings.actions';\nimport { Space } from '../spaces/space.class';\nimport { User } from '../users/user.class';\nimport { selectCurrentUser } from '../../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../../user/src/lib/user.types';\nimport { LoadingModel } from '../../../../loading/src/lib/loading.model';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\nimport {\n SpaceFilterReason,\n filterSpacesByAppliedFilters,\n FilteredSpaces\n} from './booking-filter.utils';\nimport {\n BookingFormData,\n internalBookingTypeOption,\n} from './booking.form.data';\nimport {\n BookingFormState,\n BookingStoreState,\n} from './booking.form.types';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\n\n\nexport const selectBookingFormsData =\n (state: BookingStoreState | RoomStoreState | BuildingStoreState | UserStoreState) =>\n (state as any).bookingForm as BookingFormState;\n\nexport const selectActiveForm = createSelector(selectBookingFormsData, state => {\n // Recreate because serialized form dateTz doesn't have DateTZ class methods\n if (!state.activeForm?.dateTz) {\n return state.activeForm\n }\n const { date, is_local_tz, building_tz} = state.activeForm?.dateTz;\n const endTzDate = state.activeForm?.recurrence_endTz?.date;\n const recurrence_endTz = endTzDate ? {\n recurrence_endTz : new DateTZ({ date: endTzDate.valueOf(), is_local_tz, building_tz })\n } : {};\n\n const recurrence_starts = state.activeForm?.recurrence_starts\n\t\t\t? {\n\t\t\t\t\trecurrence_starts: state.activeForm?.recurrence_starts.map( el =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// at final step of booking creation process recurrence_start becomes Array which need to be Array\n\t\t\t\t\t\t\t// To Do: Refactor - apps/staff/src/app/booking/booking-create/booking-form-base.component.ts lno: 186\n\t\t\t\t\t\t\treturn new DateTZ({ date: typeof el === 'number' ? el * 1000 : el.date.valueOf(), is_local_tz, building_tz })\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\n const recEditingSearchPayload = (state.activeForm.action === SeriesAction.EDIT && state.activeForm.is_recurrent)\n\t\t\t?\n\t\t {\n\t\t\t\tid: state.activeForm.id,\n\t\t\t\tignore: state.activeForm.ignore,\n\t\t\t\tbookable: state.activeForm.bookable\n\t\t\t}\n\t\t\t: {};\n\n\n\n\n return {\n ...state.activeForm,\n dateTz: new DateTZ({ date: date.valueOf(), is_local_tz, building_tz }),\n ...recurrence_endTz,\n ...recurrence_starts,\n\t\t\t\t...recEditingSearchPayload\n }\n});\n\nexport const selectBookingType = createSelector(selectActiveForm,\n (form) => form?.bookingType);\n\nexport const selectBookingLocations = createSelector(selectActiveForm,\n (form) => (form?.location || []).filter(f => !f.groupHeader));\n\nexport const selectIsInternal = createSelector(selectBookingType,\n (type) => type?.value === internalBookingTypeOption.value);\n\nexport const selectFormFilters = createSelector(selectBookingFormsData,\n (state) => state.activeFormFilters || []);\n\nconst selectRoomResultsFromState = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.model);\n\nconst selectRoomResultsFromState_map = createSelector(roomStateSelector,\n loadRoomsForResultsMap.selectors.model);\n\nconst selectLaterThatDayResultsFromState = createSelector(roomStateSelector,\n loadLaterThatDayResults.selectors.model);\nconst selectNextDayResultsFromState = createSelector(roomStateSelector,\n loadNextDayResults.selectors.model);\nconst selectByIdResultsFromState = createSelector(roomStateSelector,\n loadByIdResults.selectors.model);\nconst selectDiffSizeResultsFromState = createSelector(roomStateSelector,\n loadDiffSizeResults.selectors.model);\n\nexport const selectHomepageBookingsResultsFromState = createSelector(bookingStateSelector,\n loadHomepageBookingsResults.selectors.model);\nexport const selectUpcomingBookingsResultsFromState = createSelector(bookingStateSelector,\n loadUpcomingBookingsResults.selectors.model);\nexport const selectPastBookingsResultsFromState = createSelector(bookingStateSelector,\n loadPastBookingsResults.selectors.model);\nexport const selectCancelledBookingsResultsFromState = createSelector(bookingStateSelector,\n loadCancelledBookingsResults.selectors.model);\nexport const selectBookingByIdResultsFromState = createSelector(bookingStateSelector,\n loadBookingByIdResults.selectors.model);\n\n/**\n * Wraps {@link filterSpacesByAppliedFilters} with {@link LoadingModel} interop.\n * This will only filter data if there is data to filter, and returns a success {@link LoadingModel}.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\nconst filterSpacesByAppliedFiltersIfSuccess = (\n results: LoadingModel,\n formFilters: SelectOption[],\n activeForm: BookingFormData,\n buildings: Building[] | undefined,\n currentUser: User | undefined,\n isStaffMap: boolean = false): LoadingModel => {\n const data = results.optionalSuccess;\n\n // don't filter model if no success found\n return !activeForm ? results.mutate({\n spaces: data, // the result here is a raw JSON Space, not the Space class\n reason: SpaceFilterReason.None,\n statusMap: {}\n }) : results.mutate(\n filterSpacesByAppliedFilters(formFilters, data, activeForm, buildings || activeForm.buildings, currentUser, isStaffMap));\n};\n\nexport const selectFilteredResults = createSelector(selectRoomResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectMapFilteredResults = createSelector(selectRoomResultsFromState_map,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser, isStaffMap) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser, true));\n\nexport const selectFilteredLaterDayResults = createSelector(selectLaterThatDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectFilteredNextDayResults = createSelector(selectNextDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n\nexport const selectFilteredByIdResults = createSelector(selectByIdResultsFromState,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser));\n\nexport const selectFilteredDiffSizeResults = createSelector(selectDiffSizeResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n/**\n * Maps selected options by loaded buildings.\n */\nexport const selectSelectedBuildingOptions = createSelector(\n selectBookingLocations,\n selectLoadBuildingsSuccess,\n (locations, buildings) => (locations\n .map(l => buildings?.find(b => b.id === l.value))\n .filter(f => !!f) as Building[])\n);\n\n","import { Building, BuildingCity } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { BuildingLevel } from '../organisation/level.class';\nimport { Space } from '../spaces/space.class';\nimport { SpacesService } from '../spaces/spaces.service';\nimport {\n timezoneDisplay,\n timezoneNameToDate,\n unique,\n ImageDirective,\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * If more than 3 are selected, we truncate location display.\n */\nconst MAX_ABBREV_LOCATIONS = 3;\n\nexport const mapBuildingToSelectOption = (\n city: string,\n building: Building\n): SelectOption => ({\n display: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n dropdownOverride: `${building.code}-${building.name}, ${building.address}`,\n value: building.id,\n groupId: city,\n groupChild: true,\n shortDisplay: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n meta: { building, city },\n});\n\nexport const mapCityToAllSelectOption = (\n city: BuildingCity\n): SelectOption => ({\n display: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n value: city.name,\n groupHeader: true,\n groupId: city.name,\n shortDisplay: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n meta: { city },\n});\n\n/**\n * Flattens a map of {@link BuildingCity} to {@link Building} array into a list of {@link SelectOption}.\n * @param grouped The grouping\n */\nexport const flattenDisplayOffices = (\n grouped: Map\n) => {\n const options: SelectOption[] = [];\n grouped.forEach((value, key) => {\n options.push(mapCityToAllSelectOption(key));\n value.forEach((b) =>\n options.push(mapBuildingToSelectOption(key.name, b))\n );\n });\n return options;\n};\n\n/**\n * This method will either add or remove a selected option from the selectedOptions list based on\n * these conditions:\n * 1. If the option EXISTS in the list AND is a groupHeader, de-select all of its children.\n * 2. If the option EXISTS in the list AND is a groupChild, remove it and its associated header from the list.\n * 3. If the option does NOT EXIST in the list AND is a groupHeader, select all other children.\n * 4. If the option does NOT EXIST in the list AND is a groupChild, add it to the list.\n *\n * Special note regarding item 4:\n * 4a. If that selection completes the children selection, select its associated header as well.\n */\nexport const toggleSelectedByGroup = (\n options: SelectOption[],\n selectedOptions: SelectOption[],\n option: SelectOption\n) => {\n if (selectedOptions.find((s) => s.value === option.value)) {\n return selectedOptions.filter((s) => {\n let filter = s.value !== option.value;\n // if group header, also remove any option that is the child of it.\n if (option.groupHeader) {\n filter =\n filter &&\n (!s.groupChild ||\n (s.groupChild && s.groupId !== option.groupId));\n } else if (option.groupChild) {\n // if child removing, remove the associated header.\n filter =\n filter &&\n (!s.groupHeader ||\n (s.groupHeader && s.groupId !== option.groupId));\n }\n return filter;\n });\n }\n // option does NOT EXIST\n // if adding header, add the other children to the selected list, ensuring no dupes.\n if (option.groupHeader) {\n const toSelect = options.filter(\n (v) =>\n v.groupChild &&\n v.groupId === option.value &&\n !selectedOptions.find((selected) => selected.value === v.value)\n );\n return [...selectedOptions, option, ...toSelect];\n }\n // add group child, add the group header if all satisfied\n const newGroup = [...selectedOptions, option];\n\n // check if we have selected all children from options by filtering down by city and checking if\n // they're in the selected options list.\n const remainingChildrenInGroup = options.filter(\n (o) =>\n o.groupChild &&\n o.groupId === option.groupId &&\n !newGroup.find((ng) => ng.value === o.value)\n );\n // if we dont have remaining children, add the group\n if (remainingChildrenInGroup.length === 0) {\n return [\n ...newGroup,\n options.find((o) => o.groupHeader && o.groupId === option.groupId),\n ];\n }\n return newGroup;\n};\n\n/**\n * If the list of locations are larger than {@link MAX_ABBREV_LOCATIONS}, then truncate\n * and display the remaining count.\n */\nexport const truncateLocationList = (\n locations: readonly SelectOption[]\n): string => {\n // comma separate the locations\n let truncatedLocations = [...locations];\n const shouldTruncate = locations.length > MAX_ABBREV_LOCATIONS;\n if (shouldTruncate) {\n truncatedLocations = truncatedLocations.splice(0, MAX_ABBREV_LOCATIONS);\n }\n let display = truncatedLocations\n .map((l) => l.shortDisplay || l.display)\n .join(', ');\n if (shouldTruncate) {\n display += `...(${locations.length})`;\n }\n return display;\n};\n\nexport const mapBuildingLevelToOption = (\n level?: BuildingLevel\n): SelectOption =>\n level\n ? {\n value: level.id,\n display: level.name,\n }\n : undefined;\n\n/**\n * Returns all levels included with the building, deduped.\n * @param buildings\n */\nexport const flattenBuildingsWithLevels = (buildings: Building[]) => {\n const flattenedLevels = unique(\n buildings.reduce((next: BuildingLevel[], building: Building) => {\n next.push(...building.levels);\n return next;\n }, []),\n 'id'\n );\n return {\n flattenedLevels,\n buildings,\n };\n};\n\n/** Gets route to image placeholder if room image isn't found */\n\nexport const placeholderRoute = (num: number): string => {\n let index: number;\n if (num <= 3) {\n index = num;\n } else if (num % 3 === 0) {\n index = 3;\n } else {\n index = 1;\n }\n return `assets/img/rooms/placeholder-${index}.png`;\n};\n\n/**\n * Method takes the rootFolderURL and fileSlug to create an array of three images\n * that should exist. If a room image exists, it replaces the placehoder image.\n */\nexport const setupRoomImages = (\n componentReference: ImageDirective,\n image_positions: number[],\n rootFolderURL: string,\n fileSlug: string,\n imagesLoaded: boolean = false\n): void => {\n let foundImages: any[] = image_positions.map((i) =>\n i ? { path: placeholderRoute(i) } : false\n );\n image_positions.forEach((n) => {\n const desiredImageName = `${rootFolderURL}${fileSlug}-part-${n}.png`;\n const desiredImage = location.pathname.includes('concierge') ? `${location.origin}/staff/${desiredImageName}` : desiredImageName;\n if (!imagesLoaded) {\n const tester = new Image();\n tester.onload = () => {\n // Will never run on unit test\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = [...foundImages.slice()];\n componentReference?.loadImages && componentReference?.loadImages.next([...foundImages.slice()]);\n };\n tester.src = desiredImage;\n }\n\n // Force valid image output on unit test\n if (imagesLoaded) {\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = foundImages.slice();\n }\n });\n};\n\nexport const bookingStatusDetails = (booking: Booking) => {\n const now = DateNow(new Date());\n let image = '';\n let text = '';\n let title = '';\n\n if (booking?.status) {\n const status = now > booking.endDateTz ? 'expired' : booking.status;\n switch (status) {\n case 'unavailable':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Unavailable';\n text = 'Unavailable';\n break;\n case 'declined':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'cancelled':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'expired':\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n case 'tentative':\n image = 'assets/icon/booking_pending.svg';\n title = 'Requested';\n text = 'Pending';\n break;\n case 'accepted':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n case 'approved':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n default:\n // TODO\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n }\n }\n return { text, title, image };\n};\n\nexport const roomHasCateringHours = (building: Building, space: Space) => {\n let hasCatering = building\n ? building.has_catering && building.catering_hours\n : false;\n // Room catering status as false overrides building status\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n return hasCatering;\n};\n\nexport const cateringAllowed = (booking: Booking, building: Building) => {\n const status = bookingStatusDetails(booking);\n const disallowedStatus = ['declined', 'cancelled', 'expired'].includes(\n status.text\n );\n const opens = building?.catering_hours?.start;\n const closed = building?.catering_hours?.end;\n\n if (disallowedStatus) {\n return false;\n }\n\n if (typeof opens === 'undefined' || typeof closed === 'undefined') {\n return false;\n }\n\n // Catering time could be a decimal so convert to a date\n const openMinutes = opens * 60;\n const closeMinutes = closed * 60;\n\n const startOfDay = booking.startDateTz.startOfValue('day');\n const cateringOpenTime = startOfDay.addValue({ minutes: openMinutes });\n const cateringCloseTime = startOfDay.addValue({ minutes: closeMinutes });\n\n if (\n cateringOpenTime.ms <= booking.startDateTz.ms ||\n cateringCloseTime.ms > booking.startDateTz.ms\n ) {\n // Booking ends before catering opens\n if (booking.endDateTz.ms <= cateringOpenTime.ms) {\n return false;\n }\n // Booking starts after catering closes\n if (booking.startDateTz.ms > cateringCloseTime.ms) {\n return false;\n }\n\n // Start time is OK\n if (booking.startDateTz.ms > DateNow(new Date()).ms) {\n // Due to COVID, no orders are available once a meeting begins.\n return true;\n }\n }\n\n return false;\n};\n\nexport const checkCollisions = (\n service: SpacesService,\n booking: Booking\n): Promise => {\n return new Promise((resolve, reject) => {\n\n let availabilityParams: {\n room_ids: string;\n dateTz: DateTZ;\n duration: number;\n setup: number;\n breakdown: number;\n hide_bookings: boolean;\n [key: string]: any;\n } = {\n room_ids: booking.space.id,\n dateTz: booking.startDateTz,\n duration: booking.duration,\n setup: booking.setup[booking.space.email],\n breakdown: booking.breakdown[booking.space.email],\n hide_bookings: false,\n };\n\n if (booking.recurrence_type === \"master\" || booking.recurrence_type === null) {\n availabilityParams = {\n ...availabilityParams,\n ignore: booking?.icaluid,\n recurrence_count: booking?.recurrence_count,\n recurrence_period: booking?.recurrence_period,\n recurrence_endTz: booking?.recurrence_endTz,\n recurrence_interval: booking?.recurrence_interval,\n recurrence_starts: booking?.recurrence_starts,\n is_recurrent: booking?.is_recurrent,\n recurrence_days: booking?.recurrence_days\n } as typeof availabilityParams;\n }\n\n service\n .available(\n availabilityParams,\n null,\n false\n )\n .then(\n (list) => {\n const space = list.length ? list[0] : null;\n if (space) {\n if (!space.bookable) return reject('Has conflict');\n const setup = booking?.setup[space?.email] || 0;\n const breakdown = booking?.breakdown[space?.email] || 0;\n const start_time = booking?.startDateTz.seconds - setup;\n const end_time = booking.endDateTz.seconds + breakdown;\n\n const bookings = space.settings.bookings;\n // console.log('Bookings:', bookings);\n // Compare the existing bookings to see if any truely conflict.\n if (bookings.length) {\n const has_conflict = bookings.find(bkn => {\n const b_setup = bkn.setup[space.email] || 0;\n const b_breakdown = bkn.setup[space.email] || 0;\n const start = (bkn.start_epoch || bkn.start) - b_setup;\n const end = (bkn.end_epoch || bkn.end) + b_breakdown;\n return (\n (end_time > start && end_time <= end) || // Booking ends during the meeting\n (start_time >= start && start_time < end) || // Booking starts during a meeting\n (start_time <= start && end_time >= end) // Booking overlaps entire meeting\n ) && \n ( \n bkn.id !== booking.id \n || \n ( !!booking.is_recurrent && (booking.recurrence_type === \"master\" || booking.recurrence_type === null ) ) \n ?\n bkn.recurrence_master_id !== booking.id\n :\n false\n \n )\n\n\n\n });\n // Conflicts found, reject\n if (has_conflict) return reject('has booking conflict');\n }\n return resolve(space.bookable);\n }\n reject('space not found');\n },\n () => reject('available error')\n );\n });\n};\n\nexport const getStatusErrorMessage = (status?: number) => {\n let msg = '';\n switch (status) {\n\t\t\tcase 400:\n\t\t\t\tmsg = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 403:\n\t\t\t\tmsg = 'Your do not have permission to update this booking.';\n\t\t\t\tbreak;\n\t\t\tcase 409:\n\t\t\t\tmsg = 'Sorry, your booking time conflicts with another booking.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmsg = 'Your booking failed to update, please try again';\n }\n return msg;\n};\n","export * from './room-results/room-results.viewmodel'\nexport * from './booking-filter.utils'\nexport * from './booking.form.actions'\nexport * from './booking.form.data'\nexport * from './booking.form.spec-helpers'\nexport * from './booking.form.types'\nexport * from './booking.selectors'\nexport * from './booking.utils'","import { Space } from '../../spaces/space.class';\nimport { BuildingLevel } from '../../organisation/level.class';\nimport { Building } from '../../organisation/building.class';\n\nexport class RoomResultsViewModel {\n\n public levelDisplay: string;\n public title: string;\n public office: string;\n public capacity: string;\n\n constructor(public space: Space,\n public level?: BuildingLevel,\n public building?: Building) {\n\n this.levelDisplay = `Level ${this.space?.level?.short_name}`;\n this.title = this.space.local_name;\n this.office = this.building ? `(${this.building?.code}) ${this.building?.name}` : '';\n this.capacity = `Capacity: ${this.space.capacity} people`;\n }\n}\n\n/**\n * For each result from results, we find its level and building from the lists.\n */\nexport const mapResultsToViewModels = (results: Space[],\n flattenedLevels: BuildingLevel[],\n buildings: Building[]): RoomResultsViewModel[] =>\n results.map((r: Space) => {\n const level = flattenedLevels.find(l => r.zones.includes(l.id));\n const building = buildings.find(b => r.zones.includes(b.id));\n return new RoomResultsViewModel(\n r,\n level,\n building\n );\n });\n","import { Injectable, NgZone } from '@angular/core';\nimport { BehaviorSubject, combineLatest, of, Observable } from 'rxjs';\nimport {\n catchError,\n debounceTime,\n filter,\n first,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { replaceBookings, timePeriodsIntersect } from './booking.utilities';\nimport { SpacesService } from '../spaces/spaces.service';\nimport { Booking } from '../bookings/booking.class';\nimport { Space } from '../spaces/space.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { OrganisationService } from '../organisation/organisation.service';\n\nexport type BookingType =\n | 'internal'\n | 'client'\n | 'external'\n | 'setup'\n | 'training'\n | 'interview'\n | 'declined';\n\nexport interface BookingFilters {\n /** List of zone ids to get bookings for */\n zone_ids?: string[];\n space_emails?: string[];\n hide_type?: BookingType[];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BookingStateService extends BaseClass {\n /** List of bookings */\n private _poll = new BehaviorSubject(false);\n /** List of bookings */\n private _long_poll = new BehaviorSubject<'month' | ''>('');\n private _long_poll_week = new BehaviorSubject<'week' | ''>('');\n /** List of bookings */\n private _bookings = new BehaviorSubject([]);\n /** List of meeting count per date */\n public _noOfMeetings = new BehaviorSubject<{}>({});\n /** Filter details for bookings */\n private _filters = new BehaviorSubject({});\n /** Currently active date */\n private _dateTz = new BehaviorSubject(DateNow(new Date()));\n /** Currently displayed zone */\n private _zone = new BehaviorSubject(' ');\n /** Whether booking data is being loaded */\n private _loading = new BehaviorSubject(false);\n /** Observable for filter and booking list changes */\n private _state = combineLatest(\n this._bookings,\n this._filters,\n this._dateTz,\n this._zone\n );\n\n /** Observable for list of bookings */\n public readonly bookings = this._bookings.asObservable();\n /** Observable for active date */\n public readonly dateTz = this._dateTz.asObservable();\n /** Observable for active zone */ // R-- zone was this._date.asObservable(); this looks like a mistake but it exists from the beginning of time\n public readonly zone = this._dateTz.asObservable();\n /** Observable for loading state of bookings */\n public readonly loading = this._loading.asObservable();\n\n public get booking_date() {\n // When this class is initialized this._dateTz is local timezone\n return this._dateTz.value;\n }\n\n public get timezone() {\n return localStorage.getItem('CONCIERGE.timezone');\n }\n\n /** Obsevable for filtered list of bookings */\n public readonly filtered = this._state.pipe(\n map((state) => {\n const bdTz = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const startTz = bdTz.startOfValue('day');\n const endTz = startTz.addValue({}).endOfValue('day');\n return this.filterBookings(startTz, endTz);\n }),\n shareReplay(1)\n );\n\n /** Obsevable for filtered list of bookings of the active week */\n public readonly filtered_week = this._state.pipe(\n map(() => {\n // Tested to be valid in building time now.\n const bd = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const start = bd.startOfValue('week').startOfValue('day');\n const end = this.getEndOfWeek(bd);\n return this.filterBookings(start, end);\n })\n );\n\n /** Obsevable for filtered list of bookings for active month */\n public readonly filtered_month = this._state.pipe(\n map(() => {\n const start = this.booking_date.startOfValue('month');\n const end = this.booking_date.endOfValue('month');\n return this.filterBookings(start, end);\n })\n );\n\n /** Active filters */\n public get filters() {\n return this._filters.getValue();\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private ngZone: NgZone,\n ) {\n super();\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Just to get the timezone correct\n this._dateTz.next(\n new DateTZ({\n date: this._dateTz.value.ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone,\n })\n );\n });\n\n /** Generate observable for updating bookings */\n const search = combineLatest(this._poll, this._zone, this._dateTz).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap(() => {\n const fzone = this._zone.getValue();\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n const start = this.booking_date.startOfValue('day');\n const end = start.endOfValue('day');\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start.seconds,\n available_to: end.seconds,\n });\n }),\n catchError(() => of([]))\n );\n\n const search_long_week = combineLatest(\n this._long_poll_week,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, false);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n\n //TO DO: make sure both spaces have same booking\n /** Subscribe to update observable */\n search.subscribe((space_list) => {\n this.processBookings(space_list);\n this._loading.next(false);\n });\n search_long_week.subscribe((space_list) => {\n this.processBookings(space_list, this._long_poll_week.getValue() as any);\n this._loading.next(false);\n });\n }\n\n /**\n * Function to build\n */\n private buildSpaceLongQuery(dailyCount: boolean = false): Observable {\n return combineLatest(\n this._long_poll,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = dailyCount ? this._org.building.id : props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, dailyCount);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n }\n\n private querySpace(type: string, fzone: string, dateTz: DateTZ, dailyCount: boolean = false) : Observable | Observable{\n const start = () => {\n const s = dateTz;\n if (type === 'week') {\n return s.startOfValue('week');\n } else {\n return s.startOfValue('month');\n }\n };\n\n const end = () => {\n const e = start();\n if (type === 'week') {\n /**\n * To Do: date-tz.class.ts endOfValue subtracts 1 day from end of week for 7 days a week type which returns Friday instead of Saturday\n * below is the adjustment -\n */\n return e.addValue({ days: 1 }).endOfValue('week');\n } else {\n return e.endOfValue('month');\n }\n /**\n * R--- when testing March 2022 London offices, the month is an hour short.\n * Is this a Luxon bug or London DST?\n */\n };\n\n // dates here are ok\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start().seconds,\n available_to: end().seconds,\n ...(dailyCount) ? { daily_count: true } : ''\n });\n }\n\n\n public getDailyMeetingCount() : void {\n this._long_poll.next('month');\n this.buildSpaceLongQuery(true).subscribe((counts) => {\n this._noOfMeetings.next(counts);\n this._loading.next(false);\n });\n }\n\n /**\n * Update the booking filters\n * @param details\n */\n public setFilters(details: BookingFilters) {\n this._filters.next(details);\n }\n\n /**\n * Update the booking date\n * @param details\n */\n public setDate(dateTz: DateTZ) {\n this._dateTz.next(dateTz);\n }\n\n /**\n * Update the booking's zone\n * @param details\n */\n public setZone(zone: string) {\n this._zone.next(zone);\n }\n\n /**\n * update day view once\n */\n public pollOnce(){\n this._poll.next(true);\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPolling(delay: number = 30 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingWeek(delay: number = 4 * 30 * 1000 ) {\n this._long_poll_week.next('week');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll_week.next('week'),\n delay\n );\n });\n }\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingEveryFiveMin(delay: number = 60 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingMonth(delay: number = 5 * 60 * 1000) {\n this._long_poll.next('month');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll.next('month'),\n delay\n );\n });\n }\n\n\n /**\n * Stop polling to update bookings;\n */\n public stopPolling() {\n this._poll.next(false);\n this.clearInterval('polling');\n this._long_poll.next('');\n this.clearInterval('polling_long');\n }\n\n public updateRoomList() {\n this._spaces.updateRoomList();\n }\n\n /**\n * Add booking to bookings listing\n * @param booking\n */\n public add(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Update booking in the bookings list\n * @param booking\n */\n public replace(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings\n .filter(\n (bkn) =>\n bkn.icaluid !== booking.icaluid && bkn.id !== booking.id\n )\n .concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Remove booking in the bookings list\n * @param booking\n */\n public remove(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.filter(\n (bkn) => bkn.icaluid !== booking.icaluid\n );\n this._bookings.next(new_bookings);\n }\n\n public attentToDelete(\n booking: Booking,\n action: 'series' | 'booking' = 'booking',\n undo: boolean = false\n ) {\n const bookings = this._bookings.getValue();\n const attempted_to_delete = ((action) => {\n return (bkg: Booking) => {\n switch (action) {\n case 'booking': {\n const booking_master = bookings.find(\n (bkn) => bkn.icaluid === booking.icaluid\n );\n if (!booking_master) return false;\n return bkg.id === booking.id;\n }\n case 'series': {\n const booking_master = bookings.find(\n (bkg) =>\n bkg.id ===\n (booking.recurrence_type === 'occurrence'\n ? booking.recurrence_master_id\n : booking.id)\n );\n if (!booking_master) return false;\n return (\n booking_master.id === bkg.id ||\n bkg.recurrence_master_id === booking_master.id\n );\n }\n default:\n false;\n }\n };\n })(action);\n\n const new_bookings = [...bookings].map((bkg) => {\n if (!undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = action;\n }\n\n if (undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = null;\n }\n\n return bkg;\n });\n\n this._bookings.next(new_bookings);\n }\n\n private processBookings(\n space_list: Space[],\n period: 'day' | 'week' | 'month' = 'day'\n ) {\n const start = () => {\n switch (period) {\n case 'month':\n return this.booking_date.startOfValue('month');\n case 'week':\n return this.booking_date.startOfValue('week');\n default:\n return this.booking_date.startOfValue('day');\n }\n };\n const end = () => {\n const s = start();\n switch (period) {\n case 'month':\n return s.endOfValue('month');\n case 'week':\n return s.endOfValue('week');\n default:\n return s.endOfValue('day');\n }\n };\n\n let bookings = this._bookings.getValue();\n space_list.forEach((space) => {\n return (bookings = replaceBookings(\n bookings,\n space.bookings.map((bkn) => new Booking(bkn)),\n {\n room_email: space.email,\n fromTz: start(),\n toTz: end(),\n }\n ));\n });\n this._bookings.next(bookings);\n }\n\n // private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n // const filters = this._filters.getValue();\n // const bookings = this._bookings.getValue();\n // const fzone = this._zone.getValue();\n // return bookings.filter((bkn) => {\n // const intersects = timePeriodsIntersect(\n // startTz.ms,\n // endTz.ms,\n // bkn.startDateTz.ms,\n // bkn.endDateTz.ms\n // );\n // const in_zone = bkn.room.zones.includes(fzone);\n // const has_space =\n // !filters.space_emails?.length ||\n // filters.space_emails.includes(bkn.room.email);\n // const in_zones =\n // !filters.zone_ids?.length ||\n // !!bkn.room.zones.find((zone) =>\n // filters.zone_ids.includes(zone)\n // );\n // const type = bkn.declined ? 'declined' : bkn.getType();\n\n // const show =\n // !filters.hide_type?.length ||\n // !filters.hide_type.includes(type as any);\n // return intersects && has_space && in_zone && in_zones && show;\n // });\n // }\n\n private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n const filters = this._filters.getValue();\n const bookings = this._bookings.getValue();\n const fzone = this._zone.getValue();\n return bookings.filter((bkn) => {\n const intersects = timePeriodsIntersect(\n startTz.ms,\n endTz.ms,\n bkn.startDateTz.ms,\n bkn.endDateTz.ms\n );\n // Check if any room in the booking satisfies the conditions\n const roomSatisfiesConditions = bkn.multi_rooms.some((room) => {\n const in_zone = room.zones.includes(fzone);\n const has_space =\n !filters.space_emails?.length ||\n filters.space_emails.includes(room.email);\n const in_zones =\n !filters.zone_ids?.length ||\n !!room.zones.find((zone) => filters.zone_ids.includes(zone));\n return in_zone && has_space && in_zones;\n });\n \n const type = bkn.declined ? 'declined' : bkn.getType();\n \n const show =\n !filters.hide_type?.length ||\n !filters.hide_type.includes(type as any);\n return intersects && roomSatisfiesConditions && show;\n });\n } \n\n /**If Sunday add one day to get Saturday as end of week */\n private getEndOfWeek(date: DateTZ): DateTZ {\n return date.dateWeekday === 7\n ? date.addValue({ days: 1 }).endOfValue('week').endOfValue('day')\n : date.endOfValue('week').endOfValue('day');\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport { CateringOrder } from '../catering';\nimport { User } from '../users';\nimport {\n flatten,\n HashMap,\n humaniseDuration,\n shorterBuildingDateFormatString,\n shorterLocalDateFormatString,\n toTitleCase,\n unique\n} from '@mckinsey-converge/base';\nimport { Space } from '../spaces/space.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport {\n BookingNote,\n} from './booking.types';\nimport { convertLocalTimestampToTimezonedDateTz, DateNow, DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, getLastDateFromList, handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { findSpace } from '../spaces';\nimport { DateTime } from 'luxon';\n\n\nexport interface IBookingQueryOptions {\n /** booking ID */\n id?: string;\n email?: string;\n target?: string;\n from?: number; // R--- depreciate\n until?: number; // R--- depreciate\n fromTz?: DateTZ;\n untilTz?: DateTZ;\n show_cancelled?: boolean;\n pagination?: boolean;\n limit?: number;\n offset?: number;\n sort?: string,\n filters?: any;\n include_rooms?: boolean;\n building_zone?: string;\n}\n\nexport class Booking extends BaseDataClass {\n /** Unique calendar event ID */\n // public readonly icaluid: string;\n /** Subject or title of the booking */\n public title: string;\n /** Luxon based date class of the booking start time */\n public startDateTz: DateTZ;\n /** Luxon based date class of the booking start time */\n public endDateTz: DateTZ;\n /** Description or details of the booking */\n public readonly body: string;\n /** Type of booking */\n public readonly booking_type: string;\n /** List of catering orders for the booking */\n public catering: readonly CateringOrder[];\n /** Whether booking's duration covers all day */\n public readonly all_day: boolean;\n /** Mapping of emails to approval statuses */\n public approval_status: HashMap;\n /**\n * New booking approval status set in constructor\n *\n * timeBasedStatusLabel is a getter calculated via current time, some parts of the application\n * may use status when it should use timeBasedStatusLabel\n */\n public status: 'tentative' | 'accepted' | 'approved' | 'declined' | 'cancelled' | 'expired' | 'unavailable';\n /** Host/Organiser of the booking */\n public organiser: User;\n /** List of people invited to attend the booking */\n public attendees: User[];\n /** Author of the booking */\n public readonly creator: User;\n\n /** List of notes associated with the booking */\n public notes: readonly BookingNote[];\n /** Mapping of spaces to equipment charge codes */\n public equipment_codes: HashMap;\n /** Mapping of spaces to expected number of attendees */\n public expected_attendees: HashMap;\n /** Map of space emails to the setup time before the meeting in minutes */\n public setup: HashMap;\n /** List of checked in attendees */\n public check_ins: object;\n /** Map of space emails to the breakdown time before the meeting in minutes */\n public breakdown: HashMap;\n /** List of fields edited since creation */\n public readonly edits: string[];\n /** List of users to be notified on visitor arrivals */\n public readonly notify_users: readonly string[];\n /** Whether the time or duration has changed */\n public time_changed = false;\n /**\n * Booking Space\n * Bookings only have one room on MCK\n */\n public room: Space;\n /** building_zone */\n public building_zone: string;\n /** Initialized Timezone */\n public timezone: string;\n /** Array of company names */\n public company?: string[];\n /** Flag for multiroom booking */\n public is_multiroom: boolean;\n /** Multiroom booking ID */\n public multiroom_master_id: string; \n /** Merged - field holds flag for merged-multiroom booking which tightly coupled with multiroom booking only */\n public merged: boolean;\n /** Type of recurrence, Shows whether this is a master or an occurence in the series. */\n public readonly recurrence_type: string;\n /** The frequency of the recurring booking. */\n public readonly recurrence_period: RecurrencePeriod;\n /** The interval time between each period. Defaults to 1. For example, with a period of \"weekly\" and an interval of 2, the recurrencd happen every 2 weeks. */\n public readonly recurrence_interval: number;\n /** Unix epoch in seconds of the recurrence end date */\n private _recurrence_endTz: DateTZ;\n /** The number of times to repeat the recurring booking. */\n public readonly recurrence_count: number;\n /** ID of the booking considered the master */\n public readonly recurrence_master_id: string;\n /** An array of booking IDs which belong to this recurring series. This INCLUDES the master booking ID. */\n public readonly occurrence_ids: string[];\n /** A list of INDIVIDUAL edits to any of the bookings in the series. This is so we can prompt the user if they are going to override previously updated bookings with a whole-series update. */\n public readonly occurrence_edits: string[];\n /** A list of Ocurrences */\n public readonly occurrence_details: { id: string, start_epoch: number }[];\n /** When the booking was created */\n public created_epoch: number;\n /** Is the Application concierge */\n public is_concierge: boolean;\n /**helper to know if recurring toggle is on */\n public is_recurrent: boolean;\n /**array of start dates of each ocurrence in the series */\n public recurrence_starts: Array\n /**array of conflicting dates not to be included in the recurrence series */\n public recurrence_exceptions: Array\n\n public recurrence_days?: Array\n\n /** Master recurrence start */\n public recurrence_start: number;\n\n /** Start Epoch */\n public start_epoch: number;\n public end_epoch: number;\n public level_zone: string;\n public opt_out: boolean;\n public outlook_opt_out: boolean;\n public multi_rooms: Space[];\n public room_setup: any;\n public room_breakdown: any;\n public headcount: number;\n public equipment_code: string;\n\n /** Currently back-end is not properly setting the recurrence_end property, this is a workaround */\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz;\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date;\n }\n\n /** Mark a booking for deleting */\n public attempted_to_delete?: 'series' | 'booking' | null;\n\n // No specific reason to set readonly but canm be change if needed to update in future\n public readonly booked_by : string | { name: string };\n public readonly booker: Object;\n public readonly booker_concierge: Object\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = settingsService.concierge;\n\n /**\n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = new DateTZ();\n\n const defaultTitle = ''; // Blank since the create booking form will init with test values.\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n const defaultBuildingZone = null // R --- no idea, should be a building.id but which and how\n const defaultOrgainiser = User.active_user || new User(); // meh, non American use.\n const defaultBookingType = 'internal';\n\n /**\n * Process the simple raw_data with defaults mixed in\n */\n this.title = raw_data.title || defaultTitle;\n this.timezone = raw_data.timezone || defaultLocalTimezone;\n // Used by components to get the building details\n this.building_zone = raw_data.building_zone || defaultBuildingZone;\n this.body = raw_data.body || '';\n // Provided booking type\n this.booking_type = raw_data.booking_type || defaultBookingType;\n // Attendees provided in API booking data\n this.attendees = (raw_data.attendees || []).map((i) => new User(i));\n // Provided organiser, active user, or empty user?\n this.organiser = raw_data.organiser ? new User(raw_data.organiser) : defaultOrgainiser;\n // Creator is provided or defaults to the organizer\n this.creator = (raw_data.booked_by ? new User(raw_data.booked_by) : defaultOrgainiser) || this.organiser;\n // Setup and breakdown times can conflict but not the true event start and end times\n this.setup = raw_data.setup || {};\n this.breakdown = raw_data.breakdown || {};\n this.room_setup = raw_data.room_setup;\n this.room_breakdown = raw_data.room_breakdown;\n // Notes are assigned by room but we only support a single room\n this.notes = raw_data.notes || [];\n this.equipment_codes = raw_data.equipment_codes || {};\n this.equipment_code = raw_data.equipment_code || '';\n this.expected_attendees = raw_data.expected_attendees || {};\n this.headcount = raw_data.headcount;\n this.check_ins = raw_data.check_ins || {};\n this.notify_users = raw_data.notify_users?.length ? raw_data.notify_users : [this.organiser?.name];\n this.company = raw_data.company || [];\n // retain booked by if there : helps to get correct creator above\n this.booked_by = raw_data.booked_by;\n this.booker = raw_data.booker;\n this.booker_concierge = raw_data.booker_concierge;\n this.level_zone = raw_data.level_zone;\n this.opt_out = raw_data.opt_out;\n this.outlook_opt_out = raw_data.outlook_opt_out;\n\n /**\n * \n */\n this.merged = raw_data?.merged || null;\n\n /**\n * Multiroom fields\n */\n this.is_multiroom = raw_data.is_multiroom || null;\n this.multiroom_master_id = raw_data.multiroom_master_id || null;\n\n /**\n * Setup Defaults when raw_data values are not provided\n *\n * all room_ids and space_list inputs can be refactored into just room like an API booking\n *\n * raw_data.room can be provides as the Space class or JSON object\n */\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n // this.room = raw_data?.room ? (Array.isArray(raw_data?.room) && raw_data.room.length > 0) ? raw_data?.room.map((element) => new Space(element))[0]: [new Space(raw_data.room)][0] : [new Space()][0];\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n\n if (raw_data && raw_data.room) {\n if (Array.isArray(raw_data.room) && raw_data.room.length) {\n this.room = raw_data.room.map((element) => new Space(element))[0];\n } else if (Array.isArray(raw_data.room) && raw_data.room.length === 0) {\n this.room = [new Space()][0];\n } else {\n this.room = [new Space(raw_data.room)][0];\n }\n } else {\n this.room = [new Space()][0];\n }\n\n\n const room_id = raw_data.room_id || raw_data.room_ids // Not sure why we have room_id and room_ids\n if (!this.room?.id && room_id?.length) {\n this.room = findSpace(room_id[0]) || this.room;\n }\n\n const roomsData = raw_data?.multi_rooms || raw_data?.room;\n this.multi_rooms = roomsData\n ? Array.isArray(roomsData)\n ? roomsData.map((element) => new Space(element))\n : [new Space(roomsData)]\n : [new Space()];\n\n \n const room_ids = [...(raw_data?.room_id || []), ...(raw_data?.room_ids || [])];\n\n room_ids.forEach(roomId => {\n const newRoom = findSpace(roomId);\n // Check if the room is found and not already included in this.room\n if (newRoom && !this.multi_rooms.some(room => room.id === newRoom.id)) {\n // Add the new room to this.room\n this.multi_rooms.push(newRoom);\n }\n });\n\n // this.room is sometimes getting set to undefined when raw_data?.room is coming as an object\n if(this.multi_rooms.length && this.room === undefined){\n this.room = this.multi_rooms[0];\n }\n \n /**\n * Setup the booking start and end time\n *\n *\n * Booking defaults to now if start is not defined.\n * Booking durration is now a getter\n */\n // now rounded to the next 5 minute increment\n const defaultStartTz = new DateTZ({ date: nowTz.ms, is_local_tz: false, building_tz: this.timezone }).setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n\n /**\n * When saving a booking the BaseDataClass doens't know to use the toAPIJson\n * so startDateTz isn't being convert to the epoch timestamp\n *\n * I'm not testing for the end time values because we can assume those follow the same pattern.\n */\n const startEpochProvided = !!(raw_data.start_epoch || raw_data.start);\n const startDateTzProvided = !!raw_data.startDateTz;\n\n /**\n * Not trying to be fancy here, just clear.\n */\n if (!startEpochProvided && startDateTzProvided) {\n /**\n * Once a booking is saved the BaseDataClass recreates the Booking\n * but doesn't use the toApiJSON method adapt the class input, mainly the\n * startDateTz isn't converted to the start_epoch timestamp.\n */\n this.startDateTz = raw_data.startDateTz;\n this.endDateTz = raw_data.endDateTz;\n } else if (startEpochProvided) {\n /**\n * A Booking created from the API responses arrives with the booking\n * start_epoch and end_epoch timestamps.\n */\n this.startDateTz = new DateTZ({\n date: ((raw_data.start_epoch || raw_data.start) * 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n this.endDateTz = new DateTZ({\n date: ((raw_data.end_epoch || raw_data.end)* 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n } else {\n /**\n * And there are uses of new Booking where there are no inputs\n * and defaults are necessary.\n */\n this.startDateTz = defaultStartTz;\n this.endDateTz = defaultStartTz.addValue({ minutes: 60 });;\n }\n\n /**\n * End time was by design ending at one minute before, IE 4:00PM is 3:59PM,\n * because of calendar and conflcit checking\n *\n * Check and finesse it.\n * Not sure why but some booking endtime added extra seconds\n */\n if ((this.endDateTz.minutes % 5) !== 0 || this.endDateTz.second > 0) {\n // Not sure of the source but some bookings do not conform.\n this.endDateTz = this.endDateTz.setValue({ second: 0, minute: Math.round(this.endDateTz.minutes / 5) * 5 });\n }\n\n\n\n /**\n * Setup the booking created_date\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n this.created_epoch = raw_data.created_epoch || nowTz.seconds;\n\n\n /**\n * Setup the booking all_day boolean\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n if ('all_day' in raw_data) {\n this.all_day = raw_data.all_day;\n } else {\n this.all_day = !!raw_data.all_day || this.duration > 23 * 60;\n }\n\n\n // R--- TODO Concierge will use startDateTz so i'm not sure if this is needed.\n if (!this.is_concierge && this.all_day && this.timezone) {\n /**\n * Concierge has a all_day form field, I can see it may need this for that, does it really?\n */\n this.startDateTz = this.startDateTz.startOfValue('day')\n }\n\n /**\n * Setup the booking approval status\n */\n let status = raw_data.status;\n // If not provided default to approved.\n if (!raw_data.status) {\n status = 'accepted';\n }\n // \"show_as\" is a special rule to override how the applications display the status\n if (raw_data.show_as && raw_data.show_as === 'cancelled') {\n status = 'declined';\n }\n const approvalStatus = {};\n this.multi_rooms.forEach(room => {\n approvalStatus[room.email] = status;\n });\n // Tracking new \"status\" and legacy \"approval_status\" from raw_data.status.\n this.status = status;\n this.approval_status = raw_data.approval_status || {};\n\n /**\n * Catering setup\n *\n * Bring in and sort the catering order by delivery time\n */\n\n this.catering = (raw_data.catering instanceof Array ? raw_data.catering : []).map(\n (i) => new CateringOrder(i)\n );\n\n\n\n /**\n * Edited fields setup\n *\n * Bring in and sort the catering order by delivery time\n *\n * cateringOrders can return the order sorted\n */\n const edited_fields = Array.isArray(raw_data.edits)\n ? raw_data.edits\n : unique(\n flatten(\n Object.keys(raw_data.edits || {}).map((room) => {\n return flatten(Object.values(raw_data.edits[room]));\n })\n )\n );\n this.edits = edited_fields;\n\n /**\n * New Recurring booking feilds\n *\n * New fields do not match the BookingRecurrenceDetails type\n * and are simpler to manage this way\n */\n this.recurrence_count = raw_data.recurrence_count || null;\n this.recurrence_days = raw_data.recurrence_days || null;\n this.occurrence_edits = raw_data.occurrence_edits || null;\n this.recurrence_endTz = raw_data.recurrence_end ? new DateTZ({date: raw_data.recurrence_end * 1000, is_local_tz: false, building_tz: this.timezone}) : null;\n this.recurrence_exceptions = raw_data.recurrence_exceptions || null;\n this.occurrence_ids = raw_data.occurrence_ids || null;\n this.recurrence_interval = raw_data.recurrence_interval || null;\n this.recurrence_period = raw_data.recurrence_period || null;\n this.recurrence_type = raw_data.recurrence_type || null;\n this.recurrence_master_id = raw_data.recurrence_master_id\n this.occurrence_details = raw_data.occurrence_details\n this.is_recurrent = raw_data.is_recurrent || (!!this.recurrence_type && !!this.recurrence_period) || null;\n this.recurrence_starts = raw_data.recurrence_starts || []\n this.start_epoch = raw_data.start_epoch\n this.end_epoch = raw_data.end_epoch\n\n /**\n * I'm not clear why, but the booking body, aka description is copied into the notes.\n * R--- In concerge data description is only a key when saving, also in the note array?\n */\n if (raw_data.body && !this.notes.find((i) => i.type === 'description')) {\n this.notes = [\n ...this.notes,\n {\n type: 'description',\n date: 0,\n message: raw_data.body,\n author: this.organiser.email\n }\n ];\n }\n\n /**\n * In case there is a cancellation in progress the property attempted_to_delete is set to false\n * And it is persisted until the booking is gone\n */\n this.attempted_to_delete = raw_data.attempted_to_delete || null;\n }\n\n\n /** Service for managing Bookings */\n protected get _service() {\n return ServiceManager.serviceFor(Booking);\n }\n\n /** Alias to approval_status */\n public get auto_approve(): boolean {\n // if concierge we auto_approve always.\n if (this.is_concierge) {\n return true;\n }\n return !this.multi_rooms.some(room => room.byRequest({\n dateTz: this.startDateTz,\n duration: this.duration,\n host: this.organiser\n }));\n }\n\n /** Whether booking has been approved */\n public get approved(): boolean {\n return !this.declined && !this.tentative;\n }\n\n /** All of the booking attendees including the organizer */\n public get allAttendees(): User[] {\n return unique([this.organiser].concat(this.attendees), 'email');\n }\n\n /** Computer format for booking type */\n public get bookingTypeId(): string {\n return this.booking_type.toLowerCase();\n }\n\n /** Human format for booking type */\n public get bookingTypeLabel(): string {\n return toTitleCase(this.booking_type);\n }\n\n /** Get accessor for the check in object, app expect array */\n public get checkInsArray(): string[] {\n return Object.keys(this.check_ins || {})\n }\n\n /** Legacy getter for \"class\" */ // R-- TODO remove\n public get class(): string {\n return this.booking_type;\n }\n\n /** */\n public get displayEndDateTz(): DateTZ {\n if ((this.endDateTz.minutes % 5) !== 0) {\n // All the bookings should end in 59 seconds\n return this.endDateTz.addValue({ seconds: 1 });\n }\n // but if not they return 00\n return this.endDateTz;\n }\n\n /** Whether booking has been declined */\n public get declined(): boolean {\n /**\n * I'm not sure, nor is Cam if this is ever used to decline\n * all booking for a specific room\n */\n const isAnyRoomDeclined = this.multi_rooms.some(room => room.name.toLowerCase().includes('decline'));\n if (isAnyRoomDeclined) {\n return true;\n }\n\n if (this.status.includes('decline')) {\n return true;\n }\n\n return false;\n }\n\n /** Description of the booking purpose */\n public get description(): string {\n const note = (this.notes || []).find((i) => i.type === 'description');\n return note ? note.message : '';\n }\n\n /** Catering getter */\n public get cateringOrders() {\n // Return the catering orders sorted by delivery time\n return this.catering ? this.catering.slice().sort((a, b) => {\n if (a?.delivery_time > b?.delivery_time) return 1;\n if (b?.delivery_time > a?.delivery_time) return -1;\n\n return 0;\n }) : [];\n }\n\n /** Get the created date as DateTz */\n public get creationDateTz() {\n return new DateTZ({ date: this.created_epoch * 1000, is_local_tz: false, building_tz: this.timezone })\n }\n\n public get tz_offset() {\n return getTimezoneOffsetString(this.timezone);\n }\n\n /** Display value for the date */\n public get date_string(): string {\n return this.startDateTz.formatDate('dd MMM yyyy');\n }\n\n /**\n * Get the booking durration based on start and end times\n */\n public get duration(): number {\n return Math.abs(this.startDateTz.startOfValue('minute').dateDiff(this.displayEndDateTz, 'minutes'));\n }\n\n /** Unix timestamp of the booking start */\n public get date() { // R--- remove if not necessary\n return this.startDateTz.ms;\n }\n\n /** Whether booking contains external visitors in the attendee list */\n public get has_visitors(): boolean {\n return this.attendees.reduce((a, v) => a || v.external, false);\n }\n\n /** Does the booking have catering orders */\n public get has_catering(): boolean {\n return !!this.catering.length;\n }\n\n /**\n * Unique calendar event ID\n * same as this.id, used to support existing component usage\n */\n public get icaluid(): string {\n return this.id;\n }\n\n /**\n * Get the booking room id\n */\n public get room_id(): string {\n return this.room.id;\n }\n\n /** Legacy getter of room, aka space */\n public get space(): Space {\n return this.room;\n }\n\n /** Status of the booking */\n public get timeBasedStatusLabel(): 'future' | 'upcoming' | 'done' | 'started' | 'in_progress' | 'expired_yesterday' {\n const buildingTzDt = DateNow(new Date()).toZone(this.timezone) ; // building time\n\n if (DateNow(new Date()).isBeforeDate(this.startDateTz.subtractValue({ minutes: 15 }))) {\n return 'future';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz)) {\n return 'upcoming';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: 15 }))) {\n return 'started';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: this.duration }))) {\n return 'in_progress';\n }\n // if current time is 12 AM (as per timezone) and booking expired yesterday\n else if(buildingTzDt.startOfValue('day').addValue({ minutes: 1 }).isAfterDate(this.startDateTz, 'day') ) {\n return 'expired_yesterday'\n }\n\n return 'done';\n }\n\n /** Whether booking is tentative */\n public get tentative(): boolean {\n if (\n this.status &&\n this.status.indexOf('tentative') >= 0\n ) {\n return true;\n }\n\n return false;\n }\n\n /** Display valuie for the start and end times of the booking */\n public get time_period(): string {\n return `${this.startDateTz.formatDate('h:mma')} - ${this.displayEndDateTz.formatDate('h:mma')}`;\n }\n\n /** Display value for the start time of the booking */\n public get start_time(): string {\n return this.startDateTz.formatDate('h:mma');\n }\n\n /** Display value for the end time of the booking */\n public get end_time(): string {\n return this.endDateTz.formatDate('h:mma');\n }\n\n /** Display value for the duration of the booking */\n public get length_string(): string {\n return humaniseDuration(this.duration);\n }\n\n /** Display value for the location of the booking */\n // public get local_room_name(): string {\n // return this.room?.local_name || 'No location';\n // }\n public get local_room_name(): string {\n if (this.multi_rooms.length === 0) {\n return 'No location';\n } else {\n return this.multi_rooms.map(room => room.local_name).join(', ');\n }\n } \n\n /** Display value for the level of the first space in the booking */\n public get level(): string {\n return this.space.level.name;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Booking {\n return new Booking(this.toJSON());\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(isEdit = false): Booking {\n return new Booking({\n ...this.toJSON(),\n id: isEdit ? this.id : null,\n });\n }\n\n /**\n *\n * @param status\n * @returns void\n */\n public undo(status?: 'accept' | 'decline', opts: { series?: boolean } = {}): Promise {\n return this._service.undo(\n this.id, status || 'accept',\n opts\n );\n }\n\n /**\n * Delete booking from the server\n */\n public delete(opts: { series?: boolean } = {}): Promise {\n if (this.id) {\n return this._service.delete(this.id, { ...opts });\n\n // R-- ask Cam again is he's positive these extra params are not needed for anything\n // return this._service.delete(this.id, {\n // concierge: this.is_concierge,\n // host: this.organiser.email,\n // room_id: this.space?.id,\n // icaluid: this.icaluid,\n // start: json.start,\n // end: json.end\n // });\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Booking): HashMap {\n let data = super.toJSON();\n // Remove the description from the notes\n data.notes = Array.isArray(data.notes) ? data.notes.filter((note) => note.type !== 'description') : data.notes;\n // Encode the nested objects\n data.room = data.room.toJSON();\n\n\n\n data.organiser = data.organiser.toJSON();\n data.creator = data.creator?.toJSON ? data.creator.toJSON(): data.creator;\n // Map the attendees User objects\n data.attendees = data.attendees.map((i: User) => i.toJSON());\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n return data;\n }\n\n /**\n * Convert object into plain object\n */\n public toApiJSON(this: Booking): HashMap {\n let data = super.toJSON();\n\n // Update booking payload contains additional fields\n data.icaluid = \"\";\n if (data.id) {\n data.icaluid = data.id;\n data.location_name = this.multi_rooms.map((item)=>{return item.local_name}).join(', ');\n data.from_room = this.multi_rooms.map((item)=>{return item.email}).join(', ');\n data.building_zone = this.room?.building?.id;\n }\n\n /**\n * These fields are rather in flux\n * According to Cam \"approve\" will be the prefered field\n * and auto_approve and approval_status can be removed.\n */\n data.approve = this.auto_approve; // this value appear incorrect on update\n data.auto_approve = [this.auto_approve]; // Needed to update approval status until BE accepts \"approve\"\n // delete data.approval_status;\n\n // Booking start and end data\n delete data.startDateTz;\n delete data.endDateTz;\n data.start = this.startDateTz.seconds;\n data.end = this.endDateTz.seconds;\n data.old_start = this.startDateTz.seconds; // remove is not necessary\n data.old_end = this.endDateTz.seconds; // remove is not necessary\n\n // Creation date value\n delete data.created_epoch;\n data.creation_date = this.creationDateTz.seconds;\n\n // Catering fields\n // data.catering = data.catering.toJSON();\n data.catering = this.cateringOrders;\n data.has_catering = this.has_catering;\n delete data.cateringOrders\n\n // Attendees appear quite incomplete\n // Map the attendees User objects\n data.attendees = this.allAttendees.map((i: User) => i.toJSON ? i.toJSON() : i);\n\n // Orgainizer and Creator data\n data.organiser = data.organiser.toJSON ? data.organiser.toJSON() : data.organiser;\n data.creator = data.creator.toJSON ? data.creator.toJSON() : data.creator;\n\n // Convert check_ins to checked_in array\n delete data.check_ins;\n data.checked_in = this.checkInsArray;\n\n // edits - edit booking is showing all fields even w/o an edit :(\n\n // Room data\n data.room_ids = this.multi_rooms.map((item)=>{return item.email});\n delete data.room;\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n // Not found in dev data\n delete data.name;\n delete data.email;\n delete data.is_concierge;\n // delete data.building_zone;\n // delete data.status;\n\n return data;\n }\n\n public getType(): string {\n if (!this || this.status?.includes('decline')) {\n return 'cancelled';\n }\n const booking_type = this.booking_type;\n if (booking_type === 'internal' && this.has_visitors) {\n return 'external';\n }\n return booking_type;\n }\n\n /** fallback for a booking when the recurrence_end is null but it's a series booking */\n public recurrenEndFromOcurrences(occurrence_details: { id: string, start_epoch: number }[]): DateTZ {\n const date = occurrence_details?.map(occurence => occurence)\n .sort((a, b) => new Date(a.start_epoch * 1000).getTime() - new Date(b.start_epoch * 1000).getTime())\n .reverse()\n .shift()\n .start_epoch * 1000\n return new DateTZ({date, is_local_tz: false, building_tz: this.timezone});\n }\n\n public get dateString() {\n return shorterLocalDateFormatString(this.startDateTz);\n }\n public get dateBuildingString() {\n return shorterBuildingDateFormatString(this.startDateTz);\n }\n\n public get endDateString(): string {\n return shorterLocalDateFormatString(this.recurrenEndFromOcurrences(this.occurrence_details));\n }\n}\n\n/**\n * Merge catering orders with same time and location\n * @param order_list List of catering orders\n */\nexport function mergeCateringOrders(order_list: CateringOrder[]) {\n // R--- investigate when this is used. Staff doesn't use it when adding catering orders.\n for (let i = 0; i < order_list.length; i++) {\n const orders = order_list.filter(\n (order) =>\n order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time\n );\n if (orders.length > 1) {\n const new_list = order_list.filter(\n (order) =>\n !(order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time)\n );\n new_list.push(new CateringOrder({\n ...order_list[i],\n items: flatten(orders.map(order => order.items)),\n booking_date: this.startDateTz.ms,\n booking_timezone: this.booking_timezone,\n }));\n order_list = new_list;\n i = 0;\n }\n }\n return order_list;\n}\n","import { DateTZ } from \"@mckinsey-converge/date-tz\";\n\nexport interface SpaceRules {\n auto_approve: boolean; // if false sapce is requestable else bookable\n hide: boolean;\n max_length?: number;\n min_length?: number;\n reason?: string // specially for non-bookable rooms\n}\n\nexport interface BookingNote {\n /** Type of note */\n type: 'equipment' | 'catering' | 'description' | 'private' | 'other' | 'catering-private';\n /** Name of the note's author */\n author: string;\n /** Contents of the note */\n message: string;\n /** Time the note was added to the booking */\n date: number;\n /** Display value for the time */\n time?: string;\n /** ID of the space associated with the note */\n space?: string;\n /** ID of the catering order associated with the note */\n order_id?: string;\n}\n\nexport interface DateDurationData {\n dateTz: DateTZ,\n duration: number,\n mobile: boolean,\n save?: boolean,\n}\n\nexport enum BOOKING_STATUS {\n approved = 'approved',\n declined = 'declined',\n tentative = 'tentative',\n unavailable = 'unavailable'\n}","import {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { AvailableBookingFields } from '../settings.interfaces';\nimport {\n HashMap,\n humaniseDuration,\n mockDate as mockDateBase,\n resetDate as resetDateBase,\n timeFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { CateringOrder } from '../catering/catering-order.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { User } from '../users/user.class';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport {\n BookingRule,\n SpaceStatus\n} from './space.types';\nimport { validateEndTime } from '../validation.utilities';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\nimport { Space } from '../spaces';\nimport * as cloneDeep from 'lodash/cloneDeep';\n\nconst MINUTE = 1;\nconst HOUR = 60;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\n\nconst DURATION_MAP: { [duration: string]: number } = {\n month: MONTH,\n months: MONTH,\n week: WEEK,\n weeks: WEEK,\n day: DAY,\n days: DAY,\n hour: HOUR,\n hours: HOUR,\n minute: MINUTE,\n minutes: MINUTE\n};\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const mockDate = mockDateBase;\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const resetDate = resetDateBase;\n\nexport interface IBookingSlot {\n start: number;\n end: number;\n}\n\n\nexport function bookingOptionsToQuery(options: IBookingQueryOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n delete query.type;\n if (options.filters) {\n delete query.filters;\n for (const property in options.filters) {\n if (!query[property]) {\n query[property] = options.filters[property]\n }\n }\n }\n\n // id?: string;\n // cancelled?: boolean;\n if (options.until) {\n query.to = options.until;\n delete query.until;\n }\n \n }\n return query;\n}\n\n\n/**\n * Generate a list of free time slots between the given bookings\n * @param list List of bookings to find slots between\n * @param min_size Minimum length of a free slot in minutes\n */\nexport function getFreeBookingSlots(list: Booking[]=[], min_size: number = 30, dateTzMs: number = DateNow(new Date()).ms,): IBookingSlot[] {\n /* istanbul ignore else */\n if (!list.length) {\n return [\n {\n start: 0,\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n }\n ];\n }\n const slots: IBookingSlot[] = [];\n let start = new DateTZ({ date: dateTzMs });\n list.sort((a, b) => a.date - b.date);\n for (const booking of list) {\n const bkn_start = booking.startDateTz;\n const bkn_end = booking.endDateTz;\n if (bkn_start.isAfterDate(start)) {\n const diff = Math.abs(bkn_start.dateDiff(start, 'minutes'));\n /* istanbul ignore else */\n if (diff >= min_size) {\n slots.push({ start: start.ms, end: bkn_start.ms });\n }\n start = bkn_end;\n } else if (start.startOfValue('minute').ms === bkn_start.startOfValue('minute').ms) {\n start = bkn_end;\n }\n }\n slots.push({\n start: start.ms,\n // R--- these X 10's make no sense. why not + 2 years?\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n });\n\n return slots;\n}\n\n/**\n * Get the next free time slot from the given bookings\n * @param list List of bookings to find the next slot\n * @param date Date to find next slot after in ms since UTC epoch\n * @param min_size Minimum length of the free slot in minutes\n * \n * R--- Possibly depreciate, I don't see it used anywhere except for its own test\n */\nexport function getNextFreeBookingSlot(\n list: Booking[],\n date: number = DateNow(new Date()).ms,\n min_size: number = 15\n): IBookingSlot {\n const slots = getFreeBookingSlots(list, min_size, date);\n const date_ = new DateTZ({date})\n const time = date_.startOfValue('minute').setValue({ second: 1 });\n for (const block of slots) {\n const start = new DateTZ({date: block.start});\n const end = new DateTZ({date: block.end});\n if (start.startOfValue('minute').isAfterDate(time)) {\n return block;\n } else if (time.isBeforeDate(end.startOfValue('minute'))) {\n const duration = end.startOfValue('minute').dateDiff(time, 'minutes');\n /* istanbul ignore else */\n if (duration >= min_size) {\n return block;\n }\n }\n }\n return slots[slots.length - 1];\n}\n\n/**\n * Generate form fields for the given booking\n * @param booking Booking to generate form for\n * @param current_user Current user of the system to default as the host\n */\nexport function generateBookingForm(\n booking: Booking,\n use_fields: AvailableBookingFields[],\n isConcierge: boolean = false,\n manualTimezone?: string,\n action?: SeriesAction | BookingAction | null\n ): FormGroup {\n if (!booking) {\n throw Error('No booking passed');\n }\n\n const user_service = ServiceManager.serviceFor(User);\n const current_user =\n user_service.current ||\n new User({ id: 'local-user', name: 'Local User', email: 'local@place.tech' });\n\n const fields: HashMap = {\n id: new FormControl(booking.id || ''),\n space_list: new FormControl( booking.is_multiroom? booking.multi_rooms : [booking.room], []),\n room: new FormControl(booking.room, {}),\n dateTz: new FormControl({ value: booking.startDateTz || DateNow(), disabled: false }, [Validators.required]),\n duration: new FormControl({ value: booking.duration, disabled: false }),\n organiser: new FormControl(booking.organiser || current_user, [Validators.required]),\n attendees: new FormControl(booking.attendees, []),\n title: new FormControl(booking.title || '', { validators: [ Validators.required, Validators.minLength(1) ], updateOn: 'blur' }), //Validators.pattern(\"[^=`~!@#$%*{};:'\\\",_.<>]*\")\n booking_type: new FormControl(booking.booking_type),\n body: new FormControl(booking.body),\n notes: new FormControl(booking.notes),\n equipment_codes: new FormControl(booking.equipment_codes),\n expected_attendees: new FormControl(booking.expected_attendees),\n company: new FormControl(booking.company),\n is_multiroom: new FormControl(booking.is_multiroom),\n merged: new FormControl({value: booking?.merged, disabled: true}),\n catering: new FormControl(\n booking.cateringOrders.map(\n (order) => new CateringOrder({\n ...order,\n booking_date: booking.startDateTz.ms,\n booking_timezone: booking.timezone,\n })\n )\n ),\n all_day: new FormControl(!!booking.all_day),\n has_catering: new FormControl(!!booking.has_catering),\n needs_space: new FormControl(true),\n action: new FormControl(''),\n timezone: new FormControl(manualTimezone || \"\"),\n is_before_date: new FormControl(false)\n };\n if (!isConcierge) {\n fields.duration.setValidators([Validators.required, validateEndTime(fields.dateTz)]);\n }\n /* istanbul ignore else */\n if (booking.id && booking.id !== 'ad-hoc') {\n fields.organiser.disable();\n /* istanbul ignore else */\n if (booking.endDateTz.ms < DateNow(new Date()).ms) {\n fields.dateTz.disable();\n }\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n fields.dateTz.setValidators(dateValidators);\n fields.dateTz.updateValueAndValidity();\n }\n let list_length = -1;\n fields.space_list.valueChanges.subscribe((list) => {\n const expected = fields.expected_attendees.value || {};\n const matches = Object.keys(expected).filter((key) =>\n list?.find((space) => space.email === key)\n ).length;\n if (list && list.length && matches === 0) {\n const codes = fields.equipment_codes.value || {};\n if (Object.keys(expected).length >= 0 || Object.keys(codes).length >= 0) {\n const key = Object.keys(expected)[0] || Object.keys(codes)[0];\n const new_expected = {};\n const new_codes = {};\n const notes = fields.notes.value;\n notes.forEach((note) => (note.space === key ? (note.space = list[0].email) : ''));\n new_expected[list[0].email] = expected[key];\n new_codes[list[0].email] = codes[key];\n fields.expected_attendees.setValue(new_expected);\n fields.equipment_codes.setValue(new_codes);\n }\n }\n list_length = list?.length;\n });\n fields.dateTz.valueChanges.subscribe((_) => {\n fields.duration.updateValueAndValidity();\n });\n fields.needs_space.valueChanges.subscribe((space_needed) => {\n if (!space_needed) {\n fields.space_list.setValue([]);\n }\n });\n fields.has_catering.valueChanges.subscribe((has_catering) => {\n if (!has_catering) {\n fields.catering.setValue([]);\n }\n });\n const simplified_fields: HashMap = [\n 'id',\n 'space_list',\n 'space_ids',\n 'notes',\n 'dateTz',\n 'booking_type',\n 'equipment_codes',\n 'expected_attendees',\n 'timezone',\n 'is_before_date',\n ...use_fields\n ].reduce((map, key) => {\n /* istanbul ignore else */\n if (fields[key]) {\n map[key] = fields[key];\n }\n return map;\n }, {});\n \n if (simplified_fields.all_day) {\n const handleAllDay = (value) => {\n if (value) {\n let startOfDay = simplified_fields.dateTz.value.clone();\n // When the booking space isn't set we still need a way to determine midnight\n // and here we use the current concierge building selection's timezone.\n if (manualTimezone) {\n startOfDay = startOfDay.toZone(manualTimezone);\n }\n\n simplified_fields.dateTz.setValidators([Validators.required]);\n simplified_fields.dateTz.setValue(simplified_fields.all_day.value\n ? startOfDay.startOfValue('day')\n : simplified_fields.dateTz.value);\n simplified_fields.duration.setValue(simplified_fields.all_day.value\n ? 24 * 60\n : simplified_fields.duration.value);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.disable();\n // simplified_fields.dateTz.disable();\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n simplified_fields.dateTz.setValidators(dateValidators);\n simplified_fields.duration.setValue(booking.duration || 30);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.enable();\n simplified_fields.dateTz.enable();\n }\n };\n simplified_fields.all_day.valueChanges.subscribe(handleAllDay);\n handleAllDay(simplified_fields.all_day.value);\n }\n\n const occurrences = booking.occurrence_details || [];\n\n //Add recurrence fields\n if(action && booking.recurrence_period === RecurrencePeriod.LIST){\n booking.recurrence_starts = occurrences\n .filter(occurrence => occurrence.id !== booking.recurrence_master_id)\n .map((occurrence) => new DateTZ({date: occurrence.start_epoch * 1000, is_local_tz: false, building_tz: booking.timezone})\n ) \n }\n /**If series exists then set the start and end dates from the first and last bookings in the occurrences array\n * this prevents prefilled form errors due to individual edits\n */\n if(action && action !== SeriesAction.CLONE && action !== BookingAction.CLONE && occurrences && occurrences.length && !booking.id){\n const start_dateTz = new DateTZ({\n date: occurrences.sort((d1, d2) => d1.start_epoch - d2.start_epoch)[0].start_epoch * 1000, \n is_local_tz: false, building_tz: booking.timezone\n })\n simplified_fields.dateTz.setValue(start_dateTz)\n const end = occurrences.sort((d1, d2) => d2.start_epoch - d1.start_epoch)[0].start_epoch * 1000\n booking.recurrence_endTz = new DateTZ({date: end, is_local_tz: false, building_tz: booking.timezone}) \n }\n\n // R-- needs TZ aware fields\n const _recurr_end = simplified_fields.dateTz?.value || new DateTZ({ date: 1 }); // new DateTZ({date: simplified_fields.date?.value}) \n const fields_with_recurrence = {\n ...simplified_fields,\n recurrence_period: new FormControl(booking.recurrence_period || RecurrencePeriod.WEEKLY),\n recurrence_interval: new FormControl(booking.recurrence_interval || 1),\n recurrence_endTz: new FormControl(booking.recurrence_endTz || _recurr_end.addValue({days: 1})),\n recurrence_count: new FormControl(booking.recurrence_count || 0),\n is_recurrent: new FormControl(booking.is_recurrent),\n recurrence_starts: new FormControl(booking.recurrence_starts || []),\n recurrence_exceptions: new FormControl([]),\n recurrence_pattern: new FormControl(RecurrencePeriod.WEEKLY), //Helper value to store the last selected pattern (daily, weekly, monthly),\n recurrence_days: new FormControl(booking.recurrence_days || [])\n }\n\n if(booking.is_recurrent && action !== BookingAction.CLONE){\n fields_with_recurrence.recurrence_starts.setValidators([arrayWithValues])\n fields_with_recurrence.recurrence_starts.updateValueAndValidity()\n fields_with_recurrence.recurrence_endTz.setValidators([Validators.required, validDateTZ]);\n }\n // Generate form group for booking item\n const form = new FormGroup(fields_with_recurrence);\n return form;\n}\n\n/**\n * Validate whether date is in the future\n * @param control Control to check value\n */\nexport function isFuture(control: AbstractControl) {\n const dateTz = control.value; // new DateTZ({date: control.value});\n return dateTz.isBeforeDate(DateNow(new Date()).subtractValue({ minutes: 5 }))\n ? { dateTz: 'Date needs to be in the future' }\n : null;\n}\n\n/**\n * Validate whether an array has values\n * @param control Control to check value\n */\nexport function arrayWithValues (control: AbstractControl) {\n return control.value.length !== 0 ? null : { field: 'Needs at least one value'}\n}\n\n/**\n * Validate whether a date has a valid value (future or current date)\n * @param control Control to check value\n */\n export function validDate (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = new DateTZ({date: control.value})\n const now = DateNow(new Date())\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Validate whether a date has a valid DateTZ value (future or current date)\n * @param control Control to check value\n */\n export function validDateTZ (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = DateNow(control.value.JSDate);\n const now = DateNow(new Date());\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Get minimum duration from ruleset in minutes\n * Default to 5min\n */\nexport function getMinLength(rule_list: HashMap): number {\n return Object.values(rule_list).reduce((min, block) => {\n const min_block = block.reduce((min_length, el) => {\n if (el.conditions.min_length && stringToMinutes(el.conditions.min_length) > min) {\n return stringToMinutes(el.conditions.min_length);\n } else {\n return min_length;\n }\n }, 5);\n if (min_block > min) {\n return min_block;\n } else {\n return min;\n }\n }, 5) as number;\n}\n\n/**\n * Whether the first input is greater than the last. Converts duration strings into minutes\n * @param duration_1 First input can be a number in minutes or a duration string e.g. `1 hour`\n * @param duration_2 Second input can be a number in minutes or a duration string e.g. `30 minutes`\n */\nexport function durationGreaterThanOrEqual(\n duration_1: string | number,\n duration_2: string | number\n) {\n const first: number = typeof duration_1 === 'string' ? stringToMinutes(duration_1) : duration_1;\n const second: number =\n typeof duration_2 === 'string' ? stringToMinutes(duration_2) : duration_2;\n return first >= second;\n}\n\n/**\n * Conver time string into minutes\n * @param str timestring e.g. `'1 day'`, `'15 minutes'`, `'2 weeks'`\n */\nexport function stringToMinutes(str: string): number {\n const parts = str.split(' ');\n return +parts[0] * DURATION_MAP[parts[1]];\n}\n\n/**\n * Get current status within bookings\n * @param bookings List of bookings\n * @param host Host of the new event\n * @param date Datetime of the new event\n */\nexport function statusFromBookings(\n bookings: Booking[] = [],\n bookable: boolean = true,\n requestable: boolean = false,\n dateTz: DateTZ = DateNow(),\n space?: Space\n) {\n const free_slots = getFreeBookingSlots(bookings.filter((bkn) => !bkn.declined));\n const now = DateNow() // new DateTZ({date}); // now should be now\n // commeted bellow piece as correct way to get next free booking slot is at line- 488\n // const next_free_slot = free_slots.find((slot) => {\n // return slot && (slot.start > now.ms || now.ms > slot.start - slot.start % 1000 || now.ms < slot.end - slot.end % 60 * 1000);\n // // const start = new DateTZ({date: slot?.start || 0 });\n // // const end = new DateTZ({date: slot?.end || 0}); // slot end isn't late enough? or after now/\n // // return start.isAfterDate(now) || (now.isAfterDate(start.startOfValue('second')) && now.isBeforeDate(end.startOfValue('minute')))\n // });\n\n const next_free_slot = getNextFreeBookingSlot(bookings.filter((bkn) => !bkn.declined), dateTz.ms);\n \n const start = new DateTZ({date: next_free_slot?.start || 0});\n const end = new DateTZ({date: next_free_slot?.end || 0});\n const currently_free = dateTz.isAfterDate(start.startOfValue('second')) && dateTz.isBeforeDate(end.startOfValue('minute'));\n const time_until_next_block = humaniseDuration(\n currently_free ? end.dateDiff(dateTz, 'minutes') : start.dateDiff(dateTz, 'minutes'),\n 'short'\n );\n\n const free_tomorrow = !currently_free && !start.isSameDate(dateTz, 'day');\n const free_today = currently_free && !end.isSameDate(dateTz, 'day');\n \n return {\n status: (!bookable\n ? SpaceStatus.NotBookable\n : currently_free\n ? requestable\n ? SpaceStatus.Requestable\n : SpaceStatus.Available\n : SpaceStatus.InProgress) as SpaceStatus,\n available_until: free_today\n ? 'No meetings today'\n : currently_free\n ? `Free until ${end.formatDate(timeFormatString())}(${time_until_next_block})`\n : free_tomorrow\n ? 'Unavailable today'\n : `Free at ${start.formatDate(timeFormatString())}(${time_until_next_block})`\n };\n}\n\n/**\n * V1 version display.\n */\nexport const spaceStatusToDisplay = (status: SpaceStatus): string => {\n switch (status) {\n case SpaceStatus.NotBookable:\n return 'Not Bookable';\n case SpaceStatus.Requestable:\n return 'Available by Request';\n case SpaceStatus.Unavailable:\n return 'Unavailable';\n case SpaceStatus.InProgress:\n return 'Meeting in Progress';\n case SpaceStatus.Available:\n default:\n return 'Available';\n }\n};\n\nexport function replaceBookings(\n list: Booking[],\n new_bookings: Booking[],\n filter_options: { room_email: string; fromTz: DateTZ; toTz: DateTZ }\n) {\n const filtered_list = list.filter((booking) => {\n return (\n !(booking.multi_rooms.some(room => room?.email === filter_options.room_email)) ||\n !timePeriodsIntersect(filter_options.fromTz.ms, filter_options.toTz.ms, booking.startDateTz.ms, booking.endDateTz.ms)\n );\n });\n const updated_list = filtered_list.concat(new_bookings);\n updated_list.sort((a, b) => a.date - b.date);\n return unique(updated_list, 'icaluid');\n}\n\nexport function timePeriodsIntersect(\n start1: number,\n end1: number,\n start2: number,\n end2: number,\n type = ''\n) {\n return (\n (start1 >= start2 && start1 < end2) ||\n (end1 > start2 && end1 <= end2) ||\n (start2 >= start1 && start2 < end1) ||\n (end2 > start1 && end2 <= end1)\n );\n}\n\nexport function formatWhen({\n all_day,\n startTZ,\n endTZ,\n displayEndTZ\n}): string {\n if (all_day) {\n return `${startTZ.formatDate('dd MMM yyyy')} - All Day`;\n } else {\n if (startTZ.isSameDate(endTZ, 'day')) {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('h:mma')}`;\n } else {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('dd MMM yyyy, h:mma')}`;\n }\n }\n}\n\nexport const isIncludes = (item: any, field: string, searchVaue: string) => (item && item[field] && item[field].toLowerCase().includes(searchVaue));\n\nexport function searchRoomsAndBookings(allItems: (Space | Booking)[], searchValue: string, isConcierge:boolean = false) {\n\n let relevantItems: (Space | Booking)[] = [];\n\n if(isConcierge) {\n relevantItems = allItems.filter( (item: any ) => \n isIncludes(item, 'title', searchValue) ||\n isIncludes(item.creator, 'name', searchValue) ||\n isIncludes(item.organiser, 'name', searchValue) ||\n isIncludes(item, 'simple_name', searchValue) || // search with room name \n (item?.attendees && !!item?.attendees.filter(el => el.name.toLowerCase().includes(searchValue)).length ) \n );\n } else {\n relevantItems = allItems.filter( (item: any ) => \n this.isIncludes(item.creator, 'name', searchValue) ||\n this.isIncludes(item.organiser, 'name', searchValue) ||\n this.isIncludes(item, 'simple_name', searchValue) \n );\n }\n\n const filteredItems = this.duplicateMultiroomEntriesIfAny(relevantItems);\n \n return filteredItems;\n} \n\nexport function duplicateMultiroomEntriesIfAny(bookings) {\n // Initialize an array to hold the original and duplicated entries \n const updatedBookings = [...bookings];\n\n // Loop through the original bookings array \n [...bookings].forEach(booking => {\n if(booking?.is_multiroom) {\n // calculate the number of times to duplicates the booking\n const duplicatesCount = booking.multi_rooms.filter(el => el.id !== booking.space.id);\n\n // Create the duplicate and add them to the updatedBookings array.\n for(let i = 0; i < duplicatesCount.length; i++) {\n // Deep copy the booking to ensure references are not copied\n const duplicatedBooking = cloneDeep(booking); \n duplicatedBooking.room = duplicatesCount[i]; \n updatedBookings.push(duplicatedBooking);\n }\n }\n });\n\n // Return the array with duplicated entries \n return updatedBookings;\n\n}\n \n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { DateNow } from \"@mckinsey-converge/date-tz\";\nimport { Observable } from 'rxjs/internal/Observable';\nimport { forkJoin } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n const now = DateNow(new Date())\n if (!options.from) {\n options.from = now\n .startOfValue('day')\n .subtractValue({ days: 2 })\n .ms;\n }\n if (!options.until) {\n options.until = null;\n }\n\n const key = `bookings|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Booking[]) => {\n delete this._promises[key];\n resolve(list);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking, series?: boolean): Promise {\n const body = booking.toApiJSON()\n if(series){\n body.series = true\n }\n return booking.id ? this.update(booking.id, body) : this.add(body);\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n public checkinIndividualVisitor(id: string, fields: BookingCheckinParams) {\n return this.taskObsr(id, 'checkin', fields); \n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n public declineMultiple(bookings: Booking[]): Observable {\n const requests = [];\n bookings.forEach(bkg => {\n const booking = bkg.toJSON();\n const id = booking.id;\n const fields = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: booking.space?.email,\n icaluid: booking.icaluid,\n start: booking.startDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n end: booking.endDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n };\n if (bkg.is_recurrent && bkg.recurrence_type === 'master') {\n // Add series=true for recurrent bookings\n fields['series'] = true;\n } \n requests.push(this.taskObsr(id, 'concierge_decline', fields) ); \n });\n return forkJoin(requests);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { PaginatedAPIService } from '../paginated.service';\nimport { Booking, IBookingQueryOptions, } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { Observable } from 'rxjs';\n\nexport interface PaginatedBooking {\n results: Booking[];\n total: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsPaginatedService extends PaginatedAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n\n const key = `bookingsPaginated|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (response: any) => {\n delete this._promises[key];\n resolve(response);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking): Promise {\n return booking.id ? this.update(booking.id, booking.toJSON()) : this.add(booking.toJSON());\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n // public getHoldingBay(query: IBookingQueryOptions): Promise {\n // const key = `bookingsPaginated|holding-bay`;\n // if (!this._promises[key]) {\n // this._promises[key] = new Promise((resolve, reject) => {\n // const respond = (response: any) => {\n // delete this._promises[key];\n // resolve(response);\n // };\n // const error = e => {\n // reject(e);\n // delete this._promises[key];\n // }; \n // this.query(query, { url: '/api/staff/bookings/holding_bay' }).then(respond, error);\n // });\n // }\n\n // return this._promises[key];\n // }\n\n public getHoldingBay = (query: IBookingQueryOptions): Observable => this.queryHoldingBay(query, { url: '/api/staff/bookings/holding_bay' });\n}\n","export * from './booking.class'\nexport * from './space.types'\nexport * from './bookings.service'\nexport * from './bookingsPaginated.service'\nexport * from './booking.utilities'\nexport * from './booking-state.service'\nexport * from './space.utilities'\nexport * from './booking.types'\n","import { SpaceRules } from './booking.types';\n\nimport {\n durationGreaterThanOrEqual,\n stringToMinutes\n} from './booking.utilities';\nimport {\n SpaceCheckOptions,\n SpaceRuleOptions\n} from './space.types';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * Get booking rules for the given user and space\n * @param options\n */\nexport function rulesForSpace(options: SpaceRuleOptions): SpaceRules {\n if (!options) {\n throw Error('Options are needed to check for rule matches');\n }\n const space_rules_for_user: SpaceRules = {\n auto_approve: true,\n hide: true,\n reason: ''\n };\n let match = false;\n /* istanbul ignore else */\n if (options.space) {\n for (const type in options.rules) {\n if (\n options.rules.hasOwnProperty(type) &&\n options.rules[type] instanceof Array &&\n options.space.zones.find((zone) => zone === type)\n ) {\n for (const rule_block of options.rules[type]) {\n /* istanbul ignore else */\n if (\n checkRules({\n user: options.user,\n space: options.space,\n time: options.time,\n duration: options.duration,\n rules: rule_block.conditions\n })\n ) {\n const ruleset = rule_block.rules;\n const conditions = rule_block.conditions;\n space_rules_for_user.hide = false;\n /* istanbul ignore else */\n if (conditions.max_length) {\n space_rules_for_user.max_length = stringToMinutes(\n conditions.max_length as string\n );\n }\n /* istanbul ignore else */\n if (conditions.min_length) {\n space_rules_for_user.min_length = stringToMinutes(\n conditions.min_length as string\n );\n }\n // NOTE: use max_length in conditions instead of book_length in rules\n // if (ruleset.book_length) {\n // space_rules_for_user.max_length = stringToMinutes(ruleset.book_length as string);\n // }\n /* istanbul ignore else */\n if (ruleset.auto_approve !== undefined) {\n space_rules_for_user.auto_approve = ruleset.auto_approve;\n }\n match = true;\n space_rules_for_user.reason = '';\n break;\n }\n else {\n space_rules_for_user.reason = 'OfficeRules';\n }\n }\n }\n \n /* istanbul ignore else */\n if (!space_rules_for_user.hide) {\n break;\n }\n }\n }\n if (!match) {\n space_rules_for_user.hide = true;\n }\n return space_rules_for_user;\n}\n\n\n/**\n * Check if user matches the given ruleset\n * @param options\n */\nfunction checkRules(options: SpaceCheckOptions): boolean {\n /* istanbul ignore else */\n if (options.rules) {\n const time = new DateTZ({date: options.time});\n const count = Object.keys(options.rules).length;\n let matches = 0;\n Object.keys(options.rules).forEach((key) => {\n let counter = 0;\n const condition: string[] =\n options.rules[key] instanceof Array\n ? (options.rules[key] as [])\n : [options.rules[key] as string];\n switch (key) {\n case 'groups':\n /* istanbul ignore else */\n if (options.user && options.user.groups) {\n counter = 0;\n condition.forEach((i) =>\n options.user.groups.find((j) => j === i) ? counter++ : null\n );\n /* istanbul ignore else */\n if (counter > 0) {\n matches++;\n }\n }\n break;\n case 'locations':\n /* istanbul ignore else */\n if (options.user && options.user.location) {\n counter = 0;\n condition.forEach((i) =>\n (options.user.last_location.name || '').indexOf(i) >= 0\n ? counter++\n : null\n );\n /* istanbul ignore else */\n if (counter >= options.rules[key].length) {\n matches++;\n }\n }\n break;\n case 'is_before':\n /* istanbul ignore else */\n if (options.time) {\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date()).addValue({ minutes: duration });\n let match = time.isBeforeDate(check);\n /* istanbul ignore else */\n matches += match ? 1 : 0;\n }\n break;\n case 'is_after':\n /* istanbul ignore else */\n if (options.time) {\n\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date());\n time.isAfterDate(check.addValue({ minutes: duration })) ? matches++ : '';\n }\n break;\n case 'min_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(options.duration, condition[0])\n ) {\n matches++;\n }\n break;\n case 'max_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(condition[0], options.duration)\n ) {\n matches++;\n }\n break;\n }\n });\n return matches >= count;\n }\n return false;\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringCategoriesService extends BaseAPIService {\n\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringCategory, this);\n this._name = 'catering category/group';\n this._api_route = 'catering/category';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering categories. Use catering menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering categories. Use catering menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringCategory(raw_item);\n }\n\n public format(item: CateringCategory) {\n return { ...item };\n }\n}\n","import { CateringItem } from \"./catering-item.class\";\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport class CateringCategory extends CateringItem {\n /** Whether item is a category */\n public is_category = true;\n public admin_only: boolean;\n public restricted_from: number;\n\n constructor(data: HashMap) {\n super(data);\n this.is_category = true;\n (this as any).must_select = this.must_select || 0;\n (this as any).order_anytime = !!data.order_anytime && this.package;\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj = super.toJSON();\n obj.order_anytime = !!obj.order_anytime && obj.package;\n return obj;\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nexport interface CateringAvailability {\n /** Month of the year that the item starts being available */\n readonly from_month: number;\n /** Month of the year that the item ends being available */\n readonly to_month: number;\n}\n\nexport class CateringItem {\n /** Unique ID of the catering item */\n public readonly id: string;\n /** Display name of the catering item */\n public readonly name: string;\n /** Description of the item */\n public readonly description: string;\n /** URL to the image associated with the item */\n public readonly image_path: string;\n /** Type of catering item */\n public readonly catering_type: string;\n /** Availability of the item */\n public readonly available: CateringAvailability;\n /** Time in hours that is needed to prepare the item beforehand */\n public readonly prior_notice: number;\n /** Cost of the item without decimals */\n private unit_price: number;\n /** Cost of the item without decimals */\n public readonly supplier_cost: number;\n /** Minimum number this item allowed in an order */\n public readonly minimum_quantity: number;\n /** Maximum number this item allowed in an order */\n public readonly maximum_quantity: number;\n /** List of categories that the item is contained in */\n public readonly parent_categories: readonly string[];\n /** Allegen information associated with the item */\n public readonly allergy: string;\n /** Whether the supply of this item has run out */\n public out_of_stock: boolean;\n /** Whether item can be ordered within the time limit set by the building */\n public readonly order_anytime: boolean;\n /** Number of child items that must be selected as part of the package */\n public readonly must_select: number;\n /** List of associated items */\n public readonly items: CateringItem[];\n public readonly availableItems: CateringItem[];\n /** Whether child items are part of a package */\n public readonly package: boolean;\n /** List of zone ids associated with the category */\n public readonly zones: readonly string[];\n /** Number of this item in the assoicated order */\n private _amount = 0;\n /** Unique ID of the catering item */\n private instance_id: string;\n /** Whether item is a category */\n public is_category: boolean = false;\n /** Whether item is disabled in Staff App */\n public admin_only: boolean;\n /** restricted_from indicates category restriction from hours ahead of delivery time */\n public restricted_from: number;\n\n public get can_order_anytime(): boolean {\n return (\n this.order_anytime ||\n !this.package && this.items.reduce(\n (anytime, item) => anytime || item.can_order_anytime,\n false,\n )\n );\n }\n\n /** Number of this item in the assoicated order */\n public get amount(): number {\n return this._amount || 0;\n }\n\n /** Unit price in the assoicated order */\n public get price(): number {\n return this.unit_price || 0;\n }\n\n /** Total cost of the amount of items set */\n public get total(): number {\n return (this._amount * this.unit_price) || 0;\n }\n\n constructor(data: HashMap) {\n this.instance_id = `item-${Math.floor(Math.random() * 999_999_999)}`;\n this.id = data.id || '';\n this.name = data.name || '';\n this.is_category = this.id.includes('category-');\n this.available = {\n from_month: (data.available ? data.available.from_month : data.available_from) || -1,\n to_month: (data.available ? data.available.to_month : data.available_to) || -1,\n };\n this.description = data.description || '';\n this.prior_notice = data.prior_notice || data.notice;\n this.unit_price = data.unit_price || data.price || 0;\n this.supplier_cost = data.supplier_cost;\n this.minimum_quantity = Math.max(0, data.minimum_quantity || 0);\n this.maximum_quantity = Math.max(1, data.maximum_quantity || 999);\n this.parent_categories = data.category_ids || data.parent_categories || data.categories;\n this.order_anytime = !!data.order_anytime;\n this.image_path = data.image_path || '';\n this.admin_only = data.admin_only;\n this.restricted_from = data.restricted_from || data?.root_category_restricted_from || 0;\n \n this.catering_type = data.catering_type;\n this.must_select = data.must_select ?? 0;\n this._amount = data._amount || data.amount || 0;\n this.allergy = data.allergy || '';\n const cateringItems: CateringItem[] = (data.items || []).map(item => new CateringItem(item));\n this.items = cateringItems;\n const filteredCateringItems = cateringItems.filter(c => !c.out_of_stock);\n this.availableItems = filteredCateringItems;\n this.out_of_stock = !!data.out_of_stock ||\n // if original items are empty, we hit the bottom, so if we filter out items then its out of stock.\n (cateringItems.length > 0 && filteredCateringItems.length === 0);\n this.package = data.package === 'true' || data.package === true;\n this.zones = data.zones && data.zones.length ? [...data.zones] : [];\n }\n\n public setAmount(amount: number = 0): void {\n if (amount <= this._amount) {\n if (amount < this.minimum_quantity) {\n amount = 0;\n }\n } else {\n if (amount < this.minimum_quantity) {\n amount = this.minimum_quantity;\n }\n }\n this._amount = Math.max(0, Math.min(this.maximum_quantity, amount));\n }\n\n /**\n * Updates the unit_price in the assoicated order if necessary\n * @param price value to compare to unit_price\n */\n public setPrice(price: number = 0): void {\n if(this.unit_price !== price) this.unit_price = price;\n }\n\n /**\n * Increase amount of the item the order\n * @param amount Amount to increase by\n */\n public addToOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount += amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = this.minimum_quantity;\n } else if (this._amount > this.maximum_quantity) {\n this._amount = this.maximum_quantity;\n }\n }\n\n /**\n * Decrease amount of the item the order\n * @param amount Amount to decrease by\n */\n public removeFromOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount -= amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = 0;\n }\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._changes;\n delete obj._server_names;\n // Convert remaining members to be public\n obj.price = obj.unit_price;\n obj.categories = obj.parent_categories;\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n return obj;\n }\n\n\n\n public within_category_restricted_time(dateTz): boolean {\n /**\n * Update : https://mckinsey.atlassian.net/browse/CNG-574\n * Right now the frontend is restricting catering orders based off the field .settings.discovery_info.catering_restricted_from,\n * so for this ticket change it’s best we keep that field as the default time restriction, then add a new field to catering categories called \n * restricted_from which will override the old field if it’s present!\n * restricted_from can be set by concierge admin to restrict item from being order before set time ex if it been set to 24 then the item should\n * available to order before 24 hours of booking/order time!\n */\n\n if(!!this?.restricted_from) {\n const expired = DateNow(new Date()).addValue({ hours: this?.restricted_from }).startOfValue('minute');\n return dateTz.isBeforeDate(expired);\n } else {\n return false;\n }\n \n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { CateringItem } from './catering-item.class';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringItemsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringItem, this);\n this._name = 'Catering Menu';\n this._api_route = 'catering/item';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering items. Use menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering items. Use menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringItem(raw_item);\n }\n\n public format(item: CateringItem) {\n return item instanceof CateringItem ? item.toJSON() : item;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { CateringItem } from './catering-item.class';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringMenuService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Catering Menu';\n this._api_route = 'menu';\n }\n\n /**\n * Convert user data to local format\n * @param user User data\n */\n protected processItem(item: HashMap) {\n return item.items ? new CateringCategory(item) : new CateringItem(item);\n }\n}\n","\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringNotesService {\n\n public cateringNotes = [];\n\n \n public setNotes(notes) {\n this.cateringNotes = notes;\n }\n\n public getNotes() {\n return this.cateringNotes;\n }\n}","import { CateringItem } from './catering-item.class';\nimport { HashMap } from '@mckinsey-converge/base';\n\nimport { CateringCategory } from './catering-category.class';\nimport { Booking } from '../bookings';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport type CateringOrderMutableProperties =\n | 'items'\n | 'location_id'\n | 'location'\n | 'delivery_time'\n | 'charge_code'\n | 'notes'\n | 'status';\n\nexport type CateringOrderStatus = 'accepted' | 'preparing' | 'ready' | 'delivered' | 'cancelled';\n\nconst now = DateNow(new Date());\n\n// R--- refactor booking date to be dateTz\nexport class CateringOrder {\n /**\n * Booking fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Unique Booking ID for the catering order */\n readonly booking_id: string;\n /** \n * Timestamp based booking time of the booking associated with the order\n * \n * Must be provide as the true Booking startDateTz or as a new DateTZ with \n * the correct date: timestamp, local_tz = false and bulding_tz values\n */\n readonly booking_date: number;\n /**\n * Timezone of the booking associated with the order\n */\n readonly booking_timezone: string;\n /** ID of the location to deliver the items to */\n location_id: string = '';\n /** Display text for the location to deliver the items to */\n location: string = '';\n /**\n * Smart timezone aware catering datetime with timezone\n */\n readonly bookingDateTz: DateTZ;\n\n /** \n * Booking associated with the order \n * \n * The booking attached to the CateringOrder is a special case used \n * mainly on the Concierge catering reports because someone created \n * a bad pattern to save catering changes to the booking. \n * \n * Avoid when possible.\n */\n public booking: Booking = null;\n\n /**\n * Catering specific fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Whether the order status change is loading */\n public loading: boolean;\n /** Unique ID for the catering order */\n readonly id: string;\n /** Number of minutes after the start of the associated meeting to delivery the order */\n readonly delivery_time: number = 0;\n /** Status of the catering order */\n readonly status: CateringOrderStatus;\n /** Whether items in the order need to be prepared in the kitchen */\n readonly kitchen: boolean;\n /** Whether items in the order are in the pantry */\n readonly pantry: boolean;\n /** List of items */\n readonly items: readonly (CateringItem | CateringCategory)[] = [];\n /** Creation time of the order */\n readonly created_at: number;\n /** Charge code associated with the order */\n readonly charge_code: string;\n /** Notes associated with the order */\n readonly notes: string;\n // /** Mapping of properties to their changes */\n // private _changes: HashMap = {};\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n /** Currency code for the location of the order */\n public symbol: string;\n /** Whether the is an error with the order */\n public error: boolean;\n\n\n constructor(data: HashMap) {\n /** \n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = DateNow(new Date());\n // now rounded to the next 5 minute increment\n const defaultStartTz = nowTz.setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n\n this.id = data.id || `order-${Math.floor(Math.random() * 999_999_999)}`;\n\n // If the booking is provided default the booking values to the true booking values\n this.booking = data.booking || null;\n\n \n // Has a booking so init with those values\n if (this.hasBookingAttached) {\n this.booking_date = this.booking.startDateTz.ms;\n this.booking_timezone = this.booking.timezone;\n this.bookingDateTz = this.booking.startDateTz;\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n } else {\n this.booking_date = data.booking_date || defaultStartTz.ms;\n this.booking_timezone = data.booking_timezone || defaultLocalTimezone;\n this.bookingDateTz = new DateTZ({ date: this.booking_date, is_local_tz: false, building_tz: this.booking_timezone });\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n }\n \n this.delivery_time = typeof data.delivery_time === 'number' ? data.delivery_time : 0;\n this.status = data.status || 'accepted';\n this.charge_code = data.charge_code || data.code;\n this.notes = data.notes;\n this.kitchen = data.kitchen instanceof Array ? !!data.kitchen.length : data.kitchen;\n this.pantry = data.pantry instanceof Array ? !!data.pantry.length : data.pantry;\n this.symbol = data.symbol || 'USD';\n this.items = (data.items || [])\n .map(item => (item.items ? new CateringCategory(item) : new CateringItem(item)))\n .filter(item => !!item.amount);\n }\n\n /** Special Case, check if a full booking is attached */\n public get hasBookingAttached(): boolean {\n return !!this.booking;\n }\n\n /** Display string for the types of items in the order */\n public get type(): string {\n let type = '';\n /* istanbul ignore else */\n if (this.kitchen) type += 'Kitchen';\n /* istanbul ignore else */\n if (this.pantry) {\n /* istanbul ignore else */\n if (type) type += ' + ';\n type += 'Pantry';\n }\n return type;\n }\n\n /** Total cost of the order */\n public get total(): number {\n return this.items.reduce((total, item) => total + (item.total || 0), 0);\n }\n\n /** Total number of items in the order */\n public get item_count(): number {\n return this.items.reduce((total, item) => total + (item.amount || 0), 0);\n }\n\n public get deliver_date(): DateTZ {\n return (this.bookingDateTz || this.booking?.startDateTz).addValue({ minutes: this.delivery_time })\n }\n\n /** Display string for the delivery time of the order (short version) */\n public get deliver_at(): string {\n return this.deliver_date.formatDate('h:mm a');\n }\n\n /** Display string for the delivery time of the order */\n public get deliver_at_time(): string {\n return this.deliver_date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Display string for the delivery date of the order */\n public get deliver_on_date(): string {\n return this.deliver_date.formatDate('dd MMM yyyy');\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): CateringOrder {\n return new CateringOrder(this.toJSON());\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringOrder): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._server_names;\n // Remove local public members\n delete obj.booking;\n delete obj.loading;\n delete obj.bookingDateTz;\n\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substr(1)] || key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n\n return obj;\n }\n}\n","import { CateringItem } from './catering-item.class';\n\nexport const mergeCateringItemWithFormData = (existing: CateringItem, override: any) =>\n new CateringItem({\n ...(existing instanceof CateringItem ? existing.toJSON() : existing),\n ...override\n });\n","export * from './catering-item.class';\nexport * from './catering-category.class';\nexport * from './catering-menu.service';\nexport * from './catering-order.class';\nexport * from './catering-categories.service';\nexport * from './catering-items.service';\nexport * from './catering.utilities';\nexport * from './catering-notes.service';\n","import { Injectable } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloseDialogService {\n private dialogRefMap = new Map>();\n\n constructor() { }\n\n // Register a dialog with its ID\n registerDialog(id: string, dialogRef: MatDialogRef): void {\n this.dialogRefMap.set(id, dialogRef);\n }\n\n // Close a specific dialog by ID\n closeDialog(id: string): void {\n const dialogRef = this.dialogRefMap.get(id);\n if (dialogRef) {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n }\n }\n\n // Optional: Close all dialogs\n closeAllDialogs(): void {\n this.dialogRefMap.forEach((dialogRef, id) => {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n });\n }\n}\n\nexport enum DialogIds {\n MeetingDetails = 'meetingDetailsDialogId',\n BookingConfirmation = 'bookingConfirmationDialogId',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CollapseService {\n private collapseSubject = new BehaviorSubject(false);\n collapse$ = this.collapseSubject.asObservable();\n\n collapsePanel() {\n this.collapseSubject.next(false);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class DataCommonModule {}\n","import { Injectable } from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subscription\n} from 'rxjs';\n\nimport {\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\n/** List of keys that cannot be in a combination by themselves or with each other */\nconst INVALID_STANDALONE_KEYS: string[] = ['control', 'shift', 'alt', 'meta', 'os'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HotkeysService {\n /** Map of subjects which store press states of keys */\n private keydown_states: HashMap> = {};\n /** Map of obserers for key state subjects */\n private keydown_observers: HashMap> = {};\n /** List of keys at the end of a combination */\n private combo_end: string[] = [];\n /** List of registered hotkey combinations */\n private registered_combos: string[][] = [];\n /** Counter for the number of keydown events. Used for checking order of key presses */\n private counter: number = 0;\n /** Last key code to be pressed */\n private last_down: string;\n\n constructor() {\n window.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.last_down !== code) {\n /* istanbul ignore else */\n if (!this.keydown_states[code]) {\n this.keydown_states[code] = new BehaviorSubject(null);\n this.keydown_observers[code] = this.keydown_states[code].asObservable();\n }\n this.keydown_states[code].next(++this.counter);\n /* istanbul ignore else */\n if (this.combo_end.indexOf(code) >= 0) {\n event.preventDefault();\n }\n this.last_down = code;\n }\n });\n\n window.addEventListener('keyup', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.keydown_states[code]) {\n this.keydown_states[code].next(null);\n }\n /* istanbul ignore else */\n if (this.last_down === code) {\n this.last_down = null;\n }\n });\n }\n\n /**\n * Listen to the given key combination\n * @param combo Array of key codes to listen to or a hotkey string e.g. `Alt+Shift+KeyK`\n * @param next Callback for combination presses\n */\n public listen(combo: string | string[], next: () => void): Subscription {\n combo = (combo instanceof Array ? combo : combo.split('+'));\n const combination: string[] = combo.map(i => this.mapKey(i.toLowerCase()));\n /* istanbul ignore else */\n if (combination.length > 0 && this.validCombination(combination)) {\n this.registered_combos.push(combination);\n const last_key = combination[combination.length - 1];\n /* istanbul ignore else */\n if (!this.keydown_states[last_key]) {\n this.keydown_states[last_key] = new BehaviorSubject(null);\n this.keydown_observers[last_key] = this.keydown_states[last_key].asObservable();\n }\n this.updateCombinationEndList();\n return this.keydown_observers[last_key].subscribe((count) => {\n /* istanbul ignore else */\n if (count) {\n const presses: number[] = [];\n /* istanbul ignore else */\n if (combination.length > 0) {\n // Check that keys are pressed\n for (const key of combination) {\n const state = this.keydown_states[key];\n presses.push(state ? state.getValue() || -1 : -1);\n }\n // Check that keys are pressed in the correct order\n for (let i = 0; i < combination.length - 1; i++) {\n if (presses[i] > presses[i + 1]) {\n return;\n }\n }\n }\n const total = presses.reduce((a, v) => a + (v > 0 ? 1 : -1), 0);\n /* istanbul ignore else */\n if (total >= combination.length) {\n next();\n }\n }\n });\n }\n return null;\n }\n\n /**\n * Map key codes with multiple versions to simple form\n * @param code Code to transform\n */\n private mapKey(code: string): string {\n /* istanbul ignore else */\n if (code.indexOf('alt') >= 0 || code.indexOf('shift') >= 0 || code.indexOf('control') >= 0) {\n return code.replace('left', '').replace('right', '');\n }\n return code;\n }\n\n /**\n * Update the list of the last keys in combinations to allow for prevent default actions on pre-existing hotkeys\n */\n private updateCombinationEndList(): void {\n const key_list = [];\n for (const combo of this.registered_combos) {\n this.combo_end.push(combo[combo.length - 1]);\n }\n this.combo_end = unique(key_list);\n }\n\n /**\n * Checks if the given hotkey combination is allowed and valid\n * @param combo Array of key codes\n */\n private validCombination(combo: string[]): boolean {\n let non_meta = 0;\n for (const key of combo) {\n /* istanbul ignore else */\n if (INVALID_STANDALONE_KEYS.indexOf(key) < 0) {\n non_meta++;\n }\n }\n return non_meta > 0;\n }\n}\n","export * from './location.class';\nexport * from './location.service';\n","import { HashMap } from '@mckinsey-converge/base';\n\nimport { Organisation } from '../organisation/organisation.class';\nimport {\n ServiceLike,\n ServiceManager\n} from '../service-manager.class';\nimport { BuildingLevel } from '../organisation/level.class';\n\nexport class MapLocation {\n /** ID of the element on the associated map */\n public readonly id?: string;\n /** Name of the location */\n public readonly name?: string;\n /** X coordinate of the location */\n public readonly x?: number;\n /** Y coordinate of the location */\n public readonly y?: number;\n /** Level details for the location */\n public readonly level: BuildingLevel;\n /** Whether the position is fixed */\n public readonly fixed: boolean;\n /** Accuracy of the location when not fixed */\n public readonly confidence?: number;\n /** Whether location is at a desk */\n public readonly at_desk?: boolean;\n /** Whether location is set */\n public readonly empty: boolean;\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(MapLocation);\n }\n\n /** Display string for the building and level of the location */\n public get display(): string {\n const service = ServiceManager.serviceFor(Organisation);\n if (!service) {\n return this.level.name;\n }\n const bld = service.buildings.find((bld) => bld.id === this.level.building_id);\n return bld ? `${bld.name}, ${this.level.name}` : this.level.name;\n }\n\n /** Whether location is in a different building from the active one */\n public get in_another_building(): boolean {\n const service = ServiceManager.serviceFor(Organisation);\n return service && service.building.id !== this.level.building_id;\n }\n\n constructor(raw_data: HashMap) {\n this.id = raw_data.id || raw_data.map_id || raw_data.desk_id;\n this.name = raw_data.name || '';\n this.x = raw_data.x\n ? Math.floor(this.normalise(raw_data.x, raw_data.x_max || 10000) * 10000)\n : null;\n this.y = raw_data.y\n ? Math.floor(this.normalise(raw_data.y, raw_data.x_max || 10000) * 10000)\n : null;\n const service = ServiceManager.serviceFor(Organisation);\n this.level =\n raw_data.level instanceof BuildingLevel\n ? raw_data.level\n : service\n ? service.levelWithID(raw_data.level)\n : new BuildingLevel(raw_data.level);\n this.fixed = this.x === null && this.y === null;\n this.confidence = Math.max(5, Math.min(15, raw_data.confidence || 0));\n this.at_desk = this.id && this.id.indexOf('area-') === 0;\n this.empty = !(this.name && this.level && (this.id || this.x || this.y));\n }\n\n /** Normalise the given value within the max */\n private normalise(value: number, max: number): number {\n return value / (max * 1.0);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { MapLocation } from './location.class';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocationService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(MapLocation, this);\n this._name = 'Location';\n this._api_route = 'people';\n }\n\n public add(...args): never {\n throw new Error('Create not allowed for location service')\n }\n\n public update(...args): never {\n throw new Error('Update not allowed for location service')\n }\n\n public delete(...args): never {\n throw new Error('Delete not allowed for location service')\n }\n\n public process(item: HashMap) {\n return new MapLocation(item) as any;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { BookingRule } from '../bookings';\nimport { ServiceManager } from '../service-manager.class';\n\nexport interface BuildingCity {\n timezone: string\n name: string\n}\n\nexport interface IBuildingRoleUser {\n name: string;\n email: string;\n phone: string;\n}\n\nexport interface LockerMap {\n [zone: string]: {\n [area: string]: {\n [type: string]: (string | boolean)[][];\n };\n };\n}\n\nexport interface ICoordinates {\n longitude: number;\n latitude: number;\n}\n\nexport interface LevelFeature {\n id: string;\n level_id: string;\n name: string;\n}\n\nexport interface BookingRuleDetails {\n /** List of booking rules details for the building */\n readonly rules: readonly string[];\n /** Custom booking rules for the map */\n readonly map_rules?: readonly string[];\n /** Custom booking rules for the map */\n readonly other_rules?: readonly string[];\n /** Contact email address for the building */\n readonly contact?: string;\n /** Information string to display before the rule listings */\n readonly info?: string;\n /** Link for more details */\n readonly link?: { url?: string, name?: string };\n /**\n * Allow buildings to define their own rules formats where needed or for special messages.\n */\n readonly custom_html?: string;\n}\n\nexport class Building extends BaseDataClass {\n /** Service for managing buildings */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Engine Zone ID for the building */\n public readonly zone_id: string;\n /** Organisation Code for the building */\n public readonly code: string;\n /** Geographical address of the building */\n public readonly address: string;\n /** Details about the booking rules for the building */\n public readonly booking_details: BookingRuleDetails;\n /** Details about the booking rules for the building */\n public readonly booking_rules: HashMap;\n /** Number of hour before a booking catering is restricted */\n public readonly catering_restricted_from: number;\n /** Currency code for the country assoicated with the building */\n public readonly currency: string;\n /** Map of fields that are required on the form */\n public readonly required: HashMap;\n /** IANA timezone database string for the location the building resides */\n public readonly timezone: string;\n /** Whether catering is available in this building */\n public readonly has_catering: boolean;\n /** ID of the system used for the holding bay */\n public readonly holding_bay: string;\n /** ID of the system used for standalone visitors bookings */\n public readonly visitor_space: string;\n /** List of zones to determine sort order spaces */\n public readonly sort_order: readonly string[];\n /** Searchable map features */\n public readonly searchables: readonly LevelFeature[];\n /** List of available extras for the building */\n public readonly extras: readonly Identity[];\n /** List of available extra equipment for loan at the building */\n public readonly loan_items: readonly Identity[];\n /** List of available levels for the building */\n public readonly levels: readonly BuildingLevel[];\n /** The city the building belongs in **/\n public readonly city: string;\n\n public readonly catering_hours: { readonly start: number, readonly end: number };\n /** Map of custom settings for the building */\n private _settings: HashMap;\n /** Map of roles and list of the associated users */\n private _roles: HashMap;\n /** Map of the locker ID arrays */\n private _lockers: LockerMap;\n /** Map of important system ids for the building */\n private _systems: HashMap;\n /** Map of important phone numbers for the building */\n private _phone_numbers: HashMap;\n /** Globe coordiates for the build */\n private _location: ICoordinates;\n /** List of zones associated with the building */\n public readonly zones: readonly string[];\n\n constructor(raw_data: HashMap) {\n super(raw_data);\n const settings = raw_data.settings || {};\n const disc_info = settings.discovery_info || {};\n this.zone_id = raw_data.zone_id || raw_data.zone;\n this.extras = (raw_data.extras || disc_info.extras || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.loan_items = (raw_data.loan_items || disc_info.loan_items || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.levels = (raw_data.levels || disc_info.levels || []).map(i => new BuildingLevel({\n ...i,\n building_id: this.id\n }));\n this._roles = raw_data.roles || disc_info.roles || {};\n this._lockers = raw_data.lockers || raw_data.locker_structure || disc_info.locker_structure || {};\n this._systems = raw_data.systems || disc_info.systems || {};\n this._settings = settings;\n this._phone_numbers = raw_data.phone_numbers || disc_info.phone_numbers || {};\n this._location = raw_data.location || disc_info.location || { longitude: null, latitude: null };\n this.catering_hours = raw_data.catering_hours || disc_info.catering_hours || settings.catering_hours || {\n start: 7,\n end: 20\n };\n const searchables = [];\n if (raw_data.neighbourhoods) {\n for (const lvl in raw_data.neighbourhoods) {\n if (raw_data.neighbourhoods.hasOwnProperty(lvl)) {\n const lvl_features = raw_data.neighbourhoods[lvl] || {};\n for (const feature in lvl_features) {\n if (lvl_features.hasOwnProperty(feature)) {\n searchables.push({\n id: lvl_features[feature],\n name: feature,\n level_id: lvl\n });\n }\n }\n }\n }\n }\n this.searchables = searchables;\n this.code = raw_data.code || disc_info.code || settings.code || '';\n this.address = raw_data.address || disc_info.address || settings.address || '';\n this.booking_details = raw_data.booking_details || disc_info.booking_details || settings.booking_details || {};\n this.booking_rules = raw_data.booking_rules || disc_info.booking_rules || settings.booking_rules || {};\n this.catering_restricted_from = raw_data.catering_restricted_from || disc_info.catering_restricted_from || settings.catering_restricted_from || 0;\n this.currency = raw_data.currency || disc_info.currency || settings.currency || 'USD';\n this.required = raw_data.required || disc_info.required || settings.required || {};\n if (disc_info.requires_equipment_code) {\n this.required.equipment_code = true;\n }\n if (disc_info.requires_expected_attendees) {\n this.required.expected_attendees = true;\n }\n this.timezone = raw_data.timezone || disc_info.timezone || settings.timezone || '';\n this.has_catering = raw_data.has_catering || disc_info.has_catering || settings.has_catering || false;\n this.holding_bay = raw_data.holding_bay || disc_info.holding_bay || settings.holding_bay || '';\n this.visitor_space = raw_data.visitor_space || disc_info.visitor_space || settings.visitor_space || '';\n this.sort_order = raw_data.sort_order || disc_info.sort_order || settings.sort_order || [];\n this.city = raw_data.city || disc_info.city || 'No City';\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings) || getItemWithKeys(['discovery_info', ...keys], this._settings);\n return value;\n }\n\n /**\n * Get list of users with the associated role\n * @param name Role to find users for\n */\n public role(name: string): IBuildingRoleUser[] {\n return [...(this._roles[name] || [])];\n }\n\n /**\n * Get list of the names of available user role lists\n */\n public get role_names(): string[] {\n return Object.keys(this._roles).filter(i => this._roles.hasOwnProperty(i));\n }\n\n /** Map of the locker ID arrays */\n public get lockers(): LockerMap {\n return { ...(this._lockers || {}) };\n }\n\n /** Map of important system ids for the building */\n public get systems(): HashMap {\n return { ...(this._systems || {}) };\n }\n\n /** Map of important phone numbers for the building */\n public get phone_numbers(): HashMap {\n return { ...(this._phone_numbers || {}) };\n }\n\n /** Real coordinates */\n public get location(): ICoordinates {\n return { ...this._location };\n }\n\n /**\n * Get search map feature for the given level ID\n * @param level_id ID of level to grab features for\n */\n public featuresForLevel(level_id: string): LevelFeature[] {\n return (this.searchables || []).filter(i => i.level_id === level_id);\n }\n\n /**\n * Building objects are readonly and cannot be changed\n */\n public async save(): Promise {\n throw new Error('Building objects are readonly and cannot be changed');\n }\n\n /**\n * Building objects are readonly and cannot be deleted\n */\n public async delete(): Promise {\n throw new Error('Building objects are readonly and cannot be deleted');\n }\n}\n","export * from './building.class';\nexport * from './level.class';\nexport * from './organisation.class';\nexport * from './organisation.service';\n","import { HashMap } from 'libs/base/src/lib/types.utilities';\n\n/** Building Level data */\nexport class BuildingLevel {\n /** ID of the building level zone */\n readonly id: string;\n /** ID of the building zone associated with the level */\n readonly building_id: string;\n /** Name of the level */\n readonly name: string;\n /** Number or short identifier of the level */\n readonly short_name: string;\n /** Map URL for the level */\n readonly map_url: string;\n /** Usage type for the level */\n readonly type: 'staff' | 'client' | 'any';\n /** Setting for the level */\n readonly settings: HashMap;\n\n constructor(_data: HashMap = {}) {\n this.id = _data.id || _data.level_id || '';\n this.building_id = _data.bld_id || _data.building_id || '';\n this.name = _data.name || _data.level_name || '';\n const lower_name = this.name.toLowerCase();\n const num = lower_name.indexOf('level') >= 0 ? lower_name.replace(/ ?level ?/gi, '') : lower_name.substr(0, 1).toUpperCase();\n this.short_name = _data.short_name || num || '';\n this.map_url = _data.map_url || '';\n this.type = _data.type || _data.floor_type || 'any';\n this.settings = _data.settings;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap\n} from '@mckinsey-converge/base';\n\n/* istanbul ignore next */\n\nexport class Organisation extends BaseDataClass {\n /** List of available building zone ids for the organisation */\n public readonly available_buildings: readonly string[];\n /** Map of custom settings for the building */\n private _settings: HashMap;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this._settings = raw_data.settings || {};\n this.available_buildings = (raw_data.settings?.discovery_info?.buildings || []).map(\n (bld) => bld.zone_id\n );\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings);\n return value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { Organisation } from './organisation.class';\nimport { Building } from './building.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { first } from 'rxjs/operators';\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { UsersService } from '../users';\nimport { SettingsService } from '../settings.service';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganisationService extends BaseAPIService {\n /** Organisation data for the application */\n private _organisation: Organisation;\n /** Actively displayed building */\n private _active_building: string;\n\n private _spaceTypesSubject: Subject = new Subject();\n\n constructor(\n protected _composer: ComposerService,\n private _service: ApplicationService,\n private _users: UsersService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Organisation, this);\n ServiceManager.setService(Building, this);\n this._name = 'Organisation';\n this._api_route = 'zones';\n this.set('buildings', []);\n this.set('active_building', null);\n this._users.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /**\n * Add is not available on organisation service\n */\n public async add(form_data: HashMap, query_params?: HashMap): Promise {\n throw new Error('Add is not available on the organisation service');\n }\n\n /**\n * Update is not available on organisation service\n */\n public async update(\n id: string,\n form_data: HashMap,\n query_params?: HashMap\n ): Promise {\n throw new Error('Update is not available on the organisation service');\n }\n\n /**\n * Delete is not available on organisation service\n */\n public async delete(id: string): Promise {\n throw new Error('Delete is not available on the organisation service');\n }\n\n /**\n * Get list of levels for the given building ID\n * @param bld_id Building ID\n */\n public levels(bld_id: string): readonly BuildingLevel[] {\n return (this.buildings.find((i) => i.id === bld_id) || ({} as Building)).levels;\n }\n\n /**\n * Get a setting from the organisation or active building\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string) {\n return this.building.setting(key) || this._organisation.setting(key);\n }\n\n /** Active building */\n public get building(): Building {\n return this.buildings.find((i) => i.id === this._active_building);\n }\n\n /** List of types of spaces */\n public get space_types(): Identity[] {\n return this.get('space_types') || [];\n }\n\n public set building(bld: Building) {\n if (bld instanceof Building) {\n this._active_building = bld.id;\n } else {\n this._active_building = bld;\n }\n this.set('active_building', this.building);\n this.loadSpaceTypes();\n localStorage.setItem('PlaceOS.building', this._active_building);\n localStorage.setItem('CONCIERGE.timezone', bld.timezone);\n }\n\n /** List of buildings for the organisation */\n public get buildings(): Building[] {\n return this.get('buildings') || [];\n }\n\n /**\n * Get list of available equipment\n * @param id ID of the building to get the list from. i.e. Defaults to the active building\n */\n public getExtras(id: string, bld_id?: string) {\n const bld = this.buildings.find((i) => i.id === bld_id) || this.building;\n if (bld && id) {\n return bld.extras.filter((i) => `${i.id}`.indexOf(id) >= 0);\n }\n return [];\n }\n\n /**\n * Get the first level matching the list of given IDs\n * @param ids List of ID to search with\n */\n public levelWithID(ids: string | string[]): BuildingLevel {\n const list = ids instanceof Array ? ids : [ids];\n const bld_list = this.buildings;\n for (const id of list) {\n for (const bld of bld_list) {\n for (const lvl of bld.levels) {\n if (lvl.id === id) {\n return lvl;\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Initialise service data\n */\n protected async load(): Promise {\n /* istanbul ignore else */\n if (localStorage) {\n this._active_building = localStorage.getItem(`${this.settingsService.frontend.toUpperCase()}.building`);\n }\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.organisation = { message: 'Loading organisation data', state: 'loading' };\n await this.loadOrganisation();\n loading.organisation = { message: 'Loading organisation data', state: 'complete' };\n loading.buildings = { message: 'Loading building data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadBuildings();\n loading.buildings = { message: 'Loading building data', state: 'complete' };\n loading.levels = { message: 'Loading building floor data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadLevels();\n loading.levels = { message: 'Loading building floor data', state: 'complete' };\n this._service.set('loading', loading);\n loading.space_types = { message: 'Loading space type data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadSpaceTypes();\n loading.space_types = { message: 'Loading space type data', state: 'complete' };\n this._service.set('loading', loading);\n const user = this._users.current;\n\n if (user) {\n const id = localStorage.getItem('PlaceOS.building');\n const building = this.buildings.find(bld => id && bld.id === id) || this.buildings.find((bld) => bld.code === user.location);\n if (building) {\n this._active_building = building.id;\n this.set('active_building', building);\n } else if(this.building) {\n // This conditional solves a problem of infinite loop when user building doesn't exist.\n this._active_building = this.building.id;\n this.set('active_building', this.building);\n }\n }\n }\n\n /**\n * Load organisation data for application\n */\n public async loadOrganisation(): Promise {\n const org_data = await this.query({ tags: 'org', engine: true });\n this._organisation = new Organisation(org_data[0]);\n this.set('organisation', this._organisation);\n return this._organisation;\n }\n\n /**\n * Load building data for the organisation already stored in the service..\n */\n public async loadBuildings(): Promise {\n return this.loadBuildingsWithOrg(this._organisation);\n }\n\n /**\n * Load building data for the organisation passed.\n */\n public async loadBuildingsWithOrg(organisation: Organisation): Promise {\n const bld_data = await this.query({ tags: 'building', engine: true, limit: 1000 });\n const buildings = (bld_data as HashMap[])\n .map((i) => new Building(i))\n .filter((bld) => organisation.available_buildings.includes(bld.id));\n this.set('buildings', buildings);\n /* istanbul ignore else */\n if (!this._active_building && buildings && buildings.length > 0) {\n this._active_building = buildings[0].id;\n }\n return buildings;\n }\n\n /**\n * Load level data for the buildings\n */\n public async loadLevels(): Promise {\n const lvl_data = await this.query({ tags: 'level', engine: true, limit: 1000 });\n const levels = (lvl_data as HashMap[]).map((i) => new BuildingLevel(i));\n this.set('levels', levels);\n return levels;\n }\n\n /**\n * Load space type data for the buildings\n */\n public async loadSpaceTypes(): Promise {\n const type_data = await this.query({ tags: 'room', engine: true, limit: 1000, building_id: this._active_building });\n const types = (type_data as HashMap[]).map((i) => ({ id: i.id, name: i.name }));\n this.set('space_types', types);\n // Emit the updated space_types\n this._spaceTypesSubject.next(types);\n }\n\n /**\n * Observable to listen for changes in space_types\n */\n public get spaceTypesObservable(): Observable {\n return this._spaceTypesSubject.asObservable();\n }\n\n public getOrganizationFiltersByRoomType(key: string) {\n if (!this._organisation) {\n return {}\n }\n const discovery_info = this._organisation.setting('discovery_info')\n\n return discovery_info && discovery_info[key] ? discovery_info[key] : {}\n }\n\n public getRoomTypeSubsetDDOptions(type:string) {\n const filters = this.getOrganizationFiltersByRoomType(type) || {}\n return [...Object.keys(filters).map((key) => {\n const display = filters[key].toString();\n return {\n display,\n value: key,\n meta: {}\n }\n }) ];\n }\n\n\n\n /**\n * The function will generate filter options, excluding London. London has its own set of options as per the request. \n * The filter options pertain to a subset of room type options managed by the room admin module.\n * @returns filterOptions: filter options for day view space type filter\n */\n public getRoomFilterOptionsPerLocation() {\n let internalSubSet = this.getRoomTypeSubsetDDOptions('internal_room_types');\n if(this.building.name.toLowerCase().includes('london')) {\n internalSubSet = internalSubSet.filter(e => !e.value.includes('meeting') && !e.value.includes('partner') );\n }\n const filterOptions = [];\n internalSubSet.forEach(el => filterOptions.push({name: el.display, id: el.value} ) ); \n return filterOptions\n }\n\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseAPIService } from './base.service';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class PaginatedAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}, config: { url?: string } = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = query_params.cache || 1000;\n delete query_params.cache;\n }\n const query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = config && config.url ? `${config.url}${query ? '?' + query : ''}` : `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: IEngineResponse;\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * \n * @param query_params \n * @param config \n * @returns \n */\n queryHoldingBay(query_params: HashMap = {}, config: { url?: string } = {}):Observable {\n const query = toQueryString(query_params);\n const url = `${config.url}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );\n }\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse{\n let result: IEngineResponse;\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n return result;\n }\n \n\n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => {\n result = this.process(d); \n },\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { FormGroup } from \"@angular/forms\";\nimport { HashMap } from \"@mckinsey-converge/base\"\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\n\nexport enum RecurrencePeriod {\n LIST = 'list',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n //RELATIVE_MONTHLY = 'relativeMonthly', for the moment we will only support absoluteMonthly\n ABSOLUTE_MONTHLY = 'monthly'\n}\n\nexport enum DaysOfWeek {\n SUNDAY = 'sunday',\n MONDAY = 'monday',\n TUESDAY = 'tuesday',\n WEDNESDAY = 'wednesday',\n THURSDAY = 'thursday',\n FRIDAY = 'friday',\n SATURDAY = 'saturday'\n\n}\n\nexport enum SeriesAction {\n EDIT = 'edit',\n CLONE = 'clone'\n}\n\nexport enum BookingAction {\n CLONE = 'booking_clone',\n EDIT = 'booking_edit'\n}\n\nexport interface WeekDays {\n id: string;\n active: boolean;\n day_index: number;\n full_name: string;\n}\n\nexport interface RepeatPeriod {\n id: RecurrencePeriod;\n label: string\n}\n\nexport enum RepeatsOn {\n PATTERN = 'pattern',\n DATE = 'date'\n}\n\nexport interface RecurrenceType {\n type: RepeatsOn;\n label: string;\n}\n\nexport interface RecurrenceDetails {\n period: RecurrencePeriod,\n end: DateTZ,\n list: Array\n interval: number\n}\n\nexport interface RecurrenceRecurringDetails extends RecurrenceDetails {\n start: number\n}\n\nexport const recurrencePeriodToDurationType = (period: RecurrencePeriod) =>{\n switch (period) {\n case RecurrencePeriod.DAILY:\n return 'days'\n case RecurrencePeriod.WEEKLY:\n return 'weeks' \n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return 'months' \n default:\n return 'days'\n }\n}\n\n/**\n * Generate weekdays from monday to saturday\n */\nexport const generateWeekDays = (date: number, params: { building_tz?: string } = {}): Array=> {\n const { building_tz } = params;\n let start_week = DateNow(new Date()).startOfValue('week').addValue({days : 1}); //set monday as start of week\n const week_days: Array = []\n for (let i = 1; i <= 7; i++) {\n const activeDate = new DateTZ({date, building_tz, is_local_tz: false })\n const active = activeDate.dateWeekday === i\n const full_name = start_week.formatDate('EEEE')\n const day_index = i === 7 ? 0 : i //Sunday must be indexed as day 0\n week_days.push({id: full_name.substring(0, 1), active, day_index, full_name: full_name.toLocaleLowerCase()});\n start_week = start_week.addValue({ days : 1 });\n }\n return week_days\n}\n\nexport const getFirstDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isBeforeDate(b) ? a : b; });\n}\n\nexport const getLastDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isAfterDate(b) ? a : b; });\n}\n\nexport const recurrenceDetails = (recurr: RecurrenceDetails): string => {\n const end = getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `Occurs Every ${period} until ${end}`\n }else{\n return `Occurs Every ${recurr.interval} ${period}s until ${end}`\n }\n } \n \n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `Occurs on Specific Dates until ${getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')}`\n default:\n return ''\n }\n}\n\nexport const recurrenceRecurringDetails = (recurr: RecurrenceRecurringDetails): string => {\n const end = recurr.end\n const start = new DateTZ({ date: recurr.start })\n\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `occurs every ${period} effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }else{\n return `occurs every ${recurr.interval} ${period}s effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }\n }\n\n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `occurs on Specific Dates`\n default:\n return ''\n }\n}\n\nexport const handleRecurrenceFields = (data: HashMap) => {\n if(data.is_recurrent){\n if(data.recurrence_period !== RecurrencePeriod.LIST){\n delete data.recurrence_starts\n delete data.recurrence_endTz\n if(data.recurrence_period !== RecurrencePeriod.WEEKLY){\n delete data.recurrence_days\n }\n } else if(data.recurrence_period){\n data.recurrence_list = [...(data.recurrence_starts || []).map((date: DateTZ) => date.startOfValue('minute').seconds)]\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.recurrence_days\n }\n delete data.is_recurrent\n }else{\n delete data.recurrence_period;\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.is_recurrent\n delete data.recurrence_exceptions\n delete data.recurrence_days\n }\n\n return data\n}\n\n/** Removes expired occurrences and updates start and end dates when cloning a series */\nexport const removeExpiredOcurrences = (form: FormGroup) =>{\n if(form.controls.action?.value === SeriesAction.CLONE ){\n const tz = form.controls.space_list.value[0].timezone\n const date_now = new DateTZ({ is_local_tz: false, building_tz: tz });\n const occurrences = form.controls.recurrence_starts.value.filter((date: DateTZ) =>\n date_now.isBeforeDate(date, 'day') || date_now.isSameDate(date, 'day')\n )\n form.controls.recurrence_starts.setValue(occurrences)\n const { start, end } = setStartAndEndDateFromArray(occurrences, tz)\n form.controls.dateTz.setValue(start)\n form.controls.recurrence_endTz.setValue(end)\n }\n}\n\n/** \n * Returns starts and end dates from an array of dates in milliseconds \n **/\n export const setStartAndEndDateFromArray = (dates: Array, tz: string): {start: DateTZ, end: DateTZ} =>{\n if(dates.length !== 0){\n return {\n start: dates.sort((d1, d2) => d1.ms - d2.ms)[0] ,\n end: dates.sort((d1, d2) => d2.ms - d1.ms)[0]\n }\n }\n //if the dates array is empty set the start and end dates as the current and next day\n const now = DateNow(new Date()).toZone(tz)\n return {start: now, end: now.addValue({days: 1})}\n}\n\nexport const setRecurrenceStartsTime = (form: FormGroup) => {\n const { recurrence_starts, dateTz } = form.value\n const list = (recurrence_starts || []).map((date: DateTZ) => date.setValue({hour: dateTz.dateHour, minute: dateTz.minutes}))\n form.controls.recurrence_starts.setValue(list)\n}","export * from './report.class'\nexport * from './reports.service'\n","import { CurrencyPipe } from '@angular/common';\n\nimport {\n csvToJson,\n downloadFile,\n HashMap,\n humaniseDuration,\n jsonToCsv,\n} from '@mckinsey-converge/base';\n\nimport { ServiceManager } from '../service-manager.class';\nimport { Space } from '../spaces';\nimport { Organisation } from '../organisation';\n\nexport class Report {\n /** Type of report */\n public readonly type: string;\n /** List of data associated with the report */\n public readonly data: T[];\n\n constructor(raw_data: HashMap = {}) {\n this.type = raw_data.type || '';\n this.data = this.cleanData(raw_data.data);\n }\n\n /** Create report data structure from CSV */\n public static fromCSV(type: string, data: string): Report {\n const csv_json = csvToJson(data);\n return new Report({ type, data: csv_json });\n }\n\n /** Download report data as CSV format */\n public downloadCSV(name: string = 'unnamed.csv'): void {\n downloadFile(name, jsonToCsv(this.data));\n }\n\n /** Download report data as JSON format */\n public downloadJSON(name: string = 'unnamed.json'): void {\n downloadFile(name, JSON.stringify(this.data, undefined, 4));\n }\n\n public formatCancelledBy(email: string) {\n if (email !== null && email !== undefined) {\n let name = email.split('@')[0];\n name = name.split('_').join(' '); //get name from email and convert it to title case\n name = name.replace(/\\w\\S*/g, function (txt) {\n return `${txt\n .charAt(0)\n .toUpperCase()}${txt.substr(1).toLowerCase()}`;\n });\n return name;\n } else {\n return email;\n }\n }\n\n public timeConverter( UNIX_timestamp: number ){\n if(!UNIX_timestamp) return '';\n let a = new Date(UNIX_timestamp * 1000);\n let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n let year = a.getFullYear();\n let month = months[a.getMonth()];\n let date = a.getDate();\n let hour = ((a.getHours() + 11) % 12 + 1);\n let suffix = a.getHours() >= 12 ? \"PM\":\"AM\";\n let min = a.getMinutes() === 0 ? '00':a.getMinutes();\n let time = date + ' ' + month + ' ' + year + ' - ' + hour + ':' + min + ' ' + suffix;\n return time;\n }\n\n private cleanData(data: T[] = []) {\n if (data.length > 0 && this.type === 'day') {\n for (let i = 0; i < data.length; i++) {\n data[i]['booker'] = data[i]['booker'].name;\n data[i]['expected_attendees'] = Object.values(data[i]['expected_attendees'])[0];\n }\n } else if (data.length > 0 && this.type === 'audit') {\n for (let i = 0; i < data.length; i++) {\n data[i]['created_at'] = this.timeConverter(data[i]['created_at']);\n }\n } else if (data.length > 0 && this.type === 'catering') {\n for (let i = 0; i < data.length; i++) {\n data[i]['Cancelled By'] = this.formatCancelledBy(\n data[i]['Cancelled By']\n );\n }\n const fields = Object.keys(data[0]);\n const room_field = fields.find(\n (key) =>\n key.toLowerCase().includes('room') &&\n key.toLowerCase().includes('email')\n );\n const price_field = fields.find((key) =>\n key.toLowerCase().includes('price')\n );\n\n for (let row of data) {\n /* istanbul ignore else */\n const space_service = ServiceManager.serviceFor(Space);\n if (room_field && price_field && space_service) {\n const room = space_service.find(\n row[room_field].toLowerCase()\n );\n const org_service = ServiceManager.serviceFor(Organisation);\n const bld = org_service.buildings.find(\n (bld: { id: any }) =>\n bld.id === room?.level?.building_id\n );\n row[price_field] = new CurrencyPipe('en_us').transform(\n row[price_field] / 100,\n bld?.currency\n );\n }\n /* istanbul ignore else */\n for (let field of fields) {\n row[field] =\n typeof row[field] === 'string'\n ? row[field].replace(/\\,/g, '٫')\n : row[field];\n }\n }\n } else if (this.type === 'bookings') {\n data = data.map((i: HashMap) => {\n const booking = i;\n try {\n if (booking.setup instanceof Object) {\n booking.setup = booking.setup[booking.room_email];\n }\n if (booking.breakdown instanceof Object) {\n booking.breakdown =\n booking.breakdown[booking.room_email];\n }\n booking.setup = humaniseDuration((booking.setup || 0) / 60);\n booking.breakdown = humaniseDuration(\n (booking.breakdown || 0) / 60\n );\n booking.description = (booking.description || '')\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ');\n booking['Meeting Host'] =\n booking.organizer?.name || booking.organizer;\n booking['Booked By'] =\n booking.booked_by?.name ||\n booking.booked_by?.email ||\n '';\n booking.charge_code =\n booking.equipment_codes[booking.room_email] || '';\n // booking.expected_attendees = Object.keys(booking.expected_attendees).map(key => booking.expected_attendees[key]).join(', ');\n booking.attendees = (booking.attendees || [])\n .map((person) => person.name || person.email || person)\n .join('٫ ');\n booking.notes = (booking.notes || [])\n .map((note) =>\n note.author &&\n (note.type === 'description' ||\n note.type === 'private')\n ? `[${note.author}|${note.type}]${note.message\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ')}`\n : ''\n )\n .join(' | ');\n booking.cancelled = booking.isCancelled;\n booking.status = booking.status[booking.room_email] || '';\n booking.company = booking.company.join(', ');\n if (booking.cancelled_by) {\n booking.cancelled_by = this.formatCancelledBy(\n booking.cancelled_by\n );\n }\n booking.cancelled_date = this.timeConverter(booking.cancelled_at_epoch);\n\n } catch (e) {}\n const remove_fields = [\n 'id',\n 'icaluid',\n 'accepted_at',\n 'accepted_by',\n 'check_ins',\n 'changeKey',\n 'created',\n 'booking_type',\n 'edit_history',\n 'end_epoch',\n 'old_attendees',\n 'start_epoch',\n 'expected_attendees',\n 'isAllDay',\n 'isCancelled',\n 'body',\n 'is_free',\n 'lastModifiedDateTime',\n 'locationType',\n 'locations',\n 'organizer',\n 'booked_by',\n 'originalEndTimeZone',\n 'originalStartTimeZone',\n 'room_booking_status',\n 'room_email',\n 'room_emails',\n 'room_id',\n 'sensitivity',\n 'seriesMasterId',\n 'show_as',\n 'notes',\n 'subject',\n 'type',\n 'previous_booking',\n 'catering',\n 'responseStatus',\n 'equipment_codes',\n 'cancelled_at_epoch',\n ];\n for (const field of remove_fields) {\n if (booking[field] !== undefined) {\n delete booking[field];\n }\n }\n const output = {};\n const order = [\n 'title',\n 'start',\n 'end',\n 'location',\n 'Meeting Host',\n 'Booked By',\n 'booked_at',\n 'booked_ahead_by',\n 'all_day',\n 'attendees',\n 'company',\n 'description',\n 'cancelled',\n 'cancelled_by',\n 'cancelled_date',\n ];\n const keys = Object.keys(booking);\n keys.sort((a, b) => {\n const idx_a = order.indexOf(a);\n const idx_b = order.indexOf(b);\n return (\n (idx_a === -1 ? keys.length : idx_a) -\n (idx_b === -1 ? keys.length : idx_b)\n );\n });\n for (const key of keys) {\n output[key] = booking[key];\n }\n return output;\n }) as any;\n }\n return data;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { Report } from './report.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReportsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Reports';\n this._api_route = 'reports';\n }\n\n protected process(raw_data: any): Report {\n return raw_data instanceof Array\n ? new Report({ data: raw_data })\n : Report.fromCSV('', raw_data);\n }\n}\n","import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { HashMap } from '@mckinsey-converge/base';\n\n\nexport interface ServiceLike extends HashMap {\n parent: any;\n add: (_: HashMap) => Promise;\n update: (id: string, _: HashMap) => Promise;\n delete: (id: string, params?: HashMap) => Promise;\n task: (id: string, name: string, data: HashMap) => Promise;\n listen: (prop: string) => Observable;\n}\n\nexport interface ServiceProvider {\n provideFor: Type;\n useValue: T;\n}\n\nexport class ServiceManager {\n /** Map of available services for child classes */\n private static _service_list: ServiceProvider[] = [];\n\n /** Set the services used to handle data model requests */\n public static setService(type: Type, service: any): void {\n if (window.debug) {\n (window as any).ServiceManager = this._service_list;\n }\n const index = ServiceManager._service_list.findIndex(provider => provider.provideFor === type);\n if (index >= 0) {\n ServiceManager._service_list.splice(index, 1, { provideFor: type, useValue: service });\n } else {\n ServiceManager._service_list.push({ provideFor: type, useValue: service });\n }\n }\n\n /** Get the services used to handle data model requests */\n public static serviceFor(type: Type): ServiceLike {\n const provider = ServiceManager._service_list.find(provider => provider.provideFor === type) || { useValue: null };\n return provider.useValue;\n }\n\n constructor() {\n throw new Error('ServiceMananger is static class');\n }\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\n\nimport { VERSION } from '@mckinsey-converge/environment';\nimport {\n BaseClass,\n getItemWithKeys,\n HashMap,\n log\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from './service-manager.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ndeclare global {\n interface Window {\n debug: boolean;\n }\n}\n\nexport const SETTINGS_TOKEN = 'settings_service_data';\n\ntype SettingsAppData = T & {\n title: string;\n description: string;\n short_name: string;\n logo_light: {\n type: string;\n src: string;\n background: string;\n }\n logo_dark: {\n type: string;\n src: string;\n background: string;\n }\n heap_io: {\n app_id: number;\n force_ssl: boolean;\n secure_cookie: boolean;\n disable_text_capture: boolean;\n cookie_path: string;\n }\n}\n\nexport interface SettingsData {\n debug: boolean;\n mock: boolean;\n frontend: 'staff' | 'concierge' | 'booking';\n composer: {\n domain: string;\n route: string;\n protocol: string;\n port: string;\n use_domain: boolean;\n local_login: boolean;\n }\n app: SettingsAppData;\n}\n\nexport class SettingsObject {\n constructor(public data: SettingsData) {\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SettingsService extends BaseClass {\n /** Name of the application */\n private _app_name = 'Converge';\n /** List of override settings in order of priority */\n private _overrides = new BehaviorSubject([]);\n /** Mapping of behaviour subjects */\n private _subjects: HashMap> = {};\n /** Mapping of observables */\n private _observables: HashMap> = {};\n /** Which frontend we're in. staff, concierge, or bookings **/\n public readonly frontend: string;\n private _bypass_bookings: boolean = false;\n\n /**\n * @hidden\n */\n public set overrides(value: HashMap[]) {\n this._overrides.next(value);\n }\n\n /** Get observable for key */\n public listen(name: string): Observable {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n return this._observables[name];\n }\n\n /** Update observable value for key */\n public post(name: string, value: T): void {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n this._subjects[name].next(value);\n }\n\n public value(name: string): T {\n return !this._observables[name] ? null : this._subjects[name].getValue();\n }\n\n /** Page title */\n public get title() {\n return this._title.getTitle();\n }\n\n public set title(value: string) {\n this._title.setTitle(`${value} | ${this._app_name}`);\n }\n\n constructor(private _title: Title,\n @Inject(SETTINGS_TOKEN)\n private settings: SettingsObject) {\n super();\n ServiceManager.setService(SettingsService, this);\n const time = new DateTZ({date: VERSION.time});\n const built = DateNow(new Date()).isSameDate(time, 'day')\n ? `Today at ${time.formatDate('h:mma')}`\n : time.formatDate('do MMM yyyy, h:mma');\n const frontend = this.get('frontend') || 'Unknown';\n this.frontend = frontend;\n log('CORE', `${VERSION.semver}`, null, 'debug', true, frontend?.toUpperCase());\n log('APP', `${VERSION.hash} | Built: ${built}`, null, 'debug', true, frontend?.toUpperCase());\n this.init();\n }\n\n /**\n * Initialise the settings\n */\n public async init() {\n if (this.get('debug')) {\n window.debug = true;\n }\n if (this.get('app')?.name) {\n this._app_name = this.get('app').name;\n }\n log('Settings', 'Successfully loaded settings');\n this._initialised.next(true);\n }\n\n /** Whether settings service has initialised */\n public get app_name() {\n return this._app_name;\n }\n\n public get concierge() {\n return this.frontend === 'concierge';\n }\n\n public set bypass_bookings(value: boolean) {\n this._bypass_bookings = value;\n }\n\n public get bypass_bookings() {\n return this._bypass_bookings;\n }\n\n /**\n * Get a setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public get(key: string): any {\n const keys = key.split('.');\n if (keys[0] !== 'app') {\n return getItemWithKeys(keys, this.settings.data);\n }\n const override_settings = this._overrides.getValue();\n for (const override of override_settings) {\n const value = getItemWithKeys(keys.slice(1), override);\n if (value != null) {\n return value;\n }\n }\n return getItemWithKeys(keys, this.settings.data);\n }\n}\n","export * from './space.class';\nexport * from './spaces.service';\nexport * from './space.utilities';\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n} from '@mckinsey-converge/base';\nimport {\n Building,\n BuildingLevel,\n Organisation\n} from '../organisation';\nimport { User } from '../users';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { SpaceRules } from '../bookings/booking.types';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { DateTime } from 'luxon';\n\nexport interface ISpaceAvailabilityOptions {\n /** Start date and time of the availability block */\n dateTz?: DateTZ;\n /** Length of the availability block */\n duration: number;\n /** */\n id?: string;\n /** List of spaces to look at the availability for */\n room_ids?: string;\n /** Whether the spaces looked at should be bookable */\n bookable?: boolean;\n /** List of spaces or zones to ignore */\n ignore?: string;\n /** List of zones to look at the availability for */\n zone_ids?: string | string[];\n /** Whether space bookings should not be returned */\n hide_bookings?: boolean;\n /** Min capacity on the room **/\n capacity?: number\n clear?: boolean;\n /** Length of the setup */\n setup?: number;\n /** Length of the breakdown */\n breakdown?: number;\n /** Hide declined bookings */\n hide_declined?: boolean;\n /** Max capacity on the room **/\n capacity_max?: number\n\n diff_capacity?: boolean\n\n /** Fields to include recurrence in the availability search */\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array\n is_recurrent?: boolean\n is_multiroom?: boolean\n merged?: boolean\n recurrence_days?: Array\n}\n\nexport interface SpaceBookingRuleOptions {\n dateTz: DateTZ;\n duration: number;\n host: User;\n}\n\nexport const OPTION_DEFAULTS: ISpaceAvailabilityOptions = {\n duration: 60\n};\n\nexport interface RecurrenceAvailability {\n /** Unix epoch in seconds */\n readonly date: number;\n /** Whetehr space is available at this time */\n readonly available: boolean;\n}\n\n/**\n * Room Settings Type\n *\n * Exmaple:\n * available: true\n * available_until: 1644344999\n * bookings: []\n * catering: false\n * charge_code: false\n * extra_features: \"meeting_room boardroom\"\n * internal_or_external: \"internal\"\n * map_id: \"08.8.15\"\n * natural_light: false\n * room_booking_screen: true\n * room_name: \"8.15 Meeting\"\n * vc: false\n * recurrence_availability: {\n * date: \"1642596300\",\n * available: false,\n * }\n */\nexport interface RoomSettings {\n // Local room name is required.\n room_name?: string\n // TBD if anything else should be required\n available?: boolean\n available_until?: number\n bookings?: HashMap[]\n catering?: boolean\n charge_code?: boolean\n extra_features?: string\n internal_or_external?: string\n map_id?: string\n natural_light?: boolean\n room_booking_screen?: boolean\n vc?: boolean\n recurrence_availability?: RecurrenceAvailability[]\n equipment_code?: boolean\n external?: boolean\n}\n\n/**\n * List of space features that come from settings.\n *\n * Im sure this list will grow. It is not the most comprehensive list.\n */\nexport enum SpaceFeatures {\n BoardRoom = 'boardroom',\n Catering = 'catering',\n CocktailRoom = 'cocktail',\n ConferencePhone = 'conference_phone',\n ConferenceRoom = 'conference',\n ElectronicWhiteboard = 'whiteboard',\n FlipChart = 'flipchart',\n Glassboard = 'glassboard',\n PartnerOffice = 'partner',\n PhoneBooth = 'phone_booth',\n TheatreRoom = 'theatre',\n TeamRoom = 'team_room',\n VideoConference = 'vc',\n NaturalLight = 'natural_light',\n WirelessContentSharing = 'wireless_content_sharing',\n WorkshopRoom = 'workshop',\n UShapeRoom = 'u_shape',\n Miscellaneous = 'miscellaneous'\n}\n\nexport enum SpaceEquipments {\n conference_phone,\n whiteboard,\n vc,\n flipchart,\n glassboard,\n wireless_content_sharing\n}\nexport enum SpaceStyles {\n boardroom,\n cocktail,\n conference,\n partner,\n theatre,\n team_room,\n // natural_light,\n workshop,\n u_shape,\n miscellaneous\n}\n\nconst EMPTY_ARRAY = [];\n\nexport class Space extends BaseDataClass {\n /** Whether space can be booked by users */\n public readonly bookable: boolean;\n /** People capacity of the space */\n public readonly capacity: number;\n /** Index to force order when sorting multiple spaces */\n public readonly sort_priority: number;\n /** Settings has extensive info displayed in the app. */\n public readonly settings: RoomSettings;\n /** URL for the control interface of the space */\n public readonly support_url: string;\n /** Engine zones associated with the space */\n public readonly zones: readonly string[];\n /** Is the Application concierge */\n public is_concierge: boolean = false;\n /** To allow bookings with rooms for staff calendar view only */\n public allowStaffRoomWithBookings: boolean = false;\n\n /** Simple name == local name being using in seeting.room_name\n\t\t *\n\t\t*/\n public simple_name: string;\n\n /** Room style set of all room style one room has\n * [\"boardroom\", \"cocktail\", \"miscellaneous\", \"natural_light\", \"theatre\", \"u-shape\", \"workshop\"] */\n public room_style: string[] = [];\n\n /** Equipment set of all room equipment one room has\n * [\"conference_phone\", \"whiteboard\", \"vc\", \"flipchart\", \"glassboard\", \"whiteboard\", \"wireless_content_sharing\"] */\n public equipment: string[] = [];\n\n /** Filters has charge code settings for booking and catering */\n public filters: RoomSettings;\n\n /** room_type subset of internal or external rooms */\n public room_type: string[] | string;\n /**\n * Features used in identifying room types.\n *\n * Both features and extra_features are space delimited strings.\n *\n * There is a getter featuresArray that returns the\n * combination of the two as an array.\n */\n public readonly features: string;\n public readonly extra_features: string;\n public map_id: string;\n\n\n /** Service for managing spaces */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Return the rooms' building */\n public get building() {\n return this._service?.buildings.find((bld) => {\n return this.zones.includes(bld.id);\n });\n }\n\n /** Return building timezone */\n public get timezone() {\n return this.building?.timezone;\n }\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = !!settingsService?.concierge;\n this.allowStaffRoomWithBookings = settingsService?.bypass_bookings || false;\n\n const defaultGlobalName = raw_data.name || raw_data.email || 'Meeting Room';\n const defaultSettings = {\n room_name: defaultGlobalName\n }\n /**\n * Duplicate of base-api.class just for readability\n * .name is the full, mckinsey standardised name of the room.\n * You can think of it was what people would call the room when\n * considering every office and room globally.\n *\n * this.name = raw_data.name;\n */\n /**\n * Settings has extensive info displayed in the app.\n * setting.room_name is always used when displaying the room name in the applications\n * setting.room_name is the more office-specific room name, you can think of this as\n * the one people in that office would refer to the room as.\n *\n */\n this.settings = raw_data.settings || defaultSettings;\n this.filters = raw_data?.filters;\n // Room fields\n this.bookable = raw_data.bookable || false;\n this.capacity = raw_data.capacity || 0;\n this.support_url = raw_data.support_url;\n this.zones = raw_data.zones instanceof Array ? raw_data.zones : [];\n // Feature fields\n this.features = raw_data.features || '';\n this.extra_features = raw_data.settings?.extra_features || '';\n\n\t\tthis.room_type = raw_data?.room_type;\n this.simple_name = raw_data?.simple_name;\n this.map_id = raw_data?.map_id || raw_data.settings?.map_id || '';\n this.room_style = raw_data?.room_style || [];\n this.equipment = raw_data?.equipment || [];\n\n }\n\n /**\n * Return the global room name\n * IE LDN-4-408-06\n */\n public get global_name(): string {\n return this.name || ''\n }\n\n /**\n * Return the local room name\n * i.e. 4.08\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.room_name\n */\n public get local_name(): string {\n return this.simple_name || this.name || ''; // this.settings?.room_name\n }\n\n public get street_and_city(): string {\n return this.building ? `${this.building.address}, ${this.building.city}` : '';\n }\n\n /**\n * Return the map_id from settings\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.map_id and use map_id from space modal( after testing over prod)\n */\n // public get map_id(): string {\n // return this?.map_id || this.settings?.map_id || '';\n // }\n\n /** Internal / External status */\n public get internal_or_external(): string {\n const external = this.filters?.external;\n return external ? 'external' : 'internal'; // ( external ? 'external' : this.settings?.internal_or_external ) || 'internal';\n }\n\n /**\n * Works in conjunction with available_until.\n *\n * If a room is bookable that only means you can make a booking but not when.\n * Available indicates that it is available to be booked durring the queried times.\n */\n public get available(): boolean {\n return this.settings?.available ?? false;\n }\n\n public get currently_in_use(): boolean {\n const nowMs = new DateTZ({ date: DateTime.now(), is_local_tz: false, building_tz: this.timezone }).ms;\n const runningBookings = this.settings?.bookings?.filter( bks => {\n const startEpoch = new DateTZ({ date: bks.start_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n const endEpoch = new DateTZ({ date: bks.end_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n return startEpoch <= nowMs && endEpoch >= nowMs;\n })\n // console.log(raw_data.settings.room_name+' : '+ nowMs.ms);\n // console.log('IS IN USER CURRENTLY : ', isinUsernow);\n return !!runningBookings.length;\n }\n\n /** Last returned availability time */\n public get available_until(): number {\n return this.settings?.available_until;\n }\n\n /** Bookings associated with the space */\n public get bookings(): HashMap[] {\n // We should need to care if a room as bookings in Staff\n if (!this.is_concierge && !this.allowStaffRoomWithBookings) {\n return EMPTY_ARRAY;\n }\n\n if (this.settings?.bookings?.length) {\n /**\n * When we're dealing with Concierge the API data arriving is rooms, and those rooms contain booking,\n * but those bookings don't contain a room since the room is the root.\n * In order for Concierge to filter bookings by room we need to reattach this room\n * to each of the bookings, with it's own bookings.\n *\n * It's loopy and kooky but correcting for this pattern is beyond the scope of this refactor.\n */\n const spaceWithBookings = new Space(this.toJSON());\n return this.settings?.bookings.map(b => {\n b.room = spaceWithBookings;\n return b;\n });\n }\n return EMPTY_ARRAY;\n }\n\n /**\n\t\t * Whether space has catering\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.catering and use filters?.catering instead\n\t\t */\n public get has_catering(): boolean {\n return this.filters?.catering || this.settings?.catering || false;\n }\n\n /** Returns an array of the space delimited feature and extra_feature strings.\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove features, extra_features\n */\n public get featuresArray(): (SpaceFeatures | string)[] {\n // (this.simple_name === \"Entresol M-06\" ) && console.log('raw_data : ', this)\n const roomType = Array.isArray(this.room_type) ? this.room_type : [this.room_type]\n const features = [\n ...this.features.split(' '),\n ...this.extra_features?.split(' '),\n\n ...roomType, // required to work with staff>result>filters\n ...this?.room_style,\n ...this?.equipment,\n\n (this.filters?.natural_light) && SpaceFeatures.NaturalLight || undefined, // || this.settings?.natural_light\n // this.settings?.natural_light && SpaceFeatures.NaturalLight || undefined,\n // this.settings?.vc && SpaceFeatures.VideoConference || undefined,\n ].filter(f => !!f).map(f => f.toLowerCase());\n //will be an array... new Set() turns it into a set, but [... ] turns it back into an array again\n return [ ...new Set(features) ];\n }\n\n /** Level in which the space is associated */\n public get level(): BuildingLevel {\n const service = ServiceManager.serviceFor(Organisation);\n return (service ? service.levelWithID(this.zones as any) : null) || new BuildingLevel({});\n }\n\n /**\n * Return the new recurrence_availability from settings\n */\n public get recurrence_availability(): RecurrenceAvailability[] {\n return this.settings?.recurrence_availability || [];\n }\n\n public get availableOccurrences(): number {\n if(this?.recurrence_availability) {\n return this?.recurrence_availability?.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this?.recurrence_availability.length;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Space {\n return new Space(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): Space {\n const space = { ...this };\n space.settings.bookings = []; // clear out bookings\n return new Space({ ...space, id: null, email: null });\n }\n\n /**\n * Generate the booking rules for space with given options\n * @param options Conditions for generating the space rules\n */\n public rulesFor(options: SpaceBookingRuleOptions): SpaceRules {\n if (!this._service || !this.level) {\n return { auto_approve: true, hide: false };\n }\n\n const building = this.is_concierge ? this.level.building_id : this.building\n\n if (!building) {\n return { auto_approve: true, hide: false };\n }\n const { dateTz, duration, host } = options;\n const rules: SpaceRules = rulesForSpace({\n time: dateTz.ms,\n duration,\n space: this,\n user: host,\n rules: building.booking_rules\n });\n return rules;\n }\n\n /**\n * Whether space can only be booked by request\n * @param options Conditions for checking the space rules\n */\n public byRequest(options: SpaceBookingRuleOptions) {\n const rules = this.rulesFor(options);\n return !rules.auto_approve;\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Space): HashMap {\n return { ...super.toJSON(), settings: { ...this.settings, bookings: [] }, filters: { ...this.filters }, equipment: [ ...this.equipment] };\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport {\n ISpaceAvailabilityOptions,\n Space\n} from './space.class';\nimport { Building } from '../organisation/building.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\n\nexport function availabilityOptionsToQuery(options: ISpaceAvailabilityOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n if (options.dateTz) {\n const date = options.dateTz.startOfValue('minute');\n query.available_from = date.seconds; // Add one second or API will not allow end to end booking\n query.available_to = date.addValue({ minutes: options.duration || 60 }).subtractValue({ seconds: 1 }).seconds;\n\n if (options.setup) query.setup = options.setup ;\n if (options.breakdown) query.breakdown = options.breakdown;\n \n delete query.dateTz;\n delete query.duration;\n }\n\n if (!options.capacity_max) delete query.capacity_max\n\n if (options.hide_declined) query.hide_declined = options.hide_declined;\n query = handleRecurrenceFields(query)\n }\n return query;\n}\n\n/**\n * Compare two spaces to determine order\n * @param first\n * @param second\n */\nexport function sort(first: Space, second: Space, blds: Building[] = []) {\n const bld = blds.find(bld => first.zones.includes(bld.id));\n const bld_b = blds.find(bld => second.zones.includes(bld.id));\n if (bld) {\n if (bld !== bld_b) {\n return (bld.name).localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = first.zones.indexOf(zone_id) >= 0;\n const b_has_zone = second.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n }\n return first.name.localeCompare(second.name);\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { BaseAPIService } from '../base.service';\nimport { ISpaceAvailabilityOptions, Space } from './space.class';\nimport { ApplicationLoadingState, HashMap } from '@mckinsey-converge/base';\nimport { availabilityOptionsToQuery } from './space.utilities';\nimport { ServiceManager } from '../service-manager.class';\nimport { OrganisationService } from '../organisation';\nimport { ApplicationService } from '../app.service';\nimport { SettingsService } from '../settings.service';\nimport { DateNow } from '@mckinsey-converge/date-tz';\nimport { Observable } from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\n\nlet SPACE_LIST = [];\n\nexport function findSpace(id: string) {\n return SPACE_LIST.find((_) => _.id === id || _.email === id);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SpacesService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n private _org: OrganisationService,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n \n super(_composer, settingsService);\n ServiceManager.setService(Space, this);\n this._name = 'Space';\n this._api_route = 'rooms';\n this._compare = (a, b) =>\n !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this._list_filter = (a: Space) => {\n const bld = this._org.building;\n return a.level.building_id === bld.id;\n };\n this._org.initialised\n .pipe(first((_) => _))\n .subscribe(() => this.init());\n }\n\n public async query(query: HashMap = {}, setList:boolean = false) {\n const list = await super.query(query);\n if ( (query.hasOwnProperty('cache') && query.cache === false) || !Object.keys(query).length || setList) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n return list;\n }\n\n public filterAvailableSpaces(list: Space[]) {\n return list.filter((i) => {\n if (i.recurrence_availability?.length) return i; //if recurrence, send the space regardless of availability (needed for edit and cloning series)\n return i.available;\n });\n }\n\n /**\n * Get available spaces\n * @param options\n */\n public available(\n options: ISpaceAvailabilityOptions,\n uniqueId?: string,\n filter: boolean = true\n ): Promise {\n if (!options) {\n throw new Error('Space avilability requires request options');\n }\n\n const now = DateNow(new Date());\n if (!options.dateTz) {\n options.dateTz = now.startOfValue('minute');\n }\n\n if (options.hide_declined === undefined) {\n options.hide_declined = true;\n }\n\n const key = `available|${options.id ? options.id : ''}|${\n uniqueId ?? ''\n }`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Space[]) => {\n delete this._promises[key];\n resolve(filter ? this.filterAvailableSpaces(list) : list);\n };\n const error = (e) => {\n reject(e);\n delete this._promises[key];\n };\n const query = availabilityOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(\n (i) => respond([i]),\n error\n );\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n const loading: ApplicationLoadingState =\n this._service.get('loading') || {};\n if (!loading.spaces) {\n loading.spaces = {\n message: 'Loading space data',\n state: 'loading',\n };\n this._service.set('loading', loading);\n }\n // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n const option = {\n zone_ids: this._org.building.id\n }\n await this.query(option, true).catch(() => {\n loading.spaces = { message: 'Loading space data', state: 'failed' };\n this._service.set('loading', loading);\n });\n loading.spaces = { message: 'Loading space data', state: 'complete' };\n this._service.set('loading', loading);\n }\n\n /**\n * Convert raw data into API object\n * @param raw_data Raw API data\n */\n public process(raw_data: HashMap): Space {\n return new Space(raw_data);\n }\n /**\n * \n * Special observable function to make http call for rooms\n * @param query \n * @returns observable\n */\n public queryRooms = (query: HashMap = {}): Observable => super.queryRoomsForQR(query);\n\n public setSpaceList(list) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n\n public queryBooking = (query: HashMap = {}) : Observable | Observable => super.queryObsr(query);\n public updateSpace = (id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.updateObsr(id, form_data, should_inject_concierge, query_params);\n public uploadSpacePhotos = (apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.uploadSpacePhotos(apiSubRoute, form_data, should_inject_concierge, query_params);\n \n public updateRoomList() {\n this.load().then((_) => null)\n }\n}\n","import {\n BehaviorSubject,\n of\n} from 'rxjs';\nimport {\n Building,\n Organisation\n} from './organisation';\nimport { BaseDataClass } from './base-api.class';\nimport { MapLocation } from './location';\nimport { User } from './users';\nimport { Booking } from './bookings';\nimport {\n RoomSettings,\n Space,\n SpaceFeatures\n} from './spaces';\nimport { ServiceManager } from './service-manager.class';\nimport {\n CateringCategory,\n CateringItem\n} from './catering';\nimport {\n HashMap,\n padZero,\n predictableRandomInt,\n unique\n} from '@mckinsey-converge/base';\n\nimport * as faker from 'faker';\n\nimport {\n SETTINGS_TOKEN,\n SettingsData,\n SettingsObject,\n SettingsService\n} from './settings.service';\nimport { Report } from './reports';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nfaker.seed(2560);\n\nlet SERVICE: any;\n\ndeclare global {\n interface Jest {\n fn: () => any\n }\n}\n\n\ndeclare let jest: Jest;\n\n/* istanbul ignore file */\n\nexport function generateMockOrganisationService(): HashMap {\n return {\n levelWithID: jest.fn(),\n listen: jest.fn(),\n loadOrganisation: jest.fn(),\n initialised: of(true),\n building: new Building(generateMockBuilding({ id: 'bld-01' })),\n loadBuildingsWithOrg: jest.fn(),\n getOrganizationFiltersByRoomType: jest.fn(),\n getRoomTypeSubsetDDOptions: jest.fn(),\n getRoomFilterOptionsPerLocation: jest.fn(),\n ...generateMockDataService('OrganisationService')\n };\n}\n\nexport const generateMockSpacesService = (): HashMap => ({\n available: jest.fn(),\n ...generateMockDataService('SpacesService')\n});\n\nexport const generateMockUsersService = (): HashMap => ({\n loadCurrentUser: jest.fn(),\n ...generateMockDataService('UsersService')\n});\n\nexport const bookingState = () => ({\n bookings: of([]),\n filtered: of([]),\n filtered_week: of([]),\n filtered_month: of([]),\n setZone: jest.fn(),\n setDate: jest.fn(),\n setFilters: jest.fn(),\n add: jest.fn(),\n replace: jest.fn(),\n remove: jest.fn(),\n startPolling: jest.fn(),\n startPollingMonth: jest.fn(),\n startPollingWeek: jest.fn(),\n startPollingEveryFiveMin: jest.fn(),\n _noOfMeetings: of([])\n});\n\nconst test_app = {\n title: 'McKinsey & Company',\n description: 'McKinsey & Company Staff UI written with Angular Framework',\n short_name: 'STAFF',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: ''\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: ''\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/staff/'\n }\n};\n\nexport const TEST_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/test',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false\n },\n app: test_app,\n mock: false,\n frontend: 'staff'\n};\n\nexport const generateMockSettingsService = (overrides: Partial> = {}) => new SettingsService({ getTitle: () => jest.fn() } as any,\n new SettingsObject({\n ...TEST_SETTINGS,\n ...overrides\n }));\n\n/**\n * Provides an injectable instance for settings.\n */\nexport const provideMockSettingsObject = (settings: Partial> = {}) => ({\n provide: SETTINGS_TOKEN,\n useValue: new SettingsObject({\n ...TEST_SETTINGS,\n ...settings\n })\n});\n\n/**\n * Generate a mocked version of the application service\n */\nexport function generateMockAppService(settingsOverrides: Partial> = {}) {\n SERVICE = {\n setting: jest.fn(),\n notify: jest.fn(),\n notifyInfo: jest.fn(),\n notifyWarn: jest.fn(),\n notifySuccess: jest.fn(),\n notifyError: jest.fn(),\n log: jest.fn(),\n navigate: jest.fn(),\n navigateBack: jest.fn(),\n get: jest.fn(),\n listen: jest.fn(),\n set: jest.fn(),\n Composer: { auth: { token: 'test' } },\n Hotkeys: { listen: jest.fn() },\n Users: generateMockUsersService(),\n Organisation: generateMockOrganisationService(),\n Locations: generateMockDataService('LocationsService'),\n Base: generateMockDataService('BaseService'),\n Menu: generateMockDataService('CateringMenuService'),\n Spaces: generateMockSpacesService(),\n Bookings: generateMockDataService('BookingsService'),\n Reports: generateMockDataService('ReportsService'),\n CateringItems: generateMockDataService('CateringItemsService'),\n CateringCategories: generateMockDataService('CateringCategoriesService'),\n Settings: generateMockSettingsService(settingsOverrides),\n initialised: of(true)\n };\n ServiceManager.setService(BaseDataClass, SERVICE.Base);\n ServiceManager.setService(Organisation, SERVICE.Organisation);\n ServiceManager.setService(Building, SERVICE.Organisation);\n ServiceManager.setService(User, SERVICE.Users);\n ServiceManager.setService(Booking, SERVICE.Bookings);\n ServiceManager.setService(Space, SERVICE.Spaces);\n ServiceManager.setService(MapLocation, SERVICE.Locations);\n ServiceManager.setService(Report, SERVICE.Reports);\n ServiceManager.setService(CateringItem, SERVICE.CateringItems);\n ServiceManager.setService(CateringCategory, SERVICE.CateringCategories);\n SERVICE.Organisation.buildings = [SERVICE.Organisation.building];\n SERVICE.Users.current = new User(generateMockUser());\n SERVICE.Users.initialised = of(true);\n SERVICE.Bookings.booking_list = new BehaviorSubject(new Array(10).fill(0).map(_ => new Booking(generateMockBooking())));\n SERVICE.listen.mockReturnValue(of(null, []));\n return SERVICE;\n}\n\nexport function generateMockDataService(name: string) {\n const service = {\n find: jest.fn(),\n filter: jest.fn(),\n listen: jest.fn(),\n get: jest.fn(),\n set: jest.fn(),\n setting: jest.fn(),\n query: jest.fn(),\n show: jest.fn(),\n add: jest.fn(),\n save: jest.fn(),\n remove: jest.fn(),\n delete: jest.fn(),\n update: jest.fn(),\n addFrom: jest.fn(),\n removeFrom: jest.fn(),\n task: jest.fn(),\n available: jest.fn(),\n process: jest.fn(),\n updateList: jest.fn(),\n clearList: jest.fn(),\n removeFromList: jest.fn(),\n accept: jest.fn(),\n decline: jest.fn(),\n checkin: jest.fn(),\n is_logged_in: false,\n initialised: of(true),\n getHoldingBay: jest.fn(),\n name,\n queryRooms: of(true),\n queryRoomsForQR: of([]),\n queryObsr: of([]),\n queryBooking: of(true),\n checkinIndividualVisitor: jest.fn(),\n taskObsr: of(true),\n updateSpace: jest.fn(),\n updateObsr: of([]),\n uploadSpacePhotos: of([])\n\n };\n\n service.getHoldingBay.mockImplementation(_ => Promise.resolve([new Booking({})]));\n service.save.mockImplementation(_ => Promise.resolve(new Booking({})));\n\n service.listen.mockReturnValue(of(null));\n service.filter.mockReturnValue([]);\n return service;\n}\n\nlet SPACE_COUNT: number = 0;\n\nexport function generateMinimalRoomDetails(count: number) {\n return {\n name: `space-0${count}`,\n email: `space-0${count}@test.com`,\n settings: {\n name: `localname-0${count}`,\n catering: true\n }\n }\n}\n\nexport function generateMockSpace(overrides: HashMap = {}, space_id: number = null, recurring_search: boolean = false ): Space {\n const id = `space-${space_id || SPACE_COUNT++}`;\n const name = overrides.name || `${faker.name} ${faker.name.lastName()} Space`;\n const startOfDay = DateNow(new Date()).startOfValue('day');\n let settings: RoomSettings = {\n available: true,\n available_until: startOfDay.addValue({ days: 1 }).seconds, // (Date.now() / 1000) + (60 * 60 * 24), // now plus 24 hrs\n bookings: Array(10).fill(0).map(i => generateMockBooking()),\n catering: true,\n charge_code: true,\n extra_features: \"meeting_room boardroom\",\n internal_or_external: \"internal\",\n map_id: \"1\",\n natural_light: false,\n room_booking_screen: true,\n room_name: `${name} - Local Name`,\n vc: false,\n }\n if (overrides.settings) {\n settings = { ...settings, ...overrides.settings };\n delete overrides.settings;\n }\n if (recurring_search) {\n settings.recurrence_availability = [\n {\n date: startOfDay.seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 1 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 2 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 3 }).seconds,\n available: false,\n },\n ]\n }\n\n const linked = Math.floor(predictableRandomInt(99999)) % 2 === 0 && SPACE_COUNT > 1;\n return new Space({\n id,\n name: `${name} - Global Name`,\n map_id: `${space_id || SPACE_COUNT}`,\n type: faker.commerce.productName(),\n searchable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n controlable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n hourly_rate: Math.floor(predictableRandomInt(300)) * 100,\n bookable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n capacity: 15,\n sort_priority: 0,\n setup: Math.floor(predictableRandomInt(6)) * 5,\n breakdown: Math.floor(predictableRandomInt(6)) * 5,\n support_url: `/control/#/${id}`,\n image: faker.image.business(),\n zones: ['zone_lvl-0'],\n features: `${SpaceFeatures.BoardRoom} ${SpaceFeatures.ElectronicWhiteboard}`,\n email: `${name.toLowerCase().split(' ').join('.')}@${USER_DOMAIN}`,\n settings,\n ...overrides\n });\n}\n\nlet BOOKING_COUNT = 0;\nlet BOOKING_DATE = DateNow(new Date()).setValue({ hour: 6 }).setValue({minute: 0}).subtractValue({ days: 10 }).startOfValue('minute');\n\n/**\n * Set the initial time used for generating mock bookings\n * @param time New initial time as ms from UTC epoch\n */\nexport function setMockBookingStartDatetime(time: number) {\n const date = new DateTZ({date: time})\n BOOKING_DATE = date.startOfValue('minute');\n}\n\n/**\n * Create mock raw API data for a booking\n * @param override Overrides the properties of the generated booking with it's own\n */\nexport function generateMockBooking(override: HashMap = {}) {\n const id = `booking-${BOOKING_COUNT++}`;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4) + 2) * 15 });\n const start = BOOKING_DATE.ms;\n const duration = Math.floor(predictableRandomInt(4) + 2) * 15;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4)) * 15 });\n const organiser = generateMockUser({ external: false, visitor: false });\n const orders = Array(Math.floor(predictableRandomInt(5)))\n .fill(0)\n .map(_ => generateMockCateringOrder({ booking_date: start }, override.room_ids, override.menu));\n const hasCatering = Math.floor(predictableRandomInt(34567)) % 3 === 0;\n const date_start = new DateTZ({date: start})\n return {\n id,\n title: `${faker.commerce.productName()} Meeting`,\n attendees: Array(Math.floor(predictableRandomInt(5) + 2))\n .fill(0)\n .map((_, i) => generateMockUser(override.users)),\n organiser,\n start_epoch: date_start.seconds,\n end_epoch: date_start.addValue({ minutes: duration }).seconds,\n body: faker.lorem.paragraph(),\n notes: [{ type: 'other', message: faker.lorem.paragraph() }],\n location: faker.address.city(),\n // Mckinsey only has internal or external meetings\n booking_type: ['internal', 'external'][predictableRandomInt(2)],\n setup: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n breakdown: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n status: 'accepted',\n catering: hasCatering ? orders : [],\n room: new Space(generateMinimalRoomDetails(1)), // returns space-01 type values\n equipment_codes: {},\n company:[],\n ...override\n };\n}\n\nlet BLD_COUNT = 0;\nlet LVL_COUNT = 0;\n\n/**\n * Generate raw mock data for creating a building\n * @param id Forced ID for the mock\n * @param overrides Supply object value overrides in place. Supports a levelGenerator function\n * to stabilize level ids for testing.\n */\nexport function generateMockBuilding(overrides: HashMap = {}): HashMap {\n const id = `zone_bld-${BLD_COUNT++}`;\n const levels = Array(10)\n .fill(0)\n .map((_, i) => generateMockLevel(undefined, overrides.levelGenerator?.(i)));\n const features: any = {};\n for (const lvl of levels) {\n const count = Math.floor(predictableRandomInt(3) + 2);\n features[lvl.level_id] = {};\n for (let i = 0; i < count; i++) {\n features[lvl.level_id][faker.commerce.productName()] = `feature-${i + 1}`;\n }\n }\n return {\n id,\n zone_id: id,\n extras: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n code: 'NYO',\n name: faker.name.firstName(),\n address: 'building address field',\n city: 'building city',\n loan_items: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n levels,\n roles: {\n 'first-aiders': Array(10)\n .fill(0)\n .map(i => generateMockUser())\n },\n neighbourhoods: features,\n settings: {\n test: {\n nested: {\n level2: true,\n org: false\n }\n },\n city: faker.address.city()\n },\n timezone: 'America/Chicago',\n ...overrides\n };\n}\n\n/**\n * Generate raw mock data for a building level\n * @param id Forced ID for the mock\n * @param overrides value overrides\n */\nexport function generateMockLevel(id?: string, overrides: HashMap = {}): HashMap {\n if (!id) {\n id = `zone_lvl-${LVL_COUNT++}`;\n }\n return {\n id,\n level_id: id,\n level_name: `Level ${LVL_COUNT}`,\n short_name: `L ${LVL_COUNT}`,\n ...overrides\n };\n}\n\nlet USER_COUNT = 0;\n\nexport let USER_DOMAIN = 'acaprojects.com';\n\nconst USER_EMAILS: string[] = [];\n\n/**\n * Generate raw mock data for a user\n * @param id Forced ID for the mock\n * @param name Forced name for the user\n * @param external Whether user is external of the organisation\n */\nexport function generateMockUser(override: HashMap = {}): HashMap {\n const id = `user-${USER_COUNT++}`;\n const name = `${faker.name.firstName()} ${faker.name.lastName()}`;\n const external = override.external || !(predictableRandomInt(99999) % 2);\n const organisation = external ? faker.company.companyName() : USER_DOMAIN.split('.')[0];\n let delegates: {email: string, opt_out: boolean}[] = [];\n const delegate_count = Math.min(predictableRandomInt(4) + 1, USER_EMAILS.length);\n for (let i = 0; i < delegate_count; i++) {\n delegates.push({email: USER_EMAILS[Math.floor(predictableRandomInt(USER_EMAILS.length))], opt_out: false});\n }\n delegates = unique(delegates);\n const email = `${name\n .split(' ')\n .join('.')\n .toLowerCase()}@${external ? 'not-' : ''}${USER_DOMAIN}`;\n USER_EMAILS.push(email);\n return {\n id,\n name,\n first_name: name.split(' ')[0],\n last_name: name.split(' ')[1],\n email,\n phone: faker.phone.phoneNumber(),\n visitor: external,\n organisation: {\n id: organisation\n .split(' ')\n .join('.')\n .toLowerCase(),\n name: organisation\n },\n department: faker.commerce.department(),\n staff_code: padZero(Math.floor(predictableRandomInt(99999)), 5),\n delegates,\n image: faker.image.avatar(),\n ...override\n };\n}\n\nexport function generateMockCateringOrder(overrides: HashMap = {}, room_id: string = '', menu: HashMap = {}) {\n return {\n id: `order-${predictableRandomInt(9999_9999)}`,\n delivery_time: predictableRandomInt(6) * 5,\n location_id: room_id, // R--- could be undefined\n items: new Array(predictableRandomInt(5, 1)).fill(0).map(i => pickMenuItem(menu)),\n ...overrides\n };\n}\n\nfunction pickMenuItem(menu_map: HashMap = {}) {\n const zones = Object.keys(menu_map);\n const menu = menu_map[zones[predictableRandomInt(zones.length)]] || [];\n const category = menu[predictableRandomInt(menu.length)] || { items: [] };\n const group = { ...(category.items[predictableRandomInt(category.items.length)] || {}) };\n if (!group.package && group.items?.length) {\n const item = { ...group.items[predictableRandomInt(group.items.length)] };\n item.amount = predictableRandomInt(5, 1);\n return item;\n }\n group.amount = predictableRandomInt(5, 1);\n return group;\n}\n\nexport function generateMockLocation(overrides: HashMap, fixed_locations: string[], maps: string[]): HashMap {\n const fixed = predictableRandomInt(999_999_999) % 2 === 0;\n if (fixed && (!overrides || overrides.fixed)) {\n return {\n map_id: fixed_locations[predictableRandomInt(fixed_locations.length)],\n level: maps[predictableRandomInt(maps.length)],\n ...overrides\n };\n } else {\n return {\n x: predictableRandomInt(900, 100),\n x_max: 1000,\n y: predictableRandomInt(500, 100),\n level: maps[predictableRandomInt(maps.length)],\n confidence: predictableRandomInt(30),\n ...overrides\n };\n }\n}\n\nlet ORG_COUNT = 0;\n\nexport function generateMockOrganisation(): HashMap {\n const buildings = Array(3).fill(0).map(i => generateMockBuilding());\n return {\n id: `zone_org-${ORG_COUNT++}`,\n name: `Organisation ${ORG_COUNT}`,\n buildings,\n settings: {\n discovery_info: {\n buildings\n },\n test: {\n nested: {\n org: true\n }\n }\n }\n };\n}\n\n\nexport const generateMockBuildingSetByCity = () => {\n const buildings: Building[] = Array(10).fill(0)\n .map(() => new Building(generateMockBuilding()));\n buildings.push(...Array(2).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'Auckland'\n },\n city: 'Auckland'\n }))));\n buildings.push(...Array(5).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'NYC'\n },\n city: 'NYC'\n }))));\n return buildings;\n};\n\nexport function generateMockModalData(data: HashMap = null) : HashMap {\n if (data) {\n return data;\n }\n return {\n pendingDate: new Date(1603087100 + (1000 * 60 * 15)),\n pendingDuration: 60,\n date: 1603087100,\n duration: 30,\n }\n}\n\nexport const mockDateToBuildingTz = (date?: number) =>{\n return new DateTZ({date, building_tz: 'America/Chicago', is_local_tz: false})\n}","export * from './user.class'\nexport * from './user.utilities'\nexport * from './users.service'\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { MapLocation } from '../location';\nimport { ServiceManager } from '../service-manager.class';\n\nexport class User extends BaseDataClass {\n \n /** Currently logged in user */\n public static get active_user(): User {\n const service = ServiceManager.serviceFor(User);\n return service ? service.current : null;\n }\n\n /** First name of the user */\n public readonly first_name: string;\n /** Last name of the user */\n public readonly last_name: string;\n /** Windows user ID */\n public readonly windows_id: string;\n /** FMNO */\n public readonly fmno: string;\n /** Type of user */\n public readonly type: 'partner' | 'external' | 'internal';\n /** Contact phone number of the user */\n public readonly phone: string;\n /** Organisational department the user is part of */\n public readonly business_unit: string;\n /** Whether user is external from the application's organisation */\n public readonly external: boolean;\n /** Whether user is a visitor */\n public readonly visitor: boolean;\n /** Organisational Identifier for the user */\n public readonly staff_code: string;\n /** Basic location descriptor for the user */\n public readonly location: string;\n /** List of users that this user can act on behalf */\n public readonly delegates: readonly {email: string, opt_out: boolean}[];\n /** URL of the user's avatar image */\n public readonly image: string;\n /** List of user groups associated with this user */\n public readonly groups: readonly string[];\n /** Organisation the user is associated with */\n private _organisation: Identity;\n\n /** Map location of the user */\n private _location: MapLocation;\n /** List of desk bookings */\n // private _desk_bookings: HashMap = {}; // R--- can't explain why this is here.\n /** Host/Organisawe email notification opt out/in setting */\n public opt_out: boolean;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this.first_name = raw_data.first_name || '';\n this.last_name = raw_data.last_name || '';\n this.windows_id = raw_data.email || '';\n this.fmno = raw_data.fmno;\n this.external = raw_data.external || false;\n this.visitor = raw_data.visitor || false;\n\n\n this.type = this.visitor ? 'external' : 'internal';\n this.phone = raw_data.phone || raw_data.mobile || '';\n this.business_unit = raw_data.business_unit || raw_data.department || '';\n this._organisation = raw_data.organisation || {\n id: raw_data.organisation_id,\n name: raw_data.organisation_name\n };\n\n this._location = null;\n this.image = raw_data.image || '';\n this.staff_code = raw_data.staff_code || raw_data.fmno || '';\n this.delegates = raw_data.delegates || [];\n this._location = new MapLocation(\n raw_data.location && raw_data.location instanceof Object\n ? raw_data.location\n : { name: raw_data.location }\n );\n this.groups = raw_data.groups || [];\n this.location = raw_data.location || raw_data.officeLocation || '';\n this.opt_out = raw_data.opt_out;\n }\n\n /** Organisation the user is associated with */\n public get organisation() {\n return this._organisation;\n }\n\n /** Map location of the user */\n public get last_location(): MapLocation {\n return new MapLocation(this._location || {});\n }\n\n /**\n * Ask the server for the users current location\n */\n public locate(): Promise {\n const service: any = ServiceManager.serviceFor(MapLocation);\n return new Promise((resolve, reject) => {\n if (service) {\n service.show(this.id, { desk: this.email }).then(\n l => {\n this._location = l;\n resolve(l);\n },\n e => reject(e)\n );\n } else {\n resolve(null);\n }\n });\n }\n\n /**\n * Whether user is available during the given period\n * @param start Start time as a unix timestamp with milliseconds\n * @param end End time as a unix timestamp with milliseconds\n */\n public available(start?: number, end?: number): Promise {\n return new Promise(resolve => {\n this._service.query({ email: this.email, start, end }).then(\n l => resolve(l && l.length > 0),\n _ => resolve(false)\n );\n });\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): User {\n return new User(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): User {\n return new User({ ...this, id: null, email: null });\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: User): HashMap {\n const data = super.toJSON();\n delete data.location;\n return data;\n }\n}\n\n// R--- Might need an toApiJSON due to visitor field.","import {\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { HashMap } from '@mckinsey-converge/base';\nimport { User } from './user.class';\n\n/**\n * Generate form fields for the given user\n * @param user User to generate form for\n */\nexport function generateUserForm(user: User): FormGroup {\n if (!user) {\n throw Error('No user passed');\n }\n const fields: HashMap = {\n id: new FormControl(user.id || ''),\n name: new FormControl(user.name || ''),\n first_name: new FormControl(user.first_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n last_name: new FormControl(user.last_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n email: new FormControl(user.email || '', [Validators.email])\n };\n // Generate form group for booking item\n return new FormGroup(fields);\n}\n","import { Injectable } from '@angular/core';\nimport { Location } from '@angular/common';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { Md5 } from 'ts-md5/dist/md5';\n\nimport { BaseAPIService } from '../base.service';\nimport { User } from './user.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ILoginOptions {\n /** URL to post login request to */\n url?: string;\n /** Whether form data is passed in the body of the request */\n form?: boolean;\n /** Custom headers to pass into the post request */\n headers?: HashMap;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n protected uhttp: HttpClient,\n protected location: Location,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(User, this);\n this._name = 'Users';\n this._api_route = 'users';\n this._compare = (a, b) => !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this.set('list', []);\n this.set('current_user', new User({ id: 'local_user', name: 'Local User' }));\n this.set('delegates', null);\n this._composer.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /** Currently logged in user */\n public get current(): User {\n return this.get('current_user');\n }\n\n /** Whether the user has properly logged in */\n public get is_logged_in(): boolean {\n return this.current && this.current.id !== 'local_user';\n }\n\n /* istanbul ignore next */\n /**\n * Sets the access token and expiry for the user\n * @param token OAuth bearer token\n * @param expiry Expiry epoch timestamp in ms\n * @param reload Whether to reload the page after setting tokens\n */\n public setToken(token: string, expiry?: number, reload: boolean = true) {\n if (!expiry) {\n const now = DateNow(new Date())\n expiry = now.addValue({ days: 7 }).endOfValue('day').ms;\n }\n const path = `${location.origin}${\n this._service.setting('composer.route') || ''\n }/oauth-resp.html`;\n const client_id = Md5.hashStr(path);\n if (sessionStorage) {\n sessionStorage.setItem(`${client_id}_access_token`, token);\n sessionStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (localStorage) {\n localStorage.setItem(`${client_id}_access_token`, token);\n localStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (reload) {\n this.location.go(this.location.path());\n }\n return path;\n }\n\n /**\n * Post login request to the API\n * @param query_params Key value pairs to pass into\n * @param options Options for the login request\n */\n public async login(query_params: HashMap, options: ILoginOptions = {}): Promise {\n if (this.settingsService.concierge) {\n if (!this._promises['login']) {\n this._promises['login'] = new Promise((resolve, reject) => {\n this.set('status', 'loading');\n let headers = new HttpHeaders();\n if (!options || options.form !== false) {\n headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');\n }\n const url = (options ? options.url : '') || '/auth/signin';\n this.uhttp.post(url, query_params, { headers }).subscribe(\n (_) => null,\n (e) => reject(e),\n () => {\n this._composer.auth.authorise();\n resolve();\n }\n );\n });\n }\n return this._promises['login'];\n }\n }\n\n\n /**\n * Logout of user and redirect to logout URL\n */\n public logout() {\n this._composer.auth.logout();\n }\n\n /**\n * Loads current user from API. This diverges from {@link load} in order to simply return\n * the user object instead of setting it on the service.\n */\n public async loadCurrentUser(): Promise {\n return this.show('current')\n }\n\n /**\n * Load initial data for the service\n */\n protected load(tries: number = 0): Promise {\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.user = { message: 'Loading user credentials', state: 'loading' };\n this._service.set('loading', loading);\n this.set('status', 'loading');\n return new Promise((resolve) => {\n // this is due to unclear nature of the merge between concierge and staff\n // concierge has the retries enabled, while staff continuously retries.\n if (this.settingsService.concierge && tries > 4) {\n this.set('status', 'invalid');\n loading.user = { message: 'Loading user credentials', state: 'failed' };\n this._service.set('loading', loading);\n return resolve();\n }\n this.show('current').then(\n async (current_user) => {\n this.set('status', 'available');\n this.set('current_user', current_user);\n this._initialised.next(true);\n if (this._service && this._service.setting('app.user.grab_api_details')) {\n this.show(current_user.email).then(\n async (user) => {\n this.set('current_user', user);\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = {\n message: 'Loading user credentials',\n state: 'complete'\n };\n this._service.set('loading', loading);\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n } else {\n \n // is after process\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => current_user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = { message: 'Loading user credentials', state: 'complete' };\n this._service.set('loading', loading);\n }\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n });\n }\n\n private async loadDelegates() {\n const delegates = this.current.delegates;\n if (!delegates || !delegates.length) {\n return [];\n }\n const promises: Promise[] = [];\n for (const del of delegates) {\n promises.push(this.show(del.email));\n }\n const list = await Promise.all(promises);\n this.set('delegates', list);\n this.set('list', unique((this.get('list') || []).concat(list)));\n return list;\n }\n\n /**\n * Convert raw API data into a valid User Object\n * @param raw_item Raw API data\n */\n protected process(raw_data: any): User {\n return new User(raw_data);\n }\n}","import { AbstractControl } from '@angular/forms';\n\nimport { User } from './users';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\nconst HAS_ERROR = true;\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n */\nexport function buildValidateDate(date?: number) {\n const from = new DateTZ({ date });\n return (c) => validateDate(c, date);\n}\n\n/**\n * Check that control value is a date that is the same or after from date\n * @param control Angular form control\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateDate(control: AbstractControl, is_from?: number) {\n const from = new DateTZ({date: is_from})\n const date = new DateTZ({date: control.value})\n return date.isBeforeDate(from) ? { date: HAS_ERROR, message: 'Booking needs to be made in the future' } : null;\n}\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function buildValidateStartTime(date: number, is_from?: number) {\n const from = new DateTZ({date: is_from})\n return (c) => validateStartTime(c, date, from.ms);\n}\n\n/**\n * Check that control value time is after the comparison date time\n * @param control Angular form control\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateStartTime(control: AbstractControl, date: number, is_from?: number) {\n const now = new DateTZ({date: is_from});\n const parts = control.value.split(':');\n const date_obj = new DateTZ({date});\n return date_obj.setValue({ hour: +parts[0], minute: +parts[1] }).isBeforeDate(now) ? {\n start: HAS_ERROR,\n message: 'Booking time needs to be made in the future'\n } : null;\n}\n\nexport function buildValidateDuration(min: number = 30, max: number = 240) {\n return (c) => validateDuration(c, min, max);\n}\n\nexport function validateDuration(control: AbstractControl, min: number = 30, max: number = 240) {\n if (control.value < (min || 30)) {\n return { duration: HAS_ERROR, message: `Minimum booking duration is ${min} minute${min === 1 ? 's' : ''}` };\n } else if (control.value > (max || 480)) {\n return { length: HAS_ERROR, message: `Maximum booking duration is ${max} minute${max === 1 ? 's' : ''}` };\n }\n return null;\n}\n\nexport function buildValidateAttendees(host: User, min: number = 0) {\n return (c) => validateAttendees(c, host, min);\n}\n\nexport function validateAttendees(control: AbstractControl, host: User, min: number = 0) {\n if (!control || !(control.value instanceof Array)) {\n return min > 0\n ? { invalid: true, message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you` }\n : null;\n }\n const list: User[] = control.value;\n if (host) {\n const result = list.find(a => a.email === host.email);\n if (result) {\n list.splice(list.indexOf(result), 1);\n }\n }\n return list.length >= min ? null : {\n count: true,\n message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you`\n };\n}\n\nexport function validateEndTime(dateControlTz: AbstractControl) {\n return (control: AbstractControl) => {\n // const date = new DateTZ({date: date_control ? date_control.value : undefined})\n const now = DateNow(new Date())\n return dateControlTz.value.addValue({ minutes: control.value || 60 }).isBeforeDate(now)? { end_time: true } : null;\n };\n}\n\nexport function noWhitespaceValidator(control: AbstractControl) {\n const value = control?.value;\n if ( value === '') {\n return null; // Return null if control value is undefined or null\n }\n const isWhitespace = value.trim().length === 0;\n // const isValid = !isWhitespace;\n return !isWhitespace ? null : { whitespace: true };\n}\n\n","export * from './lib/date-tz.class'","import { DateObjectUnits, DateTime, DateTimeUnit, DurationLike, DurationUnits } from 'luxon';\nimport { getTimezoneOffset } from 'date-fns-tz';\n\nfunction padZero(value: number, length: number): string {\n let str = `${value}`;\n while (str.length < length) str = `0${str}`;\n return str;\n}\n\ninterface DateTZParams {\n date?: number | DateTime\n building_tz?: string\n is_local_tz?: boolean\n all_day?: boolean\n}\n\nconst now = new Date()\n\nexport class DateTZ {\n date: DateTime\n date_org: DateTime\n building_tz: string\n is_local_tz: boolean = true\n all_day: boolean\n local_tz: string\n valid: boolean\n\n constructor(data?: DateTZParams) { \n this.date_org = typeof data?.date === 'number' ? DateTime.fromMillis(data?.date) : data?.date ? data?.date : DateTime.fromMillis(now.valueOf())\n this.is_local_tz = data?.is_local_tz === false ? data?.is_local_tz : true\n this.all_day = data?.all_day || false\n this.local_tz = DateTime.now().zoneName\n this.building_tz = data?.building_tz || this.local_tz\n this.date = !this.is_local_tz ? this.date_org.setZone(this.building_tz) : this.date_org\n this.valid = this.date.isValid\n }\n\n //get epoch milliseconds\n public get ms(): number {\n return this.date.valueOf()\n }\n\n //get epoch seconds\n public get seconds(): number {\n return Math.trunc(this.date.toSeconds())\n }\n\n //get the second of the minute\n public get second(): number {\n return this.date.second\n }\n\n //get the minutes of the hour\n public get minutes(): number {\n return this.date.minute\n }\n\n //get the minutes of the hour\n public get hours(): number {\n return this.date.hour\n }\n\n public get utc(): number {\n const newDate = new DateTZ({...this, date: this.date.toUTC()})\n return newDate.seconds\n }\n\n public get dateDay(): number {\n return this.date.day\n }\n\n public get dateHour(): number {\n return this.date.hour\n }\n\n public get dateYear(): number {\n return this.date.year\n }\n\n public get dateWeekday(): number {\n try {\n return this.date.weekday;\n } catch (e) {\n return this.date.toJSDate().getDay();\n }\n }\n\n public get dateMonth(): number {\n return this.date.month\n }\n\n public dateDiff (compare_to: DateTZ, unit: DurationUnits, ans_unit = 'minutes'): number {\n return this.date.diff(compare_to.date, unit)[ans_unit]\n }\n\n //set the date to the begining of the given unit\n public startOfValue (unit: DateTimeUnit) {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 7) {\n // Don't change, we want sunday as the start of the week even though luxon thinks it is Monday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 1) {\n // If this.date is monday, just subtract one more day to make it Sunday\n const monday = new DateTZ({ ...this, date: this.date })\n newDate = monday.subtractValue({ days: 1 });\n } else {\n // If later than monday, startOfWeek back to monday and then subtact another day to get to Sunday.\n const monday = new DateTZ({...this, date: this.date.startOf(unit)})\n newDate = monday.subtractValue({ days: 1 })\n }\n }\n\n return newDate\n }\n\n //set the date to the end of the given unit\n public endOfValue (unit: DateTimeUnit) : DateTZ {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 6) {\n // Don't change, we want saturday as the end of the week even though luxon thinks it is Sunday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 7) {\n // If this.date is Sunday, this alone is the luxon end of week so add a day\n // to get to monday, then endOfWeek to Sunday, and subtract 1 day to Saturday\n const sunday = new DateTZ({ ...this, date: this.date }).addValue({ days: 1 })\n newDate = sunday.endOfValue(unit).subtractValue({ days: 1 }); // return next saturday\n } else {\n // If not saturday or sunday\n // endOfWeek to Sunday and then subtact a day to get to Saturday.\n const later = new DateTZ({...this, date: this.date.endOf(unit)})\n newDate = later.subtractValue({ days: 1 })\n }\n } else {\n newDate = new DateTZ({...this, date: this.date.endOf(unit)})\n }\n\n return newDate\n }\n \n public startEpoch (): number {\n const org = new DateTZ({date: this.date_org})\n return this.all_day\n ? this.startOfValue('day').ms - this.dateDiff(org, 'minutes')\n : this.ms\n }\n\n //clone the given value and unit to the date\n public clone (): DateTZ {\n // return new DateTZ({...this})\n return this.addValue({ seconds: 0 })\n }\n\n //adds the given value and unit to the date\n public addValue (duration: DurationLike, isLastDayOfMonth?: boolean): DateTZ {\n return new DateTZ({...this, date: isLastDayOfMonth ? this.date.plus(duration).endOf('month') : this.date.plus(duration)});\n }\n\n //subtracts the given value and unit to the date\n public subtractValue (duration: DurationLike): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.minus(duration)})\n return newDate\n }\n\n public setValue (obj: DateObjectUnits): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.set(obj)})\n return newDate\n }\n\n public formatDate (format: string): string {\n // Return new immuatable via \"plus\" to prevent \n // TypeError: Cannot assign to read only property 'weekData' of object\n // https://github.com/moment/luxon/issues/601\n return this.date.plus({ seconds: 0 }).toFormat(format)\n }\n\n public formatLocalDate (format: string): string {\n // setZone already returns new immutable so it doesn't have the formatDate issue.\n return this.date.plus({ seconds: 0 }).setZone(this.local_tz).toFormat(format)\n }\n\n public isSameDate(compare_to: DateTZ, value: DateTimeUnit): boolean {\n return this.date.hasSame(compare_to.date, value)\n }\n\n public isAfterDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear > compare_to.dateYear\n case 'month':\n if(this.isAfterDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth > compare_to.dateMonth\n }\n case 'day':\n if(this.isAfterDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay > compare_to.dateDay\n }\n case 'hour':\n if(this.isAfterDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour > compare_to.dateHour\n }\n case 'minute':\n if(this.isAfterDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes > compare_to.minutes\n }\n default:\n return this.ms > compare_to.ms;\n }\n }\n\n public isBeforeDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear < compare_to.dateYear\n case 'month':\n if(this.isBeforeDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth < compare_to.dateMonth\n }\n case 'day':\n if(this.isBeforeDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay < compare_to.dateDay\n }\n case 'hour':\n if(this.isBeforeDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour < compare_to.dateHour\n }\n case 'minute':\n if(this.isBeforeDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes < compare_to.minutes\n }\n default:\n return this.ms < compare_to.ms;\n }\n }\n\n public toZone(tz: string): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: this.date.setZone(tz), \n building_tz: tz, \n is_local_tz: false\n })\n return newDate\n }\n\n public setTimestamp(timestamp: number): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: timestamp,\n })\n return newDate\n }\n\n public get JSDate(): Date {\n return this.date.toJSDate()\n }\n\n // helper to log out the dateTZ values\n public logDateTz (label: string = ''): void {\n console.log(`${label} local tz/date/time`, this.addValue({ seconds: 0 }).formatLocalDate(\"cccc d MMMM,yyyy h:mma\"), this.local_tz)\n console.log(`${label} building tz/date/time`, this.addValue({ seconds: 0 }).formatDate(\"cccc d MMMM,yyyy h:mma\"), this.building_tz)\n }\n}\n\nexport const DateNow = (date: Date = new Date()) => {\n return new DateTZ({date: date.valueOf()})\n} \n\n// input the local time and the building timezone\nexport const convertLocalTimestampToTimezonedDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const date = new Date(timestamp);\n return new DateTZ({ date: timestamp, building_tz: buildingTimezone, is_local_tz: false }).setValue({\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes()\n });\n}\n\n// input the building time and the building timezone\nexport const convertTimezonedTimestampToLocalDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const local_tz = DateTime.now().zoneName;\n const localOffset = getTimezoneOffset(local_tz, new Date(timestamp));\n const desiredOffset = getTimezoneOffset(buildingTimezone, new Date(timestamp));\n if (localOffset > desiredOffset) {\n const eleA = timestamp + (localOffset - desiredOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n } else {\n const eleA = timestamp + (desiredOffset - localOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n }\n}\n\nexport const localTimezone = () => {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n}\n\nexport const getTimezoneOffsetString = (tz: string) => {\n const offset_minutes = Math.floor(getTimezoneOffset(tz) / 1000 / 60);\n const hours = Math.floor(offset_minutes/60);\n const minutes = offset_minutes % 60;\n return `${offset_minutes > 0 ? '+' : '-'}${padZero(Math.abs(hours), 2)}${padZero(minutes, 2)}`;\n}\n\nexport function toMiddayUTC(value: DateTZ = DateNow()) {\n // exclude Auckland from rouding up timezone as it has 12+ hours UTC timezone difference\n return value.building_tz.includes('Auckland') ? value : new DateTZ({\n date: value.setValue({ hour: 12, minute: 0 }).ms,\n is_local_tz: false,\n building_tz: 'UTC',\n }).setValue({ hour: 12, minute: 0 });\n}\n\n/**returns the offset between two timezones in minutes and hours */\nexport function timezoneOffset(tz: string){\n const nowTz = DateNow(new Date())\n const offset = nowTz.date.offset - nowTz.toZone(tz).date.offset\n return {minutes: offset, hours: offset/60}\n}\n\nexport function isToday (date, timezone) {\n\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: timezone\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: timezone,\n }),\n 'day'\n );\n}\n","export * from './lib/environment.module';\nexport * from './lib/version';\nexport * from './lib/environment.service'\nexport * from './lib/types'\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n providers: []\n})\nexport class EnvironmentModule {\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { EnvironmentData } from './types';\n\nexport const ENVIRONMENT_TOKEN = 'environments_service_data';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EnvironmentService {\n\n public get production(): boolean {\n return this.environment.production;\n }\n\n public get heap_io_id(): number {\n return this.environment.heap_io_id;\n }\n\n constructor(@Inject(ENVIRONMENT_TOKEN) private environment: EnvironmentData) {\n }\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"dirty\": false,\n \"raw\": \"f96712b73\",\n \"hash\": \"f96712b73\",\n \"distance\": null,\n \"tag\": null,\n \"semver\": null,\n \"suffix\": \"f96712b73\",\n \"semverString\": null,\n \"version\": \"0.0.0\",\n \"time\": 1733977368186\n};\n/* tslint:enable */\n","export * from './lib/legacy-overlays.module';\nexport * from './lib/space-select-modal/space-select-modal.component';\nexport * from './lib/new-user-modal/new-user-modal.component';\nexport * from './lib/confirm-modal/confirm-modal.component';\nexport * from './lib/catering-confirm-modal/catering-confirm-modal.component';\nexport * from './lib/catering-details-modal/catering-details-modal.component';\nexport * from './lib/requirement-details-modal/requirement-details-modal.component';\nexport * from './lib/booking-confirm/booking-confirm.component';\nexport * from './lib/user-form/user-form.component'\nexport * from './lib/booking-form/booking-form.component'\nexport * from './lib/no-catering-modal/no-catering-modal.component'\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport { Router } from '@angular/router';\n\nimport {\n ApplicationService,\n Booking,\n BookingsService,\n BookingStateService,\n CateringOrder,\n getFirstDateFromList,\n OrganisationService,\n rulesForSpace,\n recurrenceDetails,\n SeriesAction,\n SettingsService,\n Space,\n SpacesService,\n User,\n UsersService,\n formatWhen,\n BOOKING_STATUS,\n CloseDialogService,\n DialogIds\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent,\n HashMap,\n humaniseDuration\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ConflictsModalComponent, ConflictsModalComponentData } from '@mckinsey-converge/ui';\n\n\nexport interface BookingConfirmModalData {\n old_booking: Booking;\n booking: Booking;\n action?: SeriesAction\n}\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n\n@Component({\n selector: 'a-booking-confirm-modal',\n templateUrl: './booking-confirm.component.html',\n styleUrls: ['./booking-confirm.component.scss']\n})\nexport class BookingConfirmComponent extends BaseDirective implements OnInit{\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for changes are being processed */\n public loading: string;\n /** Whether space availability is being checked */\n public checking_available: boolean;\n /** Whether to show all attendees */\n public show_attendees: boolean = false;\n /** Whether to show all locations */\n public show_locations: boolean;\n /** Whether to show all catering orders */\n public show_orders: boolean;\n /** Whether booking has succeeded */\n public success: boolean;\n /** Whether booking needs to be accepted */\n public readonly is_request: boolean;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n lastMomentConflict: boolean = false;\n \n @ViewChild('attendeesListRef') attendeesListRef: ElementRef;\n @ViewChild('locationsListRef') locationsListRef: ElementRef;\n @ViewChild('cateringListRef') cateringListRef: ElementRef;\n\n /** Booking to confirm changes to */\n public get old_booking(): Booking {\n return this._data.old_booking;\n }\n\n /** Booking to confirm changes to */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Active user */\n public get user(): User {\n return this._users.current;\n }\n\n /** Title of the displayed event */\n public get title(): string {\n return this.booking.title;\n }\n\n /** Comapny names */\n public get company(): string[] {\n return this.booking.company;\n }\n \n\n /** Display string of when the event will occur */\n public get when(): string {\n const duration_value = this.booking.duration;\n const all_day = this.booking.all_day && duration_value < 25 * 60;\n if(this.booking.is_recurrent && this.booking.recurrence_starts && this.booking.recurrence_starts.length){\n return formatWhen({all_day, ...this.recurrenceDates })\n }\n return formatWhen({\n all_day,\n startTZ: this.booking.startDateTz,\n endTZ: this.booking.endDateTz,\n displayEndTZ: this.booking.displayEndDateTz})\n }\n\n public get recurrenceDates(){\n const startTZ = getFirstDateFromList(this.booking.recurrence_starts)\n const endTZ = startTZ.addValue({minutes: this.booking.duration})\n return {startTZ, endTZ, displayEndTZ: endTZ}\n }\n\n /** Display string for the recurrence value of the booking */\n public get recurrence(): string {\n return recurrenceDetails({\n period: this.booking.recurrence_period,\n end: this.booking.recurrence_endTz,\n list: this.booking.recurrence_starts,\n interval: this.booking.recurrence_interval\n });\n }\n\n /** Display string for the event's duration */\n public get duration(): string {\n const duration_value = this.booking.duration;\n return this.booking.all_day ? 'All Day' : humaniseDuration(duration_value);\n }\n\n /** List of spaces associated with the event */\n public get spaces(): Space[] {\n return this.booking.multi_rooms;\n }\n\n /** List of attendees associated with the event not including the host */\n public get attendees(): User[] {\n const attendees = this.booking.attendees;\n return attendees.filter((i) => i.email !== this.organiser.email);\n }\n\n /** Host of the event */\n public get organiser(): User {\n return this.booking.organiser || this._users.current;\n }\n\n /** Host of the event */\n public get equipment_codes(): HashMap {\n return this.booking.equipment_codes || {};\n }\n\n /** Host of the event */\n public get catering_codes(): HashMap {\n const catering = this.catering;\n const codes = {};\n for (const order of this.catering) {\n codes[order.location_id] = order.charge_code;\n }\n return codes;\n }\n\n /** Host of the event */\n public get equipment_notes(): HashMap {\n return this.booking.notes\n .filter((note) => note.type === 'equipment')\n .reduce((map, notes) => {\n map[notes.space] = notes.message;\n return map;\n }, {});\n }\n\n /** Details about the event */\n public get notes(): string {\n return this.booking.body;\n }\n\n /** List of catering orders in the booking */\n public get catering(): CateringOrder[] {\n return (this.booking.catering || []).map((order) => {\n const space: any = this.spaces.find(\n (a_space) => a_space.email === order.location_id\n ) || {\n level: {}\n };\n const building: any =\n this._org.buildings.find((bld) => bld.id === space.level.building_id) || {};\n return new CateringOrder({\n ...order,\n location: space.local_name,\n symbol: building.currency,\n booking_date: this.booking.startDateTz.ms,\n booking_timezone: this.booking.timezone,\n });\n });\n }\n\n /** Map of changes to the booking */\n public get changes(): HashMap {\n return {};\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _org: OrganisationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private _router: Router,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingConfirmModalData,\n public settings: SettingsService,\n private closeDialogService: CloseDialogService, \n private renderer: Renderer2,\n ) {\n super();\n this.booking.time_changed =\n this.old_booking &&\n (this.old_booking.startDateTz.ms !== this.booking.startDateTz.ms ||\n this.old_booking.duration !== this.booking.duration);\n // in concierge, all bookings are acceptable without explicit approval.\n\n const rules = rulesForSpace({ user: this.user, space: this.booking.room, duration: 60 });\n this.is_request = this.settings.concierge ? false : rules.auto_approve;\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined; \n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && (booker_concierge !== null && booker_concierge !==undefined ) && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && (booker_concierge['email'] && organiser.email !==booker_concierge['email']) ) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n /**\n * Save booking changes\n */\n public saveChanges() {\n this.loading = 'Checking availability of selected spaces';\n this._dialog_ref.disableClose = true;\n this.checkSpaceAvailability().then(\n () => {\n this.loading = 'Processing booking request...';\n // Change the unchanged settings to the selected room\n const newEmail = this.booking.space.email;\n const replaceObjects = ['setup', 'breakdown', 'approval_status']\n replaceObjects.forEach(key => {\n const obj = this.booking[key];\n if (obj && obj.constructor === Object) {\n const keys = Object.keys(obj);\n if (keys.length > 0) {\n const replacement = {};\n keys.forEach(nk => {\n replacement[newEmail] = obj[nk];\n })\n this.booking[key] = replacement;\n }\n }\n });\n\n const buffer = {};\n this.booking.multi_rooms.map(room => room.email).forEach(elem => buffer[elem] = 900);\n\n // // if no setup or breakdown time already added and notes or catering exist? add 15 min buffer setup and breakdown to booking\n // if(this.booking.setup === null || this.booking.breakdown === null){\n // const has_note_buffer = (this.booking.notes && this.booking.notes?.length) || (this.booking.catering && this.booking.catering?.length) ? \n // buffer : null; // 900 seconds = 15 min\n // if (has_note_buffer) {\n // this.booking.setup = has_note_buffer;\n // this.booking.breakdown = has_note_buffer; \n // this.booking.room_setup = has_note_buffer; \n // this.booking.room_breakdown = has_note_buffer; \n // }\n // }\n\n // if no setup time already added and notes or catering exist? add 15 min buffer setup time to booking\n if (this.booking.setup === null || this.booking.setup === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.setup = has_note_buffer;\n this.booking.room_setup = has_note_buffer;\n }\n }\n\n // if no breakdown time already added and notes or catering exist? add 15 min buffer breakdown time to booking\n if (this.booking.breakdown === null || this.booking.breakdown === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.breakdown = has_note_buffer;\n this.booking.room_breakdown = has_note_buffer;\n }\n }\n\n\n this._bookings.save(this.booking, this._data.action === SeriesAction.EDIT).then(\n async (bkn) => {\n this.loading = null;\n this.success = true;\n this._dialog_ref.disableClose = false;\n const updated = new Booking({ ...this.booking, ...bkn.toApiJSON() });\n this._booking_state_service.replace(updated);\n \n /**\n * update the master booking in case of recurring to have latest updated in the system\n */\n if(updated.recurrence_master_id !== null)\n { \n const master_booking = await this._bookings.show(updated.recurrence_master_id);\n this._booking_state_service.replace(master_booking);\n }\n\n if (bkn.is_recurrent && bkn.recurrence_type === 'master') {\n this._booking_state_service.pollOnce();\n this.closeDialogService.closeDialog(DialogIds.MeetingDetails);\n }\n\n localStorage.removeItem('ACA_STAFF.booking_form_data');\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess(\n `Successfully ${this.booking.id ? 'updated' : 'created'} booking`\n );\n },\n (err) => {\n\n this._dialog_ref.disableClose = false;\n let erroMessage: string = '';\n switch(err.status){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 400:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.lastMomentConflict = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n },\n (err) => {\n\n this.lastMomentConflict = true;\n this._dialog_ref.disableClose = false;\n const erroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n }\n\n /**\n * Staff only\n */\n public newBooking() {\n this._router.navigate(['/book', 'spaces']);\n this._dialog_ref.close();\n }\n\n /**\n * Staff only\n */\n public toSchedule() {\n this._router.navigate(['/schedule'], {\n queryParams: { email: this.booking.organiser.email }\n });\n this._dialog_ref.close();\n }\n\n /**\n * Check whether the selected spaces are available for the selected time period\n */\n public checkSpaceAvailability(): Promise {\n const spaces: Space[] = this.spaces;\n if (\n (this.booking.id &&\n (this.booking.startDateTz.ms === this.old_booking.startDateTz.ms &&\n this.booking.duration === this.old_booking.duration)) ||\n (spaces && spaces.length <= 0)\n ) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n // Use of this.booking.timezone is unreliable, use booking space instead.\n const all_day = this.booking.all_day;\n // R--- should be nothing to do with date as a timestamp getter\n this._spaces\n .available({\n room_ids: spaces.map((space) => space.id).join(','),\n dateTz: this.booking.startDateTz,\n duration: all_day ? 24 * 60 : this.booking.duration,\n ignore: this.booking.icaluid,\n recurrence_count: this.booking.recurrence_count,\n recurrence_period: this.booking.recurrence_period,\n recurrence_endTz: this.booking.recurrence_endTz,\n recurrence_interval: this.booking.recurrence_interval,\n recurrence_starts: this.booking.recurrence_starts,\n is_recurrent: this.booking.is_recurrent,\n recurrence_days: this.booking.recurrence_days\n })\n .then(\n (space_list) => {\n for (const space of space_list) {\n if (!space.bookable) {\n this.lastMomentConflict = true;\n return reject(\n `${space.name} is not available at the select time period.`\n );\n }\n }\n if (space_list.length < spaces.length) {\n this.lastMomentConflict = true;\n return reject(\n `${spaces[0].name} is not available at the select time period.`\n );\n }\n resolve();\n },\n (err) => reject(err)\n );\n });\n }\n\n public openConflictsModal(){\n const ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.booking.local_room_name,\n conflicts: this.booking.recurrence_exceptions,\n copy_conflicts: true,\n timezone: this.booking.timezone\n }\n });\n\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(event.reason === 'close'){\n ref.close();\n }else if(event.reason === 'action'){\n navigator.clipboard.writeText(this.conflictsText)\n }\n \n })\n );\n ref.afterClosed().subscribe(() => this.unsub('modal_events'));\n }\n\n public get conflictsText(){\n let text = ''\n this.booking.recurrence_exceptions.map((date)=>{\n const dateTZ = new DateTZ({date: date*1000});\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n text = `${text}\\n${display}${dateTZ.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n })\n return text\n }\n\n public toggleList(listType: 'attendees' | 'locations' | 'catering') {\n if (listType === 'attendees') {\n this.show_attendees ? this.collapseList(this.attendeesListRef) : this.expandList(this.attendeesListRef);\n this.show_attendees = !this.show_attendees;\n } else if (listType === 'locations') {\n this.show_locations ? this.collapseList(this.locationsListRef) : this.expandList(this.locationsListRef);\n this.show_locations = !this.show_locations;\n } else if (listType === 'catering') {\n this.show_orders ? this.collapseList(this.cateringListRef) : this.expandList(this.cateringListRef);\n this.show_orders = !this.show_orders;\n }\n }\n\n public expandList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n const listItems = listElement.getElementsByClassName('list-item');\n let totalHeight = 0;\n\n for (let i = 0; i < listItems.length; i++) {\n totalHeight += listItems[i].offsetHeight;\n }\n\n this.renderer.setStyle(listElement, 'max-height', `${totalHeight}px`);\n this.renderer.addClass(listElement, 'shown');\n }\n\n public collapseList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n this.renderer.setStyle(listElement, 'max-height', '4.5em');\n this.renderer.removeClass(listElement, 'shown');\n }\n}\n","\n
\n \n
\n \n
\n Booking Details\n Confirmed!\n Requested!\n
\n
Please await confirmation of room
\n
\n
\n \n
{{ title || 'No title' }}
\n
\n
\n \n
{{ when }}
\n
\n
\n \n
{{ recurrence }}
\n 0\"\n (click)=\"openConflictsModal()\"\n >\n Conflicts\n
\n \n
\n \n
{{ duration }}
\n
\n
\n Locations({{ spaces.length || '0' }})*:\n
\n
\n
\n
{{ item?.local_name }}
\n \n Notes\n
\n \n Code\n
\n
\n
No Locations
\n
\n 1\"\n (click)=\"toggleList('locations')\"\n >\n {{ show_locations ? 'Hide' : 'Show more' }} Locations\n \n \n \n
\n \n
{{ organiser?.name || organiser?.email }}
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n
\n\n
\n \n \n \n \n
\n
\n\n
\n
\n
\n \n
\n
\n {{ loading }}\n
\n
\n
\n
\n\n \n \n \n
My Day\n \n\n","import {\n Component,\n Input,\n OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Output, EventEmitter \n} from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { distinctUntilChanged, first, skip } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n arrayWithValues,\n BookingAction,\n CateringOrder,\n SeriesAction,\n SettingsService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\n\nimport { NewUserModalComponent } from '../new-user-modal/new-user-modal.component';\nimport {\n SpaceSelectModalComponent,\n SpaceSelectModalData\n} from '../space-select-modal/space-select-modal.component';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\nimport { MatChipsModule} from '@angular/material/chips';\n\n\n@Component({\n selector: 'a-booking-form',\n templateUrl: './booking-form.component.html',\n styleUrls: ['./booking-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BookingFormComponent extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** List of available users to host bookings */\n public user_list: User[] = [];\n public nowTz: DateTZ = DateNow(new Date());\n /** From date input for date field */\n public fromDateTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n /** Last bookable date, concierge only */\n public readonly untilDateTz = DateNow(new Date()).addValue({ days: 365 }).endOfValue('day');\n public isConcierge: boolean;\n public localTimezone = DateNow(new Date()).building_tz;\n public localStart = \"\";\n public localEnd = \"\";\n // Define an array to store selected company options\n public chipOptions: any[] = [];\n public showTimeCateringWarning: boolean = false;\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _dialog: MatDialog,\n private settingsService: SettingsService,\n private cdRef: ChangeDetectorRef\n ) {\n super();\n this.isConcierge = this.settingsService.concierge;\n }\n\n public ngOnInit(): void {\n // Trim title \n // this.form.get('title').setValue(this.form.get('title').value.trim());\n\n this.chipOptions = [...this.form.controls.company.value];\n\n this.localTimezone = DateNow(new Date()).building_tz;\n const building_tz = (\n this.form.controls.action &&\n (\n this.form.controls.action.value === 'booking_clone' ||\n this.form.controls.action.value === 'clone' ||\n this.form.controls.action.value === 'edit' ||\n this.form.controls.action.value === 'booking_edit'\n ) &&\n this.form.controls.dateTz &&\n this.form.controls.dateTz.value\n ) ? this.form.controls.dateTz.value.building_tz : this.localTimezone;\n\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz });\n this.fromDateTz = closestToTimeSlotTz(this.nowTz, 15);\n\n this._users.initialised.pipe(first((_) => _)).subscribe(() => {\n const user: User = this._users.current;\n const delegates = user.delegates.map(\n (del) => this._users.find(del.email) || new User({ email: del.email, name: del.email.split('@')[0] })\n );\n this.user_list = [user].concat(delegates);\n });\n\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n this.subscription('formChanges', this.form.valueChanges\n .pipe(\n skip(1), // initial form changes\n distinctUntilChanged())\n .subscribe(() => {\n this.timeout('update_coachmark', () => {\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n }, 500);\n })\n );\n\n this.subscription('isRecurrentChanges', this.form.controls.is_recurrent.valueChanges\n .subscribe(() => {\n const recurrenceStarts = this.form.controls.recurrence_starts\n if(!this.form.controls.is_recurrent.value){\n recurrenceStarts.clearValidators() \n }else{\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n recurrenceStarts.setValidators(arrayValidators);\n }\n recurrenceStarts.updateValueAndValidity()\n })\n ); \n\n /**Disable Inputs */\n this.disableInputs();\n\n /**turn is_recurrent to false if editing or cloning a stand-alone/occurrence */\n if(this.form.controls.id?.value && !this.form.controls.action?.value){\n this.form.controls.is_recurrent.setValue(false)\n }\n\n // Subscribe to changes in dateTz, duration, and has_catering\n this.subscription('dateTz_changes', this.form.controls.dateTz.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n this.subscription('duration_changes', this.form.controls.duration.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // No need to subscribe to catering_changes since we're now handling has_catering\n this.subscription('has_catering_changes', this.form.controls.has_catering.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // Initial check\n this.checkTimeCateringWarning();\n}\n\n /**\n * \n * @param key : formcontrol name \n * Function trim value being submitted with only spaces/beginning/end \n */\n public trim(key: string): void {\n this.form.get(key).setValue(this.form.get(key).value.trim());\n }\n\n /** Whether notes and description should use the HTML editor */\n public get use_html(): boolean {\n return this._service.setting('app.booking.html_body') || false;\n }\n\n /** List of available types for bookings */\n public get booking_types(): Identity[] {\n return this._service.setting('app.booking.booking_types') || [];\n }\n\n /** Display string for the list of active spaces */\n public get spaces(): string {\n const spaces = this.form.controls.space_list.value;\n return spaces.length === 1\n ? spaces[0].local_name\n : spaces.length > 1\n ? `${spaces.length} spaces selected`\n : 'No Spaces selected';\n }\n\n public disableInputs() {\n const { id, action, needs_space, is_recurrent } = this.form.value;\n const has_id = !!id;\n const is_edit = action === BookingAction.EDIT;\n if (has_id) {\n this.form.get('is_recurrent')?.disable();\n }\n\n if(is_edit){\n this.form.get('is_multiroom')?.disable();\n }\n\n if (!this.isConcierge && !needs_space) {\n this.form.get('has_catering')?.disable();\n }\n if(has_id && is_edit && is_recurrent){\n this.form.get('dateTz')?.disable()\n this.form.patchValue({ action: null });\n }\n }\n\n /**\n * Open modal to change the space details for the booking\n */\n public openSpacesModal(): void {\n const ref = this._dialog.open(\n SpaceSelectModalComponent,\n {\n width: 'auto',\n height: 'auto',\n maxWidth: '95vw',\n data: {\n spaces: this.form.controls.space_list.value,\n dateTz: this.form.controls.dateTz.value,\n duration: this.form.controls.duration.value,\n host: this.form.controls.organiser.value,\n multiple: true,\n needsCatering: !!this.form.controls.catering?.value?.length,\n }\n }\n );\n this.subscription(\n 'new_spaces',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n let space_list = this.form.controls.space_list.value;\n space_list = event.metadata;\n this.form.controls.space_list.setValue(unique(space_list, 'id'));\n if (event.noCatering) {\n // Set has_catering to false and clear the catering list\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n } else {\n const catering = this.form.controls?.catering?.value.map((order: CateringOrder) => {\n order.location = space_list[0].name;\n order.location_id = space_list[0].email;\n return order;\n });\n this.form.controls.catering?.setValue(catering || []);\n }\n ref.close();\n this.unsub('new_spaces');\n }\n if (event.reason === 'close') {\n ref.close();\n this.unsub('new_spaces');\n }\n })\n );\n }\n\n /**\n * Open modal to change the recurrence details for the booking\n */\n public openNewUserModal() {\n const ref = this._dialog.open(NewUserModalComponent, {\n width: 'auto',\n height: 'auto'\n });\n this.subscription(\n 'new_user',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const attendees = this.form.controls.attendees?.value;\n attendees.push(event.metadata);\n this.form.controls.attendees.setValue(unique(attendees, 'email'));\n ref.close();\n this.unsub('new_user');\n this.cdRef.detectChanges();\n }\n })\n );\n }\n\n // Add & Remove chip and set the value of the form control accordingly\n addCompany(event, company): void {\n if (company) {\n this.chipOptions.push(company);\n this.form.controls.company.setValue(this.chipOptions);\n }\n event.preventDefault();\n }\n\n removeOption(option: any): void {\n const index = this.chipOptions.indexOf(option);\n if (index >= 0) {\n this.chipOptions.splice(index, 1);\n }\n this.form.controls.company.setValue(this.chipOptions);\n }\n\n private updateCoachmarkTimes(timezone: string) {\n if (!timezone) timezone = this.localTimezone;\n // Resolve the problem that locally I might have the same TZ offset but the names don't match.\n const localTzOffset = DateTime.now().setZone(this.localTimezone).offset;\n const buildingTzOffset = DateTime.now().setZone(timezone).offset;\n const dateTz = this.form.controls.dateTz.value;\n if (dateTz && localTzOffset !== buildingTzOffset) {\n const startDate = dateTz.clone();\n this.localStart = startDate.formatLocalDate(\"h:mma\");\n this.localEnd = startDate.addValue({ minutes: this.form.value.duration }).formatLocalDate(\"h:mma\");\n } else {\n // No location is selected so coachmark is hidden\n this.localStart = \"\";\n this.localEnd = \"\";\n }\n this.cdRef.detectChanges();\n }\n\n public get isSeriesAction(){\n return this.form.value.action === SeriesAction.CLONE || this.form.value.action === SeriesAction.EDIT\n }\n\n onToggleChange(toggledControlName: string, is_multiroom: boolean): void {\n if (toggledControlName === 'is_recurrent') {\n // If the is_recurrent toggle is being activated, deactivate is_multiroom\n if (this.form.controls.is_recurrent?.value) {\n this.form.controls.is_multiroom?.setValue(false);\n this.form.controls.merged?.setValue(false);\n this.form.get('merged')?.disable();\n\n }\n } else if (toggledControlName === 'is_multiroom') {\n // If the is_multiroom toggle is being activated, deactivate is_recurrent\n if (this.form.controls.is_multiroom?.value) {\n this.form.controls.is_recurrent?.setValue(false);\n }\n if(is_multiroom) { \n this.form.get('merged').setValue(false);\n this.form.get('merged')?.enable() \n } else {\n this.form.get('merged').setValue(false); \n this.form.get('merged')?.disable(); }\n }\n }\n \n private checkTimeCateringWarning() {\n const dateTz = this.form.controls.dateTz.value;\n const duration = this.form.controls.duration.value;\n const hasCatering = this.form.controls.has_catering?.value;\n const cateringOrders = this.form.controls.catering?.value;\n \n if (dateTz && duration && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n\n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n\n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n // Booking is outside of catering hours and has catering selected\n this.showTimeCateringWarning = true;\n } else {\n this.showTimeCateringWarning = false;\n }\n } else {\n this.showTimeCateringWarning = false;\n }\n\n // Inform Angular that the component needs to be checked\n this.cdRef.markForCheck();\n }\n\n}\n","
\n \n \n \n
\n
\n \n Title*:\n \n \n \n\n \n {{ ( form?.get('title').errors && form?.get('title').hasError('pattern')) \n ? 'Some special characters (^=`~!@#$%*{};:\\'_\\\",.\\<>) are not allowed' : 'Title is required'}} \n \n \n
\n\n
\n \n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n \n \n
\n \n
\n Duration is invalid. End time must be in the future\n
\n
\n
\n
\n Please be aware that this booking starts at {{localStart}} and ends at {{localEnd}} in your local timezone.\n
\n
\n Warning: Changing the booking time outside of catering hours will drop your catering order.\n
\n
\n
\n
\n
\n Recurring booking\n
\n \n
\n Multiroom\n
\n
\n \n
\n
Merged
\n
\n \n
\n
\n \n \n
\n \n \n \n \n \n {{ user.name || user.email }}\n \n \n \n
\n
\n \n \n \n {{ form?.get('attendees').errors?.customError }}\n \n
\n
\n \n
\n \n
\n \n
\n \n \n {{ ( form?.get('company').errors && form?.get('company').hasError('pattern'))\n ? 'Some special characters (^=`~@#$%*{};:_\\\",.\\<>) are not allowed' : ''}}\n \n
\n \n
\n \n \n {{ selected }}\n
\n
\n
\n
\n\n
1\">\n \n \n \n \n {{ type.name }}\n \n \n \n
\n
\n Need a meeting space?\n \n
\n
\n \n \n Need catering?\n \n
\n
\n \n \n \n \n \n \n \n
\n\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport {\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringItem,\n OrganisationService,\n Space,\n SpacesService\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringConfirmModalData {\n all_day: boolean;\n form: FormGroup;\n dateTz: DateTZ;\n}\n\n@Component({\n selector: 'a-catering-confirm-modal',\n templateUrl: './catering-confirm-modal.component.html',\n styleUrls: ['./catering-confirm-modal.component.scss']\n})\nexport class BookingCateringConfirmModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** List of selected items for the order */\n public item_list: CateringItem[] = [];\n\n /** Space selected for delivery */\n public get space(): Space {\n return this._spaces.find(this._data.form?.controls?.location_id?.value);\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n let date = this._data.dateTz;\n if (this._data.form && this._data.form.controls.delivery_time) {\n date = date.addValue({ minutes: this._data.form.controls.delivery_time.value });\n }\n return date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Form field for order items */\n public get item_field(): FormControl {\n return this._data.form.controls.items as any;\n }\n\n /** Total cost of the order */\n public get order_cost(): number {\n return this.item_list.reduce((amount, item) => {\n const price = item.price\n return amount + item.amount * price\n }, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n /* istanbul ignore else */\n if (!this.space || !this.space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find(\n (bld) => bld.id === this.space.level.building_id\n ) || { currency: 'USD' };\n return building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringConfirmModalData\n ) {\n super();\n if (!this._data.form) {\n this._service.notifyError('No form data for order');\n this._dialog_ref.close();\n }\n }\n\n public ngOnInit(): void {\n /* istanbul ignore else */\n if (this._data.form.controls.items) {\n this.subscription(\n 'item_list',\n this._data.form.controls.items.valueChanges.subscribe((items) => {\n /* istanbul ignore else */\n if (!items || items.length <= 0) {\n this._dialog_ref.close();\n }\n })\n );\n }\n this.item_list = this._data.form.controls.items.value.map((item) => new CateringItem(item.toJSON()));\n }\n}\n","
\n
Confirm Catering Order
\n \n
\n\n
\n
\n Delivering to {{ space?.local_name || space?.simple_name || space?.settings?.room_name }} at {{ delivery_time }}\n
\n
\n \n
\n
\n \n
{{ order_cost / 100 | currency:symbol }}
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n OrganisationService,\n BookingNote,\n CateringOrder,\n Space,\n UsersService,\n CateringNotesService,\n Booking\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n catering: AbstractControl;\n booking: Booking\n}\n\n@Component({\n selector: 'a-catering-details-modal',\n templateUrl: './catering-details-modal.component.html',\n styleUrls: ['./catering-details-modal.component.scss']\n})\nexport class CateringDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: HashMap = {};\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return (this._data.spaces || []).filter((space) =>\n this._data.catering.value.find((order) => order.location_id === space.email)\n );\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.pattern || this.active_form.controls.code.errors?.minlength;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n return this.space_list.reduce(\n (valid, space) => valid && this.form[space.email].valid,\n true\n );\n }\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _cateringNotesService: CateringNotesService,\n @Inject(MAT_DIALOG_DATA) private _data: CateringDetailsModalData\n ) {\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type === 'catering'\n );\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = this._data.catering.value.reduce((map, order: CateringOrder) => {\n map[order.location_id] = order.charge_code;\n return map;\n }, {});\n this.generateFormFields();\n }\n\n public submit(): void {\n this.space_list.forEach((space) => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes\n const notes = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type !== 'catering'\n );\n const new_notes = this.space_list.map(\n (space) =>\n ({\n author: this._data.booking.booked_by ? this._data.booking.booked_by['name'] : this._users.current.name,\n type: 'catering',\n message: this.form[space.email].controls.notes.value,\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote)\n );\n this._cateringNotesService.setNotes(new_notes);\n this._data.notes_field.setValue(notes.concat(new_notes).filter((note) => note.message));\n // Save the notes\n const orders = this._data.catering.value.map(\n (order) =>\n new CateringOrder({\n ...order,\n charge_code: this.form[order.location_id]\n ? this.form[order.location_id].controls.code.value\n : ''\n })\n );\n\n this._data.catering.setValue(orders);\n // This should go to the next\n this.event.emit({ reason: 'done' });\n } else {\n this._scrollToBottom();\n }\n }\n\n /** Generate form fields for each space */\n private generateFormFields(): void {\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space.level.building_id\n );\n \n this.needs_charge_code[space.email] = space?.filters?.charge_code || space?.settings?.charge_code || false;\n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(this.codes[space.email] || '',\n this.needs_charge_code[space.email] ?\n [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4), Validators.required ] : [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4)])\n });\n }\n }\n\n /** Scroll the content container to the bottom */\n private _scrollToBottom(): void {\n this._content_el?.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n}\n","
\n
\n \n \n \n
\n \n
\n\n
\n
\n \n
Please specify any allergies or gluten intolerances
\n
\n
\n
\n \n \n \n \n
\n
\n \n Charge Code\n *\n \n \n \n \n Note: Your booking will be confirmed before you are charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\n\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\nexport interface ConfirmModalData {\n /** Title of the modal */\n title: string;\n /** Contents of the modal */\n content: string;\n /** Text displaed on the confirmation button */\n action?: string;\n /** Icon to display on the modal */\n icon: ApplicationIcon;\n}\n\nexport const CONFIRM_METADATA = {\n height: 'auto',\n width: '24em',\n maxHeight: 'calc(100vh - 2em)',\n maxWidth: 'calc(100vw - 2em)'\n};\n\n@Component({\n selector: 'confirm-modal',\n templateUrl: './confirm-modal.component.html',\n styleUrls: ['./confirm-modal.component.scss']\n})\nexport class ConfirmModalComponent extends BaseDirective {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: string;\n\n /** Title of the confirm modal */\n public get title(): string {\n return (this._data ? this._data.title : null) || 'Confirm';\n }\n\n /** Body of the confirm modal */\n public get content(): string {\n return (this._data ? this._data.content : null) || 'Are you sure?';\n }\n\n /** Display text on the confirm button */\n public get action(): string {\n return (this._data ? this._data.action : null) || 'Ok';\n }\n\n /** Display icon properties */\n public get icon(): ApplicationIcon {\n return (this._data ? this._data.icon : null) || null;\n }\n\n constructor(\n private _dialog: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: ConfirmModalData\n ) {\n super();\n }\n\n /**\n * User confirmation of the content of the modal\n */\n public accept() {\n this.event.emit({ reason: 'done' });\n }\n}\n","
\n

{{ title || 'Confirm' }}

\n
\n\n
\n \n
\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { SpaceSelectModalComponent } from './space-select-modal/space-select-modal.component';\nimport { NewUserModalComponent } from './new-user-modal/new-user-modal.component';\nimport { ConfirmModalComponent } from './confirm-modal/confirm-modal.component';\nimport { NoCateringModalComponent } from './no-catering-modal/no-catering-modal.component';\nimport { BookingCateringConfirmModalComponent } from './catering-confirm-modal/catering-confirm-modal.component';\nimport { CateringDetailsModalComponent } from './catering-details-modal/catering-details-modal.component';\nimport { RequirementDetailsModalComponent } from './requirement-details-modal/requirement-details-modal.component';\nimport { BookingConfirmComponent } from './booking-confirm/booking-confirm.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UserFormComponent } from './user-form/user-form.component';\nimport { BookingFormComponent } from './booking-form/booking-form.component';\nimport { EditorModule } from '@tinymce/tinymce-angular';\n\nconst DECLARATIONS = [\n SpaceSelectModalComponent,\n NewUserModalComponent,\n ConfirmModalComponent,\n NoCateringModalComponent,\n BookingCateringConfirmModalComponent,\n CateringDetailsModalComponent,\n RequirementDetailsModalComponent,\n BookingConfirmComponent,\n UserFormComponent,\n BookingFormComponent,\n];\n\n@NgModule({\n imports: [\n LegacyUiModule,\n FormsModule,\n ReactiveFormsModule,\n CommonModule,\n UiModule,\n BaseModule,\n EditorModule,\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ...DECLARATIONS,\n BaseModule\n ]\n})\nexport class LegacyOverlaysModule {\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { BaseDirective, DialogEvent } from '@mckinsey-converge/base';\nimport { generateUserForm, User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'new-user-modal',\n templateUrl: './new-user-modal.component.html',\n styleUrls: ['./new-user-modal.component.scss'],\n})\nexport class NewUserModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for the new user */\n public form: FormGroup;\n /** New user data store */\n public user: User;\n /** Whether user details are being saved */\n public loading: boolean;\n\n public ngOnInit(): void {\n this.user = new User();\n this.form = generateUserForm(this.user);\n }\n\n public saveChanges() {\n this.form.markAllAsTouched();\n if (this.form.valid) {\n if (!this.form.controls.email.value) {\n this.form.controls.email.setValue(\n `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`\n );\n }\n const firstName = this.form.value.first_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n const lastName = this.form.value.last_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n \n const new_user = new User({\n ...this.form.value,\n name: `${firstName} ${lastName}`,\n type: 'external',\n external: true,\n visitor: true,\n });\n this.event.emit({ reason: 'done', metadata: new_user });\n }\n }\n}\n","
\n

Add External Attendee

\n \n
\n
\n \n
\n
\n \n \n
\n\n
\n
\n
\n \n
\n
\n Saving attendee...\n
\n
\n
\n
\n\n","import {\n Component,\n Output,\n EventEmitter\n} from '@angular/core';\nimport {\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'no-catering-modal',\n templateUrl: './no-catering-modal.component.html',\n styleUrls: ['./no-catering-modal.component.scss']\n})\nexport class NoCateringModalComponent extends BaseDirective {\n constructor(\n private _dialog_ref: MatDialogRef,\n ) {\n super();\n }\n\n // /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n\n // Submit the Survey in it's current state.\n public confirm() {\n this.event.emit({ reason: 'done', noCatering: true });\n this._dialog_ref.close();\n }\n\n // Close the modal\n public cancel() {\n this.event.emit({ reason: 'close' });\n this._dialog_ref.close();\n }\n}\n","
\n \n
\n
\n
\n \n

Catering is not available for your new room selection. \n
Are you sure you want to drop order and change rooms?

\n
\n
\n \n \n \n
\n
\n
","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n BookingNote,\n OrganisationService,\n SettingsService,\n Space,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface RequirementDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n codes_field: AbstractControl;\n head_counts_field: AbstractControl;\n standalone?: boolean;\n}\n\n@Component({\n selector: 'a-requirement-details-modal',\n templateUrl: './requirement-details-modal.component.html',\n styleUrls: ['./requirement-details-modal.component.scss']\n})\nexport class RequirementDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: boolean;\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return this._data.spaces;\n }\n\n public get has_recurrence(): boolean {\n return false\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.minlength || this.active_form.controls.code.errors?.pattern;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n // return this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n return this.space_list.length > 0 && this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n }\n\n public isConcierge: boolean;\n public frontend: string;\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n @Inject(MAT_DIALOG_DATA) private _data: RequirementDetailsModalData,\n private _settings: SettingsService,\n ) {\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value\n .filter((note: BookingNote) => note.type === 'equipment');\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = { ...this._data.codes_field.value };\n this.head_counts = { ...this._data.head_counts_field.value };\n this.generateFormFields();\n }\n\n public submit(): void {\n // Get the email of the first space\n const firstSpaceEmail = this.space_list[0].email;\n\n // Copy values from the first space's form controls to all other spaces\n this.space_list.forEach(space => {\n if (space.email !== firstSpaceEmail) {\n this.form[space.email].controls.notes.setValue(this.form[firstSpaceEmail].controls.notes.value);\n this.form[space.email].controls.code.setValue(this.form[firstSpaceEmail].controls.code.value);\n this.form[space.email].controls.head_count.setValue(this.form[firstSpaceEmail].controls.head_count.value);\n }\n });\n\n this.space_list.forEach(space => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes \n const notes = this._data.notes_field.value\n .filter((note: BookingNote) => note.type !== 'equipment');\n const new_notes = this.space_list.map(space => ({\n author: this._users.current.name,\n type: 'equipment',\n message: this.form[space.email].controls.notes.value.trim(),\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote));\n this._data.notes_field.setValue(notes.concat(new_notes).filter(note => note.message));\n this._data.codes_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.code.value;\n return map;\n }, {}));\n this._data.head_counts_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.head_count.value;\n return map;\n }, {}));\n this.event.emit({ reason: 'done' });\n } else {\n this._content_el.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n }\n\n /** Generate form fields for each space */\n // private generateFormFields(): void {\n // for (const space of this.space_list) {\n // const building = this._org.buildings.find(\n // bld => bld.id === space[0]?.level.building_id\n // );\n // // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n // const { filters, settings } = space;\n // const roomBasedEqCode = filters?.equipment_code || settings?.equipment_code;\n // const officeBasedEqCode = building?.required?.equipment_code;\n // this.needs_charge_code[space.email] = roomBasedEqCode !== undefined ? roomBasedEqCode : officeBasedEqCode !== undefined ? officeBasedEqCode: false;\n\n // this.form[space.email] = new FormGroup({\n // notes: new FormControl(this.notes[space.email] || ''),\n // code: new FormControl(\n // this.codes[space.email] || '',\n // this.needs_charge_code[space.email] ?\n // [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] : [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n // ),\n // head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n // });\n // }\n // }\n \n private generateFormFields(): void {\n // Initialize a variable to determine if any space needs a charge code\n let anySpaceNeedsChargeCode = false;\n \n // First pass to determine if any space needs a charge code\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space?.level.building_id\n );\n const { filters, settings } = space;\n const roomBasedEqCode = filters?.equipment_code;\n const officeBasedEqCode = building?.required?.equipment_code;\n \n // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n if (roomBasedEqCode || officeBasedEqCode) {\n anySpaceNeedsChargeCode = true;\n this.needs_charge_code = true;\n break;\n } else{\n this.needs_charge_code = false;\n }\n }\n \n // Second pass to create form groups with the determined charge code requirement.\n // We show only the first space, but if one of the selected spaces needs a mandatory charge code,\n // then all spaces need a mandatory charge code\n for (const space of this.space_list) { \n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(\n this.codes[space.email] || '',\n anySpaceNeedsChargeCode ?\n [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] :\n [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n ),\n head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n });\n }\n }\n}\n","
\n
\n \n \n \n \n {{\n this.space_list.length > 1 ? this.space_list.length + ' spaces selected' :\n this.space_list[0]?.local_name || 'No spaces selected'\n }}\n \n \n \n \n
\n \n
\n\n
\n
\n \n
\n {{\n has_recurrence && !isConcierge\n ? 'To update headcount information, add equipment or catering, please edit individual meeting occurences in My Day'\n : \"Would you like to add equipment to your booking's spaces?\"\n }}\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n Charge Code*\n \n \n \n \n Note: Your booking will be confirmed before you are\n charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n \n Headcount Estimate*\n \n \n \n \n Note: This estimate is used to calculate catering and/or\n assign rooms. Please keep updated of any changes.\n \n \n Headcount Estimate is required\n \n \n
\n \n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {\n BehaviorSubject,\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n first,\n map,\n switchMap,\n take,\n withLatestFrom\n} from 'rxjs/operators';\nimport {\n Building,\n mapBuildingToSelectOption,\n mapCityToAllSelectOption,\n OrganisationService,\n SettingsService,\n Space,\n SpaceBookingRuleOptions,\n SpacesService,\n toggleSelectedByGroup,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n DialogEvent,\n HashMap,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport { NoCateringModalComponent } from '../no-catering-modal/no-catering-modal.component'\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport interface SpaceSelectModalData {\n /** List of selected spaces */\n spaces: Space[];\n /** Start time for availability of spaces */\n dateTz: DateTZ;\n /** Duration of the availability block to look for */\n duration: number;\n /** Host of the booking being made */\n host: User;\n /** Whether multiple spaces can be selected */\n multiple: boolean;\n /** Force zone ids */\n zone_ids?: string;\n /** Booking needs catering */\n needsCatering?: boolean,\n}\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'a-space-select-modal',\n templateUrl: './space-select-modal.component.html',\n styleUrls: ['./space-select-modal.component.scss']\n})\nexport class SpaceSelectModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether space list is being loaded */\n public loading: boolean;\n /** List of available spaces to select from */\n public spaces: Space[] = [];\n /** Active building to filter spaces on */\n public active_building: Building;\n /** Active building to filter spaces on */\n public active_type: Identity;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n /** List of currently selected spaces */\n public selected_spaces: Space[] = [];\n /** Mapping as to whether a space is by request */\n public request_map: HashMap = {};\n /** Whether selected list should be shown on mobile */\n public show_list: boolean;\n\n /** host to load (only in staff) **/\n public host: User;\n\n /** List of available buildings */\n public types: Identity[] = [];\n\n public isConcierge: boolean;\n public frontend: string;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n /** Whether multiple spaces can be selected */\n public get multiple(): boolean {\n return false;\n }\n\n public get has_zone(): boolean {\n return !!this._data.zone_ids;\n }\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n\n public noCateringDialogRef: MatDialogRef;\n\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public savedSelection\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _spaces: SpacesService,\n private _settings: SettingsService,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: SpaceSelectModalData\n ) {\n super();\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld) => {\n this.loading = true;\n const zone_ids: string[] = [];\n /* istanbul ignore else */\n if (this.active_building) {\n zone_ids.push(this.active_building.id);\n }\n\n if (bld?.includes('|')) {\n bld = this.savedSelection\n }\n\n const id = request_id;\n return this._spaces.available({\n zone_ids: bld?.length ? bld : this._data.spaces[0].building.id || zone_ids.join(','),\n dateTz: this._data.dateTz,\n duration: this._data.duration\n }).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _ })),\n map((resp: { id: number, list: Space[] }) => {\n this.loading = false;\n const filtered_list = resp.list.filter((space: Space) => {\n // if concierge skip rules check.\n if (this._settings.concierge) {\n return (this.active_type && this.active_type.id ? space.zones.includes(`${this.active_type.id}`) : true) &&\n !this.selected_spaces.find((s) => s.id === space.id);\n }\n\n const rules = space.rulesFor({\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this.host || this._data.host\n });\n return (\n rules.hide !== true &&\n (this.active_type && this.active_type.id\n ? space.zones.includes(`${this.active_type.id}`)\n : true) &&\n !this.selected_spaces.find((_space) => _space.id === space.id)\n );\n });\n return resp.id === request_id ? filtered_list : this.spaces;\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.spaces = list.filter((space) => {\n if (!space.available) {\n return false;\n }\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n });\n this.spaces.sort((a, b) => this.sort(a, b));\n if (!this.selectedOptions.value.length) {\n this.setDefaultBuilding()\n }\n })\n );\n this.active_building = this._data.spaces?.length\n ? this._org.buildings.find((i) => i.id === this._data.spaces[0].level.building_id)\n : this._org.building;\n this.types = [{ id: '', name: 'Any Space Type' } as any].concat(\n this._org.space_types || []\n );\n this.active_type = this.types[0];\n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: { name: city, timezone },\n value: bld_list?.filter((bld) => bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld) => mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ]\n this.options.next(buildings)\n }));\n\n }\n\n /** Add space to selected list */\n public addSpace(space: Space) {\n this.selected_spaces.push(space);\n this.selected_spaces = unique(this.selected_spaces, 'id');\n }\n\n /** Remove space from selected list */\n public removeSpace(space: Space) {\n this.selected_spaces = this.selected_spaces.filter((a_space) => a_space.id !== space.id);\n }\n\n /** Emit current state of the selected list */\n public save(list: Space[]) {\n if (!this._data.needsCatering) {\n // No catering order to warn about\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // Check if the room has catering \n if (list[0].has_catering) {\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // If not warn that the room doesn't have catering\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.event.emit({ reason: 'done', metadata: list, noCatering: event.noCatering });\n }\n if (event.reason === 'close') {\n this.event.emit({ reason: 'close' });\n }\n })\n );\n }\n\n private update() {\n const map = {};\n const options: SpaceBookingRuleOptions = {\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this._data.host\n };\n this.selected_spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.request_map = map;\n }\n\n public setDefaultBuilding() {\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id)) || { name: '', sort_order: [] };\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld) => bld.value)\n\n });\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n public selectSpace(space: Space) {\n const list = this.spaces;\n if (list.find((item) => item.id === space.id)) {\n this.spaces = list.filter((item) => item.id !== space.id);\n } else {\n this.spaces = [space];\n }\n }\n\n public clearList() {\n this.spaces = []\n this.savedSelection = []\n }\n\n public triggerSearch = () => {\n if (this.savedSelection.length) {\n this.change$.next(this.savedSelection)\n } else {\n this.spaces = []\n }\n }\n\n}\n","
\n
Select meeting space{{ multiple ? 's' : '' }}
\n \n
\n\n
\n
\n \n \n 1\">Type\n 1\">\n \n \n {{ type?.name }}\n \n \n \n \n
\n \n \n
\n
\n
{{ space.local_name }}
\n
{{ space.level.name }}
\n
\n
\n \n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n {{ (!isConcierge && request_map[space.id]) ? 'Request' : 'Select' }}\n \n
\n
\n
\n
\n
\n
\n
\n

Selected spaces

\n
\n \n
\n \n \n
\n
\n
{{ space.name }}
\n
{{ space.level.name }}
\n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n
Loading available spaces...
\n
\n
\n\n
\n
\n \n
\n
No results available, please select another office.
\n
\n
\n\n
\n
\n \n
\n
No selected spaces
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'user-form',\n templateUrl: './user-form.component.html',\n styleUrls: ['./user-form.component.scss']\n})\nexport class UserFormComponent {\n /** Group of form fields used for creating the system */\n @Input() public form: FormGroup;\n}\n","
\n
\n
\n First Name:\n \n \n First name is required\n \n \n
\n
\n Last Name:\n \n \n Last name is required\n \n
\n
\n Email:\n \n \n A valid email is required\n \n
\n
\n
\n","export * from './lib/legacy-ui.module';\nexport * from './lib/custom-fields';\nexport * from './lib/icon/icon.component';\nexport * from './lib/feedback/feedback.component';\nexport * from './lib/action-icon/action-icon.component';\nexport * from './lib/user-avatar/user-avatar.component';\nexport * from './lib/bookings/catering/item/item.component';\nexport * from './lib/cng-search-bar/cng-search-bar.component';\n","import { Component, OnInit, Input } from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'action-icon',\n templateUrl: './action-icon.component.html',\n styleUrls: ['./action-icon.component.scss']\n})\nexport class ActionIconComponent implements OnInit {\n /** Icon to display */\n @Input() public icon: ApplicationIcon;\n /** Whether action is being processed */\n @Input() public loading: boolean;\n /** State of the action */\n @Input() public state: 'success' | 'error' | '' = '';\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","
\n \n
\n \n
\n
\n \n
\n
\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringCategory,\n CateringItem,\n SettingsService\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { PackageOptionsModalComponent } from '../package-options-modal/package-options-modal.component';\n\nfunction hasSelectionRequirements(category: CateringCategory) {\n return (\n category.must_select < category.items.length ||\n (category.must_select === category.items.length &&\n category.items.find((item: any) => item.items && item.must_select < item.items.length))\n );\n}\n\nfunction getActiveList(category: CateringCategory) {\n const items = category.items || [];\n let list = items.filter((item) => item.amount > 0).map((item) => item.id);\n for (const item of items) {\n if ((item as any).items && (item as any).items.length) {\n list = list.concat(getActiveList(item as any));\n }\n }\n return list;\n}\n\n@Component({\n selector: 'a-catering-menu-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringMenuItemComponent extends BaseDirective implements OnChanges {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Field for storing items */\n @Input() public field: FormControl;\n /** Current symbol for the selected space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n public initial_state = null;\n\n /** List of contents of the package */\n public get contents(): string {\n return this.item.items\n ? this.item.items.reduce((list, item) => {\n /* istanbul ignore else */\n if (list) {\n list += '\\n\\n';\n }\n return (list += `${item.name}${\n (item as any).items\n ? (item as any).items.reduce(\n (a_list, an_item) =>\n (a_list += `\\n ${an_item.amount ? '✓' : '•'} ${an_item.name} `),\n ''\n )\n : ''\n } ${item.amount ? '✓' : ''}`);\n }, '')\n : '';\n }\n\n constructor(private _service: ApplicationService, private _dialog: MatDialog,\n public settings: SettingsService) {\n super();\n // on the item selection set the revert/close state\n this.initial_state = this.item;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.field && this.field) {\n const list = this.field.value;\n // check the category\n let item = list.find((an_cat) => an_cat.id === this.item.id);\n if (item) {\n // update the category level amount\n this.item.setAmount(item ? item.amount : 0);\n } else {\n // find a category item\n for (var cat of list) {\n item = cat?.items.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(item ? item.amount : 0);\n break;\n }\n }; \n } \n\n // On the confirm catering order modal set the revert/close state\n if (!this.initial_state && this.item.amount) {\n this.initial_state = this.item;\n }\n\n this.subscription(\n 'field_change',\n this.field.valueChanges.subscribe((list) => {\n const item = list.find((an_item) => an_item.id === this.item.id);\n this.item.setAmount(item ? item.amount : 0);\n this.updatePackageSelection();\n })\n );\n }\n }\n\n /**\n * Update the amount of the item in the order\n * @param value New amount\n */\n public updateAmount(value: number) {\n /* istanbul ignore else */\n if (this.field) {\n const list: CateringItem[] = this.field.value;\n const item = list.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(value);\n item.setAmount(value);\n // MCK-1550 fix\n const price = this.item.price;\n item.setPrice(price)\n } else {\n const amount = this.item.amount;\n this.item.setAmount(value);\n if (\n this.item.package &&\n amount < value &&\n this.item.items &&\n this.item.items.length &&\n hasSelectionRequirements(this.item)\n ) {\n this.selectPackageOptions().then(\n (confirmed_item) => {\n list.push(new CateringCategory(confirmed_item));\n this.field.setValue(list.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n } else {\n list.push(new CateringItem(this.item));\n }\n }\n this.field.setValue(list.filter((an_item) => an_item.amount));\n }\n }\n\n public updatePackageSelection() {\n const cart_item = this.field.value.find((item) => item.id === this.item.id);\n if (cart_item) {\n const active_items = getActiveList(cart_item);\n this.timeout(\n 'update_package',\n () => {\n this.item.items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n if ((item as any).items) {\n (item as any).items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n });\n }\n });\n },\n 5\n );\n }\n }\n\n /** Reselect package options */\n public updatePackageOptions(): void {\n let updatedList: CateringItem[] = [];\n this.selectPackageOptions().then(\n (confirmed_item) => {\n // Update the existing category package\n this.field.value.forEach((category: CateringCategory) => {\n if (category.id === confirmed_item.id) {\n updatedList.push(new CateringCategory(confirmed_item))\n } else {\n updatedList.push(category)\n }\n })\n this.field.setValue(updatedList.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n }\n\n /**\n * Open modal for user to select package options\n */\n private selectPackageOptions(): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(PackageOptionsModalComponent, {\n maxWidth: '95vw',\n data: {\n item: new CateringCategory(this.item)\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n let done = false;\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n done = true;\n resolve(ref.componentInstance.item);\n this.initial_state = this.item;\n ref.close();\n }\n });\n ref.afterClosed().subscribe(() => {\n /* istanbul ignore else */\n if (!done) {\n if (this.initial_state) {\n resolve(this.initial_state);\n } else {\n reject();\n }\n }\n });\n });\n }\n}\n","\n \n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n { item.availableItems.length, plural, =1 { Contains {{ item.availableItems.length }} item } other {\n Contains {{ item.availableItems.length }} items } }\n
\n 0\"\n [matTooltip]=\"contents\"\n >\n {{ item.must_select }}\n \n Selected\n \n
\n 0\"\n (click)=\"updatePackageOptions()\"\n i18n=\"Catering order item options change action\"\n >\n Customise\n \n \n \n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n CateringCategory,\n CateringItem\n} from '@mckinsey-converge/data-common';\n\nexport interface PackageOptionsModalData {\n item: CateringCategory;\n}\n\nexport function checkItemRequirements(category: CateringCategory): boolean {\n const items = category.items || [];\n return category.must_select >= items.length\n ? items.reduce((valid, item) => valid && checkItemRequirements(item as any), true)\n : items.reduce((amount, item) => amount + (item.amount ? 1 : 0), 0) ===\n category.must_select;\n}\n\nexport function getActiveItems(category: CateringCategory): HashMap {\n let map = {};\n if (category.items) {\n const item = category.items.find(item => item.amount > 0);\n if (item) {\n map[category.id] = item.id;\n }\n category.items.forEach(item => map = { ...map, ...getActiveItems(item as any) });\n }\n return map;\n}\n\n@Component({\n selector: 'a-package-options-modal',\n templateUrl: './package-options-modal.component.html',\n styleUrls: ['./package-options-modal.component.scss']\n})\nexport class PackageOptionsModalComponent {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n\n /** Item to select options for */\n public get item(): CateringCategory {\n return this._data.item;\n }\n\n /** Whether package requirements have been met */\n public get requirements_met(): boolean {\n return checkItemRequirements(this.item);\n }\n\n public get active_items(): HashMap {\n return getActiveItems(this.item);\n }\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: PackageOptionsModalData) {\n }\n\n /**\n * Update the list of selected items\n */\n public updateAmount(a_package: CateringCategory, option: CateringItem, state: boolean) {\n if (state) {\n const needed = a_package.must_select;\n const active = a_package.items.filter(an_item => an_item.amount > 0).length;\n if (active >= needed) {\n const item = a_package.items.find(an_item => an_item.amount > 0);\n item.setAmount(0);\n }\n option.setAmount(1);\n } else {\n option.setAmount(0);\n }\n }\n}\n","
\n

Package Options

\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n \n \n
\n \n 1\"\n [checked]=\"!!option.amount\"\n (change)=\"updateAmount(package, option, $event.checked)\"\n >\n {{ option.name }}\n \n \n {{ option.name }}\n \n \n = package.items.length || option.must_select\">\n {{ option.name }}\n \n \n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\n\n// Interface to define the structure of the configuration object for the search bar\nexport interface SearchBarConfig {\n placeholder?: string;\n totalFoundItem?: number;\n showSrchWarning?: boolean;\n}\n\n@Component({\n selector: 'cng-search-bar',\n templateUrl: './cng-search-bar.component.html',\n styleUrls: ['./cmg-search-bar.component.scss']\n})\nexport class CngSearchBarComponent implements OnChanges {\n // Input property to accept configuration for the search bar\n @Input() config: SearchBarConfig = {\n placeholder: 'Search ...',\n totalFoundItem: 0,\n showSrchWarning: false\n };\n\n // Output event emitter to emit search strings to parent components\n @Output() search = new EventEmitter();\n\n // Local variable to store the search string entered by the user\n searchStr: string = '';\n\n // Lifecycle hook that is called when any data-bound property of a directive changes\n ngOnChanges(changes: SimpleChanges): void {\n // Check if the config property has changed\n if (changes.config) {\n const configChanges = changes.config.currentValue;\n // Update the config with new values or fallback to defaults\n this.config = {\n placeholder: configChanges.placeholder || 'Search ...',\n totalFoundItem: configChanges.totalFoundItem || 0,\n showSrchWarning: configChanges.showSrchWarning || false\n };\n }\n }\n\n // Method to handle the search action\n onSearch(value: string): void {\n // Emit the search string if it's not empty\n if (value) {\n this.search.emit(value);\n } else {\n this.clearSearch();\n }\n }\n\n // Method to clear the search input and reset related configurations\n clearSearch(box: HTMLInputElement | null = null): void {\n this.searchStr = '';\n if (box) {\n box.value = '';\n }\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n this.search.emit('');\n }\n\n // Method to reset the search-related warnings and item count\n resetSearch(): void {\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n }\n}\n","
\n \n \n
{{ config.totalFoundItem }}
\n \n \n \n
\n \n No search found!\n
\n
\n ","import { Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n@Directive({\n selector: '[hover-class]'\n})\nexport class HoverClassDirective {\n @Input('hover-class') hoverClass: string;\n\n constructor(private elementRef: ElementRef) {}\n\n @HostListener('mouseenter') onMouseEnter() {\n this.update('add');\n }\n\n @HostListener('mouseleave') onMouseLeave() {\n this.update('remove');\n }\n\n @HostListener('blur') onBlur() {\n this.update('remove');\n }\n\n private update(action: string): void {\n this.hoverClass.split(' ').forEach(item => this.elementRef.nativeElement.classList[action](item));\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'an-action-field',\n templateUrl: './action-field.component.html',\n styleUrls: ['./action-field.component.scss']\n})\nexport class ActionFieldComponent extends BaseDirective {\n /** Name of the field */\n @Input() public name: string;\n /** Value to display on the field */\n @Input() public placeholder: string;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Emitter for user interaction events */\n @Output('onAction') public on_action = new EventEmitter();\n /** Whether to show tooltip */\n public show_tooltip = false;\n\n /**\n * Emit that the user has performed an action on the field\n */\n public performAction() {\n this.show_tooltip = !this.show_tooltip;\n this.on_action.emit();\n }\n}\n","\n
{{ placeholder }}
\n
\n \n
\n\n","import { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'a-counter',\n templateUrl: './counter.component.html',\n styleUrls: ['./counter.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n /* istanbul ignore next */\n useExisting: forwardRef(() => CounterComponent),\n multi: true,\n },\n ],\n})\nexport class CounterComponent implements ControlValueAccessor {\n /** Maximum amount for the counter */\n @Input() public max: number = 10;\n /** Minimum amount for the counter */\n @Input() public min: number = 0;\n\n @Input() public useInput = false;\n\n /** Current value of the counter */\n public value: number;\n public previous_value: number = 0;\n /** Whether shift key is being held by the user */\n public shift_key: boolean;\n /** Whether control key is being held by the user */\n public ctrl_key: boolean;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /**\n * Add the `step` to the current value\n */\n public add() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value += step;\n if (this.value > this.max) {\n this.value = this.max || 10;\n }\n this.setValue(this.value);\n }\n\n /** Remove the `step` from the current value */\n public remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }\n\n public handleTimeout = null;\n\n public onInputChange(new_value: string) {\n if (this.handleTimeout) {\n clearTimeout(this.handleTimeout);\n this.handleTimeout = null;\n }\n this.handleTimeout = setTimeout(() => this.changeInput(new_value), 500);\n }\n\n public changeInput(new_value: string) {\n let value = Number(new_value);\n if (isNaN(value)) {\n value = this.previous_value;\n }\n if (value < this.min) {\n value = this.min || 0;\n }\n if (value > this.max) {\n value = this.max || 10;\n }\n this.setValue(value);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.previous_value = new_value;\n this.value = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.value = value;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","\n \n \n
\n {{value || '0'}}\n
\n \n\n","import { Component, OnInit, forwardRef, Input, ViewChild, Output, EventEmitter } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-date-field',\n templateUrl: './date-field.component.html',\n styleUrls: ['./date-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateFieldComponent),\n multi: true\n }\n ]\n})\nexport class DateFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n /** Optional event emitter for changes */\n @Output() public onChange = new EventEmitter();\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Currently selected date */\n public date: number;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n /** Display value for the current date */\n public get date_string(): string {\n // R--- Needs TZ aware inputs\n const date = new DateTZ({date: this.date})\n return date.formatDate('dd MMM yyyy');\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public ngOnInit() {\n this.date = DateNow(new Date()).ms;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = new DateTZ({date: this.date });\n const new_d = new DateTZ({date: new_value})\n let new_date = new_d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n this.date = new_date;\n if (this._onChange) {\n this._onChange(new_date);\n this.onChange.emit(new_date);\n }\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","\n
{{ date_string }}
\n
\n \n
\n\n\n
\n \n
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport {\n humaniseDuration,\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-duration-field',\n templateUrl: './duration-field.component.html',\n styleUrls: ['./duration-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ]\n})\nexport class DurationFieldComponent extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor {\n /** Maximum duration option available */\n @Input() public max: number = 240;\n /** Minimum duration option available */\n @Input() public min: number = 15;\n /** Step value between options */\n @Input() public step: number = 15;\n /** Reference time for displaying next to durations */\n @Input() public time: number;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Special case prepopulation i.e. out of step options */\n @Input() public specialPreprops: Array = [];\n /** Whether form all_day is enabled. */\n @Input() public all_day: boolean = false;\n\n public duration: number = 60;\n /** List of available duration options */\n public duration_options: Identity[];\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n public ngOnInit(): void {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.max || changes.min || changes.step || changes.time || changes.all_day) {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.duration = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(+new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.duration = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n private generateDurationOptions(max: number, min: number, step: number, all_day: boolean = false): Identity[] {\n const blocks: Identity[] = [];\n let time = min;\n // R--- Change input to dateTz\n let date = this.time ? new DateTZ({date: this.time}) : null;\n\n // Add special case for 10min duration/prepropulation\n for (const option of this.specialPreprops) {\n blocks.push({\n id: option,\n name: date\n ? `${date.addValue({ minutes: option }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(option)})`\n : `${humaniseDuration(option)}`\n });\n }\n\n\n while (time <= max) {\n blocks.push({\n id: time,\n name: date\n ? `${date.addValue({ minutes: time }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(time)})`\n : `${humaniseDuration(time)}`\n });\n time += step;\n }\n if (all_day) {\n blocks.push({ id: 24 * 60, name: 'All Day' }); \n }\n blocks.push({ id: 7 * 24 * 60, name: '1 week' });\n return blocks;\n }\n}\n","
\n \n \n \n {{ option.name }}\n \n \n \n
\n","export * from './action-field/action-field.component'\nexport * from './counter/counter.component'\nexport * from './date-field/date-field.component'\nexport * from './duration-field/duration-field.component'\nexport * from './time-field/time-field.component'\nexport * from './user-search-field/user-search-field.component'\nexport * from './user-list-field/user-list-field.component'\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-time-field',\n templateUrl: './time-field.component.html',\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ]\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n /** Time step between each allowed time option */\n @Input() public step: number = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public no_past_times: boolean = true;\n /** String representing the currently set time */\n public date: number = DateNow(new Date()).ms;\n /** String representing the currently set time */\n public time: string = DateNow(new Date()).formatDate('HH:mm');\n /** Available time blocks for the selected date */\n public _time_options: Identity[];\n /** Whether select field should be shown */\n public show_select: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n // R--- This is the form input that needs to be TZ active.\n public ngOnInit(): void {\n this.show_select = true;\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n this.timeout('hide', () => this.show_select = false);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step) {\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n }\n\n public get date_(){\n return new DateTZ({date: this.date})\n }\n\n /** Available time blocks for the selected date */\n public get time_options() {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] });\n if (date.minutes % 15 !== 0 && !this._time_options.find(time => time.id === date.formatDate('HH:mm'))) {\n this._time_options.push({\n name: `${date.formatDate(timeFormatString())}`,\n id: date.formatDate('HH:mm')\n });\n this._time_options.sort((a, b) => `${a.id}`.localeCompare(`${b.id}`));\n }\n return this._time_options;\n }\n\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.time = new_value;\n if (this._onChange) {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] }).startOfValue('minute');\n this._onChange(date.ms);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n if (!value) {\n return;\n }\n this.date = value;\n let date = this.date_.startOfValue('minute');\n date = date.setValue({ minute: Math.ceil(date.minutes / 5) * 5 });\n this.time = date.formatDate('HH:mm');\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Show select field for time options\n */\n public showSelect() {\n this.show_select = true;\n this.timeout('on_shown', () => {\n if (this.select_field) {\n this.select_field.focus();\n this.select_field.open();\n this.subscription('listen_close', this.select_field.openedChange.subscribe((state) => {\n if (!state) {\n this.show_select = false;\n }\n }));\n }\n });\n }\n\n /**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n private generateAvailableTimes(datestamp: number, show_past: boolean, step: number = 15): Identity[] {\n let date = new DateTZ({date: datestamp});\n const blocks = [];\n if (show_past || date.isAfterDate(DateNow(new Date()))) {\n date = date.startOfValue('day');\n } else if (date.isAfterDate(DateNow(new Date()))) {\n date = DateNow(new Date());\n }\n date = date.setValue({ minute: Math.ceil(date.minutes / step) * step });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n name: `${date.formatDate(timeFormatString()).toLocaleLowerCase()}`,\n id: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n }\n}\n","\n
\n \n
\n
\n \n
\n\n\n \n \n {{ option.name }}\n \n \n\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n tap,\n map,\n switchMap,\n finalize\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n csvToJson,\n downloadFile,\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-list-field',\n templateUrl: './user-list-field.component.html',\n styleUrls: ['./user-list-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserListFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserListFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Number of characters needed before a search will start */\n @Input() public limit: number = 3;\n /** Emitter for action to make a new user */\n @Output('newUser') public new_user = new EventEmitter();\n\n /** User list to display */\n public user_list: User[];\n /** List of active selected users on the list */\n public active_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** String */\n public search_str: string;\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User[]) => void;\n /** Form control on touch handler */\n private _onTouch: (_: User[]) => void;\n\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n\n constructor(private _service: ApplicationService, private _users: UsersService, private cdRef: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(100),\n distinctUntilChanged(),\n switchMap((query) => {\n this.loading = true;\n return query.length >= this.limit\n ? this._users.query({\n q: query.slice(0, Math.max(this.limit, 3)),\n cache: 60 * 1000\n })\n : Promise.resolve([]);\n }),\n catchError((_) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.user_list = list;\n this.user_list.forEach((i: any) => {\n i.match_name = matchToHighlight(i.match_name);\n i.match_email = matchToHighlight(i.match_email);\n return i;\n });\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n })\n );\n }\n\n /**\n * Add user to the user list\n * @param user\n */\n public addUser(user: User) {\n /* istanbul ignore else */\n if (!this.active_list) {\n this.active_list = [];\n }\n const index = this.active_list.findIndex((a_user) => a_user.id === user.id);\n /* istanbul ignore else */\n if (index < 0) {\n this.active_list = [...this.active_list, user];\n }\n this.setValue(this.active_list);\n this.search_str = '';\n }\n\n /**\n * Remove user from the user list\n * @param user\n */\n public removeUser(user: User) {\n this.active_list = this.active_list.filter((a_user) => a_user.id !== user.id);\n this.setValue(this.active_list);\n }\n\n /**\n * Load CSV file and populate the user list with the contents\n * @param event File input field event\n */\n public addUsersFromFile(event) {\n /* istanbul ignore else */\n if (event.target) {\n const file = event.target.files[0];\n /* istanbul ignore else */\n if (file) {\n const reader = new FileReader();\n reader.readAsText(file, 'UTF-8');\n reader.addEventListener('load', (evt) => {\n this.processCsvData((evt.srcElement as any).result);\n event.target.value = '';\n this.cdRef.detectChanges();\n });\n reader.addEventListener('error', (_) =>\n this._service.notifyError('Error reading file.')\n );\n }\n }\n }\n\n /**\n * Process raw CSV data and save user data to attendee list\n * @param data CSV data\n */\n private processCsvData(data: string) {\n const list = csvToJson(data) || [];\n const id = this._users.current.staff_code; \n list.forEach((el) => {\n const firstName = el.first_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n const lastName = el.last_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n\n el.name = el.name || `${firstName} ${lastName}`;\n const display = (el.name || `${Math.floor(Math.random() * 9999_9999)}`)\n .split(' ')\n .join('_')\n .toLowerCase();\n /* istanbul ignore else */\n if (!el.email) {\n el.email = `${display}+${id}@guest.mckinsey.com`;\n }\n el.type = 'external';\n el.external = !el.email.endsWith(\"@mckinsey.com\") && !el.email.endsWith(\"@external.mckinsey.com\");\n this.addUser(new User(el));\n });\n }\n\n /* istanbul ignore next */\n /** Download template CSV file */\n public downloadCSVTemplate() {\n const template = `Organisation Name,First Name,Last Name,Email,Phone\\nFake Org,John,Smith,john.smith@example.com,01234567898`;\n downloadFile('template.csv', template);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User[]): void {\n this.active_list = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User[]) {\n this.active_list = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User[]) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: User[]) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n \n \n \n
\n
\n \n \n {{ user.name }}\n \n \n \n
\n
\n\n
No attendees
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n switchMap\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-search-field',\n templateUrl: './user-search-field.component.html',\n styleUrls: ['./user-search-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserSearchFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserSearchFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Limit available options to these */\n @Input() public options: User[];\n /** Currently selected user */\n public active_user: User;\n /** User list to display */\n public user_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** Current display value of the search input field */\n public search_str: string = '';\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User) => void;\n /** Form control on touch handler */\n private _onTouch: () => void;\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n \n constructor(private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap(query => {\n this.loading = true;\n return this.options && this.options.length > 0\n ? Promise.resolve(this.options)\n : query.length >= 3\n ? (this._users.query({ q: query, cache: 60 * 1000 }) as Promise)\n : Promise.resolve([]);\n }),\n catchError((err) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription('search_results', this.search_results$.subscribe(list => {\n this.user_list = list;\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n }));\n }\n\n /** Handle input changes */\n public onInputChange(value: string): void {\n this.search_str = value;\n this.search$.next(value);\n }\n\n /**\n * Reset the search string back to the name of the active user\n */\n public resetSearchString(): void {\n if (this.active_user) {\n this.search_str = this.active_user.name;\n } else {\n this.search_str = '';\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User): void {\n this.active_user = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n this.resetSearchString();\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User): void {\n this.active_user = value;\n this.search_str = value ? value.name : '';\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouch = fn;\n }\n\n /** Function to display the user's name in the input field */\n public displayFn(user?: User): string {\n return user ? user.name : '';\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'feedback',\n templateUrl: './feedback.component.html',\n styleUrls: ['./feedback.component.scss'],\n})\nexport class FeedbackComponent extends BaseDirective implements OnInit {\n /** Name of the currently active page */\n public current_page: string;\n\n constructor(private _router: Router) {\n super();\n }\n\n public ngOnInit(): void {\n this.timeout('Getting Title', () => this.updateRoute(document.title), 1000);\n this._router.events.subscribe((event: NavigationEnd) => {\n /* istanbul ignore else */\n if (event instanceof NavigationEnd) {\n this.timeout('Getting Title', () => this.updateRoute(document.title));\n }\n });\n }\n\n public updateRoute(location) {\n location = location.substr(0, location.indexOf(' |'));\n this.current_page = location;\n }\n}\n","\n
\n Feedback\n \n \n \n
\n
\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent extends BaseDirective {\n @Input() public icon: ApplicationIcon;\n}\n","
\n {{ icon.content }}\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ActionFieldComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserListFieldComponent,\n UserSearchFieldComponent\n} from './custom-fields';\nimport { IconComponent } from './icon/icon.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ACA_PIPES_MODULE } from '@acaprojects/ngx-pipes';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { FeedbackComponent } from './feedback/feedback.component';\nimport { ActionIconComponent } from './action-icon/action-icon.component';\nimport { PopoutMenuComponent } from './popout-menu/popout-menu.component';\nimport { SearchbarComponent } from './searchbar/searchbar.component';\nimport { UserAvatarComponent } from './user-avatar/user-avatar.component';\nimport { CateringMenuItemComponent } from './bookings/catering/item/item.component';\nimport { PackageOptionsModalComponent } from './bookings/catering/package-options-modal/package-options-modal.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { CngSearchBarComponent } from './cng-search-bar/cng-search-bar.component';\nimport { HoverClassDirective } from './cng-search-bar/hover-class.directive';\n\nconst DECLARATIONS = [\n ActionFieldComponent,\n IconComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserSearchFieldComponent,\n UserListFieldComponent,\n FeedbackComponent,\n ActionIconComponent,\n PopoutMenuComponent,\n SearchbarComponent,\n UserAvatarComponent,\n CateringMenuItemComponent,\n PackageOptionsModalComponent,\n CngSearchBarComponent,\n HoverClassDirective\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ACA_PIPES_MODULE,\n FormsModule,\n ReactiveFormsModule,\n ...MATERIAL_MODULES,\n BaseModule,\n UiModule\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ACA_PIPES_MODULE,\n ...DECLARATIONS,\n ...MATERIAL_MODULES,\n BaseModule,\n ]\n})\nexport class LegacyUiModule {\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nexport interface PopoutAction extends ApplicationIcon {\n /** ID of the action */\n id: string;\n}\n\n@Component({\n selector: 'a-popout-menu',\n templateUrl: './popout-menu.component.html',\n styleUrls: ['./popout-menu.component.scss']\n})\nexport class PopoutMenuComponent extends BaseDirective {\n /** List of available actions */\n @Input() public actions: PopoutAction[] = [];\n /** Emitter for user actions */\n @Output() public action = new EventEmitter();\n /** Whether actions should show */\n public show: boolean;\n\n public close() {\n this.timeout('close', () => {\n this.show = false;\n });\n }\n}\n","\n \n\n\n","import { Component, OnInit, Input, EventEmitter, Output, ViewChild, ElementRef, SimpleChanges, OnChanges } from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-searchbar',\n templateUrl: './searchbar.component.html',\n styleUrls: ['./searchbar.component.scss']\n})\nexport class SearchbarComponent extends BaseDirective implements OnChanges {\n /** Current contents of the searchbar input */\n @Input('value') public value: string;\n /** Current contents of the searchbar input */\n @Input() public placeholder: string;\n /** Whether external changes are being processed */\n @Input() public loading: boolean;\n /** Whether external changes are being processed */\n @Input() public autofocus: boolean;\n /** Emitter for changes to the searchbar value */\n @Output() public valueChange = new EventEmitter();\n /** Input field reference */\n @ViewChild('input', { static: true }) private input_field: ElementRef;\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.autofocus && this.autofocus) {\n this.focusField()\n }\n }\n\n public focusField() {\n /* istanbul ignore else */\n if (this.input_field && this.input_field.nativeElement) {\n this.input_field.nativeElement.focus();\n }\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component, Input } from '@angular/core';\nimport { User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-user-avatar',\n templateUrl: './user-avatar.component.html',\n styleUrls: ['./user-avatar.component.scss']\n})\nexport class UserAvatarComponent {\n /** User to display avatar for */\n @Input() public user: User;\n\n public get initials(): string {\n if (!this.user) {\n return 'NA';\n }\n const parts = this.user.name.split(' ');\n return parts.length > 1\n ? `${parts[0][0]}${parts[parts.length - 1][0]}`\n : this.user.name.slice(0, 2);\n }\n}\n","
\n
{{ initials }}
\n
\n\n \n\n","export * from './lib/loading.actions'\nexport * from './lib/loading.model'\nexport * from './lib/loading.effects'\nexport * from './lib/loading.selectors'\nexport * from '../testing'\n","import {\n createAction,\n createSelector,\n on,\n On,\n props\n} from '@ngrx/store';\nimport {\n LoadingModel,\n wrapLoading\n} from './loading.model';\nimport {\n selectIsLoading,\n selectOptionalError,\n selectOptionalSuccess,\n selectSuccess\n} from './loading.selectors';\nimport { MemoizedSelector } from '@ngrx/store/src/selector';\nimport {\n ActionCreator,\n NotAllowedCheck,\n TypedAction\n} from '@ngrx/store/src/models';\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport interface Payload {\n payload: T\n}\n\nexport type LoadingAction = T & TypedAction\nexport type LoadingActionCreator = T extends null | undefined ?\n ActionCreator TypedAction>\n : ActionCreator) => LoadingAction>\n\ntype ClearAction = ActionCreator TypedAction>\n\ninterface Selectors {\n success: MemoizedSelector\n optionalSuccess: MemoizedSelector\n error: MemoizedSelector\n loading: MemoizedSelector\n model: (TState) => LoadingModel\n}\n\nexport interface LoadingActionObject {\n request: LoadingActionCreator\n success: LoadingActionCreator>\n error: LoadingActionCreator>\n clear: ClearAction,\n ons: On[],\n selectors: Selectors\n}\n\n/**\n * Creates a {@link LoadingActionObject} that contains a set of ActionCreators\n * for request, success, error, loading, and clear data. Also, it contains\n * the necessary On reducers and selectors in order to properly connect them in\n * a standardized way to data in the application.\n *\n * `TState` is the type of data on your reducer, not global store.\n * `TRequest` is an object type to use in request methods.\n * `TSuccess` is the object type of the T parameter on `LoadingModel`.\n *\n * This assumes you have state represented by:\n * ```typescript\n * interface SomeState {\n * stateKey: LoadingModel\n * }\n * ```\n *\n * To dispatch an action:\n * ```typescript\n *\n * // request parameters depend on the object type used as second type parameter\n * // in createLoadingAction\n * this.store.dispatch(someLoadingAction.request())\n *\n * // action created with createLoadingAction\n * this.store.dispatch(someLoadingAction.request({\n * name: 'Andrew G',\n * age: 24\n * }))\n *\n * ```\n *\n * The generated selectors only select data from its fractured state, not the global\n * store. In order to use them, make sure you {@link select} the global state\n * before using them:\n *\n * ```typescript\n *\n * this.store.pipe(\n * select(selectSomeState),\n * select(someLoadingAction.selectors.success)\n * ).subscribe(next => {\n *\n * })\n *\n * ```\n *\n * @param actionPrefix - Prefixes actions to uniquely identify them.\n * @param stateKey - The field within the reducer state to set data on.\n */\nexport const createLoadingAction = (\n actionPrefix: string,\n stateKey: keyof TState\n): LoadingActionObject => {\n const buildAction = (postfix: string) => `[${actionPrefix}] ${postfix}`;\n // @ts-ignore\n const request = createAction(buildAction('request'), props());\n const success = createAction(buildAction('success'), props>());\n const error = createAction(buildAction('error'), props>());\n const clear = createAction(buildAction('clear'));\n const ons: On[] = [\n on(request, (state: TState & HashMap>, action: LoadingAction) =>\n ({\n ...state,\n [stateKey]: wrapLoading(state[stateKey]).loading()\n })),\n on(success, (state: TState & HashMap>, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.success(action.payload)\n })),\n // some reason specifying state like in success and request does not work.\n on(error, (state: any, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.error(action.payload)\n })),\n on(clear, () => ({\n ...this.state,\n [stateKey]: LoadingModel.empty()\n }))\n ];\n const selectData = (state: TState) => {\n if (!state) {\n console.warn('[LoadingActions] State is empty for key', stateKey);\n }\n return wrapLoading(state?.[stateKey] as unknown as LoadingModel);\n };\n const selSuccess = createSelector, TSuccess>(\n selectData,\n selectSuccess\n );\n const selOptionalSuccess = createSelector(\n selectData,\n selectOptionalSuccess\n );\n const selError = createSelector(\n selectData,\n selectOptionalError\n );\n const selLoading = createSelector(\n selectData,\n selectIsLoading\n );\n return {\n request,\n success,\n error,\n clear,\n ons,\n selectors: {\n success: selSuccess,\n optionalSuccess: selOptionalSuccess,\n error: selError,\n loading: selLoading,\n model: selectData\n }\n };\n};\n","import {\n Actions,\n ofType\n} from '@ngrx/effects';\n\nimport { \n LoadingAction,\n LoadingActionObject\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n catchError,\n flatMap,\n map\n} from 'rxjs/operators';\nimport {\n Observable,\n of\n} from 'rxjs';\nimport { TypedAction } from '@ngrx/store/src/models';\n\n/**\n * This creates an effect to use in Effects classes. This coordinates a simple\n * success and error payload effect.\n * @param actions - The actions object\n * @param actionObject - The created createLoadingAction object.\n * @param caller - Define what API method or asynchronous operation is needed to\n * run this. Return TSuccess.\n */\nexport const createLoadingEffect = (\n actions: Actions, actionObject: LoadingActionObject,\n caller: (action: LoadingAction) => Promise): Observable> => actions.pipe(\n ofType(actionObject.request),\n flatMap((action) => caller(action as LoadingAction)),\n map((response: TSuccess) => actionObject.success({ payload: response })),\n catchError(err => {\n return of(actionObject.error({ payload: err }));\n })\n);\n","/* eslint-disable no-underscore-dangle,no-useless-constructor */\n/**\n * Wraps around the typical data objects we write for success, error, loading, and empty state. This convenience\n * wrapper consolidates all of that logic into a handy wrapper.\n */\nexport class LoadingModel {\n static empty = () => new LoadingModel(false, false, false, undefined);\n\n static success = (success?: T): LoadingModel =>\n new LoadingModel(false, false, true, success);\n\n static error = (error?: Error, optionalSuccess?: T): LoadingModel =>\n new LoadingModel(false, true, false, optionalSuccess, error);\n\n /**\n * Mutates the model with a success state, preserving other state fields.\n * @param success - override success state.\n */\n mutate = (\n success: T2 | null) => new LoadingModel(\n this.isLoading,\n this.hasError,\n !!success,\n !success ? undefined : success\n );\n\n loading = (success: T | null = this.success) =>\n new LoadingModel(\n true,\n false,\n !!success && this.hasSuccess,\n !success ? undefined : success\n );\n\n public get success(): T {\n return this._success as T;\n }\n\n public get optionalSuccess(): T | undefined {\n return this._success;\n }\n\n constructor(\n public isLoading: boolean,\n private hasError: boolean,\n private hasSuccess: boolean,\n private _success?: T,\n public error?: Error\n ) {\n }\n\n isEmpty = () => !this.isSuccess() && !this.isError();\n\n hasLoaded = () => !this.isEmpty() && !this.isLoading;\n\n isSuccess = () => this.hasSuccess;\n\n isError = () => this.hasError;\n\n shouldLoad = () => !this.isSuccess() && !this.isLoading;\n\n public toString = () =>\n `Loading: ${this.isLoading}, Success: ${this.hasSuccess}:**${this._success}**, ` +\n `Error: ${this.hasError}:${this.error}`;\n}\n\n/**\n * Wraps an object that conforms to LoadingModel to restore object loss from\n * hydrating state during development.\n */\nexport const wrapLoading = (loading: any): LoadingModel => {\n if (loading instanceof LoadingModel) {\n return loading;\n } else {\n if (!loading) {\n return LoadingModel.empty();\n } else {\n return new LoadingModel(\n loading.isLoading || false,\n loading.hasError || false,\n loading.hasSuccess || false,\n loading._success,\n loading.error\n );\n }\n }\n};\n","import { LoadingModel, wrapLoading } from './loading.model';\n\nexport const selectSuccess = (state: LoadingModel) =>\n wrapLoading(state).success;\nexport const selectOptionalSuccess = (state: LoadingModel) =>\n wrapLoading(state).optionalSuccess;\nexport const selectIsLoading = (state: LoadingModel) =>\n wrapLoading(state).isLoading;\nexport const selectIsSuccess = (state: LoadingModel) =>\n wrapLoading(state).isSuccess();\nexport const selectOptionalError = (state: LoadingModel) =>\n wrapLoading(state).error;\nexport const selectIsError = (state: LoadingModel) =>\n wrapLoading(state).isError();\nexport const selectHasLoaded = (state: LoadingModel) =>\n wrapLoading(state).hasLoaded();\nexport const selectIsEmpty = (state: LoadingModel) =>\n wrapLoading(state).isEmpty();\n\n","import {\n Observable,\n Subject\n} from 'rxjs';\nimport { Action } from '@ngrx/store';\nimport { Actions } from '@ngrx/effects';\nimport { TypedAction } from '@ngrx/store/src/models';\nimport { take } from 'rxjs/operators';\nimport {\n LoadingActionObject\n} from '../src/lib/loading.actions';\n\nexport const generateMockActions = () => {\n const dispatcher = new Subject();\n return {\n dispatcher,\n actions: new Actions(dispatcher)\n };\n};\n\n/**\n * Simple verifier that checks if the request action results in a success returned.\n */\nexport const verifyActionSuccess = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n data: TSuccess,\n payload?: TRequest,\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.success({ payload: options.data }));\n};\n\n/**\n * Simple verifier that checks if the request action results in a failure returned.\n */\nexport const verifyActionError = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n error: Error,\n payload?: TRequest\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.error({ payload: options.error }));\n};\n","export * from './effects.testing'\n","import { createLoadingAction } from '../../../loading/src/lib/loading.actions';\nimport { Space } from '../../../data-common/src/lib/spaces/space.class';\nimport {\n RoomQueryOptions,\n RoomState,\n RoomStoreState\n} from './rooms.types';\nimport {\n createAction,\n createSelector,\n props\n} from '@ngrx/store';\n\nexport const roomStateSelector = (state: RoomStoreState) => state.rooms;\n\nexport const loadRoomsWithQuery = createAction('[Rooms] Load Rooms with query', props());\n\nexport const loadRoomsForResults = createLoadingAction('Rooms', 'query');\n\nexport const loadRoomsForResultsMap = createLoadingAction('Rooms for map', 'query');\n\n\nexport const loadLaterThatDayResults = createLoadingAction('Later Rooms', 'later');\n\nexport const loadNextDayResults = createLoadingAction('Next Day Rooms', 'next');\n\nexport const loadByIdResults = createLoadingAction('By Id Rooms', 'byid');\n\nexport const selectRoomResultsSuccess = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.optionalSuccess);\n\nexport const loadDiffSizeResults = createLoadingAction('Different Size Rooms', 'size');\n","export * from './lib/storage.module';\nexport * from './lib/localstorage.wrapper'\n","export class LocalStorageWrapper {\n\n constructor(private prefix: string) {\n }\n\n protected setValue(key: string, value: string) {\n localStorage.setItem(`${this.prefix}.${key}`, value);\n }\n\n protected getValue(key: string): string | null {\n return localStorage.getItem(`${this.prefix}.${key}`) as string | null;\n }\n\n protected removeValue(key: string) {\n localStorage.removeItem(`${this.prefix}.${key}`);\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class StorageModule {\n}\n","export * from './lib/ui.module';\nexport * from './lib/types';\nexport * from './lib/base-template.component';\nexport * from './lib/recurrence-pattern-form/recurrence-pattern-form.component';\nexport * from './lib/recurrence-booking-form/recurrence-booking-form.component';\nexport * from './lib/conflicts-modal/conflicts-modal.component'\nexport * from './lib/override-changes-modal/override-changes-modal.component'\nexport * from './lib/date-tz-calendar-widget/date-tz-calendar-widget.component';\nexport * from './lib/date-tz-date-picker/date-tz-date-picker.component';\nexport * from './lib/date-tz-duration-field/date-tz-duration-field.component';\nexport * from './lib/date-tz-time-field/date-tz-time-field.component';\nexport * from './lib/aca-date-picker/aca-date-picker.component';\nexport * from './lib/conflict-alert-modal/conflict-alert-modal.component';\nexport * from './lib/tooltip/tooltip.enums';\nexport * from './lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nexport * from './lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n","import { Component, OnInit, Input, Output, OnChanges, SimpleChanges, forwardRef, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDatePickerOptions {\n /** Unix timestamp with millisecond. First selectable date */\n from?: number;\n /** Unix timestamp with millisecond. Last selectable date */\n to?: number;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: number;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'aca-date-picker',\n templateUrl: './aca-date-picker.component.html',\n styleUrls: ['./aca-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AcaDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class AcaDatePickerComponent implements OnInit, OnChanges, ControlValueAccessor {\n /** CSS class to add to the root element of the component */\n @Input() public klass = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDatePickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n /** Display the last selected day as active */\n @Input() public show_last_selection?: boolean = true\n\n public date: number = DateNow(new Date()).ms;\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private from: DateTZ;\n /** Last selectable date */\n private to: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n /** ID of the timer used for changing the month */\n private _change_timer: number;\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.date = item.value;\n if (this._onChange) {\n this._onChange(this.date);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date\n */\n public updateDate(): void {\n \n if (!this.date) {\n return;\n }\n const now = DateNow(new Date()).startOfValue('month');\n const date_ = new DateTZ({date: this.date})\n const date = date_.startOfValue('month');\n if (date.valid) {\n const difference = date.dateDiff(now, 'months', 'months');\n if (this.offset !== difference) {\n this.offset = difference;\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.from) {\n const date_ = new DateTZ({date: this.options.from})\n this.from = date_.startOfValue('day');;\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.from.startOfValue('month');\n this.min_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.from) {\n this.from = null;\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.to) {\n const date_ = new DateTZ({date: this.options.to})\n this.to = date_.startOfValue('day');\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.to.startOfValue('month');\n this.max_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.to) {\n this.to = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n if (!this.date) {\n return;\n }\n const date = DateNow(new Date()).addValue({ months : this.offset });\n const active = new DateTZ({date: this.date});\n let start = date.setValue({ day: 1 }).setValue({ weekday: 7 }).subtractValue({ weeks: 1 });\n const end_ = new DateTZ({date: start.ms})\n const end = end_.addValue({ weeks: 1 }).endOfValue('month').addValue({ days: 2 }).endOfValue('week');\n this.date_list = [];\n while (start.isBeforeDate(end) || start.isSameDate(end, 'day')) {\n this.date_list.push({\n value: start.ms,\n display: start.formatDate('d'),\n active: this.show_last_selection && active.isSameDate(start, 'day'),\n non_month: !date.isSameDate(start, 'month'),\n count: this.counters ? this.counters[start.formatDate('yyyy-MM-dd')] || 0 : 0,\n disabled: (this.from ? start.isBeforeDate(this.from, 'day') : false) || (this.to ? start.isAfterDate(this.to, 'day') : false),\n today: DateNow(new Date()).isSameDate(start, 'day')\n });\n start = start.addValue({ days : 1 });\n }\n this.month_name = date.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = DateNow(new Date()).startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days : 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n if (this._change_timer) {\n clearTimeout(this._change_timer);\n }\n this._change_timer = setTimeout(() => {\n const new_offset = this.offset + value;\n const now = DateNow(new Date())\n const date = now.addValue({ months : new_offset, days: now.dateMonth === 2 ? 2 : 0 }); //add 2 days if month is february to avoid calc errors\n if (this.from && date.isBeforeDate(this.from, 'month')) { return; }\n if (this.to && date.isAfterDate(this.to, 'month')) { return; }\n this.offset = new_offset;\n this.month.emit(this.offset);\n this.generateMonth();\n this._change_timer = null;\n }, 100);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const date = new DateTZ({date: this.date});\n const offset = this.offset;\n this.offset = DateNow(new Date()).dateDiff(date, 'months', 'months');\n if (offset !== this.offset) {\n this.generateMonth();\n }\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.updateDate();\n this.generateMonth();\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n
\n
\n
\n
\n
{{month_name}}
\n
= max_offset\" (click)=\"changeMonth(1)\" (touchend)=\"changeMonth(1)\">\n
\n
\n
\n
\n
{{item}}
\n
\n
\n
\n
\n {{item.display}}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n
\n
\n
\n
","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges\n} from '@angular/core';\n\nexport enum AlertMode {\n Warning = 'warning',\n Coachmark = 'coachmark',\n BlueCoachmark = 'blue-coachmark',\n Error = 'error'\n}\n\nexport enum AlertBannerDisplay {\n /**\n * New UI\n */\n V2 = 'v2',\n\n /**\n * Default, legacy ui.\n */\n V1 = 'v1',\n}\n\n@Component({\n selector: 'mck-alert-banner',\n template: `\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n \n
\n `,\n styleUrls: ['./alert-banner.component.scss']\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n\n @Input()\n public mode: AlertMode = AlertMode.Warning;\n\n @Output()\n public close = new EventEmitter();\n\n @Output()\n public action = new EventEmitter();\n\n @Input()\n public message: string;\n\n @Input()\n public buttonText: string;\n\n @Input()\n public showClose = true;\n\n @Input()\n public display: AlertBannerDisplay = AlertBannerDisplay.V1;\n\n public iconPath: string = 'assets/icon/warning-yellow.svg';\n public materialColor: string = 'black';\n public closeIcon: string = 'close_outline.svg';\n\n public ngOnInit(): void {\n this._onModeChange();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.mode) {\n this._onModeChange();\n }\n }\n\n private _onModeChange() {\n this.iconPath = 'assets/icon/warning-yellow.svg';\n this.closeIcon = 'close_outline.svg';\n switch (this.mode) {\n case AlertMode.Warning:\n this.materialColor = 'black';\n break;\n case AlertMode.Coachmark:\n this.materialColor = 'coachmark';\n this.closeIcon = 'close_outline_coachmark.svg';\n break;\n case AlertMode.BlueCoachmark:\n this.iconPath = 'assets/icon/info-bg-dark.svg'\n this.materialColor = 'blue-coachmark'\n break;\n case AlertMode.Error:\n this.iconPath = 'assets/img/error-icon.svg'\n this.materialColor = 'white'\n break;\n default:\n this.materialColor = 'black';\n }\n }\n\n}\n","import {\n Component,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NgControl\n} from '@angular/forms';\nimport { SelectOption } from '../types';\nimport {\n BehaviorSubject,\n combineLatest,\n from,\n Subject\n} from 'rxjs';\nimport {\n COMMA,\n ENTER\n} from '@angular/cdk/keycodes';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport {\n distinctUntilChanged,\n map,\n take\n} from 'rxjs/operators';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'mck-autocomplete-chip-select-item',\n template: `\n
\n \n {{label}}\n \n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n \n \n \n {{selected.shortDisplay}}\n close\n \n \n \n \n
\n \n \n {{option.dropdownOverride || option.display}}\n \n \n
\n
\n \n Clear\n \n \n Confirm\n \n
\n \n \n {{errorMessage}}\n
\n `,\n styleUrls: ['./auto-complete-chip-select-item.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AutoCompleteChipSelectItemComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor, OnDestroy {\n\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n @ViewChild('componentInput')\n componentInput: HTMLInputElement;\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n feedbackInput?: boolean;\n\n @Input()\n loading?: boolean;\n\n @Input()\n placeHolder: string;\n\n @Input()\n options: Subject[]>;\n\n @Input()\n selectedOptions: Subject[]>;\n\n @Input()\n useCTAs?: boolean;\n\n @Output()\n optionSelected = new EventEmitter>();\n\n @Output()\n feedbackOutput = new EventEmitter();\n\n @Output()\n chipsCleared: EventEmitter = new EventEmitter();\n\n @Output()\n onClickConfirm: EventEmitter = new EventEmitter();\n\n /**\n * If true, only allow 1 group at a time to get selected. Show others as disabled.\n */\n @Input()\n selectOnlyOneGroup = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input() public localFilter: boolean = true;\n\n /**\n * If error exists, a message.\n */\n @Input()\n errorMessage?: string;\n\n @Input()\n hideDropdownCarret?: boolean;\n\n @Input()\n displayCTA?: boolean;\n\n private selectOnlyOneGroupChange = new BehaviorSubject(false);\n\n separatorKeysCodes = [ENTER, COMMA];\n\n public filterFormControl: FormControl = new FormControl();\n\n public focused = false;\n public mobileFullScreen = false;\n\n public autocompleteOptions = new BehaviorSubject[]>([]);\n public filteredAutocompleteOptions = new BehaviorSubject[]>([]);\n\n /** List shown to user, filters children if a group header is added **/\n public chipOptions = new BehaviorSubject[]>([]);\n\n /** Form control on change handler */\n private _onChange?: (_: SelectOption[]) => void;\n /** Form control on touch handler */\n private _onTouch?: (_: string) => void;\n\n private value = new BehaviorSubject[]>([]);\n\n public enableCTAs: boolean = false\n\n public hasChips: boolean = false;\n\n constructor(@Self() @Optional() private control: NgControl) {\n super();\n if (this.control) {\n this.control.valueAccessor = this;\n }\n }\n\n public get invalid(): boolean {\n return this.control ? this.control.invalid : false;\n }\n\n public get showError(): boolean {\n if (!this.control) {\n return false;\n }\n\n const { dirty, touched } = this.control;\n\n return this.invalid ? (dirty && touched) : false;\n }\n\n public iconFillClass(color?: string): string {\n return color === 'external' ? 'mck-icon-fill-gray' : 'mck-icon-fill-white'\n }\n\n ngOnInit() {\n this.subscription('autoCompleteOptions', combineLatest([\n this.options,\n this.selectedOptions,\n this.selectOnlyOneGroupChange\n ])\n .pipe(\n map(([options, selectedOptions, selectOnlyOneGroup]) => {\n this.hasChips = !!selectedOptions.length;\n return options.map(option => {\n const selected = !!selectedOptions.find(s => s.value === option.value);\n let enabled = true;\n if (selectOnlyOneGroup) {\n // find first group item in selection\n const selectedGroupHeader = selectedOptions.find(s => s.groupHeader || s.groupId === option.groupId);\n\n // if no options chosen, enable it, otherwise only allow selections from other options.\n enabled =\n selectedOptions.length === 0 ||\n (selectedGroupHeader ? selectedGroupHeader.groupId === option.groupId : false);\n this.enableCTAs = selectedOptions.length !== 0\n }\n\n return {\n ...option,\n enabled,\n selected\n } as SelectOption;\n });\n })\n ).subscribe(next => {\n const options = next.sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n this.autocompleteOptions.next(options);\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(this.filterFormControl.value?.trim()));\n }));\n this.subscription('filterFormControlChanges',\n this.filterFormControl.valueChanges.subscribe(value => {\n if (this.localFilter && value.length) {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(value));\n } else {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions());\n }\n }));\n this.subscription('chipOptions', this.selectedOptions\n .pipe(map(selectedOptions => {\n // find group headers and check if children are part of that group.\n // if part of group, filter them out as redundant.\n const groupHeaders = selectedOptions.filter(s => s.groupHeader) || [];\n return selectedOptions.filter(s => s.groupHeader || s.groupChild && !(groupHeaders.find(g => g.groupId === s.groupId)));\n }))\n .subscribe(next => {\n this.chipOptions.next(next);\n }));\n\n this.subscription('formData', this.selectedOptions\n .pipe(map(selected => {\n // group headers always contain children, so only pick out children for data\n return selected;\n }))\n .subscribe(next => {\n this.value.next(next);\n }));\n\n // tie value changes to change.\n this.subscription('valueChanges', this.value\n .pipe(distinctUntilChanged())\n .subscribe(next => {\n if (this._onChange) {\n // rewrote this to avoid read only error\n const values = [];\n next.forEach((v, i) => {\n const value = { ...v };\n if (v.meta?.user) {\n value.display = v.meta.user.name;\n }\n values.push(value);\n });\n this._onChange(values);\n }\n }));\n\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n getFilteredAutocompleteOptions(searchString: string = '') {\n // Exact matches of the groupId or display value\n const exactMatches = this.autocompleteOptions.value.filter(o => {\n if (searchString && searchString.length) {\n return o.groupId.toLowerCase().indexOf(searchString.toLowerCase()) === 0 || o.display.toLowerCase().indexOf(searchString.toLowerCase()) === 0;\n }\n return o.groupId && o.display;\n });\n // Fuzzier search of the dropdownOverride field\n const moreOptions = this.autocompleteOptions.value.filter(o => {\n if (o?.dropdownOverride?.length && searchString) {\n const match = o.dropdownOverride?.toLowerCase().indexOf(searchString.toLowerCase()) > -1;\n // only return found locations that don't exist in exactMatches.\n return match && !exactMatches.find(e => {\n return e.value === o.value\n });\n }\n return false;\n });\n\n // Merge the two result sets\n let joinedOptions = exactMatches.concat(moreOptions).sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n\n // Create a 1D array of the groupId\n const groupIds = joinedOptions.map(o => o.groupId);\n // Get a deduped list of the group parents\n const parents = this.autocompleteOptions.value.filter(o => {\n return o?.groupHeader && groupIds.indexOf(o.groupId) !== -1;\n });\n\n // Remove the parents from the joinedOptions and merge with the reduced parents set, and then sort by groupId.\n // Resulting array sets the parents first in order so the widget renders properly.\n const filteredAutocompleteOptions = parents.concat(joinedOptions.filter(jo => !!jo.dropdownOverride)).sort((a, b) => {\n return b.groupId > a.groupId ? -1 : 1;\n });\n return filteredAutocompleteOptions;\n }\n\n loseFocus(): void {\n this.mobileFullScreen = false;\n this.focused = false;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectOnlyOneGroup) {\n this.selectOnlyOneGroupChange.next(this.selectOnlyOneGroup);\n }\n }\n\n keyedInput(matInput: string) {\n if (this.feedbackInput) {\n this.feedbackOutput.emit(matInput);\n }\n }\n\n selectOption(value: string) {\n this.options.pipe(\n take(1),\n map((options: SelectOption[]) => options.find(o => o.value === value))\n ).subscribe(next => {\n if (next) {\n this.optionSelected.emit(next);\n }\n });\n }\n\n removeOption(value: SelectOption) {\n this.optionSelected.emit(value);\n if (this.useCTAs) {\n this.onClickConfirm.emit();\n }\n\n }\n\n clearSelections() {\n this.selectedOptions.next([]);\n this.chipsCleared.emit();\n }\n\n onClickArrow() {\n // only close events we allow arrow to close panel.\n if (this.focused) {\n this.onFocus(false);\n }\n }\n\n onPanelFocusChange(focusIn: boolean) {\n this.onFocus(focusIn, true);\n }\n\n onFocus(focusIn: boolean, fromPanel?: boolean) {\n if (!focusIn && this.useCTAs) {\n this.onClickConfirm.emit();\n }\n // Only for location input???\n if (this.localFilter && fromPanel && focusIn) {\n // open on focus, mobile needs a refocus\n this.mobileFullScreen = true;\n this.timeout('showDefaults', () => {\n // All results do not show as expected unless I focus again.\n // Something about the mobile styles.\n this.onFocus(true);\n }, 100)\n }\n\n if (this.feedbackInput && !fromPanel) {\n // clear input when input creates options\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n this.feedbackOutput.emit('');\n }\n\n if (this.focused !== focusIn) {\n this.focused = focusIn;\n // clear on close\n if (!focusIn) {\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n }\n if (!fromPanel) {\n if (focusIn) {\n this.trigger.openPanel();\n } else {\n this.trigger.closePanel();\n // close the mobile full screen\n this.loseFocus();\n }\n }\n }\n }\n\n onChanged(value: SelectOption, event: MatCheckboxChange) {\n this.optionSelected.emit(value);\n }\n\n add(event: MatChipInputEvent) {\n // reset\n if (event.input) {\n event.input.value = '';\n }\n this.filterFormControl.setValue('');\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n // TODO: disabled not implemented yet.\n this.disabled = isDisabled;\n }\n\n writeValue(obj: SelectOption[] | undefined): void {\n // update selected options when this value is written\n this.options?.pipe(\n take(1),\n map((options: SelectOption[]) => {\n return options.filter(o => obj ? !!obj.find(spl => o.value === spl.value) : false );\n })\n ).subscribe(next => {\n this.selectedOptions.next(next);\n });\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null && !event.srcElement.classList.contains('mat-form-field-autofill-control')) {\n this.onFocus(false);\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\nimport { SelectOption } from '../types';\n\n/**\n * Patch orphaned SelectOption children into acting as their own group headers.\n *\n * This intends to help in the common scenario where filters have (for whatever\n * reason) prevented the child's usual group header from appearing.\n */\n@Pipe({\n name: 'groupHeaderPatch',\n})\nexport class GroupHeaderPipe implements PipeTransform {\n transform(items: SelectOption[]): SelectOption[] {\n if (!items) {\n return [];\n }\n\n return items.map(v => {\n const hasHeader = !!items.find(i => i.groupHeader && i.groupId === v.groupId);\n return {\n ...v,\n displayAsHeader: !hasHeader,\n }\n })\n }\n\n}\n","import { Component, Input, Output, forwardRef, SimpleChanges, OnChanges, OnInit, EventEmitter, ViewChild, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\nimport {\n BehaviorSubject\n} from 'rxjs';\n\n/**\n * @title Autocomplete filtering select of a single option via text search.\n */\n@Component({\n selector: 'mck-autocomplete-select-option',\n templateUrl: 'auto-complete-select-option.component.html',\n styleUrls: ['auto-complete-select-option.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutoCompleteSelectOptionComponent),\n multi: true\n }\n ],\n})\nexport class AutoCompleteSelectOptionComponent implements OnInit, OnChanges, ControlValueAccessor, OnDestroy{\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n @Input()\n public resetInput: number | undefined;\n\n @Input()\n public placeholder: string;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Output()\n public filteredOptionsChange = new EventEmitter[]>();\n\n @Output()\n public inputTextChange = new EventEmitter();\n\n @Output() emptyBoxEvent = new EventEmitter();\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n filterFormControl = new FormControl();\n filteredOptions: Observable[]>;\n\n /** The selected value */\n public value = new BehaviorSubject('');\n\n /** Available options to search / select from */\n public _options = new BehaviorSubject[]>(this.options);\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n ngOnInit() {\n this.updateFilteredOptions();\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n // Watch and apply changes from the parent component.\n if (changes.options || changes.selectedValue) {\n if (changes.options && !changes.selectedValue) {\n this.filterFormControl.setValue('')\n }\n this.updateFilteredOptions();\n }\n if (changes.resetInput) {\n this.filterFormControl.setValue('');\n this.updateFilteredOptions();\n }\n \n }\n\n private updateFilteredOptions() {\n this.filteredOptions = this.filterFormControl.valueChanges\n .pipe(\n startWith(''),\n map(value => typeof value === 'string' ? value : value && value?.display ? value.display : ''),\n map(name => name ? this._filter(name) : this.options.slice())\n );\n }\n\n displayFn(data: SelectOption): string {\n return data && data?.display ? data.display : '';\n }\n\n private _filter(display: string): SelectOption[] {\n const filterValue = display.toLowerCase();\n // return all the matches found\n const filtered = this.options.filter(option => {\n // split this input and index both, if both\n // match return true.\n if (filterValue.includes(' ')) {\n const filterValues =filterValue.split(' ');\n let matchesAll = true;\n for (let x = 0; x < filterValues.length; x++) {\n if (option.display.toLowerCase().indexOf(filterValues[x]) === -1) {\n matchesAll = false;\n }\n }\n if (matchesAll) {\n return true;\n }\n }\n // match the whole string\n return option.display.toLowerCase().indexOf(filterValue) > -1;\n });\n this.inputTextChange.emit(filterValue);\n this.filteredOptionsChange.emit(filtered);\n return filtered;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: SelectOption): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value.value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n public onChangeInput() {\n if (this.filterFormControl.value === '') {\n this.emptyBoxEvent.emit(true);\n }\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null ) {\n this.trigger.closePanel();\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n\n}","
\n {{label}}\n \n \n \n \n {{option.shortDisplay || option.display}}\n \n \n \n
","import {\n AfterViewInit,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n/**\n * A helper class for rendering embedded views (ng-template) as standalone components.\n *\n * If the view is lazy and does not render upon initialization,\n * it attempts embedding view again later.\n *\n * When testing a component directly that extends this class, its best to wrap the component\n * in a wrapper component for testing so that it can render itself.\n */\nexport class BaseTemplateComponent extends BaseDirective implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild(TemplateRef, { static: true })\n public template: TemplateRef;\n\n private isRendered = false;\n\n constructor(private vcRef: ViewContainerRef) {\n super();\n }\n\n public ngOnInit(): void {\n // try early rendering\n this.attemptViewEmbed();\n }\n\n public attemptViewEmbed() {\n if (this.template && !this.isRendered) {\n this.isRendered = true;\n this.vcRef.createEmbeddedView(this.template);\n return true;\n }\n return false;\n }\n\n public ngAfterViewInit(): void {\n if (!this.isRendered) {\n console.log('View not rendered yet, attempting to post initialization');\n setTimeout(() => {\n console.log('Timeout ended, trying again', this.template);\n if (!this.attemptViewEmbed()) {\n console.log('Attempting render in after view initialization');\n setTimeout(() => {\n if (!this.attemptViewEmbed()) {\n console.error('FAILED TO LOAD TEMPLATE');\n }\n }, 1000);\n }\n });\n }\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n this.isRendered = false;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'catering-drop-modal',\n templateUrl: './catering-drop-modal.component.html',\n styleUrls: ['./catering-drop-modal.component.scss']\n})\nexport class CateringDropComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onConfirm(): void {\n this.dialogRef.close(true);\n}\n\nonCancel(): void {\n this.dialogRef.close(false);\n}\n}\n","
\n

Catering conflict

\n
\n\n
\n
\n

Proceed without catering?

\n
\n
\n
\n\n
\n \n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input\n } from \"@angular/core\";\n import { DropdownPanel } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select-options\",\n templateUrl: \"./cng-select-options.component.html\",\n styleUrls: [\"./cng-select-options.component.scss\"]\n })\n export class CngSelectOptionsComponent implements DropdownPanel {\n @ViewChild(TemplateRef) templateRef: TemplateRef;\n @Output() closed = new EventEmitter();\n @Input() ddWidth: string;\n \n constructor() {}\n }\n ","\n
\n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input,\n OnInit\n } from \"@angular/core\";\n import { DropdownPanel, DropdownOpion } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select\",\n templateUrl: \"./cng-select.component.html\",\n styleUrls: [\"./cng-select.component.scss\"]\n })\n export class CngSelectComponent implements OnInit {\n @Input() data: any;\n public isClosed: boolean = false;\n public selected: DropdownOpion;\n constructor() {\n\n }\n ngOnInit(): void {\n this.selected = this.data.defaultSelected;\n }\n\n public optionSelected(item: DropdownOpion) {\n // this.selected = item;\n this.data.defaultSelected = item;\n this.data?.onChangeCallback && this.data?.onChangeCallback(item);\n }\n }\n ","\n\n
\n {{data?.defaultSelected?.display}}\n
\n \n
\n
\n\n
{{item?.display}}
\n
","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n ViewContainerRef\n } from '@angular/core';\n import { DropdownPanel } from './dropdown-panel';\n import { Overlay, OverlayRef } from '@angular/cdk/overlay';\n import { TemplatePortal } from '@angular/cdk/portal';\n import { merge, Observable, Subscription } from 'rxjs';\n \n @Directive({\n selector: '[dropdownTriggerFor]',\n host: {\n '(click)': 'toggleDropdown()'\n }\n })\n export class DropdownTriggerForDirective implements OnDestroy, AfterViewInit, OnInit {\n private isDropdownOpen = false;\n private overlayRef: OverlayRef;\n private dropdownClosingActionsSub = Subscription.EMPTY;\n \n @Input('dropdownTriggerFor') public dropdownPanel: DropdownPanel;\n @Output() isPanelOpened = new EventEmitter();\n constructor(\n private overlay: Overlay,\n private elementRef: ElementRef,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {\n \n }\n ngOnInit(): void {\n // const cngSelectEl = this.elementRef.nativeElement.nextElementSibling; \n // const parentWidth = this.elementRef.nativeElement.offsetWidth; \n // this.renderer.setStyle(cngSelectEl, 'width', `${parentWidth}px`);\n }\n ngAfterViewInit(): void {\n \n }\n\n \n toggleDropdown(): void {\n this.isDropdownOpen ? this.destroyDropdown() : this.openDropdown();\n \n }\n \n openDropdown(): void {\n let {ddWidth} = this.dropdownPanel;\n this.dropdownPanel.ddWidth = ddWidth !=='' ? ddWidth : `${this.elementRef.nativeElement.offsetWidth}px`;\n this.isDropdownOpen = true;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8\n }\n ])\n });\n \n const templatePortal = new TemplatePortal(\n this.dropdownPanel.templateRef,\n this.viewContainerRef\n );\n this.overlayRef.attach(templatePortal);\n \n this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(\n () => this.destroyDropdown()\n );\n }\n \n private dropdownClosingActions(): Observable {\n const backdropClick$ = this.overlayRef.backdropClick();\n const detachment$ = this.overlayRef.detachments();\n const dropdownClosed = this.dropdownPanel.closed;\n \n return merge(backdropClick$, detachment$, dropdownClosed);\n }\n \n private destroyDropdown(): void {\n if (!this.overlayRef || !this.isDropdownOpen) {\n return;\n }\n \n this.dropdownClosingActionsSub.unsubscribe();\n this.isDropdownOpen = false;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef.detach();\n }\n \n ngOnDestroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n }\n }\n ","import {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ViewChild,\n AfterViewInit,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { CollapseService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'mck-collapse-header',\n template: `\n \n \n {{title}} \n
\n
\n \n
\n \n
\n
\n {{description}}\n \n \n \n \n `,\n styleUrls: ['./collapse-header.component.scss'],\n})\nexport class CollapseHeaderComponent implements OnInit, OnDestroy {\n\n @Input() title: string;\n @Input() description: string;\n @Input() isLoading = false;\n @Input() expandedIds: string[] = [];\n @Output() updateSectionIdOnOpen = new EventEmitter<{ status: string, id: string }>(); // Emit the id of the opened result section\n\n @ViewChild('expansionPanel') expansionPanel: MatExpansionPanel;\n\n public isExpanded = new BehaviorSubject(false);\n private collapseSubscription: Subscription;\n\n constructor(private collapseService: CollapseService) {}\n\n ngOnInit(): void {\n this.collapseSubscription = this.collapseService.collapse$.subscribe(() => {\n if (this.expansionPanel) {\n this.expansionPanel.close(); // Close the panel\n }\n });\n }\n\n // Update opened section id and emit the id of the opened result section to the parent component \n public updateOpenedSectionId(isOpen: string) {\n this.updateSectionIdOnOpen.emit({ status: isOpen, id: this.expandedTitleId });\n }\n\n\n \n /**\n * Gets the expanded title as an id by removing parentheses and replacing spaces with underscores.\n * @returns The expanded title.\n */\n public get expandedTitleId(): string {\n return this.title?.split('(')[0]?.split(' ')?.join('_') ;\n }\n\n ngOnDestroy(): void {\n this.collapseSubscription.unsubscribe();\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nexport interface RoomAvaibilityModalData {\n\theaderText: string,\n\tmessage: string,\n\tbuttonLabel: string,\n\tcallback: Function,\n shouldClose: boolean\n}\n\n@Component({\n selector: 'conflict-alert-modal',\n templateUrl: 'conflict-alert-modal.component.html',\n styleUrls: ['./conflict-alert-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConflictAlertModalComponent implements OnInit {\n constructor(public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public dialogData: RoomAvaibilityModalData) {\n }\n ngOnInit(): void {}\n\n public done() {\n this.dialogData?.callback(); this.dialogRef.close()\n }\n}\n","
\n \n
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{{dialogData?.headerText}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{dialogData?.message}}
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t\t \n\t\t\t\n
","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {DialogEvent} from '@mckinsey-converge/base';\nimport {DateTZ, isToday} from '@mckinsey-converge/date-tz';\n\nexport interface ConflictsModalComponentData {\n room_name: string;\n conflicts: number[];\n copy_conflicts?: boolean;\n timezone: string;\n status?: string;\n}\n\n@Component({\n selector: 'app-conflicts-modal',\n templateUrl: './conflicts-modal.component.html',\n styleUrls: ['./conflicts-modal.component.scss']\n})\nexport class ConflictsModalComponent implements OnInit{\n public room_name: string;\n public conflicts: number[];\n public copy_conflicts: boolean;\n public timezone;\n public status: string;\n\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: ConflictsModalComponentData){\n\n }\n\n public ngOnInit(){\n this.timezone = this._data.timezone;\n this.room_name = this._data.room_name\n this.conflicts = this._data.conflicts\n this.copy_conflicts = this._data.copy_conflicts\n this.status = this._data.status\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone});\n const dateIsToday = isToday(dateTZ, this.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n\n public copy(): void {\n this.event.emit({ reason: 'action' });\n }\n\n\n}\n","
\n \n
\n\n
\n

Conflicts ({{conflicts.length}})

\n
\n The {{room_name}} room is not available on the following dates.\n Do you want to proceed without booking these days?\n
\n
\n The {{room_name}} room is not available on the following dates.\n You need to make individual bookings to cover these days, please.\n
\n
\n
\n
\n Date\n
\n
\n
\n {{formatDate(conflict)}}\n
\n
\n
\n
\n\n \n {{copy_conflicts ? 'Copy to clipboard' : 'Close'}}\n \n \n {{copy_conflicts ? 'Close' : 'Continue'}}\n \n\n","import { Component, OnInit, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'custom-snackbar',\n templateUrl: './custom-snackbar-component.component.html',\n styleUrls: ['./custom-snackbar-component.component.scss'],\n})\nexport class CustomSnackbarComponent implements OnInit {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) {\n }\n\n ngOnInit() {}\n\n get getIcon() {\n switch (this.data.snackType) {\n case 'success':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-success.svg',\n };\n case 'error':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-failure.svg',\n };\n case 'warn':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-warning.svg',\n };\n case 'info':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-info.svg',\n };\n default:\n return { type: 'info', iconPath: 'assets/icon/toast-info.svg' };\n }\n }\n\n closeSnackbar() {\n this.data.snackBar.dismiss();\n }\n}\n","
\n
\n
\n \"{{getIcon.type}}\n
\n
\n {{data.message}}\n
\n
\n
\n
close
\n
\n
","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CustomSnackbarComponent } from './custom-snackbar-component.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackBarService {\n messageText: string[];\n constructor(public snackBar: MatSnackBar) {}\n\n public openSnackBar(\n message,\n type,\n duration?,\n verticalPosition?,\n horizontalPosition?\n ) {\n const _snackType = type !== undefined ? type : 'success';\n this.snackBar.openFromComponent(CustomSnackbarComponent, {\n duration: duration || 4000,\n horizontalPosition: horizontalPosition || 'end',\n verticalPosition: verticalPosition || 'top',\n data: {\n message: message,\n snackType: _snackType,\n snackBar: this.snackBar,\n },\n });\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n OnChanges,\n SimpleChanges,\n forwardRef,\n EventEmitter,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDateTzPickerOptions {\n /** DateTZ object. First selectable date */\n fromDateTz?: DateTZ;\n /** DateTZ object. Last selectable date */\n untilDateTz?: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: DateTZ;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'date-tz-calendar-widget',\n templateUrl: './date-tz-calendar-widget.component.html',\n styleUrls: ['./date-tz-calendar-widget.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzCalendarWidgetComponent),\n multi: true,\n },\n ],\n})\nexport class DateTzCalendarWidgetComponent\n extends BaseClass\n implements OnInit, OnChanges, ControlValueAccessor\n{\n /** CSS class to add to the root element of the component */\n @Input() public className = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDateTzPickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n\n public readonly weeks = new Array(6).fill(0);\n public selectedDateTz: DateTZ = DateNow();\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private fromTz: DateTZ;\n /** Last selectable date */\n private toTz: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n private _today = DateNow();\n\n public get timezone() {\n return this.selectedDateTz?.building_tz || '';\n }\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.selectedDateTz = item.value;\n if (this._onChange) {\n this._onChange(this.selectedDateTz);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date 2\n */\n public updateDate(): void {\n if (!this.selectedDateTz) {\n return;\n }\n const now = this._today.startOfValue('month');\n const startOfMonthDateTz = this.selectedDateTz.startOfValue('month');\n if (startOfMonthDateTz.valid) {\n const difference = startOfMonthDateTz.dateDiff(\n now,\n 'months',\n 'months'\n );\n if (this.offset !== difference) {\n this.offset = Math.round(difference);\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.fromDateTz) {\n const today = this._today.startOfValue('month');\n this.fromTz = this.options.fromDateTz.startOfValue('day');\n this.min_offset = Math.round(\n this.fromTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months')\n );\n } else if (this.fromTz) {\n this.fromTz = null; // R-- check if ok\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.untilDateTz) {\n const today = this._today.startOfValue('month');\n this.toTz = this.options.untilDateTz.startOfValue('day');\n this.max_offset = this.toTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months');\n } else if (this.toTz) {\n this.toTz = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n this._today = new DateTZ({ date: Date.now(), is_local_tz: !this.timezone, building_tz: this.timezone });\n const startOfMonthDateTz = this._today.addValue({ months: this.offset });\n const active = this.selectedDateTz || DateNow();\n let startDate = startOfMonthDateTz\n .setValue({ day: 1 })\n .setValue({ weekday: 7 })\n .subtractValue({ weeks: 1 });\n this.date_list = [];\n for (let i = 0; i < 42; i++) {\n this.date_list.push({\n value: startDate,\n display: startDate.formatDate('d'),\n active: active.isSameDate(startDate, 'day'),\n non_month: !startOfMonthDateTz.isSameDate(startDate, 'month'),\n count: this.counters\n ? this.counters[startDate.formatDate('yyyy-MM-dd')] || 0\n : 0,\n disabled:\n (this.fromTz ? startDate.ms < this.fromTz.ms : false) ||\n (this.toTz ? startDate.ms > this.toTz.ms : false),\n today: this._today.isSameDate(startDate, 'day'),\n });\n startDate = startDate.addValue({ days: 1 });\n }\n this.month_name = startOfMonthDateTz.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = this._today.startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days: 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n const new_offset = Math.min(\n this.max_offset,\n Math.max(this.min_offset, this.offset + value)\n );\n this.offset = Math.round(new_offset);\n this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const offset = this.offset;\n this.offset = Math.round(\n this._today.dateDiff(this.selectedDateTz, 'months', 'months')\n );\n if (offset !== this.offset) this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: DateTZ) {\n if (value) {\n this.selectedDateTz = value;\n this.updateDate();\n this.generateMonth();\n }\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n}\n","
\n
\n \n
\n \n
{{ month_name }}
\n = max_offset\"\n (click)=\"changeMonth(1)\"\n >\n
\n \n
\n \n \n \n \n \n \n \n \n \n
{{ item }}
\n \n {{ item.display }}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTzCalendarWidgetComponent } from '../date-tz-calendar-widget/date-tz-calendar-widget.component';\n\n@Component({\n selector: 'date-tz-date-picker',\n template: `\n \n {{label}}\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./date-tz-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class DateTzDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n @Input() public label?: string;\n /** Earliest date available the user is allowed to pick */\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n /** Latest date available the user is allowed to pick */\n @Input() public untilDateTz: DateTZ = DateNow(new Date()).endOfValue('day').addValue({ years: 1 });\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n // R-- possible TODO, address all_day that disables this input and displays \"Add Day for the value like the time picker\"\n @Input() public all_day: boolean = false;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public counters: any;\n\n @Input() public initialDateSelectionTz?: DateTZ;\n\n @Output() public onSelect = new EventEmitter();\n\n @Input() public invalid?: boolean;\n\n @Input() public timezone?: string;\n\n @Input() public can_pick_today: boolean = true;\n\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n\n public ngOnInit(): void {\n if (this.initialDateSelectionTz) {\n this.writeValue(this.initialDateSelectionTz)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(DateTzCalendarWidgetComponent, {static: true }) private _acaDatePicker: DateTzCalendarWidgetComponent;\n /** Currently selected date */\n public selectedDateTzValue = new BehaviorSubject(DateNow(new Date()));\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(new DateTZ({ is_local_tz: false, building_tz: d.building_tz }), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n // date\n public get dateTzObservable(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n return d \n }));\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(newValueTz: DateTZ) {\n // Keep hours and minutes of the old date\n const old_date = this.selectedDateTzValue.value;\n let newDateTz = newValueTz.setValue({ hour: old_date.dateHour, minute: old_date.minutes, second: old_date.second });\n\n // Check that new date is before from\n if (newDateTz.ms < this.fromDateTz.ms) {\n newDateTz = this.fromDateTz;\n }\n\n this.selectedDateTzValue.next(newDateTz);\n if (this._onChange) {\n this._onChange(newDateTz);\n }\n\n this.onSelect.emit(newDateTz);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n const building_tz = this.timezone || this.fromDateTz.building_tz\n const is_local_tz = DateNow(new Date()).building_tz === building_tz\n this.setValue(new DateTZ({ is_local_tz, building_tz }));\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(selectedDateTz: DateTZ) {\n this.selectedDateTzValue.next(selectedDateTz);\n this.show_tooltip = false;\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n DurationGroup,\n nearestDurationToInput,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators'; \nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { convertLocalTimestampToTimezonedDateTz, convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'date-tz-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DateTzDurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input() public label?: string;\n @Input() public required: boolean;\n @Input() max_length?: number;\n\n // /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDateTz: DateTZ;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Whether form all_day is enabled. */\n // R-- need to address all_day that disables this input and displays \"Add Day for the value\"\n @Input() public all_day: boolean = false;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** Component will return a number of minutes */\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDateTz = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDateTz]).pipe(\n \n map(([value, currentStartDate]) => { \n /**\n * convert current start date/time to building time zone first\n * \n */\n const ms = convertTimezonedTimestampToLocalDateTz(currentStartDate.ms, currentStartDate.building_tz).ms;\n return nearestDurationToInput(this.durationGroups, ms, value); \n }\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDateTz.pipe(\n map(d => generateDurationOptionsFromGroups(d, this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDateTz.value, this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDateTz) {\n this.currentStartDateTz.next(changes.startDateTz.currentValue);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n nearestStepToInput,\n timeWithGmtOffsetFormatString,\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n generateAvailableTimes,\n generateAvailableTimesTz,\n} from '../utils/time.utils';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\nimport { filter, map, withLatestFrom } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'date-tz-time-field',\n template: `\n
\n {{\n label\n }}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzTimeFieldComponent),\n multi: true,\n },\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DateTzTimeFieldComponent\n extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Input() public label?: string;\n @Input() public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the DateTZ object datetime to start time options from **/\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n // Disables this input and displays R--- \"All Day\" for the value\n @Input() public all_day: boolean = false;\n @Input() public show_current: boolean = false;\n @Input() public startFromDateTz: boolean = false;\n\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n /** DateTZ object representing the currently set datetime */\n public selectedDateTz = new BehaviorSubject(\n closestToTimeSlotTz(DateNow(new Date()), this.step)\n );\n\n /** string representing the currently set datetime display value, needed for the input to display the slected value */\n public selectedTimeString = new BehaviorSubject(\n timeWithGmtOffsetFormatString(this.selectedDateTz.value)\n );\n\n public filterFormControl: FormControl = new FormControl();\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(\n generateAvailableTimesTz(\n DateNow(),\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(DateNow())]\n : [],\n this.startFromDateTz\n )\n );\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // Subscribe to selected option changes\n this.subscription(\n 'dateTimeChanges',\n combineLatest([this.selectedDateTz])\n .pipe(\n map(([selectedDateTz]) => {\n /**\n * The selectedDateTz should already be pegged to the closest time slot, but\n * if the selected time rolls into the past this can correct it. // R--- verify this statement\n */\n return closestToTimeSlotTz(selectedDateTz, this.step);\n }),\n withLatestFrom(this.options),\n filter(\n ([date, timeOptions]: [\n DateTZ,\n SelectOption[]\n ]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(\n (t) => t.value === date.formatDate('HH:mm')\n );\n }\n ),\n map(([dateTz, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz,\n });\n\n // Sort the time options\n timeOptions.sort((a, b) =>\n `${a.value}`.localeCompare(`${b.value}`)\n );\n return timeOptions;\n })\n )\n .subscribe((next) => {\n return this.options.next(next);\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n changes.no_past_times ||\n changes.step ||\n changes.fromDateTz ||\n changes.all_day\n ) {\n // If there's a new date value then update the time options\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // If today and all day goes from on to off the selected value isn't going to be available.\n if (\n changes.all_day &&\n !changes.all_day.currentValue &&\n changes.all_day.previousValue\n ) {\n this.setValue(this.options.value[0].display);\n }\n }\n }\n\n /**\n * Getter if the time picker options are visiable or not\n */\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n /**\n * Getter to return the current form timestamp from the from date object\n */\n public get timezone(): string {\n return this.fromDateTz.building_tz;\n }\n\n /**\n * A filter for finding a matching value when using the input text search\n */\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.selectedDateTz,\n ]).pipe(\n map(([value, selectedDateTz]) => {\n return nearestStepToInput(\n this.step,\n value,\n DateTime.now().valueOf()\n );\n })\n );\n\n /**\n * Default text displayed in the search field when the component initializes\n */\n public placeHolderOption = this.options.pipe(\n map((os) => os.length > 0 && os[0])\n );\n\n /**\n * Returns the selected option object by matching the selectedDateTz formated string with the option.display string\n */\n public selectedOption = combineLatest([\n this.options,\n this.selectedDateTz,\n ]).pipe(\n map(([options, selectedDateTz]) =>\n options.find(\n (o) =>\n o.display === timeWithGmtOffsetFormatString(selectedDateTz)\n )\n )\n );\n\n /**\n * Determines the visually selected value when the options list is visible.\n *\n * @param option DateTZ\n * @returns boolean\n */\n public isSelected(option: SelectOption) {\n return this.selectedTimeString.value === option.display;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: DateTZ) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: DateTZ) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Method just used in unit tests to test disabling the input\n * @param disabled\n */\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Update the selected values\n * @param dateTz the DateTz object for the new time\n */\n public setSelectedValues(dateTz: DateTZ) {\n // Update the selected DateTz and string representations\n this.selectedTimeString.next(timeWithGmtOffsetFormatString(dateTz));\n this.selectedDateTz.next(dateTz);\n if (this._onChange) {\n this._onChange(dateTz);\n }\n }\n\n /**\n * Update the form field value\n * @param displayString The \"display\" value of this.options set by the time picker\n */\n public setValue(displayString: string): void {\n // Convert the display time string to the actual option object via an array find.\n const newTimeTz = this.options.value.find(\n (opt) => opt.display === displayString\n ).value;\n // Update the selected DateTz and string representations\n this.setSelectedValues(newTimeTz);\n // Send the\n if (newTimeTz) {\n if (this._onChange) {\n this._onChange(newTimeTz);\n }\n }\n }\n\n /**\n * Fires when the form control value is changed\n * @param dateTz The new value for the component\n */\n public writeValue(dateTz: DateTZ | null) {\n // Init is null ?\n if (dateTz != null) {\n // Update the selected DateTz and string representations\n this.setSelectedValues(dateTz);\n // Update the available options\n this.options.next(\n generateAvailableTimesTz(\n dateTz,\n !this.noPastTimes,\n this.step,\n dateTz.building_tz,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(dateTz)]\n : [],\n this.startFromDateTz\n )\n );\n }\n }\n}\n\nfunction generateOptionForDateTz(dateTz: DateTZ): SelectOption {\n return {\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n nearestDurationToInput,\n DurationGroup,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n map\n} from 'rxjs/operators';\nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'mck-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n @Input() max_length?: number;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDate: number;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDate = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDate]).pipe(\n map(([value, currentStartDate]) => nearestDurationToInput(this.durationGroups, currentStartDate.ms, value)\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDate.pipe(\n map(d => generateDurationOptionsFromGroups(d.toZone(this.timezone), this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDate.value.toZone(this.timezone), this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDate) {\n // R--- refactor input param\n const date = new DateTZ({date: this.startDate})\n this.currentStartDate.next(date);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mck-error-message',\n template: `\n
\n
\n
\n \n \n \n
\n
\n `,\n styleUrls: ['./error-message.component.scss']\n})\nexport class ErrorMessageComponent {\n\n constructor() {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-calendar-icon',\n template: `\n \n \n \n \n \n `,\n})\nexport class CalendarIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-chevron-icon',\n template: `\n \n \n
\n \n \n \n
\n
\n \n
\n `\n})\nexport class ChevronIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n @Input()\n up?: boolean;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit\n} from '@angular/core';\n\n@Component({\n selector: 'mck-close-icon',\n template: `\n \n \n \n \n `\n})\nexport class CloseIconComponent implements OnInit {\n\n @Input()\n fillClass?: string;\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component(\n {\n selector: 'mck-informational-image',\n template: `\n \n
\n
\n
\n \n
\n
\n
\n
\n `,\n styleUrls: ['./informational-image.component.scss'],\n encapsulation: ViewEncapsulation.None\n }\n)\nexport class InformationalImageComponent extends BaseTemplateComponent {\n\n @Input()\n public src: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-label',\n template: `\n \n \n \n *\n \n \n `,\n styleUrls: ['./label.component.scss']\n})\nexport class LabelComponent extends BaseTemplateComponent implements OnInit {\n\n @Input()\n required = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { MatSelect } from '@angular/material/select';\nimport { SelectOption } from '../options/select-option';\n\n@Component({\n selector: 'mck-legend-dropdown',\n template: `\n
\n \n \n \n \n
\n \n \n \n {{ buildPlaceholder() }}\n \n
\n \n
\n \n
\n `,\n styleUrls: ['./legend-dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LegendDropdownComponent {\n\n @Input()\n public placeholder: string;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public placeholderOpen?: string\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public buildPlaceholder(){\n return this.isOpen && this.placeholderOpen ? this.placeholderOpen : this.placeholder\n }\n}\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AcaDatePickerComponent } from '../aca-date-picker/aca-date-picker.component';\n\n@Component({\n selector: 'mck-date-picker',\n template: `\n \n Date\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./mck-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MckDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class MckDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public initialDateSelection?: number;\n\n @Input() public invalid?: boolean;\n\n @Output() public onSelect = new EventEmitter();\n\n // R--- or is this the date picker to refactor. too tired.\n public ngOnInit(): void {\n if (this.initialDateSelection) {\n this.writeValue(this.initialDateSelection)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(AcaDatePickerComponent, {static: true }) private _acaDatePicker: AcaDatePickerComponent;\n\n /** Currently selected date */\n public dateValue = new BehaviorSubject(DateNow(new Date()));\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.dateValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public get date(): Observable {\n return this.dateValue;\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = this.dateValue.value;\n const d = new DateTZ({date: new_value})\n let new_date = d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n const new_d = new DateTZ({ date: new_date })\n this.dateValue.next(new_d);\n if (this._onChange) {\n this._onChange(new_date);\n }\n this.onSelect.emit(new_date);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n this.setValue(DateNow(new Date()).ms);\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n const date = new DateTZ({date: value})\n this.dateValue.next(date);\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-modal-button-row',\n template: `\n \n \n \n \n
\n \n {{secondaryLabel}}\n \n \n {{primaryLabel}}\n\n \n
\n \n
\n `,\n styleUrls: ['./modal-button-row.component.scss']\n})\nexport class ModalButtonRowComponent extends BaseTemplateComponent {\n\n @Input()\n primaryLabel?: string;\n\n /**\n * Specify if you want to disable the primary button\n */\n @Input()\n primaryDisabled?: boolean = false;\n\n /**\n * Used only if primaryLabel is specified.\n */\n @Output()\n public primarySubmit = new EventEmitter();\n\n /**\n * Specify if you want to show a secondary label button\n */\n @Input()\n secondaryLabel?: string;\n\n @Input()\n disableFixed: boolean = false;\n\n /**\n * Specify if you want to disable the secondary button\n */\n @Input()\n secondaryDisabled?: boolean = false;\n\n /**\n * Used only if secondaryLabel is specified.\n */\n @Output()\n public secondarySubmit = new EventEmitter();\n\n @Input()\n smallButtons?: boolean = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-modal',\n template: `\n \n
\n
\n \n
\n
\n

{{header}}

\n
\n
\n \n
\n `,\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n @Input()\n header?: string;\n @Input() shouldClose?: boolean = true;\n\n constructor(private dialogRef: MatDialogRef) {\n }\n\n public close() {\n this.dialogRef.close();\n }\n}\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { DateTZ, isToday } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'override-changes-modal',\n templateUrl: './override-changes-modal.component.html',\n styleUrls: ['./override-changes-modal.component.scss']\n})\nexport class OverrideChangesModalComponent implements OnInit{\n\n public edits;\n public timezone;\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: OverrideChangesModalComponent){\n\n }\n\n public ngOnInit(){\n // this.edits = this._data.edits.sort((a, b) => a - b);\n\n // Function to convert epoch to 'YYYY-MM-DD' format\n const getDateString = (epoch) => {\n return new Date(epoch * 1000).toISOString().split('T')[0];\n };\n\n // Set to store unique date strings\n const uniqueDates = new Set();\n\n // Filter the edits array\n const filteredEdits = this._data.edits.filter(epoch => {\n const dateString = getDateString(epoch);\n if (!uniqueDates.has(dateString)) {\n uniqueDates.add(dateString);\n return true;\n }\n return false;\n });\n\n this.edits = filteredEdits;\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone });\n const dateIsToday = isToday(dateTZ, this._data.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n}","
\n \n \n
\n\n \n \n \n\n

Overriding Changes

\n

Editing the series here will override all previous changes made to individual occurrences. Are you sure you want to proceed?

\n\n \n \n \n \n \n \n \n \n \n \n \n
Dates
{{formatDate(edit)}}
\n
\n\n\n \n \n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\n\n/**\n * Transforms input by returning a subset of items based on if the\n * any items include the search text based on passed objectKey.\n *\n * objectKey can be pipe separated keys. e.g: 'name|age'. Then it will check against all.\n */\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(items: any[], searchText: string, objectKey?: string): any[] {\n if (!items) return [];\n if (!searchText) return items;\n searchText = searchText.toLowerCase();\n const splitKeys = objectKey?.split('|') ?? [];\n return items.filter(it => {\n let included = false;\n splitKeys.forEach((key) => {\n if (it[key]?.toLowerCase().includes(searchText)) {\n included = true;\n }\n });\n if (splitKeys.length === 0) {\n return it.toLowerCase().includes(searchText);\n }\n return included;\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n DomSanitizer,\n SafeHtml,\n SafeResourceUrl,\n SafeScript,\n SafeStyle,\n} from '@angular/platform-browser';\n\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n@Pipe({\n name: 'sanitize',\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n type: 'resource' | 'url' | 'script' | 'style' | 'html' = 'html'\n ): SafeHtml | SafeResourceUrl | SafeScript | SafeStyle {\n switch (type) {\n case 'resource':\n return (\n this.sanitizer.sanitize(\n SecurityContext.RESOURCE_URL,\n value\n ) || ''\n );\n case 'url':\n return (\n this.sanitizer.sanitize(SecurityContext.URL, value) || ''\n );\n case 'script':\n return (\n this.sanitizer.sanitize(SecurityContext.SCRIPT, value) || ''\n );\n case 'style':\n return (\n this.sanitizer.sanitize(SecurityContext.STYLE, value) || ''\n );\n }\n return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { SelectOption } from '../types';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'mck-radio-select',\n template: `\n \n
\n {{label}}\n \n {{option.display}}\n \n
\n
\n `,\n styleUrls: ['./radio-select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioSelectComponent),\n multi: true\n }\n ]\n})\nexport class RadioSelectComponent extends BaseTemplateComponent implements OnInit, ControlValueAccessor {\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n options: SelectOption[];\n\n public value = new BehaviorSubject | undefined>(undefined);\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n public setValue(value: string) {\n const obj = this.options.find(o => o.value === value);\n this.writeValue(obj);\n if (this._onChange) {\n this._onChange(obj)\n }\n }\n\n writeValue(obj: SelectOption): void {\n this.value.next(obj);\n }\n}\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { OrganisationService, RecurrencePeriod, RecurrenceType, removeExpiredOcurrences, RepeatsOn } from \"@mckinsey-converge/data-common\";\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { first } from \"rxjs/operators\";\nimport { RecurrencePatternForm } from \"../recurrence-pattern-form/recurrence-pattern-form.component\";\n\n@Component({\n selector: 'recurrence-booking-form',\n templateUrl: './recurrence-booking-form.component.html',\n styleUrls: ['./recurrence-booking-form.component.scss']\n})\n\nexport class RecurringBookingForm implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n\n public current_type: RecurrenceType; \n public recurrence_types: Array = [\n {type: RepeatsOn.PATTERN, label: 'Repeats on'},\n {type: RepeatsOn.DATE, label: 'Repeats on specific date'}\n ]\n\n public building_tz = \"\";\n\n @ViewChild(RecurrencePatternForm) pattern_form: RecurrencePatternForm;\n\n constructor(\n private _org: OrganisationService,\n ) {}\n\n public get recurrencePeriod(){\n return this.form.get('recurrence_period')\n }\n\n public ngOnInit(): void {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.building_tz = this._org?.building?.timezone || 'America/Chicago';\n })\n if(this.recurrencePeriod.value === RecurrencePeriod.LIST){\n this.current_type = this.recurrence_types[1];\n removeExpiredOcurrences(this.form)\n }else{\n this.current_type = this.recurrence_types[0];\n }\n }\n\n public onChangeType(value: string) {\n this.current_type = this.recurrence_types.filter((type) => type.type === value)[0]\n if(this.current_type.type === RepeatsOn.PATTERN){\n this.recurrencePeriod.setValue(this.pattern_form.recurrencePatternFormControl.value)\n }else{\n this.recurrencePeriod.setValue(RecurrencePeriod.LIST)\n }\n }\n\n public dateToBuildingTz(date?: number){\n return new DateTZ({date, building_tz: this.building_tz, is_local_tz: false})\n }\n\n public get error(){\n const recurrence_starts = this.form.controls.recurrence_starts\n const recurrence_days = this.form.controls.recurrence_days\n return recurrence_starts.invalid || recurrence_days.invalid\n }\n\n}\n","
\n \n
\n \n \n {{recurrence_types[0].label}}\n \n \n \n
\n
\n \n \n {{recurrence_types[1].label}}\n \n \n \n
\n
\n
\nThe recurrence pattern is not valid.","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { MatMenuTrigger } from \"@angular/material/menu\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { OrganisationService } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ,toMiddayUTC } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-date-form',\n templateUrl: './recurrence-date-form.component.html',\n styleUrls: ['./recurrence-date-form.component.scss']\n})\n\nexport class RecurrenceDateForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n public selected_dates: Array = []\n public timezone: string = '';\n public nowTz: DateTZ = DateNow(new Date());\n public fromDateTz: DateTZ = this.nowTz.clone();\n public untilDateTz: DateTZ = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n public dateTz: DateTZ = DateNow(new Date());\n\n public get recurrenceStarts(){\n return this.form.get('recurrence_starts');\n }\n\n public get formDateTz(){\n return this.form.get('dateTz');\n }\n\n constructor (private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The fromDateTz is curious, would it make sense to be based on the form dateTz?\n this.fromDateTz = this.nowTz.clone()\n this.untilDateTz = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n\n if(this.recurrenceStarts.value){\n const tempForSort = [...this.recurrenceStarts.value]; // due to cannot assign to read only property '0' of object '[object Array]'\n this.selected_dates = tempForSort.sort((d1: DateTZ, d2: DateTZ) => d1.ms - d2.ms);\n }\n this.subscription('ocurrenceChanges', this.recurrenceStarts.valueChanges\n .subscribe(() => {\n this.selected_dates = [...this.recurrenceStarts.value]\n })\n ); \n }\n\n /**\n * Add value to the list of selected dates\n * @param newDateTz\n */\n public addDate(newDateTz: DateTZ) {\n const d = newDateTz.clone();\n const start_date = this.formDateTz.value;\n let new_date = d.setValue({hour: start_date.dateHour, minute: start_date.minutes})\n \n /** Prevent user from selecting past dates */\n if (new_date.isBeforeDate(this.fromDateTz)) {\n new_date = this.fromDateTz;\n }\n\n /** Prevent user from selecting the same date more than once */\n const is_selected = this.selected_dates.filter((date: DateTZ)=> new_date.isSameDate(date, 'day'))\n if(is_selected.length){\n return\n }\n \n this.selected_dates.push(new_date);\n this.recurrenceStarts.setValue(this.selected_dates.sort((d1, d2) => d1.ms - d2.ms));\n this.setDateTzForm();\n }\n\n /**\n * \n * @param dateMsValue: number\n * @returns \n */\n public setPickerToGivenDate(dateTsValue: DateTZ) {\n this.fromDateTz = dateTsValue.clone();\n }\n\n /**\n * Function calls on close of date picker without date selection\n */\n public onDatePickerClose = () => {\n this.setPickerToGivenDate(this.nowTz)\n };\n\n public goToToday() {\n this.addDate(this.nowTz);\n this.setPickerToGivenDate(this.nowTz);\n }\n\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n public openDatePicker() {\n this._trigger.openMenu();\n }\n\n public deleteDate(date: DateTZ) {\n const index = this.selected_dates.map((d: DateTZ) => d.ms).indexOf(date.ms)\n this.selected_dates.splice(index, 1)\n this.recurrenceStarts.setValue(this.selected_dates)\n this.setDateTzForm()\n }\n\n public isToday(date) {\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: this.timezone,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone,\n }),\n 'day'\n );\n }\n\n public formatDate(date: DateTZ){\n const isToday = this.isToday(date);\n const display = date.formatDate('ccc dd MMM yyyy');\n\n return `${display}${isToday ? ' (Today)' : ''}`;\n }\n\n private setDateTzForm(): void {\n if (this.selected_dates.length === 0)\n return;\n\n const tz = this._org.building.timezone;\n const date_now = DateNow(new Date()).toZone(tz);\n let dateTz = this.selected_dates[0].clone();\n\n dateTz = dateTz.setValue({\n hour: (this.formDateTz.value as DateTZ).hours,\n minute: (this.formDateTz.value as DateTZ).minutes\n });\n\n if (this.selected_dates[0].isSameDate(this.nowTz, \"day\") && dateTz.hours < date_now.hours) {\n const { minutes: minute, hours: hour } = closestToTimeSlotTz(this.nowTz, 15);\n dateTz = dateTz.setValue({ minute, hour, second: 0 });\n }\n\n this.formDateTz.setValue(dateTz);\n }\n}\n","
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
DateAction
{{formatDate(date)}}Delete
\n
[+] Add another date
\n \n
\n \n Today\n \n
\n
\n
\n
","import { Component, Input, OnInit } from \"@angular/core\";\nimport { FormGroup, Validators } from \"@angular/forms\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { arrayWithValues, generateWeekDays, RecurrencePeriod, recurrencePeriodToDurationType, RepeatPeriod, validDateTZ, WeekDays } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-pattern-form',\n templateUrl: './recurrence-pattern-form.component.html',\n styleUrls: ['./recurrence-pattern-form.component.scss']\n})\n\nexport class RecurrencePatternForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n\n /** Range of dates for the Start Date Picker*/\n public nowTz: DateTZ = DateNow(new Date());\n public fromStartTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n public untilTz: DateTZ = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n public timezone: string = '';\n \n\n /** Range of dates for the End Date Picker*/\n public fromEndTz: DateTZ;\n\n public repeat_period_options: Array = [\n {label: 'Day', id: RecurrencePeriod.DAILY},\n {label: 'Week',id: RecurrencePeriod.WEEKLY},\n {label: 'Month', id: RecurrencePeriod.ABSOLUTE_MONTHLY}\n ]\n public week_days: Array = []\n\n public repeat_every_options\n\n\n public get recurrenceDateStartTzFormControl() {\n return this.form.get('dateTz')\n }\n\n public get recurrenceEndFormControl(){\n return this.form.get('recurrence_endTz')\n }\n\n public get recurrencePeriodFormControl(){\n return this.form.get('recurrence_period')\n }\n\n public get recurrenceIntervalFormControl(){\n return this.form.get('recurrence_interval')\n }\n\n public get recurrencePatternFormControl(){\n return this.form.get('recurrence_pattern')\n }\n\n public get recurrenceDaysFormControl(){\n return this.form.get('recurrence_days')\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The from date is curious, why isn't it based on the form dateTz?\n this.repeat_every_options = new Array(1)\n this.fromStartTz = closestToTimeSlotTz(this.nowTz, 15)\n this.untilTz = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n this.fromEndTz = this.fromStartTz.addValue({days: 1})\n\n this.setEndDateFromStartDate(this.recurrenceDateStartTzFormControl.value) //make sure end date is after start date\n\n if(!this.recurrencePeriodFormControl.value){\n this.recurrencePeriodFormControl.setValue(RecurrencePeriod.WEEKLY)\n }\n\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.recurrencePatternFormControl.setValue(this.recurrencePeriodFormControl.value)\n }\n\n this.week_days = generateWeekDays(this.recurrenceDateStartTzFormControl.value.ms, { building_tz: this.fromStartTz.building_tz })\n this.generateMaxIntervals()\n\n if(this.recurrenceDaysFormControl.value.length > 0){\n this.week_days = this.week_days.map((day) => \n ({...day, active: this.recurrenceDaysFormControl.value.includes(day.full_name)})\n )\n }\n\n if(!this.recurrenceDaysFormControl.value.length && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n const current_days = this.week_days.filter((day) => day.active).map((day)=>day.full_name)\n this.recurrenceDaysFormControl.setValue(current_days)\n }\n\n this.generateOcurrenceList()\n\n this.subscription('startTimeChanges', this.recurrenceDateStartTzFormControl.valueChanges\n .subscribe((next) => {\n this.setEndDateFromStartDate(next) \n })\n );\n\n this.subscription('endTimeChanges', this.recurrenceEndFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n );\n \n this.subscription('recurrencePeriodFormControlChanges', this.recurrencePeriodFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n ); \n }\n\n public setEndDateFromStartDate(startDateTz: DateTZ){\n let end_date = this.recurrenceEndFormControl.value.setValue({hour: startDateTz.dateHour, minute: startDateTz.minutes})\n\n /**Update the End date picker range */\n this.fromEndTz = startDateTz.isSameDate(this.untilTz,'day') ? startDateTz : startDateTz.addValue({days: 1})\n\n if(end_date.isBeforeDate(this.fromEndTz)){\n end_date = this.fromEndTz\n }\n\n this.recurrenceEndFormControl.setValue(end_date)\n\n this.generateMaxIntervals()\n this.updateActiveWeekday() \n }\n\n public setRepeatPeriod(value: RecurrencePeriod){\n this.updateValidators(value)\n this.recurrencePeriodFormControl.setValue(value);\n this.recurrencePatternFormControl.setValue(value);\n this.recurrenceIntervalFormControl.setValue(1)\n this.generateOcurrenceList();\n }\n\n public setRepeatEvery(value: number){\n this.recurrenceIntervalFormControl.setValue(value)\n this.generateOcurrenceList()\n }\n\n public repeatTimeString(value: string){\n return this.recurrenceIntervalFormControl.value !== 1 ? `${value}(s)` : value\n }\n\n public get displayWeekdays(){\n return this.recurrencePatternFormControl.value === RecurrencePeriod.WEEKLY\n }\n\n /* Check if selected interval is valid and reset to 1 if not*/\n private validateRecurrenceInterval = () => {\n if(this.repeat_every_options.length < this.recurrenceIntervalFormControl.value){\n this.recurrenceIntervalFormControl.setValue(1)\n } \n };\n\n /**\n * Generate max value for dorpdown interval\n */\n public generateMaxIntervals(){\n const start = this.recurrenceDateStartTzFormControl.value;\n const date_diff = this.recurrenceEndFormControl.value.dateDiff(start, this.periodToDurationType, this.periodToDurationType)\n //If no diff default to 1\n this.repeat_every_options = new Array(Math.round(date_diff) || 1)\n this.validateRecurrenceInterval();\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.generateOcurrenceList()\n }\n }\n\n /**\n * Generate ocurrence list base on the selected interval\n */\n public generateOcurrenceList() {\n\n /**If selected period is list then we don't want \n * to generate a list based on the repeats on selections*/\n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.LIST){\n return\n }\n\n const occurrence = []\n const first_date = this.recurrenceDateStartTzFormControl.value;\n let start = first_date\n const end = this.recurrenceEndFormControl.value;\n const interval = this.recurrenceIntervalFormControl.value\n const recurr_days = this.week_days.filter(day => day.active)\n /**\n * isLastDayOfMonth : Boolean\n * flag - to generate last day of every month in case of day or month reccuring booking if start date is last day of month\n */\n // const isLastDayOfMonth = first_date.date.day === first_date.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY;\n const isLastDayOfMonth = first_date.dateDay === 31 && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY ;\n \n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n start = start.startOfValue('week')\n }\n\n while (end.dateDiff(start.startOfValue('day'), this.periodToDurationType, this.periodToDurationType) >= 0) {\n \n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n occurrence.push(start) \n start = start.addValue({[this.periodToDurationType]: interval}, isLastDayOfMonth);\n /**\n * IF - should only consider resetting start under mentioned condition of ticket - https://acaprojects.atlassian.net/browse/MCK-2085\n * In summery - If user select any date except 31st, other months in the series (no matter 30 or 31 day month) should have same date select as start date.\n * If user select 31st as an start date, other month in the seleries should have select last day of the month (30th/31st/28th/29th).\n * Exception for February - February should select 28th or 29th If in above both selection includes date between 28th - 31st.\n * \n */\n if(start.dateDay !== first_date.dateDay && start.dateDay !== start.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY) {\n start = start.setValue({day: first_date.dateDay});\n } \n }else {\n recurr_days.forEach((day)=>{\n const date = start.addValue({days: day.day_index})\n if((date.isAfterDate(first_date) || date.isSameDate(first_date, 'day')) && \n (date.isBeforeDate(end) || date.isSameDate(end, 'day'))){\n occurrence.push(date)\n }\n })\n start = start.addValue({[this.periodToDurationType]: interval})\n }\n }\n\n this.form.controls.recurrence_count.setValue(occurrence.length)\n this.form.controls.recurrence_starts.setValue(occurrence.sort((d1, d2) => d1.ms - d2.ms))\n \n }\n\n public get periodToDurationType(){\n const period = this.recurrencePeriodFormControl.value\n return recurrencePeriodToDurationType(period)\n }\n\n /**\n * Update active weekday in the weekdays array\n */\n private updateActiveWeekday() {\n const _week_days = this.week_days.map((day)=>{\n if(this.recurrenceDaysFormControl.value.includes(day.full_name)){\n return {...day, active: true}\n }else{\n return {...day, active: false}\n }\n })\n this.week_days = [..._week_days] \n }\n\n public setWeekDays(new_day: WeekDays){\n const days = this.recurrenceDaysFormControl.value\n if(this.disabled){\n return\n }\n\n if(!new_day.active){\n days.push(new_day.full_name)\n }else{\n const current_index = days.indexOf(new_day.full_name)\n days.splice(current_index,1)\n }\n this.recurrenceDaysFormControl.setValue([...days])\n this.updateActiveWeekday()\n this.generateOcurrenceList()\n }\n\n /**Update the recurrence days validator if period changes */\n public updateValidators(value: RecurrencePeriod){\n if(value === RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n this.recurrenceDaysFormControl.setValidators(arrayValidators);\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }else if(value !== RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n this.recurrenceDaysFormControl.clearValidators();\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }\n }\n}\n","
\n
\n \n \n \n Date and time must be in the future\n
\n
\n \n \n \n Date and time must be in the future\n
\n
\n
\n \n
\n \n \n \n {{ i + 1}}\n \n \n \n \n \n \n {{ repeatTimeString(option.label) }}\n \n \n \n
\n
\n
\n \n
\n
\n {{day.id}}\n
\n
\n
\n
\n
","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { SelectOption } from '../types';\n\n@Component({\n selector: 'mck-select-option',\n template: `\n \n \n \n \n {{ option.display }}\n \n \n `,\n styleUrls: ['./select-option.component.css']\n})\nexport class SelectOptionComponent extends BaseTemplateComponent {\n\n @Input()\n option: SelectOption;\n\n @Input()\n selected: boolean;\n\n /**\n * If true, we still display as if it wasn't disabled.\n */\n @Input()\n ignoreDisabled = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators';\nimport { MatSelect } from '@angular/material/select';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\n@Component({\n selector: 'mck-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class SelectComponent implements OnInit, OnChanges, ControlValueAccessor {\n\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n /**\n * When true, can filter by searching on the input.\n */\n @Input()\n public searchEnabled = false;\n\n @Input()\n public splitDisplay = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Input()\n public showDivider: boolean = false\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n public filterFormControl: FormControl = new FormControl();\n\n public value = new BehaviorSubject(this.selectedValue || this.options[0]?.value);\n\n /** Available time blocks for the selected date */\n public _options = new BehaviorSubject[]>(this.options);\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public selectedOption = combineLatest([this._options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this._options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n\n constructor() {\n }\n\n public ngOnInit(): void {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this._options.next(this.options);\n this.value.next(this.selectedValue || this.options?.[0]?.value);\n }\n if (changes.selectedValue) {\n this.value.next(this.selectedValue?.value);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n}\n","
\n {{label}}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mck-selected-chip-count',\n template: `\n \n {{count}}\n \n \n `,\n styleUrls: ['./selected-chip-count.component.scss']\n})\nexport class SelectedChipCountComponent {\n\n @Input()\n count: number;\n\n @Output()\n close = new EventEmitter();\n\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\nexport enum SpacerMode {\n /**\n * If vertical, it expands in the vertical direction. Size is width.\n */\n Vertical = 'vertical',\n /**\n * If horizontal, it expands in the horizontal direction. Size is height.\n */\n Horizontal = 'horizontal',\n}\n\n@Component({\n selector: 'mck-spacer',\n template: `\n \n
\n
\n
\n
\n
\n `,\n styleUrls: ['./spacer.component.css'],\n})\nexport class SpacerComponent extends BaseTemplateComponent implements OnInit {\n SpacerMode = SpacerMode;\n\n @Input()\n size: string;\n\n @Input()\n mode: SpacerMode = SpacerMode.Horizontal;\n\n @Input()\n autoSize?: boolean;\n\n @Input()\n spacerClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-switch-group',\n template: `\n
\n {{title}}\n {{option.display}}\n
\n `,\n styleUrls: ['./switch-group.component.scss']\n})\nexport class SwitchGroupComponent implements OnInit {\n\n @Input()\n title: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selectedOptions: SelectOption[] = [];\n\n @Output()\n optionChecked = new EventEmitter>();\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n public onCheckedChange(option: SelectOption) {\n this.optionChecked.emit(option);\n }\n\n public isSelected(option: SelectOption) {\n return !!this.selectedOptions.find(s => s.value === option.value);\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlot,\n nearestStepToInput,\n timeWithGmtOffsetFormatString\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { generateAvailableTimes } from '../utils/time.utils';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport {\n filter,\n map,\n withLatestFrom\n} from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'mck-time-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n `,\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the date from start **/\n @Input() public from: number;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n // R-- Which time field is going to be used, there's too many\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** String representing the currently set date */\n public date = new BehaviorSubject(DateNow(new Date()).ms);\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.date]).pipe(\n map(([value, date]) => nearestStepToInput(this.step, value, DateTime.now().valueOf()))\n );\n\n /** String representing the currently set time */\n public value = new BehaviorSubject(closestToTimeSlot(DateTime.now(), this.step).toFormat('HH:mm'));\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(generateAvailableTimes(DateNow(new Date()).ms, !this.noPastTimes, this.step, this.timezone));\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this.options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n\n // Subscribe to selected option changes\n this.subscription('dateTimeChanges',\n combineLatest([\n this.date\n ]).pipe(\n map(([date]) => {\n // R--- The time input needing to be TZ aware.\n const closestTimeSlot = closestToTimeSlot(DateTime.fromMillis(date.valueOf()), this.step);\n // Need to return the date with building timezone or the HH:mm representation will no match the option values\n return new DateTZ({date: closestTimeSlot.valueOf(), is_local_tz:false, building_tz: this.timezone});\n }),\n withLatestFrom(this.options),\n filter(([date, timeOptions]: [DateTZ, SelectOption[]]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(t => t.value === date.formatDate('HH:mm'));\n }),\n map(([date, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(date),\n value: date.formatDate('HH:mm')\n });\n // Sort the time options\n timeOptions.sort((a, b) => `${a.value}`.localeCompare(`${b.value}`));\n return timeOptions;\n })\n ).subscribe(next => this.options.next(next)));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step || changes.timezone) {\n // If there's a new date value then update the time options\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n const buildingDate = new DateTZ({date: this.from, is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.value.next(buildingDate.formatDate('HH:mm'));\n }\n if (changes.from) {\n // When the from input param changes update the date value\n this.date.next(this.from);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n // value comes in as a HH:mm string\n const newTime = (new_value.indexOf(':') > 0 ? new_value : '00:00').split(':');\n // need the date with the building timezone so the hour set is relative to there and not local.\n const d = new DateTZ({ date: this.date.value, is_local_tz: false, building_tz: this.timezone });\n const date = d.setValue({ hour: parseInt(newTime[0]), minute: parseInt(newTime[1]) });\n if (date) {\n if (this._onChange) {\n this._onChange(date.ms);\n }\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number | null) {\n if (value != null) {\n // Time input value in building time milliseconds\n this.date.next(value);\n // Get the closest time to slot in case the browser was idle and elapse the valid times\n const date = closestToTimeSlot(DateTime.fromMillis(value).startOf('minute'), this.step);\n // Need the building time so HH:mm is correct\n const buildingDate = new DateTZ({date: date.valueOf(), is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.options.next(generateAvailableTimes(buildingDate.ms, !this.noPastTimes, this.step, this.timezone));\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-toggle',\n template: `\n
\n \n
\n `,\n styleUrls: ['./toggle.component.scss']\n})\nexport class ToggleComponent {\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selected: SelectOption;\n\n @Output()\n selectedChange = new EventEmitter>();\n\n public onTapOption(option: SelectOption) {\n this.selectedChange.emit(option);\n }\n\n isSelected(option: SelectOption) {\n return this.selected === option;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Component({\n selector: 'app-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss']\n})\nexport class TooltipComponent {\n isVisible: boolean = false; // To control the visibility of the tooltip\n position: TooltipPosition = TooltipPosition.DEFAULT;\n theme: TooltipTheme = TooltipTheme.DEFAULT;\n tooltip = '';\n left = 0;\n top = 0;\n visible = false;\n}","
\n
\n
\n {{string}}\n
\n
\n
","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n HostListener,\n Injector,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport {TooltipComponent} from \"./tooltip.component\";\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Directive({\n selector: '[tooltip]'\n})\nexport class TooltipDirective {\n\n @Input() tooltip = '';\n @Input() position: TooltipPosition = TooltipPosition.DEFAULT;\n @Input() theme: TooltipTheme = TooltipTheme.DEFAULT;\n @Input() trigger: ('hover' | 'click' | 'touch')[] = ['hover']; // Now an array of trigger types\n @Input() showDelay = 0;\n @Input() hideDelay = 0;\n @Input() show: boolean = true;\n\n private componentRef: ComponentRef | null = null;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n constructor(\n private elementRef: ElementRef, \n private appRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver, \n private injector: Injector) {\n }\n\n // Helper function to check if the tirgger type is present \n private hasTrigger(triggerType: 'hover' | 'click' | 'touch'): boolean {\n return this.trigger.includes(triggerType);\n }\n\n //Mouse and hover events\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.hasTrigger('hover') ) {\n this.initializeTooltip();\n }\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.hasTrigger('hover') ) {\n this.setHideTooltipTimeout();\n }\n }\n\n // Click event\n @HostListener('click')\n onClick(): void {\n if (this.hasTrigger('click') ) {\n if (this.componentRef === null) {\n this.initializeTooltip();\n } else {\n this.destroy(); // Hide tooltip if it is already shown\n }\n }\n }\n\n // Touch event\n\n\n @HostListener('touchstart', ['$event'])\n onTouchStart($event: TouchEvent): void {\n // Prevent default to avoid click event fire immedieatly \n // $event.preventDefault();\n if(this.hasTrigger('touch')) {\n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 150); // show the tooltip after short delay\n }\n \n }\n\n @HostListener('touchend')\n onTouchEnd(): void {\n // Hide the tooltip when touch end \n if(this.hasTrigger('touch') ){\n window.clearTimeout(this.touchTimeout);\n // this.setHideTooltipTimeout();\n setTimeout(() => {\n this.setHideTooltipTimeout();\n }, 500); \n }\n \n }\n\n // Initialization of the tooltip\n private initializeTooltip() {\n if (this.componentRef === null) {\n window.clearInterval(this.hideDelay);\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);\n this.componentRef = componentFactory.create(this.injector);\n\n this.appRef.attachView(this.componentRef.hostView);\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef).rootNodes;\n\n this.setTooltipComponentProperties();\n\n document.body.appendChild(tooltipDOMElement);\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\n }\n }\n\n private setTooltipComponentProperties() {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.position = this.position;\n this.componentRef.instance.theme = this.theme;\n\n const {left, right, top, bottom} = this.elementRef.nativeElement.getBoundingClientRect();\n\n switch (this.position) {\n case TooltipPosition.BELOW: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(bottom);\n break;\n }\n case TooltipPosition.ABOVE: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(top);\n break;\n }\n case TooltipPosition.RIGHT: {\n this.componentRef.instance.left = Math.round(right);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n case TooltipPosition.LEFT: {\n this.componentRef.instance.left = Math.round(left);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n\n private showTooltip() {\n if (this.componentRef !== null) {\n this.componentRef.instance.visible = this.show ? true : false;\n }\n }\n\n private setHideTooltipTimeout() {\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n destroy(): void {\n if (this.componentRef !== null) {\n window.clearInterval(this.showTimeout);\n window.clearInterval(this.hideDelay);\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","export enum TooltipPosition {\n ABOVE = 'above',\n BELOW = 'below',\n LEFT = 'left',\n RIGHT = 'right',\n DYNAMIC = 'dynamic',\n DEFAULT = 'below'\n}\n\nexport enum TooltipTheme {\n DARK = 'dark',\n LIGHT = 'light',\n DEFAULT = 'dark'\n}\n","export { AlertMode, AlertBannerDisplay } from './alert-banner/alert-banner.component';\nexport { SelectOption } from './options/select-option';\nexport * from './cng-select/dropdown-panel';","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSelectModule } from '@angular/material/select';\nimport { AutoCompleteChipSelectItemComponent } from './auto-complete-chip-select-item/auto-complete-chip-select-item.component';\nimport { AutoCompleteSelectOptionComponent } from './auto-complete-select-option/auto-complete-select-option.component';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { RadioSelectComponent } from './radio-select/radio-select.component';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FilterPipe } from './pipes/filter.pipe';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TimeFieldComponent } from './time-field/time-field.component';\nimport { DateTzTimeFieldComponent } from './date-tz-time-field/date-tz-time-field.component';\nimport { SpacerComponent } from './spacer/spacer.component';\nimport { DurationFieldComponent } from './duration-field/duration-field.component';\nimport { DateTzDurationFieldComponent } from './date-tz-duration-field/date-tz-duration-field.component';\nimport { AcaDatePickerComponent } from './aca-date-picker/aca-date-picker.component'; // the old widget\nimport { MckDatePickerComponent } from './mck-date-picker/mck-date-picker.component'; // the old form field \nimport { DateTzCalendarWidgetComponent } from './date-tz-calendar-widget/date-tz-calendar-widget.component'; // the new widget\nimport { DateTzDatePickerComponent } from './date-tz-date-picker/date-tz-date-picker.component'; // the new form field \nimport { CalendarIconComponent } from './icons/calendar/calendar-icon.component';\nimport { ChevronIconComponent } from './icons/calendar/chevron-icon.component';\nimport { SelectOptionComponent } from './select-option/select-option.component';\nimport { CloseIconComponent } from './icons/close/close-icon.component';\nimport { SelectedChipCountComponent } from './selected-chip-count/selected-chip-count.component';\nimport { AlertBannerComponent } from './alert-banner/alert-banner.component';\nimport { ErrorMessageComponent } from './error-message/error-message.component';\nimport { ToggleComponent } from './toggle/toggle.component';\nimport { LabelComponent } from './label/label.component';\nimport { ModalComponent } from './modal/modal.component';\nimport { CollapseHeaderComponent } from './collapse-header/collapse-header.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { SwitchGroupComponent } from './switch-group/switch-group.component';\nimport { ModalButtonRowComponent } from './modal-button-row/modal-button-row.component';\nimport { InformationalImageComponent } from './informational-image/informational-image.component';\nimport { GroupHeaderPipe } from './auto-complete-chip-select-item/groupHeader.pipe';\nimport { SelectComponent } from './select/select.component';\nimport { LegendDropdownComponent } from './legend-dropdown/legend-dropdown.component';\nimport { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';\nimport { RecurrencePatternForm } from './recurrence-pattern-form/recurrence-pattern-form.component'; \nimport { RecurrenceDateForm } from './recurrence-date-form/recurrence-date-form.component';\nimport { ConflictsModalComponent } from './conflicts-modal/conflicts-modal.component';\nimport { RecurringBookingForm } from './recurrence-booking-form/recurrence-booking-form.component';\nimport { OverrideChangesModalComponent } from './override-changes-modal/override-changes-modal.component';\nimport { SanitizePipe } from './pipes/sanitise.pipe';\nimport { ConflictAlertModalComponent } from './conflict-alert-modal/conflict-alert-modal.component';\nimport { CngSelectComponent } from './cng-select/cng-select.component';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { DropdownTriggerForDirective } from './cng-select/dropdown-trigger-for.directive';\nimport { CngSelectOptionsComponent } from './cng-select/cng-select-options.component';\nimport { TooltipComponent } from './tooltip/tooltip.component';\nimport { TooltipDirective } from './tooltip/tooltip.directive';\nimport { ZoomWarningComponent } from './zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nimport { CustomSnackbarComponent } from './custom-snackbar-component/custom-snackbar-component.component';\nimport { SnackBarService } from './custom-snackbar-component/custom-snackbar-component.service';\nimport { CateringDropComponent } from './catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n\nexport const MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule,\n MatExpansionModule,\n OverlayModule\n];\n\n@NgModule({\n imports: [CommonModule,\n ...MATERIAL_MODULES,\n ReactiveFormsModule,\n FormsModule,\n NgxMatSelectSearchModule, \n NgxSkeletonLoaderModule,\n MatSnackBarModule],\n declarations: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n GroupHeaderPipe,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n SelectOptionComponent,\n CloseIconComponent,\n SelectedChipCountComponent,\n AlertBannerComponent,\n ErrorMessageComponent,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n CustomSnackbarComponent,\n CateringDropComponent\n ],\n exports: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n AlertBannerComponent,\n ReactiveFormsModule,\n FormsModule,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n ],\n entryComponents: [\n CustomSnackbarComponent,\n CateringDropComponent\n ]\n \n})\nexport class UiModule {\n}\n","/**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n\nimport {\n closestToTimeSlot,\n closestToTimeSlotTz,\n DurationGroup,\n durationHumanized,\n timeFormatString,\n timeWithGmtOffsetFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../types';\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { DateTime } from 'luxon';\n\n// 24 hours\nexport const ALL_DAY_BOOKING_VALUE = 60 * 24;\n\nexport const DEFAULT_DURATION = 30;\n\n// R--- depreciate.\nexport const generateAvailableTimes = (\n datestamp: number,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz\n): SelectOption[] => {\n // R--- refactor to only used dateTz input and drop timezone param.\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let date = new DateTZ({ date: datestamp, is_local_tz: false, building_tz: timezone });\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || date.isAfterDate(now, 'day')) {\n // later than today\n date = date.startOfValue('day');\n } else {\n // today\n date = now;\n }\n // Get the closest timeslot to the start time\n const inputDate = DateTime.fromMillis(date.ms);\n const closestDate = closestToTimeSlot(inputDate, step);\n // Date changed to the closest time\n date = new DateTZ({ date: closestDate.valueOf(), is_local_tz: false, building_tz: timezone });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(date),\n shortDisplay: date.formatDate('hh:mma'),\n value: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n};\n\n\nexport const generateAvailableTimesTz = (\n fromDateTz: DateTZ,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz,\n all_day: boolean = false,\n extras: SelectOption[] = [],\n startFromDateTz: boolean = false\n): SelectOption[] => {\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let dateTz = fromDateTz.clone();\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || dateTz.isAfterDate(now, 'day')) {\n // later than today\n dateTz = dateTz.startOfValue('day');\n } else {\n // today/fromDateTz using the flag\n dateTz = startFromDateTz ? dateTz : now;\n }\n // Get the closest timeslot to the start time\n dateTz = closestToTimeSlotTz(dateTz, step);\n // Date changed to the closest time\n const end = dateTz.endOfValue('day');\n // Add the all day option for today\n if (all_day && dateTz.isSameDate(now, 'day')) {\n const startOfDay = dateTz.startOfValue('day');\n blocks.push({\n display: timeWithGmtOffsetFormatString(startOfDay),\n shortDisplay: startOfDay.formatDate('hh:mma'),\n value: startOfDay\n })\n }\n // Add options for the rest of the day\n while (dateTz.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n });\n \n dateTz = dateTz.addValue({ minutes: step });\n }\n\n return unique(extras.concat(blocks), 'shortDisplay');\n};\n\n/**\n * Generates list of duration options for new booking flow.\n * @param date - The start dateTime\n * @param max - The max number of minutes to go to from the date param.\n * @param min - The min number of minutes to display first time from.\n * @param step - The number of minutes to step up by for timeslots.\n */\nexport const generateDurationOptions = (\n date: DateTZ,\n max: number,\n min: number,\n step: number,\n extended: boolean): SelectOption[] => {\n const blocks: SelectOption[] = [];\n let value = min;\n while (value <= max) {\n let duration: string;\n if (extended) {\n const d = durationHumanized(value - min, true);\n duration = d ? `+${d}` : 'Current';\n } else {\n duration = durationHumanized(value, true);\n }\n\n blocks.push({\n value,\n display: `${date.addValue({ minutes: value }).formatDate(timeFormatString()).toLocaleLowerCase()} (${duration})`,\n });\n value += step;\n }\n return blocks;\n};\n\nexport const allDayOption: SelectOption = ({\n value: ALL_DAY_BOOKING_VALUE,\n display: 'All Day'\n});\n\nexport const oneWeekOption: SelectOption = ({\n value: 60 * 24 * 7, // 1 week\n display: 'One Week'\n});\n\nexport const defaultDurationGroups: DurationGroup[] = [\n {\n start: 15,\n step: 15,\n max: 60 * 24\n }\n // , {\n // start: 60,\n // step: 30,\n // max: (60 * 8) - 1 // 8 hours\n // }, {\n // start: 60 * 8,\n // step: 60,\n // max: 60 * 24 // 24 hours\n // }\n];\n\n/**\n * Maps the {@link DurationGroup} to {@link SelectOption} and appends the default all day and week options.\n */\nexport const generateDurationOptionsFromGroups = (date: DateTZ, durationGroups: DurationGroup[], extended: boolean): SelectOption[] => [\n ...(durationGroups.map(duration => generateDurationOptions(date, duration.max, duration.start, duration.step, extended)).reduce(((previousValue, currentValue) => {\n previousValue.push(...currentValue);\n return previousValue;\n }), [])),\n // allDayOption,\n // oneWeekOption\n ];\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-zoom-warning',\n templateUrl: './zoom-warning.component.html',\n styleUrls: ['./zoom-warning.component.scss']\n})\nexport class ZoomWarningComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onCloseClick(): void {\n this.dialogRef.close();\n }\n}\n","
\n

Excessive zoom warning

\n
\n\n
\n
\n

\n
\n
\n
\n\n
\n \n
\n
","export * from './lib/user.module';\nexport * from './lib/user.actions'\nexport * from './lib/user.types'\nexport * from './lib/user.reducer'\n","import { \n createLoadingAction\n } from '../../../loading/src/lib/loading.actions';\nimport {\n UserState,\n UserStoreState\n} from './user.types';\nimport { User } from '../../../data-common/src/lib/users/user.class';\nimport { createSelector } from '@ngrx/store';\n\nexport const loadUser = createLoadingAction('CurrentUser', 'current');\n\nexport const selectUserState = ({ user }: UserStoreState) => user;\n\nexport const selectHasUserData = createSelector(createSelector(selectUserState, loadUser.selectors.model), (state) => !!state.optionalSuccess);\n\nexport const selectCurrentUser = createSelector(selectUserState, loadUser.selectors.optionalSuccess);\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect\n} from '@ngrx/effects';\nimport { createLoadingEffect } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\nimport { UsersService } from '../../../data-common/src/lib/users/users.service';\n\n\n@Injectable()\nexport class UserEffects {\n\n constructor(private actions: Actions,\n private userService: UsersService) {\n }\n\n @Effect()\n loadUser = createLoadingEffect(this.actions, loadUser, () => this.userService.loadCurrentUser());\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StoreModule } from '@ngrx/store';\nimport { userReducer } from './user.reducer';\nimport { EffectsModule } from '@ngrx/effects';\nimport { UserEffects } from './user.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n StoreModule.forFeature('user', userReducer),\n EffectsModule.forFeature([UserEffects])\n ]\n})\nexport class UserModule {\n}\n","import { createReducer } from '@ngrx/store';\nimport { UserState } from './user.types';\nimport { LoadingModel } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\n\n\nexport const initialUserState: UserState = {\n current: LoadingModel.empty()\n};\n\nexport const userReducer = createReducer(initialUserState,\n ...loadUser.ons);\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./$$_lazy_route_resource lazy recursive\";","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { ShellWrapperComponent } from './shell/shell.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ShellWrapperComponent,\n children: [\n {\n path: 'day-view',\n loadChildren: () =>\n import('./calendar/day-view/day-view.module').then(m => m.DayViewModule)\n },\n {\n path: 'week-view',\n loadChildren: () =>\n import('./calendar/week-view/week-view.module').then(m => m.WeekViewModule)\n },\n {\n path: 'catering',\n loadChildren: () =>\n import('./catering/catering.module').then(m => m.CateringModule)\n },\n {\n path: 'visitors',\n loadChildren: () =>\n import('./visitors/visitors.module').then(m => m.VisitorsModule)\n },\n {\n path: 'reports',\n loadChildren: () =>\n import('./reports/reports.module').then(m => m.ReportsModule)\n },\n {\n path: 'room-admin',\n loadChildren: () =>\n import('./room-admin/room-admin.module').then(m => m.RoomAdminModule)\n },\n { path: '**', redirectTo: 'day-view' }\n ]\n },\n { path: '**', redirectTo: 'day-view' }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { useHash: true })],\n exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n","import { Component, HostListener, ViewEncapsulation } from '@angular/core';\nimport { UploadManager, Amazon, Md5Workers } from '@acaprojects/ngx-uploads';\nimport { ComposerService } from '@placeos/composer';\n\nimport { detectIE } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ZoomWarningComponent } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: [\n './styles/app.component.scss',\n './styles/custom-element.styles.scss',\n './styles/native-element.styles.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent extends BaseDirective {\n constructor(\n private _composer: ComposerService,\n private _uploads: UploadManager,\n private _md5_workers: Md5Workers,\n private _service: ApplicationService,\n private _dialog: MatDialog\n ) {\n super();\n /* istanbul ignore if */\n if (detectIE() && detectIE() < 12) {\n location.href = `${location.origin}${location.pathname}assets/not-supported.html`;\n return;\n }\n // CONCIERGE.date: If invalid, reset the localstorage date and timezone when reloading pages.\n const timezoneString = localStorage.getItem('CONCIERGE.timezone') || null;\n localStorage.removeItem('CONCIERGE.date');\n if (!timezoneString) {\n localStorage.removeItem('CONCIERGE.timezone'); \n }\n\n this._md5_workers.setup('assets/md5_worker.js');\n this.initUploads();\n }\n\n ngOnInit() {\n this.adjustZoom();\n }\n\n private adjustZoom() {\n const clientWidth = document.body.clientWidth;\n if (this.isMobileOrTablet()) { // Do not show the warning if it's a mobile or tablet device\n return;\n }\n if (clientWidth < 1300) {\n this._dialog.open(ZoomWarningComponent);\n }\n }\n private isMobileOrTablet(): boolean {\n const userAgent = navigator.userAgent || navigator.vendor;\n const maxTouchPoints = navigator.maxTouchPoints || 0; // Check for touch points \n if (maxTouchPoints > 0 && window.innerWidth <= 1024) {\n return true;\n } // Check for common mobile/tablet user agent strings \n const mobileAgents = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'IEMobile', 'Opera Mini'];\n for (const agent of mobileAgents) {\n if (userAgent.indexOf(agent) > -1) {\n return true;\n }\n }\n return false;\n }\n\n private initUploads() {\n this.subscription(\n 'composer',\n this._service.initialised.subscribe((state) => {\n /* istanbul ignore else */\n if (state) {\n this.timeout('init_uploads', () => {\n const token = this._composer.auth.token;\n if (!token) {\n return setTimeout(() => this.initUploads(), 300);\n }\n this._uploads.token = token;\n this._uploads.autoStart = true;\n this._uploads.endpoint = '/api/staff/uploads';\n UploadManager.addProvider(Amazon);\n });\n this.unsub('composer');\n }\n })\n );\n }\n}\n","
\n \n
\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { FormsModule } from '@angular/forms';\nimport { MAT_LABEL_GLOBAL_OPTIONS } from '@angular/material/core';\n\nimport { ComposerModule } from '@placeos/composer';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { environment } from '../environments/environment';\nimport { SharedContentModule } from './shared/shared.module';\nimport {\n ActionReducer,\n MetaReducer,\n StoreModule\n} from '@ngrx/store';\nimport { localStorageSync } from 'ngrx-store-localstorage';\nimport { ShellWrapperComponent } from './shell/shell.component';\nimport { provideMockSettingsObject } from '@mckinsey-converge/data-common';\nimport { DEFAULT_SETTINGS } from 'src/environments/settings';\nimport { ENVIRONMENT_TOKEN } from '@mckinsey-converge/environment';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BookingsModule } from 'src/app/bookings/bookings.module';\nimport { BookingsModule as BookingModuleStaff } from '@mckinsey-converge/bookings';\nimport { CalendarModule } from 'src/app/calendar/calendar.module';\nimport { EffectsModule } from '@ngrx/effects';\n\ndeclare global {\n interface Window {\n app_loaded: boolean;\n }\n}\n\n/**\n * Cache some state in local storage. Not for use in production.\n */\n export function localStorageSyncReducer(reducer: ActionReducer): ActionReducer {\n // Keys needed to fix prod reloading. MCK-1229\n let keys = [\n 'buildings',\n 'bookingForm',\n 'rooms',\n ];\n\n if (!environment.production) {\n keys = [\n 'bookings',\n 'buildings',\n 'organisation',\n 'bookingForm',\n 'rooms',\n 'user'\n ];\n }\n\n return localStorageSync({\n keys,\n rehydrate: true,\n })(reducer);\n}\n\nconst metaReducers: Array> = [localStorageSyncReducer];\n\n@NgModule({\n declarations: [\n AppComponent,\n ShellWrapperComponent\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n AppRoutingModule,\n HttpClientModule,\n FormsModule,\n ComposerModule,\n BookingsModule,\n CalendarModule,\n LegacyOverlaysModule,\n SharedContentModule,\n StoreModule.forRoot({}, { metaReducers }),\n BookingModuleStaff,\n EffectsModule.forRoot(),\n ],\n providers: [\n { provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'nevet' } },\n provideMockSettingsObject(DEFAULT_SETTINGS),\n { provide: ENVIRONMENT_TOKEN, useValue: environment }\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule {\n constructor() {\n window.app_loaded = true;\n }\n}\n","import {Component, OnInit, Inject, Output, EventEmitter} from '@angular/core';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {first} from 'rxjs/operators';\nimport {BaseDirective, closestToTimeSlotTz} from '@mckinsey-converge/base';\nimport {\n Booking,\n BookingAction,\n generateBookingForm, OrganisationService, RecurrencePeriod, removeExpiredOcurrences, SeriesAction, validDateTZ\n} from '@mckinsey-converge/data-common';\nimport {AvailableBookingFields} from '@mckinsey-converge/data-common';\nimport {ApplicationService} from '@mckinsey-converge/data-common';\nimport {HashMap, DialogEvent} from '@mckinsey-converge/base';\nimport {CateringDetailsModalComponent, CateringDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {BookingConfirmComponent} from '@mckinsey-converge/legacy-overlays';\nimport {RequirementDetailsModalComponent, RequirementDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {SpacesService} from '@mckinsey-converge/data-common';\nimport { ConflictsModalComponent, ConflictsModalComponentData, OverrideChangesModalComponent } from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { I } from '@angular/cdk/keycodes';\n\n\nexport interface BookingFlowEvent {\n /** Type of flow event */\n type: 'previous' | 'next' | 'reset' | 'close' | 'error';\n /** Step which the event was emitted from */\n step: string;\n /** Additional metadata for the event */\n metadata?: HashMap;\n}\n\nexport interface BookingModalData {\n /** Booking to create/edit */\n booking: Booking;\n /** Whether to edit only catering */\n only_catering?: boolean;\n /** Pass in timezone for new bookings */\n timezone?: string;\n /**Type of action on a series */\n action?: SeriesAction | BookingAction;\n //** If Booking request from day view grid click */\n isFromGrid?: boolean;\n}\n\n@Component({\n selector: 'a-booking-modal',\n templateUrl: './booking-modal.component.html',\n styleUrls: ['./booking-modal.component.scss'],\n})\nexport class BookingModalComponent extends BaseDirective implements OnInit {\n\n /** Range of dates for the Start Date Picker*/\n public from_start: DateTZ;\n public to: DateTZ;\n\n /** Range of dates for the Start Date Picker*/\n public from_end: DateTZ;\n\n /** Form fields */\n public form: FormGroup;\n /** Form data store */\n public booking: Booking;\n /** Step of the booking flow that is currently active */\n public flow_step: string;\n public modalTitle: string;\n\n public iscloning: SeriesAction | BookingAction | null = null;\n\n public edit_recurrence: boolean\n\n /** Whether to edit only catering */\n public get only_catering(): boolean {\n return !!this._data.only_catering;\n }\n\n @Output() public event = new EventEmitter();\n\n /** List of available booking fields for the form */\n public get available_fields(): AvailableBookingFields[] {\n return this._service.setting('app.booking.show_fields') || [];\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.getModalTitle();\n this._dialog_ref.disableClose = true;\n this._spaces.initialised.pipe(first(_ => _)).subscribe(() => {\n this.flow_step = this._data.only_catering ? 'catering' : 'form';\n this.loadFormData();\n });\n }\n\n public getModalTitle() {\n switch (this._data.action) {\n case BookingAction.EDIT:\n this.modalTitle = 'Edit Booking';\n break;\n case SeriesAction.CLONE:\n this.modalTitle = 'Clone Recurring Series';\n break;\n case BookingAction.CLONE:\n this.modalTitle = 'Clone Booking';\n break;\n case SeriesAction.EDIT:\n this.modalTitle = 'Edit Series';\n break;\n default:\n this.modalTitle = 'New Booking';\n break;\n }\n }\n\n /**\n * Handle events from child components\n * @param event Booking flow event\n */\n public handleFlowEvent(event: BookingFlowEvent) {\n /* istanbul ignore else */\n if (event.type === 'next') {\n this.toNextFlowStep(event);\n } else if (event.type === 'previous') {\n this.toPreviousFlowStep(event);\n } else if (event.type === 'reset') {\n this.resetForm();\n }\n }\n\n public close() {\n this._dialog_ref.close();\n }\n\n\n private toNextFlowStep(event: BookingFlowEvent) {\n const space_list = this.form.controls.space_list.value;\n switch (event.step) {\n case 'recurrence':\n this.openRecurrenceConflictsModal();\n break\n case 'search':\n if (\n space_list &&\n space_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'equipment')\n ) {\n this.openEquipmentDetailsModal();\n } else {\n if (this.form.controls.has_catering && this.form.controls.has_catering.value) {\n this.navigate('catering');\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n }\n break;\n case 'catering':\n const order_list = this.form.controls.catering.value;\n if (\n order_list.find(order => this.form.controls.space_list.value.find(space => space.email === order.location_id)) &&\n order_list &&\n order_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'details')\n ) {\n this.openCateringDetailsModal();\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n break;\n case 'changes':\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n break;\n default:\n this.form.markAsDirty();\n //const is_recurr_series_edit = this.booking.id && this.form.controls.is_recurrent.value && this._data.action\n const is_recurr_series_edit = this.booking.id && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT || this._data.action === BookingAction.CLONE\n )\n if (!space_list || !space_list.length || !this.booking.id || is_recurr_series_edit || this.booking.is_multiroom) {\n this.navigate('search');\n } else if (this.booking.id && space_list && space_list.length) {\n this.openEquipmentDetailsModal();\n } else {\n this.confirmBooking();\n }\n break;\n }\n }\n\n private toPreviousFlowStep(event: BookingFlowEvent) {\n switch (event.step) {\n case 'search':\n this.navigate('form');\n break;\n case 'catering':\n /* istanbul ignore else */\n if (!this._data.only_catering) {\n this.navigate('search');\n }\n else {\n this.close();\n }\n break;\n }\n }\n\n private navigate(route: string) {\n this.flow_step = route;\n }\n\n /** Clear user changes to the form data */\n private resetForm() {\n delete this.form;\n // Pass in the desired location timezone\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone,\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n }\n\n /**\n * Load existing form data or generate a new booking form\n *\n * It fires when the modal first opens.\n * this._data.booking is an empty {} when creating a booking but set when editing\n */\n private loadFormData(): void {\n const form_data: HashMap = this._data.booking ? this._data.booking.toJSON() : {};\n form_data.duration = form_data.duration || form_data?.startDateTz?.dateDiff(form_data?.endDateTz, 'minutes') || 0\n //\n /**\n * Set the desired timezone in the booking creation.\n * this._data?.timezone is when creating a new booking\n * this._data.booking?.timezone is when editing a booking\n *\n * R-- refactor to make consistent atm _data.timezone is defined everywhere\n * but generateBookingForm could use form_data.timezone\n */\n form_data.timezone = this._data.booking?.timezone || this._data?.timezone;\n // start a new booking out with a start end time.\n\n const is_cloning_or_edit = this._data.action === SeriesAction.CLONE ||\n this._data.action === BookingAction.CLONE ||\n this._data.action === BookingAction.EDIT ||\n this._data.action === SeriesAction.EDIT;\n\n if (\n ( !this._data?.isFromGrid && ( !form_data.startDateTz || form_data.startDateTz.isBeforeDate(DateNow()) ) )\n && !this._data.only_catering && !is_cloning_or_edit\n ) {\n form_data.startDateTz = closestToTimeSlotTz(new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: form_data.timezone }), 15);\n form_data.start_epoch = form_data.startDateTz.seconds;\n form_data.endDateTz = form_data.startDateTz.addValue({ minutes: form_data.duration });\n form_data.end_epoch = form_data.endDateTz.seconds;\n }\n this.booking = new Booking(form_data);\n\n if(this.booking.is_recurrent && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT\n )){ //if it's series get the recurrence_end from the occurences\n this.booking.recurrence_endTz = this.booking.recurrenEndFromOcurrences(this.booking.occurrence_details)\n }\n\n\n // An empty booking here is when creating a new booking, edit booking will populate all the values\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone, // MUST be defined in dialog.open(BookingModalComponent or booking will revert to a local timezone\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n\n // localize the booking form start time\n /* istanbul ignore else */\n if (form_data && form_data.room_ids && this.form.controls.space_list) {\n this.form.controls.space_list.setValue(\n form_data.room_ids.map(id => this._spaces.find(id) || {id, name: id})\n );\n }\n\n this.edit_recurrence = this.booking?.id\n && (this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === SeriesAction.CLONE);\n\n if (this._data.action === SeriesAction.CLONE || this._data.action === BookingAction.CLONE) {\n\n this.iscloning = this._data.action === SeriesAction.CLONE ? SeriesAction.CLONE : BookingAction.CLONE;\n\n this._data.action === BookingAction.CLONE\n ? this.form.get('title').setValue(`Clone ${this.booking.title}`)\n : this.form.get('title').setValue(`Series Clone ${this.booking.title}`);\n\n this.form.get('id').setValue('');\n this.form.get('organiser').enable();\n\n if (this._data.action === BookingAction.CLONE) {\n this.form.get('is_recurrent').setValue(false);\n this.form.get('is_recurrent').disable();\n }\n const tz = this._org.building.timezone;\n this.form.patchValue({ timezone: tz });\n\n // Check if the booking is a list, if so then updates the value for start and end date fields.\n if (form_data.recurrence_period === RecurrencePeriod.LIST) {\n removeExpiredOcurrences(this.form)\n }\n\n // cloning individual occurrence set tup\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n // case 1: past booking\n if (start_time.isBeforeDate(date_now, \"day\")) {\n if (form_data.recurrence_period !== RecurrencePeriod.LIST) {\n this.form.controls.dateTz.setValidators([\n Validators.required,\n validDateTZ\n ]);\n this.form.controls.dateTz.updateValueAndValidity();\n this.form.controls.dateTz.markAsTouched();\n this.form.controls.is_before_date.setValue(true);\n\n if(this._data.action === BookingAction.CLONE && this.form.controls.all_day.value === true) {\n this.form.get('dateTz').enable();\n }\n }\n }\n\n // case 2: booking is in the same day but but the start time has already passed\n if (\n start_time.isSameDate(date_now, \"day\") && start_time.startEpoch() < date_now.startEpoch()\n ) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n\n // case 3: future booking nothing to do\n //Nothing to do\n }\n\n if (\n this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === BookingAction.EDIT\n ) {\n const tz = this._org.building.timezone;\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n if (\n start_time.isSameDate(date_now, \"day\") && (\n start_time.startEpoch() <= date_now.startEpoch() &&\n start_time.addValue({ minutes: this.booking.duration}).startEpoch() >= date_now.startEpoch())\n ) {\n this.form.controls.is_before_date.setValue(true);\n }\n\n if (start_time.isSameDate(date_now, \"day\") && start_time.addValue({ minutes: this.booking.duration}).startEpoch() < date_now.startEpoch()) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n }\n\n if (!this.booking.catering.length) {\n const notes = this.booking.notes.filter(note => note.type !== 'catering');\n\n this.form.get('notes').setValue(notes);\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openEquipmentDetailsModal() {\n const equipment_ref = this._dialog.open(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n codes_field: this.form.controls.equipment_codes,\n head_counts_field: this.form.controls.expected_attendees\n }\n });\n this.subscription(\n 'equipments_modal_events',\n equipment_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n metadata: {ref: 'equipment'}\n });\n equipment_ref.close();\n }\n })\n );\n equipment_ref.afterClosed().subscribe(() => this.unsub('equipments_modal_events'));\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openCateringDetailsModal() {\n const catering_ref = this._dialog.open(\n CateringDetailsModalComponent,\n {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n catering: this.form.controls.catering,\n booking: this.booking\n }\n }\n );\n this.subscription(\n 'catering_modal_events',\n catering_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'catering',\n metadata: { ref: 'details' }\n });\n catering_ref.close();\n }\n })\n );\n catering_ref.afterClosed().subscribe(() => this.unsub('catering_modal_events'));\n }\n\n /*\n Open overriding changes modal - disabled for CNG-541\n */\n private overrideChanges() {\n const ref = this._dialog.open(OverrideChangesModalComponent, {\n width: '576px',\n data: {\n edits: this.booking.occurrence_edits,\n timezone: this.booking.timezone\n }\n });\n ref.componentInstance.event.subscribe(event => {\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n ref.close();\n } else if (event.reason === 'close') {\n ref.close();\n }\n });\n }\n\n /**\n * Open modal to confirm the booking details\n */\n private confirmBooking() {\n /* Clear recurrence validator if only catering is being edited */\n if(this.only_catering){\n this.clearRecurrenceValidators()\n }\n\n /* istanbul ignore else */\n if (this.form.valid || this.only_catering) {\n const formValues = this.form.value;\n // this.booking is the booking being edited, not much to it on a new booking\n // having an empty booking is used in determining changes I assume.\n const startDateTz = this.form.controls.dateTz.value\n const endDateTz = startDateTz.addValue({ minutes: formValues.duration })\n const booking = {\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(this.booking) : this.booking.toJSON()),\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(formValues) : formValues),\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: formValues.space_list[0],\n multi_rooms: formValues.space_list.map(room => room),\n };\n\n const dialog_ref = this._dialog.open(BookingConfirmComponent, {\n width: '32em',\n maxWidth: '95vw',\n maxHeight: '95vh',\n data: {\n old_booking: this.booking,\n booking: new Booking(booking),\n action: this._data.action\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n dialog_ref.componentInstance.event.subscribe(event => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.close();\n this.event.emit({ reason: 'done', metadata: this.form});\n } else if (event.reason === 'action') {\n this.resetForm();\n }\n else if(event.reason === 'last-moment-conflict') {\n this.form.patchValue({space_list: []}, {emitEvent: true});\n // this.handleFlowEvent({ type: 'reset', step: 'search' })\n dialog_ref.close();\n }\n });\n }\n }\n\n private sanitizeBookingFromCloning(booking: Booking | Object): Object {\n const obj = booking instanceof Booking ? booking.toJSON() : booking;\n return {...Object.keys(obj).reduce((acc, key) => {\n if(\n key.search(/^recurrence_/) === -1\n && key.search(/^occurrence_/) === -1\n ) {\n acc[key] = obj[key]\n };\n\n return acc;\n }, {}),\n is_recurrent: false\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openRecurrenceConflictsModal() {\n const recurr_ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.form.controls.space_list.value[0].name,\n conflicts: this.form.controls.recurrence_exceptions.value,\n timezone: this.booking.timezone\n }\n });\n this.subscription(\n 'conflicts_modal_events',\n recurr_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(this.booking.occurrence_edits && this.booking.occurrence_edits.length && event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'changes',\n });\n } else {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n }\n }\n recurr_ref.close();\n })\n );\n recurr_ref.afterClosed().subscribe(() => this.unsub('conflicts_modal_events'));\n }\n\n public get title(){\n const type = this.booking?.id ? 'Edit' : 'New'\n return `${type} ${this.edit_recurrence ? 'recurring' : ''} booking`\n }\n\n private clearRecurrenceValidators() {\n const recurrenceStarts = this.form.controls.recurrence_starts\n recurrenceStarts.clearValidators()\n recurrenceStarts.updateValueAndValidity()\n }\n}\n","
\n
\n \n {{ modalTitle }}\n
\n \n
\n\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'booking-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class BookingCateringComponent {\n /** Form fields for the booking */\n @Input() public form: FormGroup; // R-- maybe add booking timezone has hidden form field since the date timestamp is from here\n /** Whether catering is the only action in the flow */\n @Input() public only: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Active order to display details for */\n public active_order: CateringOrder;\n\n /** Field for storing catering details */\n public get catering_field() {\n return this.form && this.form.controls.catering ? this.form.controls.catering : null;\n }\n\n /** List of spaces selected for the booking */\n public get space_list(): Space[] {\n return this.form && this.form.controls.space_list\n ? this.form.controls.space_list.value\n : [];\n }\n\n /** Date of the booking */\n public get dateTz(): DateTZ {\n const now = DateNow(new Date())\n return this.form && this.form.controls.dateTz\n ? this.form.controls.dateTz.value\n : now.startOfValue('minute');\n }\n\n /** Duration of the booking */\n public get duration(): number {\n return this.form && this.form.controls.duration ? this.form.controls.duration.value : 60;\n }\n\n /** Whether booking is all day */\n public get all_day(): boolean {\n return this.form && this.form.controls.all_day && this.form.controls.all_day.value;\n }\n\n /** Create a new catering order */\n public newOrder(): void {\n const order = new CateringOrder({\n booking_timezone: this.dateTz.building_tz,\n });\n this.active_order = order;\n }\n\n /** Handle changes to catering order */\n public handleOrderEvent(order: CateringOrder) {\n // active_order = null\n if (!order) {\n this.active_order = null;\n }\n /* istanbul ignore else */\n if (order) {\n let orders = this.form.controls.catering.value;\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n // Tack on or replace the order\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n // Sort by delivery_time\n orders = orders.sort((a,b) => {\n if ( a.delivery_time < b.delivery_time) {\n return -1;\n }\n if ( a.delivery_time < b.delivery_time) {\n return 1;\n }\n return 0\n });\n this.form.controls.catering.setValue(orders);\n this.form.markAsDirty();\n }\n this.active_order = null;\n }\n}\n","
\n \n \n \n
\n\n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-category-display',\n templateUrl: './category.component.html',\n styleUrls: ['./category.component.scss']\n})\nexport class CateringMenuCategoryComponent {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Form control for the list of order items */\n @Input() public items: FormControl;\n /** Currency symbol for the active space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for close events */\n @Output() public close = new EventEmitter();\n}\n","
\n
\n \n
{{ category?.name }}
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n \n
\n
\n Category contains no available items\n
\n
\n
\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport {\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData,\n} from '@mckinsey-converge/legacy-overlays';\n\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\nimport { BehaviorSubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ninterface StartEndResponse {\n timezone: string, \n start: DateTZ;\n end: DateTZ\n}\n\n@Component({\n selector: 'a-catering-order-details',\n templateUrl: './order-details.component.html',\n styleUrls: ['./order-details.component.scss'],\n})\nexport class BookingCateringOrderDetailsComponent extends BaseDirective implements OnInit {\n /** Catering order to edit details of */\n @Input() public order: CateringOrder;\n /** Booking date */\n @Input() public dateTz: DateTZ;\n /** Booking duration */\n @Input() public duration: number;\n /** Booking duration */\n @Input() public space_list: Space[];\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** Whether top header details should be shown */\n @Input() public hide_details: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for changes to the catering order */\n @Output() public event = new EventEmitter();\n /** Form controls for order */\n public form: FormGroup;\n /** List of available catering item categories */\n public category_list: CateringCategory[] = [];\n /** Active category to display details for */\n public active_category: CateringCategory;\n /** List of available times for delivering catering */\n public available_times: Identity[] = [];\n /** Whether the menu is loading */\n public loading: boolean;\n /** Whether the search input should be shown */\n public show_search: boolean;\n /** Current search string for filtering */\n public readonly search$ = new BehaviorSubject('');\n /** List of menu items that match the search string */\n public matched_items: CateringItem[] = [];\n\n @ViewChild('input') private _input_el: ElementRef;\n\n /** Whether user is able to order from the currently selected space */\n public get can_order(): boolean {\n return (\n (this.active_building.has_catering || this.category_list.length) &&\n (this.has_available_items) &&\n !this.out_of_hours\n );\n }\n\n /** Whether booking is with the restricted ordering period */\n // R--- different in staff, but should it be?\n public get within_restricted_time(): boolean {\n return false;\n }\n\n /** Building associated with the selected space */\n public get active_building(): Building {\n const form = this.form || { controls: { location_id: { value: '' } } };\n const form_controls = (form).controls;\n const space: Space =\n this.space_list.find((space) => space.email == form_controls.location_id.value) ||\n ({ level: {} } as any);\n return (\n this._org.buildings.find((bld) => space.level.building_id === bld.id) ||\n ({ catering_restricted_from: 0 } as any)\n );\n }\n\n /** Currency code for the active building */\n public get symbol(): string {\n return this.active_building.currency || 'USD';\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n return this.form\n ? this.form?.controls?.items?.value.reduce((total, item) => total + item.amount, 0)\n : 0;\n }\n\n /* istanbul ignore next */\n /** Whether booking time is outside of catering hours */\n public get out_of_hours(): boolean {\n return this.form?.controls?.delivery_time.value < 0;\n }\n\n /** Whether items are available for order at anytime */\n public get has_available_items(): boolean {\n return this.category_list.reduce(\n (available, category) => available || category.can_order_anytime,\n true\n );\n }\n\n constructor(\n private _menu: CateringMenuService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.generateAvailableTimes();\n this.subscription(\n 'search',\n this.search$\n .pipe(\n map((str) => {\n const search = str.toLowerCase();\n const items = [];\n for (const category of this.category_list) {\n if (category.items) {\n for (const group of category.items) {\n if ((group as any).items.length) {\n if (\n (group as any).package &&\n (group.name.toLowerCase().includes(search) ||\n (group as any).items.find((item) =>\n item.name.toLowerCase().includes(search)\n ))\n ) {\n items.push(group);\n } else {\n for (const item of (group as any).items) {\n if (item.name.toLowerCase().includes(search)) {\n items.push(item);\n }\n }\n }\n } else {\n if (group.name.toLowerCase().includes(search)) {\n items.push(group);\n }\n }\n }\n }\n }\n return items;\n })\n )\n .subscribe((items) => (this.matched_items = items))\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.dateTz || changes.duration) {\n this.generateAvailableTimes();\n /* istanbul ignore else */\n if (\n this.form &&\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n /* istanbul ignore else */\n if (changes.space_list) {\n /* istanbul ignore else */\n if (this.form && this.space_list && !this.form.controls.location_id.value) {\n this.form.controls.location_id.setValue(this.space_list[0].email);\n }\n }\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.initForm();\n }\n }\n\n public focusSearch() {\n if (this._input_el && this.show_search) {\n this._input_el.nativeElement.focus();\n }\n }\n\n public flattenArray(arr: T[]): T[] {\n return arr.reduce((acc, val) => acc.concat(val), []);\n }\n\n public initForm() {\n if(Array.isArray(this.space_list[0])){\n // this.space_list = [...this.space_list[0]];\n this.space_list = this.flattenArray(this.space_list);\n }\n this.form = new FormGroup({\n id: new FormControl(this.order.id),\n booking_date: new FormControl(this.dateTz.ms), // R-- different in staff\n location_id: new FormControl(this.order.location_id || this.space_list[0].email),\n delivery_time: new FormControl(this.order.delivery_time || this.available_times[0]?.id),\n items: new FormControl(this.order.items.map((item) => new CateringItem(item))),\n });\n this.subscription(\n 'space_change',\n this.form.controls.location_id.valueChanges.subscribe((space) => {\n this.generateAvailableTimes();\n if (\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n this.form.controls.items.setValue([]);\n this.loadMenu();\n })\n );\n this.loadMenu();\n this.generateAvailableTimes();\n if (\n this.form &&\n !this.available_times.find((time) => time.id === this.form.controls.delivery_time.value)\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n\n public confirmOrder() {\n const ref = this._dialog.open<\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData\n >(BookingCateringConfirmModalComponent, {\n maxWidth: '95vw',\n data: {\n all_day: this.all_day,\n dateTz: this.dateTz,\n form: this.form,\n },\n });\n this.subscription(\n 'confirm_event',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n // R--- add booking_date and timezone\n // this.order bookingDateTz is missing correct timezone.\n const order = new CateringOrder({ ...this.order, ...this.form.value });\n this.event.emit(order);\n ref.close();\n }\n })\n );\n ref.afterClosed().subscribe(() => this.unsub('confirm_event'));\n }\n\n private loadMenu() {\n const space = this.space_list.find(\n (space) => space.email === this.form.controls.location_id.value\n );\n this.loading = true;\n this._menu\n .query({ zone_id: this._org.buildings.find((bld) => space.zones.includes(bld.id))?.id })\n .then(\n (list) => {\n this.loading = false;\n this.category_list = list\n .map((i) => new CateringCategory(i))\n .filter(c => !c.out_of_stock);\n },\n () => (this.loading = false)\n );\n }\n\n /** Generate a list of available delivery times for the given booking time */\n private generateAvailableTimes() {\n let { timezone, start, end } = this.generateStartAndEndTimes();\n start = start.setValue({ minute: Math.ceil(start.minutes / 5) * 5 });\n // will be different from staff in these commonly named methods.\n // R--- Form Controls TBD\n // R--- The timezone here doesn't seem legit, back to putting into a form hidden field\n let start_date = this.dateTz; // new DateTZ({ date: this.date, building_tz: timezone, is_local_tz: false});\n start_date.logDateTz('start date')\n this.available_times = [];\n while (start.isBeforeDate(end)) {\n this.available_times.push({\n id: Math.abs(start_date.dateDiff(start, 'minutes')),\n name: start.formatDate('h:mma').toLocaleLowerCase(),\n });\n start = start.addValue({ minutes : 5});\n }\n /* istanbul ignore else */\n if (this.available_times.length === 0) {\n this.available_times.push({ id: -1, name: 'Out of hours' });\n }\n }\n\n private generateStartAndEndTimes(): StartEndResponse {\n const now = DateNow(new Date())\n let timezone = now.local_tz;\n const space_email = this.space_list[0]?.email;\n let catering_hours = { start: 7, end: 20 };\n // R--- change date input to dateTz input.\n // R--- Same issue as the above generateAvailableTimes\n const date_ = this.dateTz; // new DateTZ({date: this.date, building_tz: timezone, is_local_tz: false})\n let building_time = date_.startOfValue('day');\n let cat_start_time = building_time.addValue({ hours: catering_hours.start });\n let cat_end_time = building_time.addValue({ hours: catering_hours.end });\n\n if (space_email) {\n // Fetch the Space and Building\n const space = this.space_list.find((space) => space.email === space_email);\n const building = this._org.buildings.find((bld) => space?.zones.includes(bld.id));\n if (building?.timezone) {\n // Update to the building timezone if defined.\n timezone = building.timezone;\n building_time = date_.toZone(timezone).startOfValue('day');\n }\n if (building?.catering_hours) {\n // Update to the building catering hours if defined.\n catering_hours = building?.catering_hours;\n }\n // Update the hours with the currently defined timezone.\n cat_start_time = building_time.addValue({ hours: catering_hours.start });\n cat_end_time = building_time.addValue({ hours: catering_hours.end });\n }\n\n // Start Time of the Booking\n let start = date_.toZone(timezone);\n let end = date_.toZone(timezone).addValue({ minutes: this.duration });\n\n // Do the booking start and end time coincide with the catering hours?\n if (start.isBeforeDate(cat_start_time)) {\n // booking start before catering opens'\n if (cat_end_time.isAfterDate(start)) {\n // catering closes after booking starts'\n start = cat_start_time.addValue({});\n } else {\n // were just closed, catering closes before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking starts after catering is open'\n if (cat_end_time.isBeforeDate(start)) {\n // were just closed, catering closed before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n }\n\n if (end.isBeforeDate(cat_end_time)) {\n // booking ends before catering closes'\n \n if (cat_start_time.isAfterDate(end)) {\n // were just closed, catering opens is after booking ends'\n start = cat_start_time.addValue({});\n end = cat_start_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking ends after catering closes'\n // set the booking end to the catering close time.'\n end = cat_end_time.addValue({});\n }\n\n return { timezone, start, end };\n }\n}\n","
\n
\n
\n
\n \n \n \n \n {{ space.local_name }}\n \n \n \n
\n
\n \n \n \n \n {{ time.name }}\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n \n
\n
{{ item.name }}
\n \n
\n
\n
\n
\n
\n \n Back\n \n \n Confirm Order({{ item_count || '0' }})\n \n
\n
\n\n
\n
\n \"No\n
\n

\n Catering is not available for this booking.
\n Catering must be ordered within business hours at {{ active_building?.name }}.\n

\n
\n
\n\n
\n
\n
\n \n
\n
\n Loading menu for {{ active_building?.name }}...\n
\n
\n
\n
\n\n \n\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'catering-order-list-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class CateringOrderListItemComponent implements OnInit {\n /** Catering order to display */\n @Input() order: CateringOrder;\n /** */\n @Input() public space_list: Space[];\n /** Selected datetime */\n @Input() date: number;\n /** Emitter for edit events */\n @Output() public edit = new EventEmitter();\n /** Emitter for delete events */\n @Output() public delete = new EventEmitter();\n\n public room: Space;\n\n public ngOnInit(): void {\n this.room = (this.space_list || []).find(space => space.email === this.order.location_id);\n }\n\n public get space_in_booking(): boolean {\n return !!this.room;\n }\n\n /** Space selected for delivery */\n public get local_space_name(): string {\n return this.room?.local_name || '';\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n /* istanbul ignore else */\n if (!this.order) {\n return '';\n }\n return this.order.bookingDateTz.addValue({ minutes: this.order.delivery_time || 0}).formatDate('h:mma').toLocaleLowerCase();\n }\n\n\n /** Total cost of the order */\n public get order_cost(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount * item.unit_price, 0);\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n const space = this._spaces.find((this.order || {}).location_id);\n /* istanbul ignore else */\n if (!space || !space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n constructor(private _spaces: SpacesService, private _org: OrganisationService) {}\n}\n","
\n Deliver to {{ local_space_name }} at {{ delivery_time }}\n
\n
\n
\n {{ item_count }}\n { item_count, plural, =1 { item } other { items } }\n
\n
{{ order_cost / 100 | currency: symbol }}
\n
\n
\n \n \n\n \n
\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { BookingFlowEvent } from '../../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-list',\n templateUrl: './order-list.component.html',\n styleUrls: ['./order-list.component.scss']\n})\nexport class BookingCateringOrderListComponent implements OnInit{\n /** Form field for storing catering orders */\n @Input() public catering: FormControl;\n /** Selected datetime for the booking */\n @Input() public date: number;\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** */\n @Input() public space_list: Space[];\n /** Whether catering is the only action in the flow */\n @Input() public only_catering: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Emiiter for order events */\n @Output() public order = new EventEmitter();\n\n public ngOnInit(): void {\n if(this.space_list && this.space_list.length) {\n this.catering.value.forEach(catering => {\n catering.location = this.space_list[0].name; \n catering.location_id = this.space_list[0].email;\n catering.bookingDateTz = this.date;\n });\n }\n }\n\n /** List of orders in the booking */\n public get orders(): CateringOrder[] {\n /* istanbul ignore else */\n if (!this.catering) {\n return [];\n }\n return this.catering.value;\n }\n\n /** Emit event for a new catering order */\n public newOrder() {\n this.order.emit();\n }\n\n /** Emit event for editing existing order */\n public editOrder(order: CateringOrder) {\n this.order.emit(order);\n }\n\n /** Remove order from the list */\n public deleteOrder(order: CateringOrder) {\n const orders = this.orders;\n const index = orders.findIndex(an_order => order.id === an_order.id);\n /* istanbul ignore else */\n if (index >= 0) {\n orders.splice(index, 1);\n this.catering.setValue(orders);\n }\n }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n this.event.emit({ type: 'next', step: 'catering' });\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'catering' });\n }\n}\n","
\n
\n

Catering Orders

\n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n Back\n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders
\n \n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { unique } from '@mckinsey-converge/base';\n\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'booking-space-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class BookingSpaceFiltersComponent extends BaseDirective implements OnInit {\n /** Date selected for the booking */\n @Input() public date: FormControl;\n /** List of location IDs being filtered on */\n @Input() public locations: string[] = [];\n /** Preselected buildings */\n @Input() public initBuildings: string[] = [];\n /** Emitter for changes to location filter */\n @Output() public locationsChange = new EventEmitter();\n /** List of available buildings */\n public building_list: Building[] = [];\n /** Whether to show the location list */\n public show_locations: boolean;\n\n public get date_() {\n // R--- another instance, can the form control date be TZ aware\n return new DateTZ({date: this.date.value}) \n }\n\n /** Whether active date is current day */\n public get is_today(): boolean {\n const now = DateNow(new Date())\n return now.isSameDate(this.date_, 'day');\n }\n\n /** Display string for the selected date */\n public get date_display(): string {\n // R--- needs to be TZ aware because of day is relative\n return this.is_today ? 'Today' : this.date_.formatDate('dd MMM yyyy');\n }\n\n /** List of filtered location */\n public get location_list(): Building[] {\n return this.locations.map(id => this.building_list.find(bld => bld.id === id));\n }\n\n public get building_selected(): HashMap {\n const map = {};\n for (const id of this.locations) {\n map[id] = true;\n }\n return map;\n }\n\n constructor(private _org: OrganisationService) {\n super();\n }\n\n public changeDate(amount: number) {\n let date = this.date_.addValue({ 'days': amount });\n const now_ = DateNow(new Date())\n const now = now_.startOfValue('minute');\n if (date.isBeforeDate(now)) {\n date = now;\n }\n this.date.setValue(date.ms);\n }\n\n public ngOnInit(): void {\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n this.building_list = bld_list;\n if (Array.isArray(this.initBuildings)) {\n this.locations = unique(this.initBuildings);\n } \n }));\n }\n\n /**\n * Update location filter to include the given building\n * @param building Building to add\n */\n public addLocationFilter(building: Building): void {\n this.locations.push(building.id);\n this.locations = unique(this.locations);\n this.locationsChange.emit(this.locations);\n }\n\n /**\n * Remove location from the active filters\n * @param building Building to remove\n */\n public removeLocationFilter(building: Building) {\n this.locations.splice(\n this.locations.findIndex(id => building.id === id),\n 1\n );\n this.locationsChange.emit([...this.locations]);\n }\n}\n","
\n
\n
\n \n
{{ date_display }}
\n \n
\n
\n
\n \n
\n Select locations(s)\n
\n \n
\n
\n
\n
\n \n \n {{ building.name }}\n \n \n \n
\n
\n\n \n\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n EventEmitter,\n Output,\n OnChanges\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport {\n debounceTime,\n distinctUntilChanged,\n switchMap,\n catchError,\n map,\n first,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\nimport { BehaviorSubject, Observable, of, Subject } from 'rxjs';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Booking, BookingAction, BookingStateService, ISpaceAvailabilityOptions, mapBuildingToSelectOption, mapCityToAllSelectOption, SeriesAction, toggleSelectedByGroup } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { randomInt } from '@mckinsey-converge/base';;\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatChipsModule} from '@angular/material/chips';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { NoCateringModalComponent } from '@mckinsey-converge/legacy-overlays';\n@Component({\n selector: 'booking-find-space',\n templateUrl: './find-space.component.html',\n styleUrls: ['./find-space.component.scss'],\n})\nexport class BookingFindSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** Form control for setting the active space */\n @Input() public spaces: FormControl;\n /** Form group for booking */\n @Input() public form: FormGroup;\n\n @Input() public isCloning: SeriesAction | BookingAction | null;\n\n @Input() public booking: Booking;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n /** List of spaces available during the required period */\n public space_list: Space[] = [];\n /** List of users from an API search */\n public search_results$: Observable;\n /** Whether space list is loading */\n public loading: boolean;\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n\n public searchQuery: string = '';\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n public savedSelection = [];\n\n public selectedSpace: Array = [];\n\n public oldSpace = [];\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether multiple spaces are allowed to be selected */\n public get multiple(): boolean {\n return this._service.setting('app.booking.multiple_spaces');\n }\n\n public get has_valid_space() {\n if(!Array.isArray(this.spaces.value)){\n this.spaces.setValue([this.spaces.value]); \n }\n return this.spaces?.value?.some(_ => _.id && _.bookable);\n }\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public OriginalSpaceList: any;\n\n public disableCondition: boolean = false;\n\n public noCateringDialogRef: MatDialogRef;\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld = []) => {\n this.loading = true;\n request_id = randomInt(9999_9999);\n const dateTz = this.form.controls.dateTz.value;\n\n const ignore = this.form.controls.action?.value === SeriesAction.EDIT ? this.form.controls.id.value : null\n\n // R--- need to pass on the all day param and let libs/data-common/src/lib/spaces/spaces.service.ts \n // availability do the math.\n let query: ISpaceAvailabilityOptions = {\n dateTz: this.form.controls.all_day.value\n ? dateTz.startOfValue('day').startOfValue('minute').startOfValue('second')\n : dateTz.startOfValue('minute').startOfValue('second'),\n duration: this.form.controls.all_day.value\n ? 24 * 60\n : this.form.controls.duration.value,\n zone_ids: bld.length ? bld : this._org.building.id,\n bookable: true,\n recurrence_count: this.form.controls.recurrence_count.value,\n recurrence_period: this.form.controls.recurrence_period.value,\n recurrence_endTz: this.form.controls.recurrence_endTz.value,\n recurrence_interval: this.form.controls.recurrence_interval.value,\n recurrence_starts: this.form.controls.recurrence_starts.value,\n is_recurrent: this.form.controls.is_recurrent.value,\n recurrence_days: this.form.controls.recurrence_days.value,\n ignore\n };\n\n /* istanbul ignore else */\n if (this.zone_ids && this.zone_ids.length) {\n query.zone_ids = this.zone_ids.join(',');\n }\n const id = request_id;\n return this._spaces.available(query).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _})),\n map((resp: { id: number, list: Space[]}) => {\n this.loading = false;\n return resp.id === request_id ? resp.list : this.space_list;\n })\n );\n\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.space_list = list.filter((space) => {\n if (!space.available && !this.form.controls.action?.value) {\n return false;\n }\n\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n }).filter(space => space.available);\n\n this.space_list.sort((a, b) => this.sort(a, b));\n if(!this.selectedOptions.value.length){\n this.setDefaultBuilding()\n }\n // this.space_list.map((space)=>{\n // if(space.id === this.spaces.value?.id){\n // this.spaces.setValue([space])\n // const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n // this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n // }\n // })\n \n if(!this.form.controls.is_multiroom.value && this.spaces.value.length>=1){\n this.spaces.setValue([this.spaces.value[0]]);\n }\n\n this.space_list.forEach((space) => {\n this.spaces.value.forEach((savedSpace) => {\n if (space.id === savedSpace.id) {\n const updatedSpaces = this.spaces.value.map(sp => sp.id === space.id ? space : sp);\n this.spaces.setValue(updatedSpaces);\n \n const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr) => recurr.date));\n }\n });\n });\n \n this.OriginalSpaceList = this.space_list;\n\n // when updating a booking, the selected spaces are not available, so add them \n if (this.form.controls.is_multiroom.value) {\n //[Deprecated]if a space is already selected, filter the available spaces by it's level id\n if (this.spaces.value[0]?.level.id.trim() !== '') {\n // const levelId = this.spaces.value[0].level.id;\n // this.space_list = this.space_list.filter((s) => s.level.id === levelId);\n this.space_list = [\n ...this.spaces.value,\n ...this.space_list.filter(\n (sv) => !this.spaces.value.some((sh) => sh.id === sv.id)\n ),\n ];\n }\n }\n \n if (\n this.isCloning === BookingAction.CLONE\n || this.isCloning === SeriesAction.CLONE\n ) {\n\n const space = this.space_list.find(space => space.id === this.booking.room.id);\n const bookable = space !== undefined;\n this.space_list = bookable && this.space_list.filter(space => space.id !== this.booking.room.id) || this.space_list;\n\n const original_space = new Space({\n ...this.booking.room,\n ...(space || {\n settings: {\n ...this.booking.room.settings,\n recurrence_availability: []\n }\n } as any),\n bookable\n });\n\n this.oldSpace = [original_space];\n this.spaces.value.some(space => space.id === original_space.id) && this.spaces.setValue([original_space]);\n this.selectedSpace = this.updateSelectedSpace(original_space, [...this.selectedSpace]); //.push(original_space);\n }\n\n if(this.form.controls.is_recurrent.value){\n this.sortByRecurrenceAvailability();\n }\n\n\n const booking_space_list = this.form.controls.space_list.value;\n\n const idsFromUpadatedSpaceList = this.space_list.map(item => item.id);\n // Check if previous selection exists in the updated list\n const isExists = booking_space_list.filter(item => idsFromUpadatedSpaceList.includes(item?.id));\n // const isExists = idsFromUpadatedSpaceList.includes(booking_space_list.id);\n\n if(booking_space_list.length !== 0 && isExists.length){\n this.spaces.setValue(booking_space_list);\n }else {\n this.spaces.setValue([]);\n }\n })\n );\n \n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: {name: city, timezone},\n value: bld_list?.filter((bld)=> bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld)=>mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ] \n this.options.next(buildings)\n }));\n\n }\n\n public updateSelectedSpace(originalSpace, selectedSpace) {\n // Check if originalSpace already exists in selectedSpace\n const index = selectedSpace.findIndex(space => space.id === originalSpace.id);\n\n if (index === -1) {\n // If originalSpace doesn't exist, push it into selectedSpace\n selectedSpace.push(originalSpace);\n } else {\n // If originalSpace already exists, remove it before pushing\n selectedSpace.splice(index, 1);\n selectedSpace.push(originalSpace);\n }\n\n return selectedSpace;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.form) {\n const onChange = (_) => this.change$.next(_);\n /* istanbul ignore else */\n if (this.form.controls.dateTz) {\n this.subscription(\n 'date_field',\n this.form.controls.dateTz.valueChanges.subscribe(onChange)\n );\n }\n /* istanbul ignore else */\n if (this.form.controls.duration) {\n this.subscription(\n 'duration_field',\n this.form.controls.duration.valueChanges.subscribe(onChange)\n );\n }\n }\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n\n // public selectSpace(space: Space) {\n // const list = this.spaces.value;\n // if (list.find((item) => item.id === space.id)) {\n // this.spaces.setValue(list.filter((item) => item.id !== space.id));\n // } else {\n // this.spaces.setValue([space]);\n // }\n // }\n\n public selectSpace(space: Space) {\n let list = this.spaces.value;\n\n if (this.form.controls.is_multiroom?.value) {\n // If multiroom is selected\n const index = list.findIndex((item) => item.id === space.id);\n if (index > -1) {\n // Remove the space if it's already selected\n list.splice(index, 1);\n // If no spaces selected now, insert original space_list\n if (list.length === 0) {\n this.space_list = this.OriginalSpaceList;\n }\n } else {\n // Add the space to the selection\n list.length < 10 ? list.push(space) : null;\n //[Deprecated]If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n }\n } else if (list.find((item) => item.id === space.id)) {\n this.spaces.setValue(list.filter((item) => item.id !== space.id));\n } else {\n this.spaces.setValue([space]);\n }\n }\n\n // public selectSpace(space: Space) {\n // let list = this.spaces?.value;\n \n // if (this.form.controls.is_multiroom?.value) {\n // // If multiroom is selected\n // const index = list.findIndex((item) => item.id === space.id);\n // if (index > -1) {\n // // Remove the space if it's already selected\n // list.splice(index, 1);\n // // If no spaces selected now, insert original space_list\n // if (list.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n // } else {\n // // Add the space to the selection\n // list.length < 10 ? list.push(space) : null;\n // // If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n // }\n // } else {\n // // Handle single space selection (as before)\n // list = list.some((item) => item.id === space.id) ? [] : [space];\n // }\n // this.spaces.setValue(list);\n // }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n if (this.form.controls.is_recurrent.value && \n this.form.controls.recurrence_exceptions.value.length) {\n const id = this.form.controls.id.value;\n if (id && this.form.controls.action?.value === 'edit') { \n this.handleEditConflicts(id);\n } else {\n this.event.emit({ type: 'next', step: 'recurrence' });\n } \n } else {\n const space_list = this.form.value.space_list;\n const catering_order = this.form.controls.catering.value;\n const has_catering_order = catering_order && catering_order.length > 0;\n \n if (space_list && space_list.length === 1 && has_catering_order) {\n const selected_space = space_list[0];\n if (!selected_space.has_catering) {\n this.openNoCateringModal();\n return;\n }\n }\n \n this.emitNextEvent();\n }\n }\n \n private openNoCateringModal() {\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n this.emitNextEvent();\n }\n if (event.reason === 'close') {\n }\n })\n );\n \n this.noCateringDialogRef.afterClosed().subscribe(() => this.unsub('no-catering-modal'));\n }\n \n private emitNextEvent() {\n if (this.booking && this.booking.occurrence_edits && this.booking.occurrence_edits.length) {\n this.event.emit({ type: 'next', step: 'changes' });\n } else {\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'search' });\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id));\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public sortByRecurrenceAvailability() {\n this.space_list.sort((a, b)=>{\n const a_availability = (a.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/a.recurrence_availability.length\n const b_availability = (b.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/b.recurrence_availability.length\n return b_availability - a_availability\n })\n }\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld)=>bld.value) \n \n });\n }\n\n public setDefaultBuilding(){\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n public clearList(){\n this.space_list = [];\n this.savedSelection = [];\n this.spaces.setValue([]);\n }\n\n public triggerSearch = () =>{\n if(this.savedSelection.length){\n this.change$.next(this.savedSelection)\n }else{\n // disabled for CNG-645\n // this.space_list = []\n }\n }\n\n public handleEditConflicts = (id: string) =>{\n /** When editing, compare exceptions with the original ocurrence list */\n const recurrence_exceptions = this.form.controls.recurrence_exceptions;\n let occurrences_org: Array\n let booking_org: Booking;\n\n this._booking_state.bookings.subscribe(bookings => {\n booking_org = bookings.filter((booking) => booking.id === id)[0]\n occurrences_org = booking_org.occurrence_details.map((ocurr)=>\n ocurr.start_epoch\n )\n })\n\n const { hours, minutes } = new DateTZ({ date: booking_org.start_epoch * 1000, is_local_tz: false, building_tz: booking_org.timezone});\n const { hours: to_hours, minutes: to_minutes } = this.form.controls.dateTz.value;\n const new_conflicts = hours === to_hours && minutes === to_minutes\n ? recurrence_exceptions.value.filter((date: number)=> occurrences_org.includes(date))\n : recurrence_exceptions.value.filter((date: number)=> !occurrences_org.includes(date));\n\n if(new_conflicts.length){\n recurrence_exceptions.setValue([...new_conflicts])\n this.event.emit({ type: 'next', step: 'recurrence' });\n }else{\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n // Property to filter spaces based on the search query\n get filteredSpaces() {\n if (!this.space_list) {\n return [];\n }\n\n // Filter spaces based on the searchQuery\n return this.space_list.filter((space) => {\n let spaceName = space.simple_name || space.settings?.room_name || space.local_name;\n return spaceName.toLowerCase().includes(this.searchQuery.toLowerCase());\n });\n }\n\n removeSpace(spaceToRemove: Space): void {\n // Filter out the space to remove from the current list of selected spaces\n const updatedSpaces = this.spaces.value.filter(space => space.id !== spaceToRemove.id);\n this.spaces.setValue(updatedSpaces);\n //[Deprecated]If this is the last space being unselected, include spaces from all levels in space_list(available spaces)\n // if (this.spaces.value.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n }\n \n}\n","
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n {{ space?.simple_name || space[0]?.simple_name }}\n \n \n \n \n \n
\n
\n \n
\n \n \n
\n

Original Selection

\n \n
\n \n
\n
\n\n\n

All Available Rooms

\n \n \n \n \n
\n
\n
\n \n Back\n \n \n Next\n \n
\n
\n
\n\n
\n
\n
\n \n
\n
\n Checking space availability...\n
\n
\n
\n
\n\n
\n
\n
\n \n
\n
\n No results available, please select another office\n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { BookingAction, SeriesAction, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-booking-space-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class BookingSpaceItemComponent extends BaseDirective {\n /** Space to display */\n @Input() public space: Space;\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** Whether multiple spaces are able to be selected */\n @Input() public multi: boolean;\n\n @Input() isCloning: boolean;\n /** Emitter for select actions on the */\n @Output() public select = new EventEmitter();\n\n /** Whether space image should be displayed */\n public get show_image() {\n return this._service.setting('app.space_display.show_images');\n }\n\n /** Whether this space is selected */\n public get selected(): boolean {\n /* istanbul ignore else */\n if (!this.form && this.space) {\n return false;\n }\n\n return (this.form.controls.space_list && !!(this.form.controls.space_list.value || []).find((space) => space.id === this.space.id));\n // return (this.form.controls.space_list && !!(this.form.controls.space_list.value.id === this.space.id));\n }\n\n public get is_hidden(): boolean {\n return false;\n }\n\n /** Whether space is booked by request */\n public get is_request(): boolean {\n return false;\n }\n\n public get availableOccurrences(): number {\n if(this.space && this.space.recurrence_availability) {\n return this.space.recurrence_availability.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this.space.recurrence_availability.length;\n }\n\n /** Display location of the space */\n public get location(): string {\n /* istanbul ignore else */\n if (!this.space) {\n return 'Unable to determine location';\n }\n const level = this.space.level;\n const bld = this._org.buildings.find((building) => building.id === level.building_id);\n return `${bld ? bld.name + ', ' : ''}${level.name}`;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n public selectSpace() {\n if(this.form.controls.is_recurrent.value){\n const spaceConflicts = this.space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n }\n this.select.emit();\n }\n\n public disableSelect(): boolean {\n if (\n this.form.controls.action.value === SeriesAction.CLONE\n && this.availableOccurrences === 0\n ) {\n return true;\n }\n\n if (\n this.form.controls.action.value === BookingAction.CLONE\n && (this.space as any).bookable === false\n ) {\n return true;\n }\n\n return false;\n }\n}\n","
\n
\n
\n
\n
{{ space.local_name }}
\n
\n
{{ location }}
\n
\n \n {{ space.capacity || '0' }}\n
\n
\n \n Available for {{ availableOccurrences }} out of {{ totalOccurrences }} occurrences\n
\n \n
\n \n {{ multi ? (selected ? 'Remove' : 'Select') : is_request ? 'Request' : 'Book' }}\n \n
\n\n","import { Component, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { setRecurrenceStartsTime } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DateTime } from 'luxon';\nimport { CateringDropComponent } from '@mckinsey-converge/ui';\nimport { ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'booking-spaces-form',\n templateUrl: './form.component.html',\n styleUrls: ['./form.component.scss']\n})\nexport class BookingSpaceFlowFormComponent {\n /** Booking form fields */\n @Input() public form: FormGroup;\n /** Whether form is not the first page in the flow */\n @Input() public can_return: boolean = false;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n @ViewChild('container', { static: true }) private container: ElementRef;\n\n constructor(private _dialog: MatDialog, private cdRef: ChangeDetectorRef) {}\n\n /** Move flow to next step */\n public next(): void {\n if (this.form.controls?.is_recurrent?.value) {\n setRecurrenceStartsTime(this.form);\n }\n \n this.form.markAllAsTouched();\n this.form.updateValueAndValidity();\n \n if (this.form.controls?.attendees?.value?.some(item => item.name.length > 50)) {\n const attendeesControl = this.form.get('attendees');\n attendeesControl.setErrors({\n customError: 'Attendee name cannot be more than 50 characters',\n });\n }\n \n // Check if booking is outside catering hours and 'Need catering?' is selected\n const isOutsideCateringHours = this.checkIfOutsideCateringHours();\n const hasCatering = this.form.controls?.has_catering?.value;\n const cateringOrders = this.form.controls?.catering?.value;\n \n if (isOutsideCateringHours && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Open the dialog\n const dialogRef = this._dialog.open(CateringDropComponent, {\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n // User confirmed to remove catering\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n // Update validity\n this.form.updateValueAndValidity();\n // Proceed to next step if form is valid\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n }\n } else {\n // User chose to go back, do not proceed\n // Optionally, scroll to the relevant field\n if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n });\n } else {\n // Proceed as usual\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n } else if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n }\n \n\n private checkIfOutsideCateringHours(): boolean {\n const dateTz = this.form.controls?.dateTz?.value;\n const duration = this.form.controls?.duration?.value;\n \n if (dateTz && duration) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n \n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } else {\n // If date or duration is not set, assume not outside catering hours\n return false;\n }\n }\n \n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'form' });\n }\n\n /** Reset form to initial state */\n public resetForm(): void {\n this.event.emit({ type: 'reset', step: 'form' });\n }\n}\n","
\n
\n
\n \n
\n
\n \n Back\n \n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { BookingSpaceFlowFormComponent } from './booking-modal/form/form.component';\nimport { BookingCateringComponent } from './booking-modal/catering/catering.component';\nimport { BookingFindSpaceComponent } from './booking-modal/find-space/find-space.component';\nimport { BookingSpaceFiltersComponent } from './booking-modal/find-space/filters/filters.component';\nimport { BookingSpaceItemComponent } from './booking-modal/find-space/item/item.component';\nimport { BookingCateringOrderListComponent } from './booking-modal/catering/order-list/order-list.component';\nimport { BookingModalComponent } from './booking-modal/booking-modal.component';\nimport { BookingCateringOrderDetailsComponent } from './booking-modal/catering/order-details/order-details.component';\nimport { CateringOrderListItemComponent } from './booking-modal/catering/order-list/item/item.component';\nimport { CateringMenuCategoryComponent } from './booking-modal/catering/order-details/category/category.component';\nimport { DeleteConfirmModalComponent } from './delete-confirm-modal/delete-confirm-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { UiModule } from '@mckinsey-converge/ui';\n\n\n@NgModule({\n declarations: [\n BookingSpaceFlowFormComponent,\n BookingCateringComponent,\n BookingFindSpaceComponent,\n BookingSpaceFiltersComponent,\n BookingSpaceItemComponent,\n BookingCateringComponent,\n BookingCateringOrderListComponent,\n BookingModalComponent,\n BookingCateringOrderDetailsComponent,\n CateringOrderListItemComponent,\n CateringMenuCategoryComponent,\n DeleteConfirmModalComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n UiModule\n ],\n exports: [\n BookingCateringOrderDetailsComponent\n ]\n})\nexport class BookingsModule {\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-delete-confirm-modal',\n templateUrl: './delete-confirm-modal.component.html',\n styleUrls: ['./delete-confirm-modal.component.scss']\n})\nexport class DeleteConfirmModalComponent {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: boolean;\n /** Whether delete action succeeded */\n public success: boolean;\n}\n","\n
\n
\n \n
\n
\n

Are you sure you want to delete this meeting?

\n

\n This will permanently delete the booking and all details from the host and attendees\n calendars.\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
Deleting meeting...
\n
\n
\n
\n\n
\n

Booking Permanently deleted

\n
\n
\n","import { NgModule } from '@angular/core';\nimport { MeetingDetailsModalComponent } from './meeting-details-modal/meeting-details-modal.component';\nimport { PrivateDetailsModalComponent } from './meeting-details-modal/private-details-modal/private-details-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsDisplayComponent } from './meeting-details-modal/details/details.component';\nimport { MeetingRecurringDetailsDisplayComponent } from './meeting-details-modal/recurring-details/recurring-details.component';\nimport { MeetingDetailsRequirementsComponent } from './meeting-details-modal/requirements/requirements.component';\nimport { MeetingCateringDetailsComponent } from './meeting-details-modal/catering/catering.component';\nimport { MeetingPrivateDetailsComponent } from './meeting-details-modal/private-details/private-details.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n declarations: [\n MeetingDetailsModalComponent,\n PrivateDetailsModalComponent,\n MeetingDetailsDisplayComponent,\n MeetingRecurringDetailsDisplayComponent,\n MeetingDetailsRequirementsComponent,\n MeetingCateringDetailsComponent,\n MeetingPrivateDetailsComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n ScrollingModule\n ],\n exports: []\n})\nexport class CalendarModule {\n}\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, NgZone, ChangeDetectorRef } from '@angular/core';\nimport { first, map, take, takeWhile } from 'rxjs/operators';\n\nimport { Booking, BookingStateService, BookingsPaginatedService, BookingsService, OrganisationService, User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { UserStoreState, selectCurrentUser } from '@mckinsey-converge/user';\nimport { Store } from '@ngrx/store';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { getListOfDateFormat, formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n@Component({\n\tselector: 'day-view-approvals-view',\n\ttemplateUrl: './approvals-view.component.html',\n\tstyleUrls: ['./approvals-view.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewApprovalsComponent extends BaseDirective implements OnInit, OnDestroy {\n\t/** List of spaces to check for pending approvals */\n\t// public space_list: string[] = [];\n\t/** Whether the pending bookings are being loaded */\n\tpublic loading: boolean = true;\n\t/** Whether an event action is in progress */\n\t// public waiting_on_event: boolean;\n\t/** Observable for tentative events */\n\n\tpublic inputText: string = '';\n\n\tpublic incommingRequests: Booking[] = [];\n\tpublic sortOrderByOptions: { display: string; value: string; meta: {}; }[];\n\tpublic selectedSort: { display: string; value: string; meta: {}; } = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\n\tpublic isClosed: boolean = false;\n\tpublic updatedRequest: Booking[] = [];\n\n\t/** Display value for the active date */\n\t// public get date_display(): string {\n\t// \treturn 'Today';\n\t// }\n\n\tpublic currentUser: User;\n\n\tconstructor(\n\t\tprivate _org: OrganisationService,\n\t\tprivate _bookings_service: BookingsPaginatedService,\n\t\tprivate store: Store,\n\t\tprivate _bookings: BookingsService,\n\t\tprivate _booking_state_service: BookingStateService,\n\t\tprivate _zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef) {\n\t\tsuper();\n\t}\n\n\tpublic ngOnInit(): void {\n\t\tthis.subscription('currentUser', this.store.select(selectCurrentUser)\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe((user: User) => {\n\t\t\t\t// Once we know we have the user loaded\n\t\t\t\tthis.currentUser = new User(user);\n\t\t\t\tthis.getHoldingBay();\n\t\t\t})\n\t\t);\n\n\t\tthis.subscription(\n\t\t\t'building',\n\t\t\tthis._org.listen('active_building').subscribe((_) => this.currentUser && this.getHoldingBay() )\n\t\t);\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis.interval('holdingBay', () => {\n\t\t\t\t// update every 30 seconds.\n\t\t\t\tthis.getHoldingBay();\n\t\t\t}, 30 * 1000);\n\t\t});\n\n\t\tthis.sortOrderByOptions = [\n\t\t\t{ display: 'Soonest booking', value: 'soonest', meta: {} },\n\t\t\t{ display: 'Latest booking', value: 'latest', meta: {} },\n\t\t\t{ display: 'Newest request creation date', value: 'newest_date', meta: {} },\n\t\t\t{ display: 'Oldest request creation date', value: 'oldest_date', meta: {} }\n\t\t];\n\n\t\tthis.selectedSort = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\t}\n\n\tpublic getHoldingBay() {\n\t\tif (!this._org.building || !this.currentUser) {\n\t\t\treturn;\n\t\t}\n\n\n\n\t\tthis.subscription('holdingBay', this._bookings_service.getHoldingBay(\n\t\t\t{\n\t\t\t\t'email': this.currentUser.email,\n\t\t\t\t'building_zone': this._org.building.id,\n\t\t\t}\n\t\t\t).subscribe((res) => {\n\t\t\t\t// Check if room object is missing 'room.building' for CNG-513\n\t\t\t\tconst isMissingRoom = res?.results?.some(bkng => !bkng.room?.building?.name) || false;\n\t\t\t\t\n\t\t\t\tconst hasInvalidEndDateInMasterBookings = res?.results\n\t\t\t\t?.filter(bkng => bkng.recurrence_type === 'master') \n\t\t\t\t.some(bkng => {\n\t\t\t\t// Check for invalid endDateString for CNG-503\n\t\t\t\t const date = new Date(bkng.endDateString);\n\t\t\t\t return isNaN(date.getTime());\n\t\t\t\t}) || false;\n\n\t\t\t\t// Run updateRoomList() to get room info\n\t\t\t\tif (isMissingRoom || hasInvalidEndDateInMasterBookings) {\n\t\t\t\t\t// this._booking_state_service.updateRoomList();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst masterIds = [];\n\t\t\t\tconst filterMasterBookings = res.results?.filter(bkng => {\n\n\t\t\t\t\tif(bkng.recurrence_type === 'master' ) {\n\t\t\t\t\t\tmasterIds.push(bkng.recurrence_master_id);\n\t\t\t\t\t}\n\t\t\t\t\treturn bkng.recurrence_type === null || bkng.recurrence_type === 'master';\n\t\t\t\t}) || [];\n\n\t\t\t\tconst filterStandardBookings = res.results?.filter(bkng => bkng.recurrence_type === 'occurrence' \n\t\t\t\t \t&& bkng.status === 'tentative' \n\t\t\t\t\t&& !masterIds.includes(bkng.recurrence_master_id) // edited from staff , need approval\n\t\t\t\t) || [];\n\n\t\t\t\tconst filterStandardAndMasterBookings = [...filterMasterBookings, ...filterStandardBookings ];\n\t\t\t\tlet expiredBkngs = [];\n\t\t\t\tconst pendingBkngs = filterStandardAndMasterBookings?.filter(bkng => (bkng.timeBasedStatusLabel !== 'expired_yesterday') ? true : !expiredBkngs.push(bkng) ) || [];\n\t\t\t\texpiredBkngs.length && this.declineExpiredBookings(expiredBkngs);\n\n\t\t\t\tthis.updatedRequest = cloneDeep(pendingBkngs);\n\t\t\t\t// const request = cloneDeep(this.updatedRequest);\n\t\t\t\tthis.searchRequest();\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.incommingRequests = [];\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t/* istanbul ignore next */\n\t/**\n\t * Track by function for ngFor optimisation\n\t * @param index Index of the item\n\t * @param item Data associated with the item at the given index\n\t */\n\tpublic trackByFn(index: number, item: Booking) {\n\t\treturn item.id || index;\n\t}\n\n\t/**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic selectOrderBy(sortingValue: { display: string; value: string; meta: {}; }) {\n\t\tthis.selectedSort = sortingValue;\n\t\tthis.searchRequest();\n\t}\n\n\t/**\n\t * Function apply order by sorting method to incomming requests for approval\n\t * @param requests\n\t */\n\tpublic applyOrderBy(requests: Booking[]): void {\n\t\tconst items = cloneDeep(requests);\n\t\tswitch (this.selectedSort.value) {\n\t\t\tcase 'soonest':\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t\tcase 'latest':\n\t\t\t\titems.sort((a, b) => b.start_epoch - a.start_epoch );\n\t\t\t\tbreak\n\t\t\tcase 'newest_date':\n\t\t\t\titems.sort((a, b) => b.created_epoch - a.created_epoch )\n\t\t\t\tbreak;\n\t\t\tcase 'oldest_date':\n\t\t\t\titems.sort((a, b) => a.created_epoch - b.created_epoch )\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.incommingRequests = items;\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\tpublic totalCateringItems(booking: Booking) {\n\t\tlet num = 0;\n\t\tbooking.catering.forEach(el => el?.items.forEach(item => num += item.amount ) );\n\t\treturn num;\n\t}\n\n\tpublic searchRequest(value?: string) {\n\t\tconst searchText = this.inputText.toLowerCase();\n\n\t\t\tconst filtered = this.updatedRequest.filter( (el) => {\n\t\t\tconst { room, organiser, booked_by, booker, booking_type, attendees, date_string, startDateTz, start_time, end_time, creationDateTz } = el;\n\n\t\t\treturn room?.name?.toLowerCase().includes(searchText) || /// input text inlcudes room name\n\t\t\t\troom?.local_name?.toLowerCase().includes(searchText) || /// input text inlcudes room local name\n\t\t\t\troom?.street_and_city?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.building?.address?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.level.name?.toLowerCase().includes(searchText) || /// input text inlcudes room level\n\n\t\t\t\torganiser?.name?.toLowerCase().includes(searchText) || ///input text inlcudes host name\n\t\t\t\t(booked_by && booked_by['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booked by name\n\t\t\t\t(booker && booker['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booker name\n\t\t\t\tbooking_type?.toLowerCase().includes(searchText)\t||\n\t\t\t\tattendees?.some(att => att?.name?.toLowerCase().includes(searchText)) || ///input text inlcudes attendees name\n\n\t\t\t\tdate_string?.toLowerCase().includes(searchText) || /// date_string == '06 Mar 2023'\n\t\t\t\tformatDateWithSuffix(date_string).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\tformatDateWithSuffix(creationDateTz.formatDate('dd MMM yyyy')).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\t//searchText.includes(startDateTz?.date?.day?.toString()) || /// day 06/6\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthLong) || /// monthLong == 'March'\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthShort) || /// monthShort == 'Mar'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayLong.toLowerCase()) || /// weekdayLong == 'Monday'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayShort.toLowerCase()) || /// weekdayShort == 'Mon'\n\n\n\t\t\t\tgetListOfDateFormat().some(format => startDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\t\t\t\tgetListOfDateFormat().some(format => creationDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\n\t\t\t\tstart_time?.toLowerCase().includes(searchText) ||\n\t\t\t\tend_time?.toLowerCase().includes(searchText)\n\n\n\t\t\t});\n\n\t\t\tthis.applyOrderBy(filtered);\n\t}\n\n\tpublic declineExpiredBookings(expiredBkngs: Booking[] ) {\n\t\t// console.log(expiredBkngs);\n\t\tthis._bookings.declineMultiple(expiredBkngs).subscribe(resArray => this.cdRef.detectChanges(),\n\t\t(error) => {\n\t\t\tconsole.log(error);\n\t\t\tthis.cdRef.detectChanges();\n\t\t});\n\n\t}\n\n}\n","
\n
\n \n\n
\n Order by: {{selectedSort.display}}\n
\n \n
\n
\n\n \n
{{sorting.display}}
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n close\n
\n
No meetings pending approval
\n
\n
\n","import { Component, Input, Output, EventEmitter, NgZone, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, ViewEncapsulation, SimpleChanges, HostListener } from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective, shorterBuildingDateFormatString } from '@mckinsey-converge/base';\nimport { Booking, CateringCategory, CateringItem, SpacesService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DatePipe } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TooltipPosition } from \"@mckinsey-converge/ui\";\n\nconst STATES: { [id: string]: string } = {};\n\n@Component({\n selector: 'approvals-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n // encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(200, style({ opacity: 1, height: '*' })),\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(200, style({ opacity: 0, height: 0 })),\n ]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DatePipe],\n})\nexport class DayViewApprovalsEventComponent extends BaseDirective implements OnInit {\n /** Event to display */\n @Input() event: Booking;\n @Input() totalCateringItems: number;\n /** Event emitter for event actions */\n @Output() acting = new EventEmitter();\n\n /** Whether approval action is being processed */\n public loading: boolean;\n /** Whether event details are shown */\n public shown: boolean;\n /* Booking type : Internal, External, Interview... */\n public bookingType: string;\n /* Booking date */\n public date: string;\n /* Booking creation date */\n public creationDate: string;\n /* Office address */\n public officeAddress: string;\n\n public showCateringNote: boolean = false;\n\n public showEquipmentNote: boolean = false;\n\n /** Whether the meeting has catering attached */\n public has_catering: boolean;\n public cateringNote: string = '';\n public equipmentNote: string = '';\n public cateringOrderItems: number = 0;\n\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /* Reccurance period */\n public recurrence_period: string;\n\n /** Requested booking start time */\n public requestedDateTz: DateTZ;\n /** Requested booking end time */\n public requestedEndDateTz: DateTZ;\n public specific_occurances;\n public recurrenceExceptions: any[] = [];\n\n /** Type of event */\n public get start(): string {\n return this.event.startDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** Type of event */\n public get end(): string {\n return this.event.endDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** View booking details */\n public view() {\n const room_id = Object.keys(this.event.approval_status)[0] || '';\n const space = this._spaces.find(room_id) || this.event.room;\n this.timeout(\n 'view',\n () => {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space,\n booking: new Booking({ ...this.event.toApiJSON(), room_id, room: space }),\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this._service.set('CONCIERGE.day_view.viewing', this.event);\n },\n 50\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_sevice: BookingStateService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _zone: NgZone,\n private cdRef: ChangeDetectorRef,\n private datePipe: DatePipe\n ) {\n super();\n }\n ngOnInit(): void {\n this.cateringOrderItems = 0;\n this.updateData();\n }\n\n public updateData() {\n const type = this.event.booking_type;\n this.bookingType = `${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n const catering: readonly CateringOrder[] = this.event.catering;\n this.has_catering = !!catering.find(\n (order) => this.event.space.email === order.location_id\n );\n this.cateringNote =\n this.event.notes.filter((el) => el.type === 'catering')[0]?.message || '';\n this.equipmentNote =\n this.event.notes.filter((el) => el.type === 'equipment')[0]?.message || '';\n\n const createdDate = this.event.creationDateTz.formatDate('dd MMM yyyy');\n const createdTime = this.event.creationDateTz.formatDate('h:mm a').toLocaleLowerCase();\n this.creationDate = `${formatDateWithSuffix(createdDate)}, ${createdTime}`;\n this.date = formatDateWithSuffix(this.event.date_string);\n this.officeAddress = `${this.event.room.building?.name} ${this.event.room.level.name}, ${this.event.space.building?.city}`;\n // `${this.event.room.building?.name} ${this.event.room.level.name} ${this.event.space.building?.city}`;\n this.isRecurrentBooking = this.event.is_recurrent && this.event.recurrence_type !== 'occurrence';\n this.recurrence_period = this.event.recurrence_period;\n this.specific_occurances = this.event.occurrence_details?.filter(ocurrence => ocurrence.id !== this.event.id).map((item)=>{\n let date = item.start_epoch * 1000;\n let specificDates = new DateTZ({date, is_local_tz: false, building_tz: this.event.timezone});\n return shorterBuildingDateFormatString(specificDates).slice(3);\n })\n this.recurrenceExceptions = this?.event?.recurrence_exceptions?.map((item)=>{\n let date = new Date(item * 1000);\n return this.datePipe.transform(date, 'dd MMM yyyy');\n }) || [];\n this.cdRef.detectChanges();\n }\n\n public get eventTitle() {\n return `${this.event.title}_${this.event.created_epoch}_${this.event.start_time}`\n }\n\n /**\n * Approve the meeting for the set room\n */\n public accept(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Approve Meeting',\n content: `Approve ${this.event.organiser.name}'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${this.event.length_string} on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const event = this.event.toJSON();\n const bookingOptions = {\n concierge: true,\n host: this.event.organiser.email,\n room_email: this.event.space?.email,\n icaluid: this.event.icaluid,\n start: event.start,\n end: event.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n } \n this._bookings\n .accept(this.event.id, bookingOptions)\n .then(\n (acceptedBooking) => {\n this._service.notifySuccess('Meeting approved.');\n this.event.status = BOOKING_STATUS.approved;\n STATES[this.event.id] = BOOKING_STATUS.approved;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error approving meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n /**\n * Decline meeting for the set room\n */\n public decline(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Decline Meeting',\n content: `Decline ${\n this.event.organiser.name || this.event.organiser\n }'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${\n this.event.length_string\n } on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_busy' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const booking = this.event.toJSON();\n this.loading = true;\n const bookingOptions = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: this.event.space?.email,\n icaluid: booking.icaluid,\n start: booking.start,\n end: booking.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n }\n this._bookings\n .decline(booking.id, bookingOptions)\n .then(\n () => {\n this._service.notifySuccess('Meeting declined.');\n this.event.status = BOOKING_STATUS.declined;\n STATES[this.event.id] = BOOKING_STATUS.declined;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error declining meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // console.log('CHANGES: ',changes);\n this.updateData();\n this.cdRef.detectChanges();\n }\n\n public isConflictWithOccurences() {\n const conflicts = this.event?.room?.totalOccurrences - this.event?.room?.availableOccurrences;\n return { is_conflict: !!conflicts, total_Conflicts: conflicts };\n }\n\n public get dateString(): string {\n if (!this.event.dateString) return '';\n return this.event.dateBuildingString.slice(3);\n }\n\n /**\n */\n public get endDateString(): string {\n if (!this.event.endDateString) {\n return '';\n }\n else if(this.event.recurrence_period === 'list' && this.event.recurrence_type === 'master'){\n const occurrence_details = this.event.occurrence_details && this.event.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.event.id);\n const endDate = this.event.recurrenEndFromOcurrences(occurrence_details);\n return shorterBuildingDateFormatString(endDate).slice(3);\n } else\n return this.event.endDateString.slice(3);\n }\n\n public get timeString(): string {\n if(!this.event.start_time) return '';\n return `${this.event.start_time} - ${this.event.end_time} `;\n }\n\n getTooltipText() {\n return this.specific_occurances;\n }\n}\n","
\t\n\t
\n\t\t\n\t\t
{{ event.recurrence_type === 'occurrence' ? 'Occurrence from a recurring series ' : 'Recurring Series' }}
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
{{ event.space?.global_name ? event.space.local_name : '' }}
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{equipmentNote}}
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{totalCateringItems}} items in catering order\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
{{ bookingType }}
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t {{ date }} \n\t\t\t\t {{ event.all_day ? 'All Day' : start + ' - ' + end }} \n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
Specific Dates
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{{ this.recurrence_period | titlecase }}\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
Conflict Dates
\n\t\t\t\t\t\t\t\t\t\t
{{date}}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{{dateString}} - {{endDateString}}\n\t\t\t\t\t
\n\t
{{timeString}}
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{ officeAddress }}\n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t {{ event.organiser?.name }}\n\t\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t\t\t\t\n\t\t\t{{ event.attendees.length }} \n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
{{ item.name }}
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n\t\t
\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t {{ event.creator?.name }}\n\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t Requested on {{ creationDate }}\n\t\t
\n\t
\n\t\n
\n\n","import {\n Component,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first, take } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport {\n ApplicationService,\n BookingStateService,\n BookingStoreState,\n BuildingLevel,\n OrganisationService,\n selectBookingByIdResultsFromState,\n User,\n Booking,\n SpacesService,\n Space,\n isIncludes,\n searchRoomsAndBookings\n} from '@mckinsey-converge/data-common';\n\nimport {\n AlertMode, DropdownOpion,\n} from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { select, Store } from '@ngrx/store';\nimport { BuildingStoreState } from 'libs/buildings/src';\nimport { clearBookingByIdResults, loadBookingsWithQuery, MyBookingsStoreState } from '@mckinsey-converge/bookings';\nimport { Subscription } from 'rxjs';\n\nexport type RoomBookingStoreState = BookingStoreState & BuildingStoreState & MyBookingsStoreState & UserStoreState;\n\n@Component({\n selector: 'a-day-view',\n templateUrl: './day-view.component.html',\n styleUrls: ['./day-view.component.scss']\n})\nexport class DayViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected type */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n /** Whether to show only items with a setup and/or breakdown time */\n public only_overflow: boolean;\n /** List of legend keys to show */\n public legend: HashMap = {};\n /** List of legend keys to show */\n public legend_list: string[] = [];\n /** List of available legend keys */\n public legend_keys: Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true }\n ];\n\n public banner_mode = AlertMode.Warning\n public showBanner = true;\n public undo_banner_mode = AlertMode.Error;\n public has_access: boolean;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n\t\tprivate spaceTypesSubscription: Subscription;\n\n event_list: Booking[] = [];\n\tsearchStr: any;\n\tfoundSearchLength: number = 0;\n\tsearchedCounter: any = 1;\n\tshowSrchWarning: boolean;\n\ttotalFoundItem: number = 0;\n spaces: Space[] = [];\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private store: Store,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Day View';\n\n if( this._service.get('active_legends') !== null && this._service.get('active_legends').hasOwnProperty('length')) {\n this.legend_keys = this._service.get('active_legends');\n }\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n \n\n\t\t\t\tthis._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n\t\t\t\t\t\t\t\t\t\tthis.dateTz = new DateTZ({\n\t\t\t\t\t\t\t\t\t\t\tdate: this.dateTz.ms,\n\t\t\t\t\t\t\t\t\t\t\tis_local_tz: false,\n\t\t\t\t\t\t\t\t\t\t\tbuilding_tz: this.timezone,\n\t\t\t\t\t\t\t\t\t\t});\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.initSpace();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n\t\t\t\t\t\t\t\t\t\tthis.levels.sort((a, b) =>\n\t\t\t\t\t\t\t\t\t\tb.name.localeCompare(a.name, undefined, {\n\t\t\t\t\t\t\t\t\t\t\t\tnumeric: true,\n\t\t\t\t\t\t\t\t\t\t\t\tignorePunctuation: true,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t);\n\n \n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n \n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'day_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return;\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n\n this.configureIfLinksFromEmail();\n\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...this.filterEvents(list)];\n\n })\n );\n\n \n }\n\n public initSpace() {\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.active_level ? this._org.building.id : this.active_level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0 && _.bookable);\n\n })\n );\n }\n\n private filterEvents(list): Booking[] {\n const bookings = list;\n const filterd_booking = bookings.filter((event) => {\n const ignore = event.is_recurrent && event.recurrence_type === 'master';\n return ( !ignore );\n });\n\n return filterd_booking || [];\n }\n\n\n\n searchBooking(value) {\n\n // Resetting warning flag\n this.showSrchWarning = false;\n\n // Converting search value to lower case for case-insensitive comparison\n const searchValue = value.toLowerCase().trim();\n \n // Combining event list and space arrays into one arrya for searchig \n // const allItems = [...this.event_list, ...this.spaces];\n\n // Filter spaces based on active_type\n const filteredSpaces = this.spaces.filter(space => {\n if (!this.active_type) {\n return true; // Include all spaces if no active type is set\n }\n if (this.active_type.startsWith('zone')) {\n return space.zones.includes(this.active_type); // Check zones if active type starts with 'zone'\n }\n return space.room_type === this.active_type; // Otherwise, check room_type\n });\n \n // Combine filtered spaces and events into one array for searching\n const allItems = [...this.event_list, ...filteredSpaces];\n\n // Filtering the combine array to find matching room or booking \n const filteredItems = searchRoomsAndBookings(allItems, searchValue, true);\n \n // Updating the total number of found items in serach\n this.totalFoundItem = filteredItems.length;\n\n // Setting showSrchWarning flag if no result were found \n this.showSrchWarning = !this.totalFoundItem;\n\n // Updating lenght of found items for later use\n this.foundSearchLength = this.totalFoundItem - 1;\n\n\n if(this.searchStr !== value) {\n // Setting the first found as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[0]);\n // Resetting the search counter\n this.searchedCounter = 0;\n }\n else {\n // Handling case where seached string is the same as previou one \n // Incrementing search counter, loopoing back to 0 if it exceed the length of found items\n this.searchedCounter = ( this.searchedCounter < this.foundSearchLength ) ? this.searchedCounter + 1 : 0\n // Setting the next found items as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[this.searchedCounter]);\n }\n // Storing the current search string for future camparison\n this.searchStr = value;\n\n }\n\n\n public configureIfLinksFromEmail() {\n /**\n * https://acaprojects.atlassian.net/browse/MCK-2055\n * Load booking with id received from email link to concierge and setup configuration to open booking detail dialog on day view\n * Will work with both formatted URL's\n * http://localhost:4200/#/day-view?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n * http://localhost:4200/#/day-view/zone-1FUT0pxu12s?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n */\n const bookingId = this._route.snapshot.queryParams['view'];\n if(bookingId) {\n this.subscription('currentUser', this.store.select(selectCurrentUser).pipe(take(1))\n .subscribe((user: User | undefined) => {\n // Once we know we have the user loaded.\n this.store.dispatch(loadBookingsWithQuery({ 'id': bookingId, 'target': 'bookingById', 'offset': 0 }));\n }));\n\n this.store.dispatch(clearBookingByIdResults())\n\n this.subscription('bookingResults', this.store.pipe( select(selectBookingByIdResultsFromState) ).pipe(first(_ => !!_ && !!_.success))\n .subscribe(next => {\n const booking = next.success ? next.success?.[0] : null;\n if (booking && booking.room) {\n const levelId = this._route.snapshot.params.hasOwnProperty('level');\n\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(booking.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n\n this.updateDateTz(booking.startDateTz)\n this._booking_state_service.setDate(booking.startDateTz);\n this._booking_state_service.setZone(booking.level_zone);\n if(!levelId ) {\n this._router.navigate(['/day-view', booking.level_zone], { queryParams: { view: bookingId }, replaceUrl: true });\n }\n }\n }));\n }\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n\t\t\t\tif (this.spaceTypesSubscription) {\n\t\t\t\t\tthis.spaceTypesSubscription.unsubscribe();\n\t\t\t\t}\n this._service.set('CONCIERGE.day_view.viewing', []);\n }\n\n\n // Fires for the big blue new booking button\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.initSpace();\n this._router?.url?.includes('/day-view') && this._router.navigate(['/day-view', this.active_level]);\n }\n\n public updateLegend(mobile: boolean = false) {\n if (mobile) {\n this.legend_list = this.legend_keys.reduce((list, key) => {\n if (key.active) list.push(key.id);\n return list;\n }, []);\n\t\t\tthis._service.set('active_legends', this.legend_keys);\n }\n this.legend = this.legend_keys.reduce((map, key) => {\n map[key.id] = this.legend_list.includes(`${key.id}`);\n return map;\n }, {});\n\n this._booking_state_service.setFilters({\n ...this._booking_state_service.filters,\n hide_type: Object.keys(this.legend).filter((i) => this.legend[i] === false) as any\n });\n }\n\n updateSpaceSelection(){ \n this._service.set('active_type', this.active_type);\n }\n\n public onOnlySetupBreakdownChanged(toggle: MatSlideToggleChange): void {\n this._service.set('APP.breakdown', toggle.checked)\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._service.get('undo').next(null);\n this._booking_state_service.attentToDelete(booking, action, true);\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public hideBanner() {\n this.showBanner = false;\n }\n\n public hideUndo() {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n
\n \n
\n \n 1\"\n appearance=\"outline\"\n >\n \n \n {{ level?.name }}\n \n \n \n \n \n \n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
{{ totalFoundItem }}
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tNo search found!\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\n\n
\n \n
\n \n
\n
\n
\n\n \n \n \n
\n \n Only Setup/Breakdown\n \n
\n
\n\n \n {{ level?.name }}\n \n\n\n \n {{ type?.name }}\n \n\n\n
\n \n
\n
{{ key?.name }}
\n
\n
\n
\n
\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { DayViewComponent } from './day-view.component';\nimport { DayViewTimelineComponent } from './timeline/timeline.component';\nimport { DayViewApprovalsComponent } from './approvals-view/approvals-view.component';\nimport { DayViewApprovalsEventComponent } from './approvals-view/event/event.component';\nimport { DayViewSpaceComponent } from './space/space.component';\nimport { DayViewSpaceEventComponent } from './space/event/event.component';\n\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { FormsModule } from '@angular/forms';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: DayViewComponent },\n { path: ':level', component: DayViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n DayViewComponent,\n DayViewTimelineComponent,\n DayViewApprovalsComponent,\n DayViewApprovalsEventComponent,\n DayViewSpaceComponent,\n DayViewSpaceEventComponent\n ],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class DayViewModule {}\n","import {\n Component,\n OnInit,\n Input,\n OnChanges,\n SimpleChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space, BOOKING_STATUS, CloseDialogService, DialogIds } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/** Details about the associated event overlapping with other events */\nexport interface IEventOverlap {\n /** Index of this item with the overlapping items */\n index: number;\n /** Total number of items overlapping with this one */\n total: number;\n}\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'day-view-space-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewSpaceEventComponent extends BaseDirective implements OnInit, OnChanges {\n /** Event to display */\n @Input() public booking: Booking;\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Space associated with the booking */\n @Input() public space: Space;\n /** Whether the item is a fixed size */\n @Input() public fixed: boolean;\n /** Overlap details for the booking */\n @Input() public overlap: IEventOverlap;\n /** Whether an action is being processed for this booking */\n @Input() public loading: boolean;\n /** Emitter for the current position of the booking within the timeline */\n @Output() public position = new EventEmitter<{ top: number; height: number }>();\n\n /** Position of the booking start time in the day */\n public top: number;\n /** Position of the booking relative to overlapping bookings */\n public left: number;\n /** Height based of the duration of the booking */\n public height: number;\n /** Size of the booking when overlapping with other bookings */\n public width: number;\n /** Offset from the booking's top that the setup time starts */\n public overflow_top: number;\n /** Offset from the booking's bottom that the breakdown time ends */\n public overflow_bottom: number;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _router: Router,\n private cdRef: ChangeDetectorRef,\n private closeDialogService: CloseDialogService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public get local_id(): string {\n return this.booking.icaluid.substr(0, 6);\n }\n\n /** Type of booking */\n public get type(): string {\n return this.booking.getType();\n }\n\n /** Period that the booking will occur during the day */\n public get period(): string {\n // the booking time is being pass in as the local timezone version.\n return this.booking.time_period;\n }\n\n /** Number attendees expected to turn up to the booking */\n public get expected(): number {\n const expected = this.booking.expected_attendees;\n return this.space ? expected[this.space.email] || 0 : 0;\n }\n\n /** Whether the meeting has catering attached */\n public get has_catering(): boolean {\n return !!this.order;\n }\n\n public get order(): CateringOrder {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp.length && orders.push(_temp[0]);\n });\n return orders[0];\n // this.booking.catering.find((order) => order.location_id === this.space.email);\n }\n\n /** View booking details */\n public view(event: Event) {\n \n this.cdRef.detach(); // Detach change detection before the dialog opens. \n\n const dialogRef = this._dialog.open(MeetingDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.closeDialogService.registerDialog(DialogIds.MeetingDetails, dialogRef);\n dialogRef?.afterClosed().subscribe(_ => {\n this.cdRef.reattach(); // Reattach change detection after the dialog closes.\n\n this.calculatePosition();\n this.cdRef.detectChanges();\n });\n }\n\n /** Whether booking is active */\n public get active(): boolean {\n const booking = this._service.get('CONCIERGE.day_view.viewing');\n return !booking || booking.id === this.booking.id;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.booking || changes.overlap || changes.dateTz) {\n this.calculatePosition();\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking_details = this.booking.toApiJSON();\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking_details));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n\n /**\n * View catering order for the booking\n */\n public viewOrder(order: CateringOrder) {\n /* istanbul ignore else */\n if (this.booking && this.booking.catering) {\n /* istanbul ignore else */\n if (localStorage) {\n this.storeOrder(order);\n }\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: this.booking.id, view: order.id },\n });\n }\n }\n\n /** Calculate the position */\n private calculatePosition() {\n /* istanbul ignore else */\n if (this.booking) {\n const overlap = this.overlap || { index: 0, total: 1 };\n const shown_date = this.dateTz.startOfValue('day');\n const date = this.booking.startDateTz.startOfValue('minute');\n const end = this.booking.endDateTz.startOfValue('minute');\n const from_previous_day = !date.isSameDate(shown_date, 'day');\n if (end.isBeforeDate(shown_date, 'day')) { // Hide booking if not on shown date\n this.top = -100;\n this.height = 1;\n return;\n }\n\n //R-- Stragest thing, but one time this was logging bookings form different timezones?\n // this.dateTz.logDateTz('calculatePosition this.dateTz')\n // this.booking.startDateTz.logDateTz('calculatePosition this.booking.startDateTz')\n\n const start = from_previous_day ? 0 : Math.abs(+date.dateDiff(shown_date, 'hours', 'hours').toFixed(3));\n const duration = Math.min(\n this.booking.duration,\n Math.abs(shown_date.dateDiff(date.addValue({ minutes: this.booking.duration }), 'minutes'))\n );\n this.top = Math.max(0, (start / 24) * 100);\n this.height = Math.min(\n 100 - this.top,\n this.fixed ? duration / 60 : (duration / 60 / 24) * 100\n );\n this.position.emit({ top: this.top, height: (duration / 60 / 24) * 100 });\n this.width = Math.min(100, 100 / overlap.total + 5);\n this.left = Math.min(100 - this.width, this.width * overlap.index - 5 * overlap.index);\n this.overflow_top =\n ( (this.booking.room_setup || this.booking.setup[this.space.email])\n ? ( ( this.booking.room_setup || this.booking.setup[this.space.email]) / 60) / duration\n : -0.1) * 100;\n this.overflow_bottom =\n ( ( this.booking?.room_breakdown || this.booking.breakdown[this.space.email])\n ? ( (this.booking?.room_breakdown || this.booking.breakdown[this.space.email]) / 60) / duration\n : -0.1) * 100;\n if (this.booking.all_day) {\n this.top = 0;\n this.height = 100;\n }\n }\n }\n}\n","\n \n \n \n 50 ? ' low' : '')\"\n [style.z-index]=\"(overlap?.index || 0) + 2\"\n (click)=\"view($event)\"\n >\n
\n
{{ booking.all_day ? 'All Day' : period }}
\n
\n \n\n \n \n
\n
\n
\n
\n \n {{booking?.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
\n
Host: 
\n
\n {{ booking.organiser?.name || booking.organiser }}\n
\n
\n \n
Booked by: 
\n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n \n
{{ booking.title }}
\n
\n
\n
\n {{ booking.attendees ? booking.attendees.length || 'No' : 'No' }} Attendee{{\n booking.attendees?.length === 1 ? '' : 's'\n }}{{ expected ? '(' + expected + ' Expected)' : '' }}\n
\n
\n
0\">\n
\n Company: {{ booking.company.length }}\n
\n
\n \n
Welcomed by: {{ booking.organiser?.name || booking.organiser }}
\n \n
\n
Catered
\n
\n \n \n \n \n \n\n","import {\n Component,\n OnChanges,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n OnInit,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { CdkDragMove, CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nimport { IEventOverlap } from './event/event.component';\nimport { BaseDirective, closestToTimeSlotTz, Identity } from '@mckinsey-converge/base';\nimport { OrganisationService, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { DayViewSettings } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\n\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'day-view-space',\n templateUrl: './space.component.html',\n styleUrls: ['./space.component.scss'],\n})\nexport class DayViewSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** List of space dropzones connected to */\n @Input() public space_list: string[];\n /** Date to display events for */\n @Input() public dateTz: DateTZ;\n /** Space to display events for */\n @Input() public space: Space;\n /** Scroll value of the day view */\n @Input() public scroll: number;\n /** Only show events with setup and/or breakdown times */\n @Input() public overflow_only: boolean;\n /** Mapping of whether to show events with a given legend id */\n @Input() public legend: HashMap = {};\n /** Scroll value to add to drop placeholders */\n @Input('scrollTop') public scroll_top: number;\n /** Last update time of the displayed bookings */\n @Input('lastUpdate') public last_update: number;\n\n @Input() public eventMovingLoader : HashMap = {};\n /** Emitter for whether the space column is in view */\n @Output() public inView = new EventEmitter();\n /** Emitter for whether an event is being dragged */\n @Output() public dragging = new EventEmitter();\n /** Emitter for whether an event is being dropped and moving in progress */\n @Output() public moving = new EventEmitter<{}>();\n /** List of bookings for the current date and space */\n public event_list: Booking[] = [];\n /** Mapping of event IDs to overlap details */\n public overlap_details: HashMap = {};\n /** Mapping of positions of event in the day */\n public position_list: HashMap<{ top: number; height: number }> = {};\n /** Override for mapped position */\n public top: number;\n /** Client Rectangle for the container element box */\n public box: ClientRect;\n /** Whether the space list is in view */\n public in_view: boolean;\n /** ID of the booking with an action processing */\n public override_state: string;\n /** Map of bookings to whether they are loading */\n public loading: HashMap = {};\n /** Settings for day view */\n public settings: DayViewSettings = {} as any;\n\n /** Container element for the component contents */\n @ViewChild('view', { static: true }) private view: ElementRef;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _bookings: BookingsService,\n private _dialog: MatDialog,\n private cdr: ChangeDetectorRef,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n /** Events to display for the active date */\n public events: Booking[] = []\n\n public ngOnInit(): void {\n this.events = this.filterEvents();\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.settings = this._service.setting('app.day_view') || {};\n this.subscription(\n 'breakdown',\n this._service\n .listen('APP.breakdown')\n .subscribe((state) => {\n this.overflow_only = state;\n this.events = [...this.filterEvents()];\n })\n );\n this.subscription(\n 'legend',\n this._service\n .listen('CONCIERGE.legend')\n .subscribe((state) => (this.legend = state || {}))\n );\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...list];\n this.events = [...this.filterEvents()];\n this.cdr.detectChanges();\n })\n );\n this.checkInView();\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.scroll) {\n this.checkInView();\n }\n if (changes.space) {\n this.event_list = [...this.event_list];\n this.timeout('in_view', () => this.checkInView(), 100);\n }\n /* istanbul ignore else */\n if (changes.last_update) {\n this.timeout('update_overlaps', () => this.calculateOverlaps(), 1000);\n }\n }\n\n // private filterEvents(): Booking[] {\n // if (this.space) {\n // const bookings = this.event_list;\n // const list = bookings.filter((event) => {\n // if (this.override_state && this.override_state === event.icaluid) {\n // this.loading[event.id] = true;\n // }\n\n // const ignore = event.is_recurrent && event.recurrence_type === 'master';\n // const roomemail = event.room.filter(rm => rm.email === this.space.email)[0];\n\n // return (\n // !ignore &&\n // event.room.some(room => room.email.includes(this.space.email)) &&\n // (!this.overflow_only ||\n // event.setup[event.room.map(room => room.email)] ||\n // event.breakdown[event.room.map(room => room.email)])\n // );\n // }).map(e => new Booking({...e.toJSON()}) );\n\n // return list;\n // }\n // return [];\n // }\n\n private filterEvents(): Booking[] {\n if (!this.space) {\n return [];\n }\n \n return this.event_list.filter((event) => {\n // Mark as loading if override state matches.\n if (this.override_state && this.override_state === event.icaluid) {\n this.loading[event.id] = true;\n }\n \n const isRecurrentMaster = event.is_recurrent && event.recurrence_type === 'master';\n const isRoomEmailMatch = event.multi_rooms.some(room => room.email === this.space.email);\n \n // Determine if the event should be included based on setup or breakdown conditions.\n const isIncludedInSetupOrBreakdown = event.multi_rooms.some(room => {\n return event.room_setup || event.room_breakdown || event.setup[room.email] || event.breakdown[room.email];\n });\n \n return !isRecurrentMaster && isRoomEmailMatch && (!this.overflow_only || isIncludedInSetupOrBreakdown);\n }).map(event => new Booking({...event.toJSON()}));\n }\n\n /* istanbul ignore next */\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n\n /**\n * Calculate to overlap details for the booking events on the space\n */\n private calculateOverlaps() {\n const events = this.events.sort(\n (a, b) =>\n a.startDateTz.ms - b.startDateTz.ms ||\n a.duration - b.duration ||\n (a.title || '').localeCompare(b.title || '')\n );\n events.forEach((i) => (this.overlap_details[i.id] = { index: 0, total: 1 }));\n for (const bkn of events) {\n const bkn_start = bkn.startDateTz.startOfValue('minute');\n const bkn_end = bkn.endDateTz.startOfValue('minute');\n let count = 1;\n let index = 0;\n const collisions: Booking[] = [];\n for (const cmp of events) {\n /* istanbul ignore else */\n if (bkn.id !== cmp.id) {\n const cmp_start = cmp.startDateTz.startOfValue('minute');\n const cmp_end = cmp.endDateTz.startOfValue('minute');\n /* istanbul ignore else */\n if (\n bkn_start.isSameDate(cmp_start, 'minute') ||\n (bkn_start.isAfterDate(cmp_start) && bkn_start.isBeforeDate(cmp_end)) ||\n bkn_end.isSameDate(cmp_end, 'minute') ||\n (bkn_end.isAfterDate(cmp_start) && bkn_end.isBeforeDate(cmp_end))\n ) {\n count++;\n collisions.push(bkn);\n /* istanbul ignore else */\n if (\n events.findIndex((i) => i.id === bkn.id) >\n events.findIndex((i) => i.id === cmp.id)\n ) {\n index++;\n }\n }\n }\n }\n this.overlap_details[bkn.id] = { index: Math.max(0, index), total: count };\n }\n }\n\n /**\n * Check whether the space column is with the view of the\n */\n private checkInView() {\n /* istanbul ignore else */\n if (this.view && this.view.nativeElement) {\n const el = this.view.nativeElement;\n this.in_view =\n el.offsetLeft + this.scroll >= -240 &&\n el.offsetLeft + this.scroll <= window.innerWidth;\n this.inView.emit(this.in_view);\n }\n }\n\n /**\n * Initialise drag events\n */\n public initDrag() {\n this.box = this.view.nativeElement.getBoundingClientRect();\n this.dragging.emit(true);\n }\n\n /**\n * Cleanup after drag\n */\n public endDrag() {\n this.timeout('end_drag', () => (this.top = 0), 10);\n this.dragging.emit(false);\n }\n\n /**\n * Update top position of the dragged event placeholder\n * @param booking Booking being dragged\n * @param event Drag event\n */\n public updateDragTop(event: CdkDragMove) {\n /* istanbul ignore else */\n if (event.delta.y) {\n const y = event.pointerPosition.y;\n const top = (y - this.box.top - this.scroll_top) / this.box.height;\n const top_minutes = (Math.round((top * 24 * 60) / 15) * 15) / 60;\n this.top = (top_minutes / 24) * 100;\n\n }\n }\n\n /**\n * Handle drop event\n * @param event\n */\n public drop(event: CdkDragDrop<{ top: number; list: Booking[] }>): void {\n const id = event.item.element.nativeElement.id;\n const booking = event.previousContainer.data.list.find((i) => i.id === id);\n /* istanbul ignore else */\n if (!booking) {\n return;\n }\n const top = event.previousContainer.data.top;\n const new_start = Math.round(((top || 0) / 100) * 24 * 60);\n const old_date = booking.startDateTz;\n const new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n const start_epoch = new_date.seconds;\n const end_epoch = new_date.addValue({ minutes: booking.duration }).seconds;\n const now = DateNow(new Date());\n /* istanbul ignore else */\n // Prevent moving event into past\n if (now.startOfValue('minute').ms > new_date.ms) {\n this.handleDropError(booking.id, 'Meetings cannot be moved into the past');\n return;\n }\n if (now.startOfValue('minute').ms > booking.endDateTz.ms) {\n this.handleDropError(booking.id, 'Only future meetings can be moved');\n return;\n }\n if(booking.is_multiroom){\n this.handleDropError(booking.id, 'Multiroom meetings cannot be moved using drag and drop');\n return;\n }\n // Check for collisions\n this.loading[booking.id] = true;\n this.override_state = booking.icaluid;\n this.moving.emit({ isMoving:true, movingId:booking.id} );\n let room = booking.space;\n let message = `Update ${booking.organiser.name}'s meeting in \"${ booking.space.local_name }\" from ${ old_date.formatDate('h:mma') } to ${new_date.formatDate('h:mma')}`;\n let success = `Successfully updated meeting time from ${old_date.formatDate( 'h:mma' )} to ${new_date.formatDate('h:mma')}`;\n /* istanbul ignore else */\n if (event.container !== event.previousContainer) {\n // Same room\n room = this._spaces.find(event.container.id.replace('space-col-', '')) || room;\n message = `Move ${booking.organiser.name}'s meeting in \"${booking.space.local_name}\" to \"${ room.local_name }\" at ${new_date.formatDate('h:mma')}`;\n success = `Successfully moved booking to \"${room.local_name}\" at ${new_date.formatDate('h:mma')}`;\n }\n /* istanbul ignore else */\n // Check if booking has a change\n // if (room === booking.space && new_date.isSameDate(old_date, 'month')) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const room_list = [room];\n // Check if booking is already in the room\n const room_count = room_list.reduce((a, v) => a.add(v.id), new Set()).size;\n /* istanbul ignore else */\n // if (room_count < room_list.length) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const new_booking = new Booking({\n ...booking.toJSON(),\n start_epoch,\n end_epoch,\n room: room_list[0],\n multi_rooms: room_list\n });\n \n // Check if catering needs be dropped to comply with catering hours\n let cateringWillBeDropped = false;\n if (booking.has_catering && booking.catering && booking.catering.length > 0) {\n const isOutsideCatering = this.isOutsideCateringHours(new_date, new_booking.duration);\n const roomDoesNotHaveCatering = !new_booking.space.has_catering;\n if (isOutsideCatering || roomDoesNotHaveCatering) {\n cateringWillBeDropped = true;\n message += `
Note: Moving this booking will remove the catering order because `;\n \n if (isOutsideCatering && roomDoesNotHaveCatering) {\n message += `the new time falls outside of catering hours and the new room does not support catering.`;\n } else if (isOutsideCatering) {\n message += `the new time falls outside of catering hours.`;\n } else if (roomDoesNotHaveCatering) {\n message += `the new room does not support catering.`;\n }\n message += ``;\n }\n }\n \n this.checkCollisions(\n room_list,\n new_date,\n new_booking.duration,\n new_booking.icaluid\n ).then(\n () => {\n this.moveBooking(message, new_booking, cateringWillBeDropped).then(\n (_) => {\n this.override_state = null;\n this.moving.emit({ isMoving:false, movingId:booking.id} );\n this._service.notifySuccess(success);\n },\n (err) => this.handleDropError(new_booking.id, `Error: ${err}`)\n );\n },\n () => this.handleDropError(new_booking.id, 'Updated meeting time clashes with another')\n );\n }\n\n public isOutsideCateringHours(startDateTime: DateTZ, duration: number): boolean {\n const startDateTimeLuxon = DateTime.fromMillis(startDateTime.ms, { zone: startDateTime.building_tz });\n const endDateTimeLuxon = startDateTimeLuxon.plus({ minutes: duration });\n \n const bookingDate = startDateTimeLuxon.startOf('day');\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTimeLuxon <= dayStartAt7am || startDateTimeLuxon >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } \n\n /**\n * Check if there are any booking collisions with the new booking time\n * @param spaces\n * @param dateTz\n * @param duration\n */\n private checkCollisions(\n spaces: Space[],\n dateTz: DateTZ,\n duration: number,\n ignore?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n this._spaces\n .available({\n room_ids: spaces.map((i) => i.id).join(','),\n dateTz,\n duration,\n ignore,\n hide_bookings: true,\n })\n .then(\n (list) => {\n list.length === spaces.length ? resolve() : reject();\n },\n () => reject()\n );\n });\n }\n\n /**\n * Handle errors from drop move logic\n * @param id Booking ID\n * @param message Error description\n */\n private handleDropError(id: string, message: string) {\n this.loading[id] = false;\n this.override_state = null;\n\t\t\t\tthis.moving.emit({ isMoving:false, movingId:id} );\n this._service.notifyError(message);\n }\n\n /**\n * Update booking\n * @param confirm_msg\n * @param new_booking\n */\n private moveBooking(confirm_msg: string, new_booking: Booking, cateringWillBeDropped: boolean = false): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Update meeting',\n content: confirm_msg,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n if (cateringWillBeDropped) {\n // Remove catering orders\n new_booking.catering = [];\n }\n this._bookings.save(new_booking).then(\n (bkn: Booking) => {\n this._booking_state_service.replace(bkn);\n resolve(bkn);\n },\n (err) => {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n this.override_state = null;\n reject(err)\n }\n );\n } else {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n }\n ref.close(event.reason);\n })\n );\n ref.afterClosed().subscribe((reason?:string) => { \n reason !== 'done' ? this.moving.emit({ isMoving:false, movingId:new_booking.id} ) : null;\n this.unsub('confirm');\n });\n });\n }\n\n public checkAvailabilityOnGivenTime(selectedBlockStart, selectedBlockEnd) {\n const runningBookings =\n this.events?.filter((bks) => {\n const startEpoch = new DateTZ({\n date: bks.start_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const endEpoch = new DateTZ({\n date: bks.end_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const hasValidBreakdown: boolean =\n bks.breakdown &&\n Object.values(bks.breakdown).some((value) => value !== null);\n if (selectedBlockStart.ms === endEpoch && hasValidBreakdown) {\n return true;\n } else\n return (\n (selectedBlockStart.ms >= startEpoch && selectedBlockStart.ms < endEpoch) ||\n (selectedBlockEnd.ms > startEpoch && selectedBlockEnd.ms < endEpoch)\n );\n }) || [];\n return !!runningBookings.length;\n }\n\n\t\t/** Whether booking has been ended */\n public expired(booking): boolean {\n\t\t\treturn booking.timeBasedStatusLabel === 'done';\n\t\t}\n\n\n\t\tgridBookingOnClick(event: any, space: Space) {\n\n // if(!event.target.classList.contains('block') )\n // return;\n\n\t\t\tconst box = this.view.nativeElement.getBoundingClientRect();\n\t\t\tconst y = event.y;\n\n\t\t\tconst top = (y - box.top - 22) / box.height;\n\t\t\tconst top_minutes = Math.round((top * 24 ) * 100) / 100; //Math.round(top * 24 );\n\t\t\tconst topMinutes = (top_minutes / 24) * 100;\n\t\t\tconst new_start = Math.round(((topMinutes || 0) / 100) * 24 * 60) ;\n\t\t\tconst old_date = this._booking_state_service.booking_date;\n\n\t\t\tconst new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n\t\t\tconst timezone = this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone')\n\t\t\tconst closestDateTz = closestToTimeSlotTz(new DateTZ({ date: new_date.ms, is_local_tz: true, building_tz: timezone }), +30)\n\n\t\t\tconst isConflict = this.checkAvailabilityOnGivenTime(closestDateTz, closestDateTz.addValue({ minutes: 60 }));\n\t\t\tif(isConflict) {\n\t\t\t\t// this._service.notifyError('Meetings cannot be create into the past');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst now = DateNow(new Date());\n\t\t\t// Prevent moving event into past\n\t\t\tif (now.startOfValue('minute').ms > closestDateTz.ms) {\n\t\t\t\t\tthis._service.notifyError('Meetings cannot be created into the past');\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst form_data = {\n\t\t\t\tdateTz : closestDateTz,\n\t\t\t\tstartDateTz : closestDateTz,\n\t\t\t\tstart_epoch : closestDateTz.seconds,\n\t\t\t\tendDateTz : closestDateTz.addValue({ minutes: 60 }),\n\t\t\t\tend_epoch : closestDateTz.addValue({ minutes: 60 }).seconds,\n\t\t\t\ttimezone : timezone,\n\t\t\t\troom: space\n\t\t\t}\n\t\t\tconst booking\t=\tnew Booking(form_data);\n\t\t\tthis._dialog.open(BookingModalComponent, {\n\t\t\t\tdata: {\n\t\t\t\t\ttimezone: timezone,\n\t\t\t\t\tbooking: booking,\n\t\t\t\t\tisFromGrid: true\n\t\t\t\t },\n\t\t\t\tautoFocus: false,\n\t\t\t\tbackdropClass: 'mck-modal-backdrop',\n\t\t\t});\n\t\t}\n}\n","\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n \n\t\t\t\t\t\n
\n
\n \n
\n
\n
\n \n\n\n","import {\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges,\n ViewChild, NgZone, DoCheck, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { filter, first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { HashMap, Identity } from '@mckinsey-converge/base';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { isToday } from 'date-fns';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\n\n\nconst UPDATE_INTERVAL = 10;\n\n@Component({\n selector: 'day-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewTimelineComponent\n extends BaseDirective\n implements OnInit, OnChanges, OnDestroy\n{\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** List of shown legend items */\n @Input() public legend: HashMap = {};\n /** Whether to show only items with a setup and/or breakdown time */\n @Input() public overflow_only: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n\n @Input() undo_action;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n /** Top value of the content scroll */\n public scroll_top: number = 0;\n /** Left value of the content scroll */\n public scroll_left: number = 0;\n /** Offset of the scroll value when starting a drag */\n public scroll_offset: number = 0;\n /** List of spaces to display for */\n public spaces: Space[] = [];\n /** List of spaces to display for */\n public filtered_spaces: Space[] = [];\n /** Mapping of space ids to whether they are in view */\n public in_view: { [id: string]: boolean } = {};\n /** Percent of the day that is now */\n public now: number;\n /** Currently active hour of the day */\n public active_hour: string;\n /** Mapping of spaces loading booking date */\n public loading_space: { [id: string]: boolean } = {};\n /** Booking ID to open modal for */\n public view_id: string;\n /** Last update time for the space bookings */\n public last_update: number = 0;\n /** Whether an event is being dragged */\n public is_dragging: boolean;\n /** Client rectangle for the scroll area */\n public box: ClientRect;\n /** Whether to show the holding bay */\n public show_holding_bay: boolean = true;\n\n public space_zones: string[] = [];\n\n public is_today: boolean = this.isToday();\n public modalInitialized = false;\n\n /** Scrollable area of the day view */\n @ViewChild('scroll_area', { static: true }) private scroll_area: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScroll: CdkVirtualScrollViewport;\n isEventMoving: boolean = false;\n bookingEl: any;\n timeoutID: any;\n column: any;\n\n /** Update scroll box when the window is resized */\n @HostListener('window:resize')\n public onResize() {\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n public get is_loading() {\n return this._booking_state_service.loading;\n }\n\n public isToday() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }),\n 'day'\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _renderer: Renderer2,\n private _dialog: MatDialog,\n private _zone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n super();\n }\n\n public get holding_bay(): Space {\n const bld = this._org.building;\n /* istanbul ignore else */\n if (bld && bld.holding_bay) {\n return this._spaces.find(bld.holding_bay);\n }\n return null;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n this._zone.runOutsideAngular(() => {\n this.interval('time', () => this.updateTime(), 15 * 1000);\n });\n // R--- return to see if the booking service needs updating\n this.subscription(\n 'dateTz',\n this._booking_state_service.dateTz.subscribe((dateTz) => {\n // const dateTz = new DateTZ({date});\n this.dateTz = dateTz;\n })\n );\n });\n });\n this.is_today = this.isToday();\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n })\n );\n\n }\n\n ngAfterViewInit() {\n const d2 = this._renderer.createElement('div');\n this._renderer.addClass(d2, 'adjustable-room-block-2');\n this.virtualScroll.elementRef && this._renderer.appendChild(this.virtualScroll.elementRef.nativeElement, d2);\n }\n\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.level && this._org.building) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.updateTime();\n this.initSpaces();\n }\n if (changes.space_type) {\n this.initSpaces();\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n public init() {\n this._service.title = 'Day View';\n this.subscription(\n 'viewing',\n this._service\n .listen('CONCIERGE.day_view.viewing')\n .subscribe((event) => this.scrollIntoView(event) )\n );\n // Subscribe to route query changes\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view') || localStorage.getItem('CONCIERGE.view_booking')) {\n this.view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_booking');\n const spaceJson = localStorage.getItem('CONCIERGE.view_booking_space');\n /* istanbul ignore else */\n if (details) {\n const space: Space | undefined = spaceJson\n ? new Space(JSON.parse(spaceJson))\n : undefined;\n const booking = new Booking({ ...JSON.parse(details), room: space });\n if(!this.modalInitialized) {\n this.modalInitialized = true;\n this.view(booking, space);\n localStorage.removeItem('CONCIERGE.view_booking');\n localStorage.removeItem('CONCIERGE.view_booking_space');\n }\n }\n }\n })\n );\n // this._zone.runOutsideAngular(() => {\n // this.interval(\n // 'scroll',\n // () => {\n // /* istanbul ignore else */\n // if (this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n // }\n // },\n // 1000\n // );\n // });\n /* istanbul ignore else */\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n /**\n * Update scroll parameters to match the change in the scroll position\n * @param event\n */\n public updateScroll(event) {\n this.scroll_top = event.target.scrollTop;\n this.scroll_left = event.target.scrollLeft;\n }\n\n\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n\n /** Update the now line position */\n private updateTime() {\n const now = new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n });\n this.now = (now.dateHour + now.minutes / 60) / 24;\n this.active_hour = now.startOfValue('hour').formatDate('HH:mm');\n this.is_today = this.isToday();\n this.cdr.detectChanges();\n }\n\n /**\n * View booking details\n * @param booking Booking to view the details of\n * @param space Space that's selected.\n */\n private view(booking: Booking, space?: Space) {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space: space || booking.space,\n booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.view_id = null;\n }\n\n\n /**\n * Scroll booking to the event on the day view\n * @param booking Booking to scroll into view\n */\n private scrollIntoView(searchData: Booking | Space ) {\n if (searchData && this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n this.column && this._renderer.removeClass(this.column, 'wild');\n\n /** Select space column element using space id in search data - \n * space.id if seach data is space object or data.space.id if search data is booking object\n * \n */\n const spaceId = searchData['space'] ? searchData['space'].id : searchData.id;\n const element: HTMLDivElement = this.scroll_area['elementRef']\n .nativeElement.querySelector(`#space-col-${spaceId}`);\n\n\n this.column = element;\n\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n if(searchData['space'] && searchData['space'].id) \n this.bookingEl = element?.querySelector(`#${searchData.id}`)?.querySelector('.event-container');\n\n\n /* istanbul ignore else */\n if (element) {\n this.timeoutID && clearTimeout(this.timeoutID);\n this._renderer.addClass(element, 'wild');\n this.bookingEl && this._renderer.addClass(this.bookingEl, 'wild');\n const scroll_box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n\n let date_percent;\n if(searchData['space'] && searchData['space'].id) {\n date_percent = Math.abs(\n searchData['startDateTz'].dateDiff(\n searchData['startDateTz'].startOfValue('day'),\n 'minutes'\n )\n ) / (24 * 60);\n }\n \n\n const box = element.getBoundingClientRect();\n const left = box.left - scroll_box.left + this.scroll_area['elementRef'].nativeElement.scrollLeft - 500;\n const top = (searchData['space'] && searchData['space'].id) ? \n this.scroll_area['elementRef'].nativeElement.scrollHeight * date_percent - 10 :\n 0\n\n\n this.scroll_area['elementRef'].nativeElement.scrollTo({\n left: left,\n top: top,\n behavior: 'smooth',\n });\n\n this.timeoutID = setTimeout(()=> {\n element && this._renderer.removeClass(element, 'wild');\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n }, 3000);\n }\n }\n }\n\n /**\n * Setup an auto-scroll for the display view\n * @param x\n * @param y\n */\n public scrollView(x: number, y: number) {\n /* istanbul ignore else */\n if (x || y) {\n this.scroll_area['elementRef'].nativeElement.scrollTop += y || 0;\n this.scroll_area['elementRef'].nativeElement.scrollLeft += x || 0;\n /* istanbul ignore else */\n if (\n (y &&\n this.scroll_area['elementRef'].nativeElement.scrollTop >=\n this.scroll_area['elementRef'].nativeElement.scrollHeight) ||\n (x &&\n this.scroll_area['elementRef'].nativeElement.scrollLeft >=\n this.scroll_area['elementRef'].nativeElement.scrollWidth) ||\n (y && this.scroll_area['elementRef'].nativeElement.scrollTop <= 0) ||\n (x && this.scroll_area['elementRef'].nativeElement.scrollLeft <= 0)\n ) {\n this.clearInterval('auto_scroll');\n }\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n }\n }\n\n public clearSelected() {\n this._service.set('CONCIERGE.day_view.viewing', null);\n }\n\n public cancelScroll() {\n this.clearInterval('auto_scroll');\n }\n\n public dragChange(is_dragging: boolean) {\n if (is_dragging) {\n this.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop; \n this.subscription(\n 'listen_move',\n this._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n const position = { x: event.clientX, y: event.clientY };\n const y = position.y > this.box.bottom - this.box.height * 0.05\n ? 1\n : position.y < this.box.top + this.box.height * 0.05\n ? -1\n : 0;\n const x = position.x > this.box.right - this.box.width * 0.05\n ? 1\n : position.x < this.box.left + this.box.height * 0.05\n ? -1\n : 0;\n this.scrollView(x * 5, y * 5);\n this._zone.runOutsideAngular(() => {\n this.interval('auto_scroll', () => {\n return this.scrollView(x * 40, y * 40) \n }, 15);\n });\n this.cdr.detectChanges();\n })\n );\n this.clearInterval('bookings');\n } else {\n this.cancelScroll();\n this.unsub('listen_move');\n }\n }\n\n private initSpaces() {\n const holding_bay = this.holding_bay;\n this.filtered_spaces = this.spaces.filter(\n (i) =>\n ( ( !this.space_type || i.zones.indexOf(this.space_type) >=0 ) || ( [i.room_type].indexOf(this.space_type) >= 0) ) &&\n (!holding_bay || i.id !== holding_bay.id) &&\n i.bookable\n );\n this.filtered_spaces.sort((a, b) => a.local_name.localeCompare(b.local_name));\n this.space_zones = this.spaces.map((i) => `space-col-${i.id}`);\n }\n\n\n\n\t\tpublic onEventDragging(isDragging: boolean): void {\n\t\t\t// Check if dragging is initiated\n\t\t\tif (isDragging) {\n\t\t\t\t// Store the current scroll position\n\t\t\t\tthis.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop;\n\t\t\t\t// Subscribe to mouse move events\n\t\t\t\tthis.subscribeToMouseMove();\n\t\t\t\t// Clear existing interval for bookings\n\t\t\t\tthis.clearInterval('bookings');\n\t\t\t} else {\n\t\t\t\t// Cancel scroll operation\n\t\t\t\tthis.cancelScroll();\n\t\t\t\t// Unsubscribe from mouse move events\n\t\t\t\tthis.unsubscribeFromMouseMove();\n\t\t\t}\n\t}\n\n\t// Subscribe to mouse move events and handle scroll logic\n\tprivate subscribeToMouseMove(): void {\n\t\tthis.subscription(\n\t\t\t'listen_move',\n\t\t\tthis._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n\t\t\t\t// Get mouse position\n\t\t\t\tconst position = { x: event.clientX, y: event.clientY };\n\t\t\t\t// Calculate scroll direction based on mouse position\n\t\t\t\tconst [x, y] = this.calculateScrollDirection(position);\n\t\t\t\t// Scroll the view based on calculated direction\n\t\t\t\tthis.scrollView(x * 5, y * 5);\n\t\t\t\t// Run auto-scroll logic\n\t\t\t\tthis.runAutoScroll(x, y);\n\t\t\t\t// Detect changes to update the view\n\t\t\t\tthis.cdr.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t// Calculate scroll direction based on mouse position\n\tprivate calculateScrollDirection(position: { x: number, y: number }): [number, number] {\n\t\tconst tolerance = 0.05;\n\t\tconst x = this.calculateDirection(position.x, this.box.left, this.box.right, tolerance);\n\t\tconst y = this.calculateDirection(position.y, this.box.top, this.box.bottom, tolerance);\n\t\treturn [x, y];\n\t}\n\n\t// Calculate direction based on mouse position and element boundaries\n\tprivate calculateDirection(pos: number, min: number, max: number, tolerance: number): number {\n\t\tif (pos > max - this.box.width * tolerance) {\n\t\t\t\treturn 1; // Scroll right\n\t\t} else if (pos < min + this.box.width * tolerance) {\n\t\t\t\treturn -1; // Scroll left\n\t\t} else {\n\t\t\t\treturn 0; // Do not scroll\n\t\t}\n\t}\n\n\t// Run auto-scroll logic\n\tprivate runAutoScroll(x: number, y: number): void {\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis.interval('auto_scroll', () => this.scrollView(x * 10, y * 10), 10);\n\t\t});\n\t}\n\n\t// Unsubscribe from mouse move events\n\tprivate unsubscribeFromMouseMove(): void {\n\t\tthis.unsub('listen_move');\n\t}\n\n public movingEvent(booking) {\n this.isEventMoving = booking.isMoving;\n this.loading_space[booking.movingId] = booking.isMoving;\n \n }\n\n}\n\n","
\n\t
\n\t\t\t\n\t
\n\n\t
\n\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
Time
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ timeslot.name }}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ room.local_name }}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\tCapacity - {{ room.capacity || '0' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{ room.capacity === 1 ? 'person' : 'people' }}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\n
\n
\n
Incoming Booking Requests
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\t
\n\t\t\t
Moving meeting
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\t
\n
\n","import { Component, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'meeting-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class MeetingCateringDetailsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public orders = [];\n\n /** Total cost of all the orders */\n public get total(): number {\n let total = 0;\n this.orders.forEach((order) => (total += order.total));\n return total;\n }\n\n public get total_edited(): boolean {\n return this.booking.edits.some((_) => this.orders.some((o) => o.id === _));\n }\n\n /** Charge code for orders in the active space */\n public get charge_code(): string {\n return (this.orders.length ? this.orders[0].charge_code : '') || '';\n }\n\n /** Currency symbol for orders in active space */\n public get symbol(): string {\n const space = this.space || { level: { building_id: '' } };\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n /** Notes for orders in active space */\n public get notes(): string {\n if (this.orders.length) {\n const note = this.booking.notes.find(\n (note) =>\n note.type === 'catering' &&\n // note.space === this.space.email &&\n this.booking.multi_rooms.some(room => room.email === note.space) &&\n note.author === this.booking.creator.name\n );\n return note ? note.message : '';\n } else {\n return '';\n }\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n constructor(\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router\n ) {\n super();\n }\n\n public ngOnInit() {\n this._updateOrders();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.booking) {\n this._updateOrders();\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toApiJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n }\n\n /** Open modal to edit catering details for booking */\n public editMeetingCatering() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n only_catering: true,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n\n /**\n * View catering order for the event\n */\n public viewOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n if (!booking || !order) return;\n /* istanbul ignore else */\n if (localStorage) this.storeOrder(order);\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: booking.id, view: order.id },\n });\n this._dialog.closeAll();\n }\n\n /** List of orders for this booking and space */\n private _updateOrders() {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp[0] && orders.push(..._temp);\n });\n orders = orders.map((order) => {\n let ord = order.toJSON();\n ord.booking = this.booking; // R--- check this change works\n return new CateringOrder(ord);\n });\n this.orders = orders;\n }\n}\n","
Catering
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n {{ total / 100 | currency: symbol }}\n
\n
\n
\n \n
\n {{ charge_code }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n\n
<No Catering Orders>
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingAction, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration } from '@mckinsey-converge/base';;\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'meeting-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss'],\n})\nexport class MeetingDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Mapping of edited fields */\n\n @Output() updateBooking = new EventEmitter();\n\n @Output() public event = new EventEmitter();\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n\n public edited: HashMap = {};\n\n /** Display string for the locations in the booking */\n public get location(): string {\n // Ensure both this.booking.room and this.space are treated as arrays\n let rooms: Space[] = [];\n \n if (Array.isArray(this.booking.multi_rooms) && this.booking.multi_rooms.length > 0) {\n rooms = this.booking.multi_rooms;\n } else if (Array.isArray(this.space) && this.space.length > 0) {\n rooms = this.space;\n }\n \n // Map each room to its local_name and join these names with a comma\n return rooms.map(room => room.local_name).join(', ');\n }\n\n /** Display string for the booking duration */\n public get duration() {\n return this.booking ? humaniseDuration(this.booking.duration) : '1 hour';\n }\n\n /** Display string for attendees in booking */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n\n /** Display string for attendees in booking */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('dd MMM yyyy')} ${this.booking.startDateTz.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get end_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration})\n return `${end_.formatDate('dd MMM yyyy,')} ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get attendees() {\n return this.booking.attendees.map((person) => person.name).join('\\n');\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done';\n }\n\n public bookingDetails: BookingDetailInfo;\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n Object.values(this.booking.edits || []).forEach(i => {\n this.edited[i] = true;\n });\n this.setDetails();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n /**\n * Function to set details of the booking, can take advantage to one time assignment and set tmeplate properties to avoid template conditions and function calls\n */\n setDetails() {\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public editMeeting() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n action: BookingAction.EDIT\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Booking Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name || booking.organiser.email }}\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ location }}\n
\n \n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ duration }}\n
\n
\n
\n \n
\n {{ attendees }}\n
\n
\n
0\">\n \n
\n {{ this.booking.company.join(', ') }}\n
\n
\n
\n \n
\n No\n
\n
\n
\n \n
\n
\n
\n\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\n\nimport { Booking, BookingAction } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingsService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { DeleteConfirmModalComponent } from '../../bookings/delete-confirm-modal/delete-confirm-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\nexport interface MeetingDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-meeting-details-modal',\n templateUrl: './meeting-details-modal.component.html',\n styleUrls: ['./meeting-details-modal.component.scss'],\n})\nexport class MeetingDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for the loading state */\n public loading: string;\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /** Handler for request errors */\n /** Whether the meeting is approved or not */\n public isApproved = false;\n public isMasterApproved = false;\n\n public master_booking: any;\n \n private _on_error = (message) => (err) => {\n this._service.notifyError(`${message}. Error: ${err.message || err}`);\n this.setLoading(null);\n };\n\n /** Booking to view details */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n public set booking(booking: Booking) {\n this._data.booking = booking;\n // if space selected no longer exists on booking change, pick first one.\n if (this._data.booking.room?.id && this._data.booking.room.id !== this._data.space?.id) {\n this._data.space = this._data.booking.room;\n }\n }\n\n /** Space to display booking details for */\n public get space(): Space {\n return this._data.space;\n }\n\n /** Type of meeting */\n public get type(): string {\n return this.booking.getType();\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: MeetingDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n if (!this.booking) {\n this._dialog_ref.close();\n return;\n }\n\n if (this.booking.is_recurrent) {\n if (this.booking.recurrence_type === 'master') {\n // If the booking is recurrent and of type 'master', use it directly\n this.isRecurrentBooking = this.booking.is_recurrent;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n } else if (this.booking.recurrence_type === 'occurrence') {\n // If the booking is recurrent and of type 'occurrence', find the master booking\n this.subscription(\n 'detail_bookings',\n this._booking_state_service.bookings.subscribe(async (bookings) => {\n this.master_booking = bookings.find((bkn) => {\n return (\n this.booking.recurrence_master_id === bkn.recurrence_master_id &&\n bkn.recurrence_type === 'master'\n );\n }) || await this._bookings.show(this.booking.recurrence_master_id);\n\n this.isApproved =\n this.booking.status === 'accepted' ||\n this.booking.status === 'approved';\n this.isMasterApproved =\n this.master_booking?.status === 'accepted' ||\n this.master_booking?.status === 'approved';\n\n // show Accept Series button for an occurrence only if it is not accepted yet and master booking is also not approved\n this.isRecurrentBooking =\n (this.master_booking?.is_recurrent &&\n !this.isApproved &&\n !this.isMasterApproved) ??\n false;\n if (this.isRecurrentBooking) {\n this.booking = this.master_booking;\n }\n })\n );\n }\n } else {\n // If the booking is not recurrent, use it directly\n this.isRecurrentBooking = false;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n }\n\n public setLoading(state: string) {\n this.loading = state;\n this._dialog_ref.disableClose = !!this.loading;\n }\n\n public acceptMeeting() {\n this.setLoading('Accepting meeting...');\n const event = this.booking.toJSON();\n\n let acceptOptions = {\n concierge: true,\n host: this.booking.organiser.email,\n room_email: this.space.email,\n icaluid: this.booking.icaluid,\n start: event.start,\n end: event.end,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings.accept(this.booking.id, acceptOptions).then(() => {\n this._service.notifySuccess('Meeting approved.');\n this.booking.status = BOOKING_STATUS.approved;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.approved });\n }, this._on_error('Apologies, Unable to approve! This time slot has been booked recently by another user, please try booking another one.'));\n }\n\n public declineMeeting() {\n this.setLoading('Declining meeting...');\n\n let declineOptions = {\n booking_id: this.booking.id,\n organiser: this.booking.organiser.email,\n icaluid: this.booking.icaluid,\n start: this.booking.startDateTz.seconds,\n end: this.booking.endDateTz.seconds,\n room_email: this.space.email,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings\n .decline(this.booking.id, declineOptions)\n .then(() => {\n this._service.notifySuccess('Meeting declined.');\n this.booking.status = BOOKING_STATUS.declined;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.declined });\n }, this._on_error('Unable to declining meeting, please try another one.'));\n }\n\n /** Open modal to confirm deletion of booking */\n public confirmDeleteMeeting() {\n const ref = this._dialog.open(DeleteConfirmModalComponent);\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'action') {\n ref.componentInstance.loading = true;\n const success = await this.deleteMeeting().catch(\n this._on_error('Error deleting booking')\n );\n ref.componentInstance.loading = false;\n ref.componentInstance.success = !!success;\n setTimeout(() => {\n ref.close();\n }, 3000);\n }\n })\n );\n }\n\n /** Open model to cloning a booking */\n public cloningMeeting(): void {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.booking,\n action: BookingAction.CLONE,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /** Delete booking */\n private async deleteMeeting(opts: { series?: boolean } = {}) {\n this.setLoading('Deleting meeting...');\n await this.booking.delete(opts);\n this._service.notifySuccess('Successfully deleted booking');\n this.event.emit({ reason: 'action', metadata: 'removed' });\n this._dialog_ref.afterClosed().subscribe((_) => this.setLoading(null));\n this._dialog_ref.close();\n this._service\n .get('undo')\n .next({ action: opts && opts.series ? 'series' : 'booking', booking: this.booking });\n return true;\n }\n\n /** Update booking requirements */\n public async updateRequirements(form: FormGroup) {\n this.setLoading('Updating requirements...');\n const value = form.value;\n const booking_data = this.booking.toJSON();\n const booking = new Booking({\n ...booking_data,\n ...value,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n booking.room_setup = 900;\n booking.room_breakdown = 900;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n\t\t\t\t\t\t\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\t\t\t\t\t\tthis._booking_state_service.bookings.subscribe((res) => {\n\t\t\t\t\t\t\tconst booking = res.find((book) => this.booking.id === book.id);\n\t\t\t\t\t\t\tthis.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n\t\t\t\t\t\t});\n this._service.notifySuccess('Successfully updated requirements');\n }\n this.setLoading(null);\n }\n\n public async updateBooking(form) {\n this.setLoading('Updating booking...');\n /* const value = form.value;\n const booking_data = this.booking.toJSON();\n const startDateTz = form.controls.dateTz.value;\n const endDateTz = startDateTz.addValue({ minutes: value.duration });\n const booking = new Booking({\n ...booking_data,\n ...value,\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating booking`))) as any;\n */\n // if (new_booking) {\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated booking');\n // }\n this.setLoading(null);\n }\n\n public async updateBreakdown(event) {\n this.setLoading('Updating requirements...');\n /*const booking_data = this.booking.toJSON();\n const _booking = new Booking({\n ...booking_data,\n setup: event.setup,\n breakdown: event.breakdown,\n notes: event.notes,\n });\n const new_booking: Booking = (await this._bookings\n .save(_booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n this._service.notifySuccess('Successfully updated requirements');\n }*/\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated requirements');\n this.setLoading(null);\n }\n}\n","
\n
{{ booking.time_period }}
\n
\n \n {{booking.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
{{ booking?.title }}
\n
\n \n
\n
\n\n \n\n\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { UsersService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { humaniseDuration } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, BookingNote } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface PrivateDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-private-details-modal',\n templateUrl: './private-details-modal.component.html',\n styleUrls: ['./private-details-modal.component.scss'],\n})\nexport class PrivateDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form Fields for private details */\n public form: FormGroup;\n /** Whether changes are being saved */\n public loading: boolean;\n /** List of available durations for setup and breakdown */\n public available_durations: Identity[] = new Array(5)\n .fill(0)\n .map((_, i) => ({ id: i * 15 * 60, name: humaniseDuration(i * 15) || '0 minutes' }));\n\n public get booking(): Booking {\n return this._data.booking;\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: PrivateDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const note = this.booking.notes.find(\n (note) => note.type === 'private'//&& note.space === this._data.space.email\n ) || { message: '' };\n this.form = new FormGroup({\n setup: new FormControl(this.booking.room_setup || this.booking.setup[this._data.space.email] || 0),\n breakdown: new FormControl( this.booking.room_breakdown || this.booking.breakdown[this._data.space.email] || 0),\n notes: new FormControl(note.message),\n });\n }\n\n public saveChanges() {\n const now = new DateTZ();\n if (this.form.dirty) {\n const old_notes = this.booking.notes.filter(\n (note) => !(note.type === 'private') // && note.space === this._data.space.email\n );\n const notes = [\n ...old_notes,\n {\n type: 'private',\n date: now.ms,\n message: this.form.value.notes,\n author: this._users.current.name,\n space: this._data.space.email,\n } as BookingNote,\n ];\n const value = this.form.value;\n const setup = { ...this.booking.setup };\n Object.keys(setup).forEach((k) => setup[k]= value.setup );\n setup[this._data.space.email] = value.setup;\n const breakdown = { ...this.booking.breakdown };\n Object.keys(breakdown).forEach((k) => breakdown[k]= value.breakdown );\n breakdown[this._data.space.email] = value.breakdown;\n const room_setup = value.setup;\n const room_breakdown = value.breakdown;\n\n const new_booking = new Booking({\n ...this.booking.toJSON(),\n setup,\n breakdown,\n room_setup,\n room_breakdown,\n notes,\n });\n this.loading = true;\n this._dialog_ref.disableClose = true;\n this._bookings.save(new_booking).then(\n (booking) => {\n\n const bkn = new Booking({ ...this.booking, ...booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\n this.event.emit({ reason: 'done', metadata: {setup, breakdown, notes} });\n this._dialog_ref.close();\n },\n (err) => {\n this._dialog_ref.disableClose = false;\n this.loading = false;\n }\n );\n } else {\n this._dialog_ref.close();\n }\n }\n}\n","
\n
Edit Private Details
\n \n
\n\n
\n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
Updating private details...
\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration, BaseDirective, DialogEvent } from '@mckinsey-converge/base';;\nimport { PrivateDetailsModalComponent } from '../private-details-modal/private-details-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-private-details',\n templateUrl: './private-details.component.html',\n styleUrls: ['./private-details.component.scss'],\n})\nexport class MeetingPrivateDetailsComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public get setup(): string {\n let setup = this.booking?.room_setup || this.booking.setup[this.space.email];\n return setup ? humaniseDuration(setup / 60) : '';\n }\n\n public get breakdown(): string {\n let breakdown = this.booking.room_breakdown ||this.booking.breakdown[this.space.email];\n return breakdown ? humaniseDuration(breakdown / 60) : '';\n }\n\n public get notes() {\n // return (this.booking.notes.find(note => note.type === 'private' && note.space === this.space.email) || {}).message;\n return (this.booking.notes.find(note => note.type === 'private' ) || {}).message;\n }\n\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n ngOnInit(): void {\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n public openPrivateDetailsModal() {\n const dialogRef = this._dialog.open(PrivateDetailsModalComponent, {\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Private Details\n
\n
\n
\n \n
\n {{ setup }}\n
\n
\n
\n \n
\n {{ breakdown }}\n
\n
\n
\n \n
\n {{ notes || '<No Notes>' }}\n
\n
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingStateService, SeriesAction, RecurrencePeriod, BookingsService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\n@Component({\n selector: 'meeting-recurring-details',\n templateUrl: './recurring-details.component.html',\n styleUrls: ['./recurring-details.component.scss'],\n})\nexport class MeetingRecurringDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** helper for setLoading state of the parent modal */\n @Output() public confirmDelete: EventEmitter<{ series?: boolean}> = new EventEmitter<{}>();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n private _recurrence_endTz: DateTZ;\n private _recurrence_startTz: DateTZ;\n private _recurrence_period: RecurrencePeriod;\n private _recurrence_interval: number;\n private _occurrence_details: { id: string, start_epoch: number, dateTz?: DateTZ }[];\n private _specific_dates: boolean = false;\n private _master_booking: Booking;\n public expired_ocurrences: Array = [];\n\n constructor(\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n private _bookings: BookingsService\n ) {\n super()\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'detail_bookings',\n this._booking_state.bookings.subscribe(async (bookings) => {\n\n const booking = bookings.find(bkn => { \n if(this.booking.recurrence_type === 'master')\n return bkn.recurrence_master_id === this.booking.icaluid;\n else \n return bkn.icaluid === this.booking.icaluid ;\n }) || this.booking;\n // if (!booking && this.booking.recurrence_type !== 'master') {\n // return;\n // }\n \n\n this.master_booking = ( this.booking.recurrence_type === 'occurrence' && booking\n ? bookings.filter(bkg => bkg.id === booking.recurrence_master_id)\n : this.booking.recurrence_type === 'master' ? [this.booking] \n : booking \n ? [booking]\n : []\n )?.shift();\n\n if (!this.master_booking) {\n this.master_booking = await this._bookings.show(booking.recurrence_master_id);\n this._booking_state.add(this.master_booking);\n }\n\n this.recurrence_endTz = this.master_booking.recurrenEndFromOcurrences(this.master_booking.occurrence_details);\n this.recurrence_startTz = new DateTZ({date: this.master_booking.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone});\n this.recurrence_period = this.master_booking.recurrence_period;\n this.recurrence_interval = this.master_booking.recurrence_interval;\n this.occurrence_details = this.master_booking.occurrence_details && this.master_booking.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.master_booking.id)\n .map(ocurrence => ({ ...ocurrence, start_epoch: ocurrence.start_epoch * 1000, dateTz: new DateTZ({ date: ocurrence.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone }) }));\n const occurrence_ids = this.master_booking?.occurrence_details.map(ocurr => ocurr.id) || []\n this.expired_ocurrences = bookings.filter(booking => {\n if(occurrence_ids.includes(booking.id)){\n const building_tz = this.master_booking.timezone\n const date = (booking.start_epoch * 1000) + (booking.duration * 60000)\n const start = new DateTZ({date, is_local_tz: false, building_tz})\n const now = DateNow(new Date()).toZone(building_tz)\n return now.isAfterDate(start, 'minute')\n }\n return false\n })\n })\n );\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public set recurrence_startTz(date: DateTZ) {\n this._recurrence_startTz = date\n }\n\n public get recurrence_startTz():DateTZ {\n return this._recurrence_startTz\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date\n }\n\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz\n }\n\n public set recurrence_period(period: RecurrencePeriod) {\n this._recurrence_period = period;\n }\n\n public get recurrence_period():RecurrencePeriod {\n return this._recurrence_period;\n }\n\n public set recurrence_interval(interval: number) {\n this._recurrence_interval = interval;\n }\n\n public get recurrence_interval():number {\n return this._recurrence_interval;\n }\n\n public set occurrence_details(occurrences: { id: string, start_epoch: number }[]) {\n this._occurrence_details = occurrences;\n }\n\n public get occurrence_details(): { id: string, start_epoch: number }[] {\n return this._occurrence_details;\n }\n\n public set specific_dates(val: boolean) {\n this._specific_dates = val;\n }\n\n public get specific_dates(): boolean {\n return this._specific_dates;\n }\n\n public set master_booking(bkng: Booking) {\n this._master_booking = bkng;\n }\n\n public get master_booking():Booking {\n return this._master_booking;\n }\n\n public toggleSpecificDates() {\n this.specific_dates = !this.specific_dates;\n }\n\n public async editSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(true), //we want to send the master booking since it's the one with all of the series data\n action: SeriesAction.EDIT,\n timezone: localStorage.getItem('CONCIERGE.timezone')\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n }); \n }\n\n public async cloneSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(),\n action: SeriesAction.CLONE\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public async cancelSeries() {\n this.confirmDelete.emit({ series: true });\n }\n}\n","
\n
\n
\n
\n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Days' : 'Day'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Weeks' : 'Week'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Months' : 'Month'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs on\n
\n
\n
\n
{{ occurrence.dateTz.formatDate('dd MMM yyyy') }}
\n
\n
\n
\n
\n
\n
\n \n
\n
\n\n \n \n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport {\n Booking,\n generateBookingForm\n} from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { RequirementDetailsModalComponent, RequirementDetailsModalData } from '@mckinsey-converge/legacy-overlays';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-details-requirements',\n templateUrl: './requirements.component.html',\n styleUrls: ['./requirements.component.scss'],\n})\nexport class MeetingDetailsRequirementsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Emitter for changes to the booking */\n @Output() public bookingChange = new EventEmitter();\n /** Emitter for updating booking */\n @Output() public event = new EventEmitter();\n public roomNames: string;\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Requirement notes */\n public get notes(): string {\n const note = this.booking.notes.find(\n (note) => note.type === 'equipment' && this.space.email === note.space\n );\n return (note ? note.message : '') || '';\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n public get headcount(): any{\n const temp = this.booking.multi_rooms.filter(room => room.email === this.space.email)[0]['email'];\n return this.booking.headcount || this.booking.expected_attendees[temp];\n }\n\n constructor(private _dialog: MatDialog, private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void {\n this.roomNames = this.booking.local_room_name;\n }\n\n /** Open modal for adding equipment requirements to booking */\n public openEquipmentDetailsModal() {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n const ref = this._dialog.open<\n RequirementDetailsModalComponent,\n RequirementDetailsModalData\n >(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: form.controls.space_list.value,\n notes_field: form.controls.notes,\n codes_field: form.controls.equipment_codes,\n head_counts_field: form.controls.expected_attendees,\n standalone: true\n }\n });\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.close();\n this.event.emit(form);\n }\n })\n );\n }\n}\n","
\n Room Requirements\n
\n
\n
\n
\n
\n
\n {{ roomNames || space.local_name }}\n
\n \n
\n
\n
\n \n
\n \n {{\n headcount\n }}\n
\n
\n
\n \n
\n {{\n booking.equipment_code || (booking.equipment_codes || {})[\n space.email || booking.room.email\n ] || 'No Charge Code'\n }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n","import { Component, Input, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { map } from 'rxjs/operators';\n\nimport { Booking, Space } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nimport { timePeriodsIntersect } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-day-display',\n templateUrl: './day-display.component.html',\n styleUrls: ['./day-display.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewDayDisplayComponent extends BaseDirective {\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** List of spaces to display bookings for */\n @Input() public spaces: Space[];\n /** Whether the date set is today */\n public isToday: boolean = false;\n /** List of bookings for this date */\n public readonly booking_list = this._booking_state_service.filtered_week.pipe(\n map((bookings) => {\n const date = this.dateTz.startOfValue('day');\n /**\n * Before the dateTz refactor timePeriodsIntersect would show bookings on the wrong day\n * because this.dateTz did not have the building timezone\n */\n return bookings.filter((booking) => {\n const ignore = booking.is_recurrent && booking.recurrence_type === 'master';\n return (\n !ignore &&\n // this.spaces.find((space: Space) => space.email === booking.room.email) &&\n // Check if any room in booking.multi_rooms satisfies the condition with any space in this.spaces\n booking.multi_rooms.some(room => \n this.spaces.find((space: Space) => space.email === room.email)\n ) &&\n timePeriodsIntersect(\n date.ms,\n date.endOfValue('day').ms,\n booking.startDateTz.ms,\n booking.endDateTz.ms\n )\n );\n });\n })\n );\n\n /** Display string for the set date */\n public get date_display(): string {\n return this.dateTz.formatDate('EEE, dd MMM yyyy');\n }\n\n constructor(private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.dateTz) {\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.dateTz.building_tz })\n this.isToday = this.dateTz.isSameDate(now, 'day');\n }\n if (changes.spaces) {\n this.timeout('changed', () => this._booking_state_service.setFilters(this._booking_state_service.filters), 100);\n }\n }\n\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n}\n","
\n
{{ date_display }}
\n
Today
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
No events for {{ date_display }}
\n
\n
\n","import { Component, Input, ChangeDetectionStrategy, OnInit, ChangeDetectorRef} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\n@Component({\n selector: 'week-view-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewItemComponent implements OnInit{\n @Input() public event: Booking;\n\n public type: string = '';\n\n constructor(private _dialog: MatDialog) {}\n\n public ngOnInit() {\n this.type = this.event.getType();\n }\n\n /**\n * Open modal to view bookings details\n */\n public viewMeetingDetails() {\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: this.event.space,\n booking: this.event\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n })\n }\n}\n","\n
\n
{{ event.all_day ? 'All Day' : event.time_period }}
\n
\n \n \n
\n
\n
\n
\n \n
{{ event.organiser?.name }}
\n
\n
\n \n
\n {{ event.space?.local_name || event.local_room_name }}\n
\n
\n
\n \n
{{ event.attendees?.length || '0' }}
\n
\n
0\">\n \n
{{ event.company.length }}
\n
\n
\n\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class WeekViewTimelineComponent extends BaseDirective implements OnInit {\n /** Timestamp of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** Whether weekends are displayed */\n @Input() public weekends: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n /** List of dates to display */\n public dateListTz: DateTZ[] = [];\n /** List of spaces to display bookings for */\n public space_list: Space[] = [];\n\n constructor(private _spaces: SpacesService, private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingWeek();\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n });\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz || changes.weekends || changes.level || changes.space_type) {\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n /**\n * Generate list of dates to display\n * @param dateTz Currently selected date\n * @param weekends Whether weekends should be included\n */\n private generateDatesTz(dateTz: DateTZ, weekends: boolean = false): DateTZ[] {\n const list: DateTZ[] = [];\n // start of day takes midnight to the previous day issue\n let day = dateTz.addValue({ minutes: 5 }).startOfValue('day');\n let start = day.startOfValue('week');\n let end = start.endOfValue('week').addValue({ minutes: 15 });\n while (start.isBeforeDate(end)) {\n if ((start.dateWeekday !== 6 && start.dateWeekday !== 7) || weekends) {\n list.push(start);\n }\n start = start.addValue({ days: 1 });\n }\n\n return list;\n }\n \n}\n","
\n
\n \n
\n \n
\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Identity } from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { Booking, BookingsService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService, BuildingLevel } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AlertMode } from '@mckinsey-converge/ui';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { Subscription } from 'rxjs/internal/Subscription';\n\n@Component({\n selector: 'a-week-view',\n templateUrl: './week-view.component.html',\n styleUrls: ['./week-view.component.scss'],\n})\nexport class WeekViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** Whether weekends are displayed */\n public weekend: boolean;\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected level */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n public banner_mode = AlertMode.Error;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n public get building() {\n return this._org.building;\n }\n\n public has_access: boolean;\n private spaceTypesSubscription: Subscription;\n \n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n\n this._service.title = 'Week View';\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if(!this.has_access) return\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = (building.levels[0] || { id: '' }).id;\n this.updateLevel();\n }\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n this.levels.sort((a, b) => b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n }));\n\n //\n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'week_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n if (this.spaceTypesSubscription) {\n this.spaceTypesSubscription.unsubscribe();\n }\n }\n\n updateSpaceSelection(){\n this._service.set('active_type', this.active_type);\n }\n\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this._router?.url?.includes('/week-view') && this._router.navigate(['/week-view', this.active_level]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public hideBanner() {\n this.undo_action = null;\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._booking_state_service.attentToDelete(booking, action, true);\n this._service.get('undo').next(null);\n this.undo_action = null;\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n}\n","
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n 1\" appearance=\"outline\">\n \n \n {{ level?.name }}\n \n \n \n 1\" appearance=\"outline\">\n \n \n {{ type?.name }}\n \n \n \n \n Show Weekends\n \n
\n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { WeekViewComponent } from './week-view.component';\nimport { WeekViewTimelineComponent } from './timeline/timeline.component';\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { WeekViewDayDisplayComponent } from './day-display/day-display.component';\nimport { WeekViewItemComponent } from './day-display/item/item.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: WeekViewComponent },\n { path: ':level', component: WeekViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [WeekViewComponent, WeekViewTimelineComponent, WeekViewDayDisplayComponent, WeekViewItemComponent],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class WeekViewModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Building, CateringMenuService, CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { BehaviorSubject } from 'rxjs';\nimport { CateringStorage } from 'src/app/catering/catering.storage';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss']\n})\nexport class CateringComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Name of the page to display */\n public page: string;\n /** Filter string for searching */\n public search_str: string;\n /** Toggle for new category modal */\n public category: number = 0;\n /** Toggle for new package modal */\n public package: number = 0;\n /** Number of categories being displayed */\n public length: number;\n /** Order type to filter by */\n public order_type: string = '';\n\n public orderDetailsExpanded = new BehaviorSubject(false);\n\n public has_access: boolean;\n menuWithOthers: any[]=[];\n allCategories: any[] = [\n { display: 'All orders', value: '', meta: { childItems: [] } },\n { display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n { display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n ];\n otherCategories: any[];\n public isClosed: boolean = false;\n\n public selectedSort: { display: string; value: string; meta: {}; } = { display: 'All orders', value: '', meta: { childItems: [] } };\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService,\n private cateringStorage: CateringStorage,\n private _menu: CateringMenuService,\n ) {\n super();\n this.orderDetailsExpanded.next(cateringStorage.orderDetails);\n }\n\n\n public ngOnInit(): void {\n\n\n\n this.subscription('orderDetailsExpand', this.orderDetailsExpanded.subscribe(value => {\n this.cateringStorage.orderDetails = value;\n }));\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.category = 0;\n this._service.title = 'Catering';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('page')) {\n this.page = params.get('page');\n }\n })\n );\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id }\n });\n })\n );\n });\n\n\n\n }\n\n\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n\n\n public mainCategorySelected(event, sortingValue) {\n if(!event.target.classList.contains('child')) {\n this.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n }\n\t}\n public selectSubcategory(event, sortingValue) {\n\t\tthis.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n\t}\n\n public loadAllCategory() {\n\n // this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n // this.length.emit(this.catering_menu.length);\n const filtered_menu = this.filter(this.catering_menu);\n\n this.otherCategories = filtered_menu.filter(mailEl => {\n\n var isThere = mailEl.items.filter(subEl => {\n if(subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\") {\n\n this.menuWithOthers.push({ value: subEl.name.toLowerCase(), display: subEl.name, meta: { parent: mailEl.name.toLowerCase() } })\n }\n return subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\";\n } );\n return !!isThere.length;\n });\n this.otherCategories.map(el => this.allCategories.push({ display: el.name, value: el.name.toLowerCase(), meta: { childItems: [] } }) );\n\n this.menuWithOthers.forEach(el => {\n this.allCategories.forEach(e => {\n if(e.value === el.meta.parent){\n e.meta['childItems'].push(el);\n }\n \t})\n });\n\n\n // console.log(this.allCategories);\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadAllCategory()\n );\n // this.loading = false;\n }\n );\n }\n\n\n\n\n public get timezone() {\n return this._org.building.timezone;\n }\n\n}\n","
\n\t\n\t
\n\t\t\t\n\t
\n\t
\n\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{{selectedSort.display}}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
{{mainCaterory.display}}
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tOrder Details\n\t\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

Catering Orders

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tView catering orders and their statuses upon arrival\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n Route,\n RouterModule\n} from '@angular/router';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport { CateringComponent } from './catering.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { CateringOrdersComponent } from './orders/orders.component';\nimport { CateringMenuComponent } from './menu/menu.component';\nimport { CateringMenuItemListComponent } from './menu/item-list/item-list.component';\nimport { CateringCategoryModalComponent } from './overlays/category-modal/category-modal.component';\nimport { CateringGroupModalComponent } from './overlays/group-modal/group-modal.component';\nimport { CateringItemModalComponent } from './overlays/item-modal/item-modal.component';\nimport { CateringOrdersItemComponent } from './orders/item/item.component';\nimport { OrderDetailsModalComponent } from './overlays/order-details-modal/order-details-modal.component';\nimport { OrderDetailsItemsComponent } from './overlays/order-details-modal/items/items.component';\nimport { OrderBookingDetailsComponent } from './overlays/order-details-modal/booking-details/booking-details.component';\nimport { OrderDetailsNotesComponent } from './overlays/order-details-modal/messages/messages.component';\nimport { CateringStorage } from './catering.storage';\nimport { CateringMenuOrderComponent } from './menu/item/item.component';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { BookingsModule } from '../bookings/bookings.module';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: CateringComponent },\n { path: ':page', component: CateringComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n CateringComponent,\n CateringOrdersComponent,\n CateringMenuComponent,\n CateringMenuItemListComponent,\n CateringCategoryModalComponent,\n CateringGroupModalComponent,\n CateringItemModalComponent,\n CateringOrdersItemComponent,\n OrderDetailsModalComponent,\n OrderDetailsItemsComponent,\n OrderBookingDetailsComponent,\n OrderDetailsNotesComponent,\n CateringMenuOrderComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n LegacyOverlaysModule,\n BaseModule,\n BookingsModule,\n UiModule\n ],\n providers: [CateringStorage],\n exports: [BaseModule]\n})\nexport class CateringModule {\n}\n","import { LocalStorageWrapper } from '@mckinsey-converge/storage';\n\nexport class CateringStorage extends LocalStorageWrapper {\n\n private static orderDetailsKey = 'order-details';\n\n constructor() {\n super('CATERING');\n }\n\n public set orderDetails(value: boolean) {\n this.setValue(CateringStorage.orderDetailsKey, value + '');\n }\n\n public get orderDetails(): boolean {\n const value = this.getValue(CateringStorage.orderDetailsKey);\n return value === 'true';\n }\n\n public removeOrderDetails() {\n this.removeValue(CateringStorage.orderDetailsKey);\n }\n}\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu-item-list',\n templateUrl: './item-list.component.html',\n styleUrls: ['./item-list.component.scss'],\n})\nexport class CateringMenuItemListComponent extends BaseDirective implements OnChanges {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Toggle for new groups */\n @Input() public package: number;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _dialog: MatDialog, private _org: OrganisationService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.package && this.package) {\n this.openGroupModal();\n }\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({\n parent_id: this.category.id,\n zones: [this.building.id],\n });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: this.category },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'category_modal',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.category.items.findIndex(\n (item) => event.metadata.id === item.id\n );\n if (index >= 0) {\n (this.category.items as any[]).splice(index, 1, event.metadata);\n } else {\n (this.category.items as any[]).push(event.metadata);\n }\n }\n })\n );\n }\n}\n","
\n \n
\n \n
\n
\n
\n\n
\n
\n \n
\n
No packages or sub-categories for {{ category.name }}
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { CateringComponent } from '../../catering.component';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { CateringItemModalComponent } from '../../overlays/item-modal/item-modal.component';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class CateringMenuOrderComponent extends BaseDirective {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Parent of the item being displayed */\n @Input() public parent: CateringCategory;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n public get symbol(): string {\n return this.building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _org: OrganisationService,\n private _menu_items: CateringItemsService,\n private _menu_categories: CateringCategoriesService\n ) {\n super();\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({ parent_id: this.item.id, zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: group.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(group, event.metadata);\n }\n })\n );\n }\n\n public openItemModal(item?: CateringItem) {\n /* istanbul ignore else */\n if (!item) {\n item = new CateringItem({ parent_id: this.item.id });\n }\n const ref = this._dialog.open(CateringItemModalComponent, {\n data: { item, parent: item.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(item, event.metadata);\n }\n })\n );\n }\n\n private updateItemList(old_item: CateringItem | CateringCategory, new_item: HashMap) {\n const item =\n old_item instanceof CateringCategory\n ? new CateringCategory(new_item)\n : new CateringItem(new_item);\n if (old_item.id) {\n const index = this.parent.items.findIndex((itm) => itm.id === old_item.id);\n (this.parent.items as any[]).splice(index, 1, item);\n (this.parent as any).items = [...this.parent.items];\n } else {\n (this.item.items as any[]).push(item);\n }\n }\n\n public deleteItem() {\n const type =\n this.item.is_category\n ? this.item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item';\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: `Delete catering ${type}`,\n content: `Are you sure you want to delete the catering ${type} \"${\n this.item.name\n }\"?
${\n this.item instanceof CateringCategory\n ? 'Any children items or groups will be immediately deleted'\n : ''\n }`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${type}...`;\n let e = null;\n let service =\n this.item.is_category\n ? this._menu_categories\n : this._menu_items;\n await service.delete(this.item.id).catch((err) => e = err || 'Error');\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n } else {\n this._service.notifyError(`Error deleting ${type}.`);\n }\n }\n });\n }\n}\n","
\n
\n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n\n \n \n \n \n \n
\n \n
\n Edit\n {{\n item.items.length || item.is_category\n ? subitem\n ? 'Group'\n : item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item'\n }}\n
\n
\n \n \n
\n","import { Component, OnInit, Input, SimpleChanges, EventEmitter, Output } from '@angular/core';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringCategoryModalComponent } from '../overlays/category-modal/category-modal.component';\nimport { HashMap, DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class CateringMenuComponent extends BaseDirective implements OnInit {\n /** Filter string for catering items */\n @Input() public search: string;\n /** Opens new category modal on change */\n @Input() public category: number;\n /** Opens new category modal on change */\n @Input() public package: number;\n /** Emitter for changes to the length of catering categories */\n @Output() public length = new EventEmitter();\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n /** Filtered list of top level catering categories */\n public filtered_menu: CateringCategory[] = [];\n /** Whether menu details are being loaded */\n public loading: boolean;\n /** Index of the active tab */\n public index: number = 0;\n /** Map of indexes to package open state */\n public state: HashMap = {};\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService, private _menu: CateringMenuService, private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.set('DELETED.menu', '');\n this.subscription('deleted', this._service.listen('DELETED.menu').subscribe(id => this.removeFromMenu(id)));\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe((_) => {\n this.index = 0;\n this.catering_menu = [];\n this.filtered_menu = [];\n this.loadCateringMenu();\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.search) {\n this.filtered_menu = this.filter(this.catering_menu);\n }\n if (changes.category && this.category) {\n this.openCategoryModal();\n }\n if (changes.package) {\n this.state[this.index] = this.package;\n }\n }\n\n public openCategoryModal(category?: CateringCategory) {\n /* istanbul ignore else */\n if (!category) {\n category = new CateringCategory({ zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringCategoryModalComponent, { \n data: { category }, \n autoFocus: false,\n backdropClass: 'mck-modal-backdrop', \n });\n this.subscription('category_modal', ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.catering_menu.findIndex(item => event.metadata.id === item.id);\n if (index >= 0) {\n this.catering_menu.splice(index, 1, event.metadata);\n this.index = index;\n } else {\n this.index = this.catering_menu.length;\n this.catering_menu.push(event.metadata);\n }\n }\n }));\n }\n\n /**\n * Remove item from the menu\n * @param id ID of the item to remove\n * @param list Menu items and categories\n */\n private removeFromMenu(id: string, list: CateringCategory[] = this.catering_menu, depth: number = 0) {\n if (list.length === 0 || depth > 4) { return false; }\n const found = list.findIndex(item => item.id === id);\n if (found >= 0) {\n list.splice(found, 1);\n return true;\n } else {\n for (const item of list) {\n if (this.removeFromMenu(id, item.items as any, depth + 1)) { return true; }\n }\n }\n return false;\n }\n\n private loadCateringMenu(): void {\n /* istanbul ignore else */\n if (this.building) {\n this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n this.length.emit(this.catering_menu.length);\n this.filtered_menu = this.filter(this.catering_menu);\n this.loading = false;\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadCateringMenu()\n );\n this.loading = false;\n }\n );\n }\n }\n\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n}\n","
\n \n \n \n \n
\n
{{category?.name}}
\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Loading menu for {{ building?.name }}
\n
\n
\n\n
\n
\n \n
\n
No menu categories for {{ building?.name }}
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\n\nimport {\n CateringOrder,\n CateringOrderStatus,\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Identity, HashMap } from '@mckinsey-converge/base';\nimport { MatDialog } from '@angular/material/dialog';\nimport { OrderDetailsModalComponent } from '../../overlays/order-details-modal/order-details-modal.component';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-catering-orders-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringOrdersItemComponent implements OnChanges {\n /** Catering order details to display */\n @Input() public order: CateringOrder;\n /** Search filter string */\n @Input() public search: string;\n /** Whether order items should be shown */\n @Input()\n public show_items: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** Whether status is being updated */\n public loading: boolean;\n /** Mapping of items to the option selections */\n public readonly item_details: HashMap<{ amount: number, details: string }> = {};\n\n public showIndividualItem : boolean = false;\n\n public get search_matches(): HashMap {\n const map = {};\n const filter = this.search.toLowerCase();\n this.order.items.forEach((item) => {\n map[item.id] = item.name.toLowerCase().indexOf(filter) >= 0;\n });\n return map;\n }\n\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status) || ({} as any);\n }\n\n public get space(): Space {\n return this._spaces.find(this.order.location_id);\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.active_status = this.order.status;\n this.updateItemDetails();\n }\n this.showIndividualItem = this.show_items;\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this.order.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this.order.id),\n 1,\n new CateringOrder({ ...this.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n }\n this.loading = false;\n }\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(): void {\n const dialogRef = this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: this.order,\n booking: this.order.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n private updateItemDetails() {\n for (const item of this.order.items) {\n if ((item as any).items) {\n const items = [];\n for (const sub_item of (item as any).items) {\n if (!sub_item.items.length && sub_item.amount) {\n items.push(sub_item)\n } else {\n for (const sub_sub_item of sub_item.items) {\n if (sub_sub_item.amount) {\n items.push(sub_sub_item)\n }\n }\n }\n }\n this.item_details[item.id] = {\n amount: items.length,\n details: `[${items.map(i => i.name).join(']\\n[')}]`\n };\n }\n }\n }\n\n public expandMore() {\n this.showIndividualItem = !this.showIndividualItem\n }\n}\n","
\n
\n
\n \n
\n
{{ order.deliver_at }}
\n
{{ space?.local_name || space?.simple_name || space?.settings?.room_name}}
\n
{{ order.booking?.organiser.name }}
\n
\n (K) Kitchen
\n (P) Pantry\n
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n\n
\n \n
\n \n
\n
\n
{{ item.name }}
\n \n {{ item_details[item.id]?.amount }}\n { item_details[item.id]?.amount, plural, =1 { Option } other { Options } }\n
\n
x {{ item.amount }}
\n
\n
\n \n \n\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { combineLatest, Subject } from 'rxjs';\nimport { filter, first, map } from 'rxjs/operators';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrderDetailsModalComponent } from '../overlays/order-details-modal/order-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'a-catering-orders',\n templateUrl: './orders.component.html',\n styleUrls: ['./orders.component.scss'],\n})\nexport class CateringOrdersComponent extends BaseDirective implements OnInit, OnChanges {\n /** Search filter string */\n @Input() public search: string = '';\n /** Currently selected date */\n @Input() public date: number;\n /** Type of order to show */\n @Input() public type: '' | 'Pantry' | 'Kitchen';\n\t\t@Input() public otherCategories: any[];\n @Input() public orderDetailsExpanded: boolean;\n\n\t\tpublic bookings = [];\n\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n /** List of catering orders for the selected date */\n public readonly orders = this._booking_state_service.filtered.pipe(\n map((bookings) => {\n let list: CateringOrder[] = [];\n bookings.forEach((booking, i) => {\n const catering = [...booking.catering]\n .map((order) => new CateringOrder({\n ...order,\n booking_date: booking.date,\n booking\n }));\n list = list.concat(catering);\n });\n list.sort((a, b) => a.booking_date - b.booking_date);\n return list;\n })\n );\n /** List of catering orders for the selected date */\n public filtered_orders = combineLatest([this.search$, this.orders]).pipe(\n map(([search, [...orders]]) => this.filter([...orders] || [], search || ''))\n );\n\n public display_orders: CateringOrder[] = [];\n /** Whether catering orders are loading */\n public readonly loading = this._booking_state_service.loading;\n\n /** Display string for the currenly selected date */\n public get date_display(): string {\n // R--- check if input can be changed since there is isSameDate calculations\n const date = new DateTZ({date: this.date});\n const now = DateNow(new Date())\n return now.isSameDate(date, 'day') ? 'Today' : date.formatDate('dd MMM yyyy');\n }\n\n /** Active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _dialog: MatDialog\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .pipe(filter((bld) => !!bld))\n .subscribe(() => {\n this._booking_state_service.setZone(this._org.building.id);\n })\n );\n this.subscription(\n 'orders',\n this.filtered_orders.subscribe((orders) => {\n this.display_orders = orders.sort((a ,b) => {\n const date = new DateTZ({date: a.booking.date}).formatDate('yyyy/MM/dd');\n\n return Date.parse(`${date} ${a.deliver_at_time.slice(0, -2)} ${a.deliver_at_time.slice(-2)}`) - Date.parse(`${date} ${b.deliver_at_time.slice(0, -2)} ${b.deliver_at_time.slice(-2)}`)\n }\n )})\n )\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view')) {\n const view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_order');\n const booking_details = localStorage.getItem('CONCIERGE.view_booking');\n /* istanbul ignore else */\n if (details) {\n const booking = new Booking(JSON.parse(booking_details));\n const order = new CateringOrder(JSON.parse(details));\n order.booking = booking;\n this.viewOrderDetails(order);\n localStorage.removeItem('CONCIERGE.view_order');\n localStorage.removeItem('CONCIERGE.view_booking');\n }\n }\n })\n );\n this.search$.next(this.search);\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.search || changes.type) {\n this.search$.next(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, order: CateringOrder) {\n return order ? order.id : index;\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(order: CateringOrder): void {\n this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: order,\n booking: order.booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /**\n * Filter list to find matching items\n * @param list List of orders to filter\n * @param search Filter string\n\t\t * TO DO : refactor ==>\n */\n private filter(list: CateringOrder[], search: string = '') {\n\t\t\t// Create a deep clone of the original list to avoid modifying the original data\n\t\t\tconst orders = cloneDeep(list);\n\t\t\t// Determine the filter criteria based on the search string or predefined type\n\t\t\tconst filter = search !== '' ? search.toLowerCase() : this.type ? this.type : '';\n\n\t\t\t// Check if 'otherCategories' is defined and if there are matching categories\n\t\t\tconst isOtherCategory = this.otherCategories ? this.otherCategories.filter(el => el.name.toLowerCase() === filter) : [];\n\t\t\tlet orderList = [];\n\n\t\t\t// If there are matching 'otherCategories', filter orders accordingly\n\t\t\tif(isOtherCategory.length) {\n\t\t\t\tconst result = this.filterOrdersByCategory([...orders], isOtherCategory[0]).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n\t\t\t\treturn orderList;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// No matching 'otherCategories', filter orders based on the general criteria\n\t\t\t\torderList = list;\n\t\t\t\tif(filter !== '') {\t\n\t\t\t\t\tconst result = this.filterOrdersByCategoryType([...orders], filter).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n // If no orders match the category type, attempt to search by item names, booker or room name\n if (orderList.length === 0) {\n const itemSearchResults = this.filterOrdersByItemName([...orders], filter);\n orderList = [...itemSearchResults];\n }\n\t\t\t\t}\n\t\t\t\treturn orderList;\n\t\t\t}\n }\n\n private filterOrdersByItemName(orders: CateringOrder[], search: string): CateringOrder[] {\n const filteredOrders: CateringOrder[] = [];\n \n orders.forEach(order => {\n const matchingItems = this.findItemsMatchingSearch(order.items, search);\n // Check if the order's location or organiser name matches the search\n const locationMatches = order.location?.toLowerCase().includes(search);\n const organiserMatches = order.booking?.organiser?.name?.toLowerCase().includes(search);\n \n if (matchingItems.length > 0 || locationMatches || organiserMatches) {\n const newOrder = new CateringOrder({\n ...order,\n items: matchingItems.length > 0 ? matchingItems : order.items,\n });\n filteredOrders.push(newOrder);\n }\n });\n \n return filteredOrders;\n }\n \n private findItemsMatchingSearch(items: any, search: string): any[] {\n const matchingItems = [];\n \n items.forEach(item => {\n let itemMatches = false;\n \n // Check if the item's name matches the search\n if (item.name?.toLowerCase().includes(search)) {\n itemMatches = true;\n }\n \n // Recursively check sub-items\n let subItems = [];\n if (item.items && item.items.length > 0) {\n subItems = this.findItemsMatchingSearch(item.items, search);\n if (subItems.length > 0) {\n itemMatches = true;\n }\n }\n \n if (itemMatches) {\n // If item matches, include it in the results\n const newItem = {\n ...item,\n items: subItems.length > 0 ? subItems : item.items,\n };\n matchingItems.push(newItem);\n }\n });\n return matchingItems;\n }\n\n\t\t// Function to filter orders based on specified categories\n\t\tfilterOrdersByCategory(orders, categories) {\n\t\t\tconst filteredOrders = [];\n\t\t\n\t\t\tfunction findMatchingOrders(order, categories) {\n\t\t\t\tif (order.items) {\n\t\t\t\t\tconst matchingItems = order.items.filter(item => {\n\t\t\t\t\t\tconst categoryName = findCategoryName(item.name, categories);\n\t\t\t\t\t\treturn categoryName !== null;\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif (matchingItems.length > 0) {\n\t\t\t\t\t\tfilteredOrders.push({ ...order, items: matchingItems });\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\torder.items.forEach(subOrder => findMatchingOrders(subOrder, categories));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\torders.forEach(order => findMatchingOrders(order, categories));\n\n\t\t\t// Function to find the category name for a given item name within the specified categories\n\t\t\tfunction findCategoryName(itemName, categories) {\n\t\t\t\tif(categories?.items !== undefined) {\n\t\t\t\t\tfor (const category of categories.items) {\n\t\t\t\t\t\tif (category.name === itemName) {\n\t\t\t\t\t\t\treturn category.name;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\tif (category.items) {\n\t\t\t\t\t\t\tconst subCategoryName = findCategoryName(itemName, category);\n\t\t\t\t\t\t\tif (subCategoryName) {\n\t\t\t\t\t\t\t\treturn subCategoryName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\n\t\t\treturn filteredOrders;\n\t\t}\n\n\t\t// Function to filter orders based on specified category type\n\t\tfilterOrdersByCategoryType(orders, categoryType) {\n\n\t\t\tconst filteredOrders = [];\n\n\t\t\tfunction filterMatchingItems(items) {\n return items\n .map(item => {\n if (item.catering_type === categoryType) {\n return { ...item };\n } else if (item.items) {\n const filteredSubItems = filterMatchingItems(item.items);\n if (filteredSubItems.length > 0) {\n return { ...item, items: filteredSubItems };\n } else {\n return null;\n }\n } else {\n return null;\n }\n })\n .filter(item => item !== null);\n }\n \n\t\t\torders.forEach(order => {\n\t\t\t\tconst filteredItems = filterMatchingItems([order]);\n\t\t\t\tif (filteredItems.length > 0) {\n\t\t\t\t\tfilteredOrders.push({ ...order , items: filteredItems[0].items});\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t\treturn filteredOrders;\n\t\t\t\n\t\t}\n\t\t\n}\n\nfunction flatten(arr) {\n\treturn arr.reduce(function (flat, toFlatten) {\n\t\treturn flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);\n\t}, []);\n}\n","
\n \n
\n
\n
\n
Time
\n
Location
\n
Host
\n
Package Types
\n
Status
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders for {{ date_display }}
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\nimport { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent, CONFIRM_METADATA } from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringCategoryModalData {\n /** Category to edit */\n category: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-category-modal',\n templateUrl: './category-modal.component.html',\n styleUrls: ['./category-modal.component.scss'],\n})\nexport class CateringCategoryModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n\n public get category(): CateringCategory {\n return this._data.category;\n }\n\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n public disabled: boolean = true\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringCategoryModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n admin_only: new FormControl(this.category.admin_only),\n restricted_from: new FormControl(this.category.restricted_from, Validators.pattern('[-_0-9]*')),\n });\n\n this.form.get('admin_only').setValue(this.form.get('admin_only').value ?? false);\n this.form.get('restricted_from').setValue(this.form.get('restricted_from').value ?? 0);\n\n if (!this.category.id) {\n this.disabled = false\n } else {\n this.form.valueChanges.subscribe(val => {\n for(let key of Object.keys(val)){\n if(this.category[key] !== val[key]){\n this.disabled = false\n return\n }\n this.disabled = true\n }\n });\n }\n\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Category`,\n content: `Are you sure you want to delete this Category? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting Category...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const category = new CateringCategory(this.category);\n const data = { ...category.toJSON(), ...this.form.value };\n \n /* Keep the \"stock\" status as true for main categories when adding or updating to avoid problems.\n The problem occurs when the top-level category is marked as \"out of stock\" if all items within it are out of stock. \n Then, if the items become available again, the top-level category stays marked as \"out of stock,\" even if subcategories and items are in stock.\n */\n data.out_of_stock = false; \n const request = category.id\n ? this._menu_categories.update(category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = category.items\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
{{ category.id ? 'Edit' : 'Add' }} category
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n Name*\n \n \n A valid name is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n Only numbers are allowed(0-999)\n \n
\n
\n \n Disable\n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, EventEmitter, Output } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\nimport { UploadManager } from '@acaprojects/ngx-uploads';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringGroupModalData {\n group: CateringCategory;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-group-modal',\n templateUrl: './group-modal.component.html',\n styleUrls: ['./group-modal.component.scss'],\n})\nexport class CateringGroupModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n { id: 'none', name: 'Other' },\n ];\n\n /** Category being edit/created */\n public get category(): CateringCategory {\n return this._data.group;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n /** Image URL for the category */\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n /** Whether category is a package */\n public get package(): boolean {\n return this.form.controls.package.value;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringGroupModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.category.price\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n catering_type: new FormControl(this.category.catering_type, [Validators.required]),\n package: new FormControl(this.category.package || false),\n must_select: new FormControl(this.category.must_select),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.category.minimum_quantity),\n maximum_quantity: new FormControl(this.category.maximum_quantity),\n order_anytime: new FormControl(this.category.order_anytime),\n out_of_stock: new FormControl(this.category.out_of_stock),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete ${this.category.package ? 'Package' : 'Sub-Category'}`,\n content: `Are you sure you want to delete this ${\n this.category.package ? 'Package' : 'Sub-Category'\n }? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${\n this.category.package ? 'Package' : 'Sub-Category'\n }...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = {\n ...(this.category instanceof CateringCategory\n ? this.category.toJSON()\n : this.category),\n ...this.form.value,\n parent_categories: [this.parent.id],\n };\n //if sub-category/item becomes non-package then mark it in stock \n data.out_of_stock = !data.package ? false : data.out_of_stock;\n data.price = data.unit_price;\n const request = this.category.id\n ? this._menu_categories.update(this.category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = this.category.items\n this.event.emit({ reason: 'done', metadata: new CateringCategory(item) });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
\n {{ category.id ? 'Edit' : 'Add' }} {{ package ? 'package' : 'sub-category' }}\n
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n \n
{{ parent.name }}
\n
\n
\n Package\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n \n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\nimport {\n CONFIRM_METADATA, ConfirmModalComponent,\n} from '@mckinsey-converge/legacy-overlays';\nimport { mergeCateringItemWithFormData } from '@mckinsey-converge/data-common';\n\nexport interface CateringItemModalData {\n item: CateringItem;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-item-modal',\n templateUrl: './item-modal.component.html',\n styleUrls: ['./item-modal.component.scss'],\n})\nexport class CateringItemModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n ];\n\n /** Category being edit/created */\n public get item(): CateringItem {\n return this._data.item;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_items: CateringItemsService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringItemModalData,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.item.price\n this.form = new FormGroup({\n name: new FormControl(this.item.name, [Validators.required]),\n description: new FormControl(this.item.description),\n catering_type: new FormControl(this.item.catering_type, [Validators.required]),\n supplier_cost: new FormControl(this.item.supplier_cost),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.item.minimum_quantity),\n maximum_quantity: new FormControl(this.item.maximum_quantity),\n order_anytime: new FormControl(this.item.order_anytime),\n out_of_stock: new FormControl(this.item.out_of_stock),\n allergy: new FormControl(this.item.allergy),\n parent_categories: new FormControl([this._data.parent.id]),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Item`,\n content: `Are you sure you want to delete this item?`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting item...`;\n let e = null;\n await this._menu_items.delete(this.item.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = mergeCateringItemWithFormData(this.item, this.form.value).toJSON();\n const request = this.item.id\n ? this._menu_items.update(this.item.id, data)\n : this._menu_items.add(data);\n request.then(\n (item) => {\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.item.id ? 'updating' : 'creating'} item. Error: ${\n err.message || err\n }`,\n ),\n );\n }\n }\n}\n","
\n
{{ item.id ? 'Edit' : 'Add' }} catering item
\n \n
\n\n
\n
\n
\n \n
{{ parent.name }}
\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-booking-details',\n templateUrl: './booking-details.component.html',\n styleUrls: ['./booking-details.component.scss'],\n})\nexport class OrderBookingDetailsComponent {\n /** Email of the order space */\n @Input() public space: Space;\n /** Booking details to display */\n @Input() public booking: Booking;\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Display startDateTZ and endDateTZ time only time */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mm a')}`;\n }\n\n /** Display startDateTZ time only time */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('h:mm a')}`;\n }\n\n /** Store booking details to be used in another component */\n public storeBooking() {\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(this.booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(this.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n}\n","
\n Meeting Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name }}\n
\n
\n
\n \n
\n {{ space?.name }}\n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ booking.attendees?.length || '0' }}({{ booking.expected_attendees[space?.email] || 0 }} expected)\n
\n
\n
\n\n View on Day View\n\n","import { Component, Input } from '@angular/core';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'order-details-items',\n templateUrl: './items.component.html',\n styleUrls: ['./items.component.scss'],\n})\nexport class OrderDetailsItemsComponent extends BaseDirective {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Whether order is being edited */\n public editing: boolean;\n /** Whether order is being updated */\n public loading: boolean;\n\n /** List of items in the order */\n public get items(): CateringCategory[] {\n return this.order.items as any;\n }\n\n constructor(\n private _service: ApplicationService, \n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,) {\n super();\n }\n\n public editOrder() {\n this.editing = true;\n }\n\n /** Handle changes to catering order */\n public async handleOrderEvent(order: CateringOrder) {\n /* istanbul ignore else */\n if (order) {\n const orders = [...this.booking.catering];\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n this.loading = true;\n const new_booking = new Booking({ ...this.booking.toJSON(), catering: orders });\n const booking = await this._bookings\n .save(new_booking)\n .catch((err) =>\n this._service.notifyError(\n `Error unable to update order. Error: ${err.message || err}`\n )\n );\n if (booking) {\n this._booking_state_service.replace(booking);\n this.booking = booking;\n this.order = order;\n this.editing = false;\n }\n this.loading = false;\n }\n }\n}\n","
\n {{ editing ? 'Edit Order' : 'Order Details' }}\n
\n
\n \n
\n
\n
{{ item.name }}
\n
x{{ item.amount }}
\n
\n \n \n
\n
{{ sub_item.name }}
\n \n \n
\n
{{ sub_sub_item.name }}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n
\n
\n\n\n
\n
\n \n
\n
\n No items in order\n
\n
\n
\n\n
\n
\n \n
\n
\n Updating order\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { UsersService, BookingNote } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-details-notes',\n templateUrl: './messages.component.html',\n styleUrls: ['./messages.component.scss'],\n})\nexport class OrderDetailsNotesComponent implements OnInit {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Emitter for changes to the active booking */\n @Output() public bookingChange = new EventEmitter();\n /** Contents of the new private note */\n public new_note: string;\n /** Whether a note is being added */\n public loading: boolean;\n\n /** List of notes for catering order space */\n public get notes(): BookingNote[] {\n const notes = this.booking.notes.filter((note) => {\n return (\n (note.type === 'catering' || note.type === 'catering-private') &&\n note.space === this.order.location_id &&\n (!note.order_id || note.order_id === this.order.id)\n );\n });\n notes.forEach((note) => {\n // Use the booking timezone to make the note date TZ aware since the native format is not.\n const date = new DateTZ({date: note.date, is_local_tz: false, building_tz: this.booking.timezone })\n note.time = date.formatDate('dd MMM, h:mma');\n });\n return notes;\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _users: UsersService\n ) {}\n\n ngOnInit(): void {}\n\n /**\n * Add note for catering order\n */\n public async addNote() {\n /* istanbul ignore else */\n if (this.booking && this.new_note) {\n const user = this._users.current;\n const notes = this.booking.notes;\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.booking.timezone })\n const date = now.startOfValue('minute');\n const new_notes = [\n ...notes,\n {\n type: 'catering-private',\n date: date.ms,\n author: user.name,\n order_id: this.order.id,\n space: this.order.location_id,\n message: this.new_note,\n time: date.formatDate('h:mma'),\n },\n ];\n const pending_booking = new Booking({ ...this.booking.toJSON(), notes: new_notes });\n this.loading = true;\n const new_booking: Booking = (await this._bookings\n .save(pending_booking)\n .catch((err) => {\n this._service.notifyError(\n `Failed to add note to order meeting. Error: ${err.message || err}`\n );\n this.loading = false;\n throw err;\n })) as any;\n this.booking = new_booking;\n if (new_booking) {\n this._booking_state.replace(new_booking);\n }\n this.order.booking = new_booking;\n this.bookingChange.emit(new_booking);\n this.loading = false;\n this.new_note = '';\n }\n }\n}\n","
\n Private Notes\n
\n
\n \n
\n
{{ item.message }}
\n
\n
{{ item.author }}
\n
\n
{{ item.time }}
\n
\n
\n
\n
\n
\n \n \n \n \n
\n \n
\n
\n\n
\n
\n \n
\n
\n No private notes for order\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { CateringOrder, CateringOrderStatus } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { SpacesService } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\nexport interface OrderDetailsModalData {\n /** Order to display details for */\n order: CateringOrder;\n /** Booking associated with catering order */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-order-details-modal',\n templateUrl: './order-details-modal.component.html',\n styleUrls: ['./order-details-modal.component.scss'],\n})\nexport class OrderDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether status is being updated */\n public loading: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** List of available order statuses */\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n public booking: Booking;\n\n /** Order to display */\n public get order(): CateringOrder {\n return this._data.order;\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status);\n }\n\n /** Space associated with the order */\n public get space(): Space {\n return this._spaces.find(this._data.order.location_id);\n }\n\n /** Details about the delivery time */\n public get delivery_date(): DateTZ {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time });\n }\n\n /** Details about the delivery_at time */\n public get delivery_at(): string {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time }).formatDate('h:mm a');\n }\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n @Inject(MAT_DIALOG_DATA) private _data: OrderDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.active_status = this._data.order.status;\n this.booking = new Booking(this._data.booking)\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this._data.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this._data.order.id),\n 1,\n new CateringOrder({ ...this._data.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking: any = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this._data.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n this.booking = updated_booking;\n }\n this.loading = false;\n\n }\n }\n}\n","\n\n
\n
\n
\n
{{ space?.name }} ({{ space?.local_name}})
\n
({{delivery_date?.ms | date:'mediumDate':timezone }}) To be delivered at {{ delivery_at }}
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'access-denied',\n templateUrl: './access-denied.component.html',\n styleUrls: ['./access-denied.component.scss']\n})\nexport class AccessDenied {\n\n constructor() {}\n\n}\n","
\n \n

Oooops - sorry! You don’t have access to this page.

\n

Please contact help desk or continue to Converge for room booking.

\n
\n","import { Component, OnInit } from '@angular/core';\n\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLinkInternal, ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss']\n})\nexport class SidebarComponent implements OnInit {\n\n /** Currently active building */\n public get active_building(): Building {\n return this._org.building;\n }\n public set active_building(building: Building) {\n this._org.building = building;\n }\n\n /** List of available menu items */\n public get menu_items(): ApplicationLinkInternal[] {\n return this._service.setting('app.general.menu.items') || [];\n }\n\n /** Logo for the application organisation */\n public get logo(): ApplicationIcon {\n return this._service.setting('app.logo_light');\n }\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings || [];\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService) {}\n\n ngOnInit(): void {}\n}\n","
\n {{ logo.content }}\n \n
\n
\n \n
\n
\n
\n \n
\n
{{ item.name }}
\n
\n \n
\n
1\">\n \n \n \n {{ building.name }}\n \n \n \n
\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { BookingStateService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, getTimezoneOffsetString, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-topbar-header',\n templateUrl: './topbar-header.component.html',\n styleUrls: ['./topbar-header.component.scss'],\n})\nexport class TopbarHeaderComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Currently building timezone */\n @Input() public timezone: string;\n /** Currently active zone */\n @Input() public zone: string;\n /** Whether to show new item button */\n @Input() public show_add_item = false;\n /** Whether to show the events for the active month */\n @Input() public show_events: boolean = false;\n /** Emitter for changes selected date */\n @Output() public dateChangeTz = new EventEmitter();\n /** Emitter for add item button */\n @Output() public event = new EventEmitter();\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n public event_map: { [date: string]: number };\n\n public fromDateTz = DateNow().subtractValue({ months: 6 });\n\n public get now() {\n return DateNow();\n }\n\n /** Display string for the currently selected date */\n public get tz(): string {\n return getTimezoneOffsetString(this.timezone_value);\n }\n\n public get timezone_value() {\n return localStorage.getItem('CONCIERGE.timezone') || this.timezone || this.now.building_tz;\n }\n\n public get is_today() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone_value,\n }),\n 'day'\n );\n }\n\n constructor(private _bookings: BookingStateService, private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // CONCIERGE.date: Get the localstorage date and timezone when changing pages.\n const date = +localStorage.getItem('CONCIERGE.date') || this.now.ms;\n \n /* istanbul ignore else */\n if (date && (date !== this.dateTz.ms || this.timezone_value !== this.dateTz.building_tz)) {\n // CONCIERGE.date Reapply the localstorage date and timezone when changing pages.\n this.timeout(\n 'init',\n () => {\n this.dateTz = new DateTZ({\n date,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n this.updateDate();\n },\n 10\n );\n }\n this.subscription(\n 'events',\n this._bookings._noOfMeetings.subscribe((list) => {\n this.event_map = {};\n this.event_map = list[0];\n })\n );\n }\n\n public noOfCount(event) {\n // Disabling bellow until find more reliable way to call as it is been called multiple times on hover/click\n // this._bookings.getDailyMeetingCount();\n // event.stopPropogation();\n }\n\n /**\n * Change the selected date with the arrow controls\n *\n */\n public changeDate(value: number) {\n let date = new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n date = date.addValue({ days: value });\n this.dateTz = date;\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n /**\n * Change the selected date with the calendar widget\n *\n */\n public applyDatePickerValue(dateInputTz: DateTZ) {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(dateInputTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n this.closeDatePicker();\n }\n\n public updateDate() {\n this.timeout('update_date', () => this._bookings.setDate(this.dateTz));\n }\n\n /** Reset date to the current date */\n public resetDate() {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(this.now).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n public closeDatePicker() {\n this.updateDate();\n }\n\n /** New Item button click */\n public newItem(): void {\n this.event.emit('new_item');\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n

Today

\n

{{ dateTz.ms | date: 'mediumDate':tz }}

\n
\n \n
\n
\n \n \n
\n
\n
\n","import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { first } from 'rxjs/operators';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n})\nexport class LoginComponent extends BaseDirective implements OnInit {\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n /** Whether the user credentials are being checked */\n public loading: boolean;\n /** Form fields for the login form */\n public form: FormGroup;\n\n /** Password field element */\n @ViewChild('pass_field', { static: true }) private pwd_field: ElementRef;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n this.loading = true;\n this.form = new FormGroup({\n username: new FormControl('', [Validators.required]),\n password: new FormControl('', [Validators.required]),\n });\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.loading = false;\n this.logo = this._service.setting('app.logo_light') || { type: 'icon' };\n });\n }\n\n /** Perform user login */\n public login() {\n this.loading = true;\n const form = this.form.value;\n this._users\n .login(\n {\n username: form.username,\n password: form.password,\n },\n { form: true }\n )\n .then(\n () => this.loading = false,\n () => {\n this.loading = false;\n this.form.controls.password.setErrors({ check: true });\n }\n );\n }\n}\n","
\n
\n
\n
\n
\n {{ logo.content }}\n \n
\n
\n
\n \n
\n \n Username:\n \n \n \n Username is required\n \n
\n
\n \n Password:\n \n \n \n Invalid username or password\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Converge is loading
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { first } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ReportDetails } from '../reports.component';\nimport { Report } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ReportsService } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-report-display',\n templateUrl: './report-display.component.html',\n styleUrls: ['./report-display.component.scss'],\n})\nexport class ReportDisplayComponent implements OnInit, OnChanges {\n /** Details about the report being requested */\n @Input() public report: ReportDetails;\n /** Start date for the generated report */\n public start_date: number;\n /** End date for the generated report */\n public end_date: number;\n /** List of report data entries */\n public report_data: Report;\n /** Whether report data is loading */\n public loading: boolean;\n /** List of selected locations */\n public locations: Building[] = [{} as any];\n /** Multiple Locations? */\n public multipleLocations: boolean = false;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n @Output() locationChanged = new EventEmitter();\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _reports: ReportsService,\n private _router: Router\n ) {}\n\n public ngOnInit(): void {\n // R--- TODO no prams present for timezone\n const now = DateNow();\n this.start_date = now.startOfValue('day').ms;\n this.end_date = now.endOfValue('day').ms;\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.locations = [this._org.building];\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.report) {\n this.report_data = null;\n }\n if (this.locations.length > 1) {\n this.locations = [this.locations[0]];\n }\n }\n\n /* function runs on location change from on-page dropdown(not from sidebar) */\n public onLocationChange(data: any) {\n this.locationChanged.emit(this.locations[0]);\n }\n\n /**\n * Ensure Space Time Continuum\n */\n public checkDates(new_date: number) {\n if (this.start_date > this.end_date) {\n // R--- TODO no prams present for timezone\n const date = new DateTZ({ date: new_date });\n this.start_date = date.startOfValue('day').ms;\n this.end_date = date.endOfValue('day').ms;\n }\n }\n\n /**\n * Generate report\n */\n public generateReport() {\n /* istanbul ignore else */\n if (this.report) {\n this.loading = true;\n this.report_data = null;\n const date = toMiddayUTC(new DateTZ({ date: this.start_date })).toZone(\n this.locations[0]?.timezone\n );\n const end_date = toMiddayUTC(new DateTZ({ date: this.end_date })).toZone(\n this.locations[0]?.timezone\n );\n this._reports\n .show(this.report.id, {\n date: date.formatDate('yyyy-MM-dd'),\n start_date: date.startOfValue('day').seconds,\n end_date: end_date.endOfValue('day').seconds,\n zone_ids: this.locations.map((i) => i.id).join(','),\n })\n .then(\n (report) => {\n const zone_ids = this.locations.map((i) => i.id).join(',');\n if (this.report.id === 'day' && this.locations[0]?.city !== 'Dallas') {\n this.loading = false;\n this._service.notifyError(\n `Day View is currently available for Dallas only`\n );\n } else {\n this.loading = false;\n this.report_data = new Report({ ...report, type: this.report.id });\n }\n },\n (err) => {\n this.loading = false;\n this._service.notifyError(\n `Error generating report. Error: ${err.message || err}`\n );\n }\n );\n }\n }\n\n public downloadReport() {\n /* istanbul ignore else */\n if (this.report_data) {\n const date = new DateTZ({ date: this.start_date });\n this.report_data.downloadCSV(\n `${this.report.name.split(' ').join('_').toLowerCase()}+${date.formatDate(\n 'yyyy-MM-dd'\n )}.csv`\n );\n }\n }\n}\n","
\n
\n
\n \n \n \n
\n
to
\n
\n \n \n
\n
\n
\n 1\">\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
\n {{\n report_data ? 'No entries for selected date' : 'Press generate above to view report'\n }}\n
\n
\n
\n\n
\n
\n \n
\n
Loading report...
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ReportDetails } from '../reports.component';\n\n\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'newlineToBR',\n pure: true // Set pure to true to ensure it's a stateless pipe\n})\nexport class NewlineToBRPipe implements PipeTransform {\n transform(value: string): string {\n if (typeof value !== 'string' || !value.includes('\\n')) {\n // If the value is not a string or doesn't contain newline characters, return it as is\n return value;\n }\n return value.replace(/\\n/g, '
').replace(/\\s/g, \"\\u00A0\");\n }\n}\n\n@Component({\n selector: 'a-report-table',\n templateUrl: './report-table.component.html',\n styleUrls: ['./report-table.component.scss'],\n})\nexport class ReportTableComponent implements OnChanges {\n /** List of report table data */\n @Input() public list: HashMap[] = [];\n /** Map of details for report */\n @Input() public details: ReportDetails;\n\n public fields: string[] = [];\n public sortField: string = '';\n public sortOrder: 'asc' | 'desc' = 'asc';\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.list && this.list && this.list.length) {\n this.fields = Object.keys(this.list[0]).filter(i => this.details.hide_fields.indexOf(i) < 0);\n }\n }\n\n public toggleSort(field: string) {\n if (this.isSortingDisabled(field)) {\n return; // Disable sorting for specific fields\n }\n\n if (this.sortField === field) {\n this.sortOrder = this.sortOrder === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortField = field;\n this.sortOrder = 'asc';\n }\n\n this.sortTable(field);\n }\n\n private sortTable(field: string) {\n const sortedList = [...this.list].sort((a, b) => {\n let aValue = a[field];\n let bValue = b[field];\n\n const dateWithTimeRegex = /\\d{1,2} \\w{3,4} \\d{4} -\\s+\\d{1,2}:\\d{2} (AM|PM)/;\n\n if (\n typeof aValue === 'string' &&\n dateWithTimeRegex.test(aValue) &&\n typeof bValue === 'string' &&\n dateWithTimeRegex.test(bValue)\n ) {\n aValue = this.parseDateString(aValue);\n bValue = this.parseDateString(bValue);\n }\n\n if (aValue < bValue) {\n return this.sortOrder === 'asc' ? -1 : 1;\n } else if (aValue > bValue) {\n return this.sortOrder === 'asc' ? 1 : -1;\n } else {\n return 0;\n }\n });\n\n this.list = sortedList;\n }\n\n private parseDateString(dateString: string): Date {\n const [datePart, timePart] = dateString.split(' - ');\n const formattedDate = `${datePart} ${timePart}`;\n return new Date(formattedDate);\n }\n\n public isSortingDisabled(field: string): boolean {\n // Disable sorting for specific fields\n const disabledFields = ['recurr', 'cancelled_by', 'all_day'];\n return disabledFields.includes(field);\n }\n}\n","\n \n \n \n \n \n \n\n \n \n
\n {{ key | replace }} \n \n \"Unsorted\"\n \"Ascending\"\n \"Descending\"\n \n \n {{ element[key] }}\n \n \n \n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { ApplicationIcon, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ReportDetails {\n /** ID associated with the report */\n id: string;\n /** Name of the report */\n name: string;\n /** Shortened name of the report */\n short_name: string;\n /** More details about the report */\n description: string;\n /** Fields to hide on the UI */\n hide_fields: string[];\n /** Icon to display for report */\n icon: ApplicationIcon;\n /** Multiselect Locations */\n multi_locations: boolean;\n}\n\n@Component({\n selector: 'a-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss'],\n})\nexport class ReportsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active report */\n public active_report: string;\n\n public has_access: boolean;\n\n public location: any;\n\n /** List of available reports to display */\n public reports: ReportDetails[] = [\n {\n id: 'bookings',\n name: 'Aggregate Bookings Report',\n short_name: 'Bookings',\n description: 'Generate comprehensive reports on various aspects of bookings',\n hide_fields: ['room_email'],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: false,\n },\n {\n id: 'catering',\n name: 'Aggregate Charge Back Report',\n short_name: 'Catering',\n description: 'View confirmed catering report or mark up unconfirmed catering',\n hide_fields: ['room_email'],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'audit',\n name: 'Audit',\n short_name: 'audit',\n description: '',\n hide_fields: [],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: true,\n }\n ];\n\n public get the_report(): ReportDetails {\n return this.reports.find((report) => report.id === this.active_report);\n }\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Reports';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('report')) {\n this.active_report = params.get('report');\n }\n })\n );\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.location = this._org.building;\n this.has_access = building ? true : false;\n\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n }\n })\n );\n });\n }\n\n public updateReport() {\n this._router.navigate(['/reports', this.active_report]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public onLocationChanged(location: any) {\n this.location = location;\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n this._router.navigate([`/reports/${this.active_report}`]);\n } else {\n // add day view to reports array\n this.reports = [\n ...this.reports,\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n ];\n }\n }\n}\n","
\n \n
\n \n
\n
\n
\n 1\" appearance=\"outline\">\n \n \n {{ report.name }}\n \n \n \n
\n
\n
\n \n
\n
\n \n
\n

{{ report.short_name }}

\n
\n
{{ report.description }}
\n \n
\n
\n \n
\n
\n
\n
\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Route, RouterModule } from '@angular/router';\n\nimport { ReportsComponent } from './reports.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { ReportDisplayComponent } from './report-display/report-display.component';\nimport { ReportTableComponent, NewlineToBRPipe} from './report-table/report-table.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: ReportsComponent },\n { path: ':report', component: ReportsComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [ReportsComponent, ReportDisplayComponent, ReportTableComponent, NewlineToBRPipe],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule]\n})\nexport class ReportsModule { }\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-bulk-qr-overlay',\n templateUrl: './bulk-qr-overlay.component.html',\n styleUrls: ['./bulk-qr-overlay.component.scss'],\n})\nexport class BulkQrOverlayComponent implements OnInit {\n @Input() itemsCheckboxes: any[];\n @Input() qrCodeUrls: any[];\n @Output() selectItemChange: EventEmitter = new EventEmitter();\n @Output() selectAllChange: EventEmitter = new EventEmitter();\n @Input() isOpen: boolean;\n @Input() selectAll: boolean;\n @Output() downloadQrCodeRequested: EventEmitter = new EventEmitter();\n @Output() cancelClick: EventEmitter = new EventEmitter();\n @Input() newArr: any[];\n @Input() allLevels: any;\n @Output() qrCodeUrlsChange: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public onSubmit(str: string) {\n this.qrCodeUrlsChange.emit(this.qrCodeUrls); // Emit the updated qrCodeUrls array\n this.downloadQrCodeRequested.emit();\n if (str === 'room') {\n this.qrTabClick({ index: 0 });\n } else if (str === 'level') {\n this.qrTabClick({ index: 1 });\n }\n }\n\n public onCancel(str: string) {\n // Handle cancel button logic for rooms here (reset the form)\n if (str === 'level') {\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...{ checked: false }, ...{ isLevel: false } };\n });\n }\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.selectAll = false;\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.cancelClick.emit();\n }\n\n public onSelectAllChange(str: string) {\n for (const checkbox of this.itemsCheckboxes) {\n checkbox.checked = this.selectAll;\n }\n if (str === 'room') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, roomname, level }) => ({\n url: window.location.origin + '/staff/#/home?id=' + id,\n roomname: roomname,\n level: level\n }));\n } else if (str === 'level') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, building_id, name }) => ({\n url: window.location.origin + '/staff/#/home?zone_id=' + building_id + '&floor=' + id,\n name: name,\n }));\n }\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n\n public onSelectItemChange(e: any, item: any) {\n if (e.checked && !item.isLevel) {\n //If room selected, push it to qrCodeUrls array\n let checkedRoomObj = {\n url: window.location.origin + '/staff/#/home?id=' + item.id,\n roomname: item.roomname,\n level: item.level,\n };\n this.qrCodeUrls.push(checkedRoomObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else if (e.checked && item.isLevel) {\n //If levels selected, push it to qrCodeUrls array\n let checkedLevelObj = {\n url:\n window.location.origin +\n '/staff/#/home?zone_id=' +\n item.building_id +\n '&floor=' +\n item.id,\n name: item.name,\n };\n this.qrCodeUrls.push(checkedLevelObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else {\n // If unselected, find the index of the checked Obj in qrCodeUrls array based on room/level name\n const index = item.isLevel\n ? this.qrCodeUrls.findIndex((obj) => obj.name === item.name)\n : this.qrCodeUrls.findIndex((obj) => obj.roomname === item.roomname);\n // If the object is found, remove it from the array using splice\n if (index !== -1) {\n this.qrCodeUrls.splice(index, 1);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n }\n }\n\n isAnyItemSelected(): boolean {\n return this.itemsCheckboxes.some((checkbox) => checkbox.checked);\n }\n\n public qrTabClick(e: any) {\n let checkedFlag = { checked: false };\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.itemsCheckboxes = [];\n this.selectAll = false;\n\n if (e.index === 0) {\n //rooms tab\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: false } };\n });\n } else if (e.index === 1) {\n //levels tab\n Object.assign(this.itemsCheckboxes, this.allLevels);\n this.itemsCheckboxes = this.itemsCheckboxes.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: true } };\n });\n }\n }\n}\n","\n
Print QR codes
\n\n\n \n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n Inject,\n} from '@angular/core';\nimport { BaseDirective, DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService, OrganisationService, SpacesService } from '@mckinsey-converge/data-common';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ResizeService, ReadLocalPicService } from '../services/';\nimport { RequiredFileType, RoomPhotoDiamension } from '../util/room-admin-utility';\nimport { HttpEventType, HttpHeaders, HttpClient} from '@angular/common/http';\nimport * as cloneDeep from 'lodash/cloneDeep';\n// import { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\nimport { of, Observable, forkJoin } from \"rxjs\";\nimport { catchError, tap, toArray } from 'rxjs/operators';\nimport { ComposerService } from '@placeos/composer';\nimport { IconComponent } from '@mckinsey-converge/legacy-ui';\n\n@Component({\n selector: 'app-manage-photos',\n templateUrl: './manage-photos.component.html',\n styleUrls: ['./manage-photos.component.scss'],\n\t\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManagePhotosComponent extends BaseDirective implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n\n\t\t public canvas: HTMLCanvasElement;\n\t\t public context: any;\n\t\t public imageInitial = null;\n\t\t public imageToModify = null;\n\n\t\t public photoArray: Array = []; // array hold images to display (uploaded or to be upload)\n\t\t public photoUploadArray: Array = []; // array hold image to upload\n\n\t\t public uploadProgress:number;\n\t\t public uploadError: boolean = false;\n\t\t public uploadingStatus: string = 'Uploading...';\n\t\t public room: any;\n\t\t public resizedFiles = [];\n\t\t public requiredFileType = RequiredFileType;\n\t\t public count: any = 0;\n\t\t public total: number = 0;\n\t\t public failedNo: string;\n\t\t// isImageToModify: boolean;\n\n\n constructor(\n\t\t\tprivate _composer: ComposerService,\n\t\t\t@Inject(MAT_DIALOG_DATA) private _data: any,\n\t\t\tpublic resizeService: ResizeService,\n\t\t\tprivate readLocalPicService: ReadLocalPicService,\n\t\t\tprivate _spaces: SpacesService,\n\t\t\tprivate cdRef: ChangeDetectorRef,\n\t\t\tprivate _service: ApplicationService,\n\t\t\tprivate httpClient?: HttpClient,\n\t\t\t) {\n\t\t\tsuper();\n }\n \n\n public ngOnInit() {\n \tthis.photoArray = cloneDeep(this._data?.photos);\n\t\tthis.room = this._data?.room\n }\n\n\t\t\n\n\t\tpublic\tonFileSelected (event , indexToReplace?) {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.context = this.canvas.getContext('2d');\n\t\t\tconst ext = RequiredFileType.split(',');\n\t\t\tconst files = event instanceof Array ? event : [...new Set(event.target.files)].filter((f:File) => ext.includes(f.type));\n\t\t\tconst unusedIdx = indexToReplace!==undefined ? 1 : (3 - this.photoArray.length);\n\t\t\tfiles.splice(0,unusedIdx).forEach( file => {\n\n\t\t\t\tthis.readLocalPicService.readFileInput(file).then((base64Img) => {\n\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\tasync function (that) {\n\n\t\t\t\t\t\t\tawait that.resizeService.resizeImage(base64Img, {width: RoomPhotoDiamension.width, height: RoomPhotoDiamension.height, outputFormat: 'image/png', })\n\t\t\t\t\t\t\t\t\t\t.then(function (imgResized) {\n\n\t\t\t\t\t\t\t\t\t\t\tthat.resizeService.createImage(imgResized).then(function (image) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.clearRect(0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.width = image.width;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.height = image.height;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.drawImage( image, 0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement = that.canvas.toDataURL('image/png');\n\t\t\t\t\t\t\t\t\t\t\t\tif(indexToReplace!==undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst index = that.photoArray.length+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tthat.cdRef.detectChanges();\n\n\t\t\t\t\t\t\t\t\t\t\t\t// indexToReplace!==undefined ? that.photoArray.splice(indexToReplace, 1, { path : dataURL} ) : that.photoArray.push({ path: dataURL });\n\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while creating image : ', error);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while resizing image : ', error);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}, 0, this );\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.log('ERROR while Read local pic :', error);\n\t\t\t\t});\n\n\t\t\t})\n\n\t\t}\n\n\n\t\tupload() {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.uploadProgress = 1;\n\t\t\tlet obs: Observable[] = [];\n\t\t\tthis.count = 0;\n\t\t\tthis.total = this.photoUploadArray.length;\n\t\t\t\n\t\t\t// for (var i = 0; i < this.photoUploadArray.length; i++)\n\t\t\tthis.photoUploadArray.forEach(( img, i) =>{ \n\t\t\t\tconst formData = new FormData();\n\t\t\t\tconst file = this.readLocalPicService.b64toFile(img.path);\n\n\t\t\t\tformData.append( \"file\", file, `${this.room.email.split('@')[0]}-part-${img.index}.png`);\n\t\t\t\t\n\t\t\t\tobs.push(this.uploadSpacePhotos('photos', formData).pipe( catchError(err => of(err.status))) ) ;\n\n\t\t\t}) \n\n\t\t\t\n\n\t\t\tthis.subscription(`uploadPhotosSub$`, forkJoin(obs.map(o => o.pipe( \n\t\t\t\t\ttap(item => this.updateProgressMeter(item)), \n\t\t\t\t\t// toArray() \n\t\t\t\t)))\n\t\t\t\t.subscribe(event => {\n\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tevent.forEach((res ,i ) => {\n\t\t\t\t\t\t\t\tif(res?.message === 'File uploaded successfully!') {\n\n\t\t\t\t\t\t\t\t\tthis.uploadError = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tconst suffixes = ['', 'st','nd','rd'];\n\t\t\t\t\t\t\t\t\tthis.failedNo = `${i+1}${suffixes[i+1]}`;\n\t\t\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(i === (this.photoUploadArray.length-1)) {\n\t\t\t\t\t\t\t\t\tthis.photoUploadArray = [];\n\t\t\t\t\t\t\t\t\tthis.uploadingStatus = 'Complete';\n\t\t\t\t\t\t\t\t\tthis.event.emit(this._data.photos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror => {\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\tconsole.log('Error while uploadig room photos: ', error) ;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tprivate updateProgressMeter(item) {\n\t\t\tif(item?.message === 'File uploaded successfully!') {\n\t\t\t\tthis.count++;\n\t\t\t\tthis.uploadProgress = this.total > 0 ? Math.round((this.count / this.total) * 100) : 0;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t}\n\t\t}\n\t\n\t\n\t\treset() {\n\t\t\tthis.uploadProgress = null;\n\t\t\tthis.cdRef.detectChanges();\n\t\t}\n\n\t\tpublic timestamp (photo) {\n\t\t\treturn photo?.index ? '' : `?${(new Date()).getTime()}`;\n\t\t}\n\n\n\t\t/**\n\t\t * update function version -2 - returns observable instead of promise...\n\t\t * @param form_data data to be update \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\t public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/${apiSubRoute}`;\n\t\t\tconst body = form_data;\n\t\n\t\t\tconst token = this._composer.auth.token; //sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n\n\t\tpublic deletePhoto(i: number) {\n\t\t\tconst index = this.photoArray[i].index;\n\t\t\tconst photoName = index ? `${this.room.email.split('@')[0]}-part-${index}.png` : this.photoArray[i].path.split('rooms/')[1];\n\n\t\t\tthis.photoArray.splice(i, 1); \n\t\t\tthis.photoUploadArray.splice(i, 1);\n\n\t\t\tthis.deleteSpacePhotos(i, false, {photo_name: [ photoName ]}).subscribe( val => {\n\t\t\t\tconsole.log(val);\n\t\t\t\tthis._service.notifySuccess('Successfully deleted!');\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tconsole.log('Error while deleting room photos: ', error) ;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t}\n\n\n\t\t/**\n\t\t * \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\tpublic deleteSpacePhotos(index: number, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/delete`;\n\t\t\tconst body = query_params;\n\t\n\t\t\tconst token = this._composer.auth.token; \n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n}\n","
\n
\n
{{ room?.roomname }}
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n
\n\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Selected photos ({{ photoArray.length }}/3)\n\t\t\t\t\tRequired photo parameters: landscape orientation, W 400x H 225 pixels, format PNG or WEBP\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tRoom photo #{{i+1}}\n\t\t\t\t\t\t{{ room.email.split('@')[0] }}-part-{{i+1}}.png \n\t\t\t\t\t\tRatio: 400x225\n\t\t\t\t\t
\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\tDrag & drop or\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{uploadingStatus}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{failedNo}} Photo failed to upload successfully. Please try again.\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n \n
","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RoomAdminComponent } from './room-admin.component';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\n\nconst routes: Routes = [\n { path: '',\n children: [\n { path: '', component: RoomAdminComponent },\n {\n path: 'room-details', \n component: RoomDetailsWrapperComponent\n }\n ]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class RoomAdminRoutingModule { }\n\n\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n DEFAULT_BOOKING_DURATION,\n rulesForSpace,\n SpacesService,\n User,\n} from '@mckinsey-converge/data-common';\nimport {\n OrganisationService,\n ApplicationService,\n BuildingLevel,\n} from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { first, take } from 'rxjs/operators';\nimport { Identity, BaseDirective, closestToTimeSlotTz } from '@mckinsey-converge/base';\nimport { Store } from '@ngrx/store';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { RoomAdminService } from './services/room-admin.service';\nimport jsPDF, { RGBAData } from 'jspdf';\nimport { Hash } from 'crypto';\n\n@Component({\n selector: 'app-room-admin',\n templateUrl: './room-admin.component.html',\n styleUrls: ['./room-admin.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomAdminComponent extends BaseDirective implements OnInit {\n public spaces: Space[] = [];\n public newArr: any[];\n public location: string;\n public isOpen = false;\n\n public itemsCheckboxes = [\n {\n label: '',\n checked: false,\n id: '',\n building_id: '',\n name: '',\n email: '',\n roomname: '',\n isLevel: false,\n },\n ];\n\n public qrCodeUrls = [];\n\n public selectAll: boolean = false;\n\n public allLevels: any; //need this for populating levels in bulk-qr-overlay component\n\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n\n /** ID of the active level */\n @Input() public level: string;\n\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n /** ID of the currently selected level */\n public active_level = '';\n\n /** List of legend keys to show */\n public legend_list: string[] = [];\n\n /** List of available legend keys */\n public readonly legend_keys: readonly Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true },\n ];\n\n public detailsViewIndex = 0;\n\n public rowInfo = [];\n\n public has_access: boolean;\n currentUser: User;\n public enableOverlay = false;\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _router: Router,\n private _booking_state_service: BookingStateService,\n private store: Store,\n private cdref: ChangeDetectorRef,\n private roomAdminService: RoomAdminService\n ) {\n super();\n }\n\n public eventFromChild(data: number) {\n this.detailsViewIndex = data;\n }\n\n public passRowToDetailsView(data: []) {\n this.rowInfo = data;\n }\n\n public returnToRoomAdmin(data: number) {\n this.detailsViewIndex = data;\n this.updatePayload();\n this.cdref.detectChanges();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Room Administration';\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.updateLevel();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(\n building.levels\n );\n this.levels.sort((a, b) =>\n b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n })\n );\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n this._org.space_types\n );\n })\n );\n });\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.enableOverlay = true;\n this._spaces.queryRooms({zone_ids: this._org.building.id }).subscribe(\n (res) => {\n const list = res.map((i) => this._spaces.process(i));\n this._router.navigate(['/room-admin']);\n this.detailsViewIndex = 0;\n this.updatePayload([...list]);\n });\n }\n\n public updatePayload(spaces?) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n /** TO DO : remove _space.filter use */\n this.spaces = spaces ? [...spaces] : this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.location = this._org.building.name;\n const roomDataSource = [];\n for (let i = 0; i < this.spaces.length; i++) {\n if (this.spaces[i].map_id) {\n\n roomDataSource.push({\n roomname: this.spaces[i].local_name,\n roomnum: this.spaces[i].map_id,\n level: this.spaces[i].level.short_name,\n capacity: this.spaces[i].capacity,\n roomtype: this.spaces[i].internal_or_external,\n bookable: this.spaces[i].bookable,\n settings: this.spaces[i].settings,\n equipment: this.spaces[i]?.equipment,\n room_style: this.spaces[i]?.room_style,\n email: this.spaces[i].email,\n roomobject: this.spaces[i],\n id: this.spaces[i].id,\n building: this.spaces[i].building,\n });\n }\n }\n\n this.newArr = [...roomDataSource]; // to make sure tabe is up to date\n\n let checkedFlag = { checked: false };\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag };\n });\n this.allLevels = this._org.building.levels;\n this.enableOverlay = false;\n this.cdref.detectChanges();\n }\n\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public bg_click_close() {\n this.isOpen = false;\n this.qrCodeUrls = [];\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.cdref.detectChanges();\n }\n\n public onQrCodeUrlsChange(newUrls: any[]) {\n this.qrCodeUrls = newUrls;\n }\n\n public downloadQrCode() {\n /**\n * Use the same array of selected rooms/levels for qr code to iterate\n */\n this.roomAdminService.doc = new jsPDF();\n let isRoom: boolean;\n this.qrCodeUrls.forEach((item, i) => {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector(`.qr-code${i} img`);\n let imageData: any = null;\n if (item.roomname) {\n isRoom = true;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.roomname, false, item.level); // roomname should be room name for rooms or [Level ] for levels\n } else if (item.name) {\n isRoom = false;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.name, true, ''); // roomname should be room name for rooms or [Level ] for levels\n }\n // Add generated qr code image to the pdf\n switch ((i + 1) % 4) {\n case 1:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n break;\n case 2:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 5, 100, 100);\n break;\n case 3:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 130, 100, 100);\n break;\n case 0:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 130, 100, 100);\n this.roomAdminService.doc.addPage();\n break;\n }\n });\n this.roomAdminService.doc.save(`${this.location} - ${isRoom ? `rooms.pdf` : `levels.pdf`}`);\n }\n}\n","
\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n

Room Administration

\n
\n
\n
\n
\n
\n
\n

Showing {{ this.location }} Rooms ({{ newArr?.length }})

\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n \n
\n
\n\n
\n\t\n
\n\n
\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RoomAdminRoutingModule } from './room-admin-routing.module';\nimport { RoomAdminComponent } from './room-admin.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { RoomsTableComponent } from './rooms-table/rooms-table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { RoomDetailsComponent } from './room-details/room-details.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { QRCodeModule } from 'angularx-qrcode';\nimport { OverlayModule} from '@angular/cdk/overlay';\nimport { MatTabsModule} from '@angular/material/tabs';\nimport { RoomAdminService } from './services/room-admin.service';\nimport { BulkQrOverlayComponent } from './bulk-qr-overlay/bulk-qr-overlay.component';\nimport { IconComponent, LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\nimport { ManagePhotosComponent } from './manage-photos/manage-photos.component';\nimport { ResizeService, ReadLocalPicService } from './services/';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { ComposerModule } from '@placeos/composer';\nimport { FileDragNDropDirective } from './util/file-drag-n-drop.directive';\n\n\n\n@NgModule({\n declarations: [RoomAdminComponent, RoomsTableComponent, RoomDetailsComponent, RoomDetailsWrapperComponent, BulkQrOverlayComponent, ManagePhotosComponent, FileDragNDropDirective],\n imports: [\n CommonModule,\n RoomAdminRoutingModule,\n SharedContentModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatExpansionModule,\n FormsModule,\n ReactiveFormsModule,\n MatSnackBarModule,\n QRCodeModule,\n LegacyUiModule,\n OverlayModule,\n MatTabsModule,\n UiModule,\n LegacyOverlaysModule,\n MatProgressBarModule,\n ComposerModule\n ],\n providers: [\n ResizeService,\n ReadLocalPicService,\n RoomAdminService\n ],\n})\nexport class RoomAdminModule { }\n","import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'room-details-wrapper',\n template: `\n
\n \n \n
\n
\n
\n
\n \n
\n

Room Administration > Room Detail

\n

Room detail

\n
\n
\n
\n
\n \n
\n
\n
\n `,\n styleUrls: ['./room-details-wrapper.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsWrapperComponent implements OnInit {\n public rowInfo: any;\n \n\n\n constructor(\n private cd: ChangeDetectorRef,\n private _router: Router,\n ) {\n if(this._router.getCurrentNavigation() !== null && this._router.getCurrentNavigation().extras['state']?.details) {\n this.rowInfo = this._router.getCurrentNavigation().extras['state']?.details;\n }\n else {\n this._router.navigate(['room-admin']);\n }\n }\n\n public ngOnInit(): void {\n this.cd.detectChanges();\n }\n\n public getToRoomList() {\n this._router.navigate(['room-admin'])\n }\n\n}","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { SpacesService, noWhitespaceValidator, OrganisationService, SpaceEquipments, SpaceStyles, setupRoomImages, ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DropdownOpion, CngSelectData } from '@mckinsey-converge/ui';\nimport { roomTypeOptions, roomSubsetOptions, roomVisibilityOptions, canteringAvailabilityOptions, room, RoomSubset } from '../util/room-admin-utility';\nimport jsPDF from 'jspdf';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ManagePhotosComponent } from '../manage-photos/manage-photos.component';\nimport { BaseDirective, DialogEvent, SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n\n\n@Component({\n selector: 'app-room-details',\n templateUrl: './room-details.component.html',\n styleUrls: ['./room-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsComponent extends BaseDirective implements OnInit {\n public reactiveForm: FormGroup;\n public room: room;\n public rowInfoData: any;\n public doc: jsPDF;\n public cityname: string;\n\n public roomTypeDD: CngSelectData;\n public roomSubsetDD: CngSelectData;\n public roomVisibilityDD: CngSelectData;\n public canteringAvailabilityDD: CngSelectData;\n\t\tpublic givenRoomType: any = 'internal';\n\t\tpublic givenRoomSubType: any = 'conference';\n\t\tpublic givenCateringAvailability: any;\n\t\tpublic uploadedPhotos : Array = [];\n\t\tpublic roomSubsetOptions:RoomSubset;\n\n @Input() set rowInfo(value: any) {\n this.rowInfoData = value;\n }\n @Input() set location(value: string) {\n this.cityname = value;\n }\n\n @Output('parentFun') parentFun: EventEmitter = new EventEmitter();\n\t\tpublic loadImages = new BehaviorSubject([]);\n\n public disableButtons = false;\n public enableOverlay = false;\n public windowLocation = location;\n\n\t// Set to a config once we know where the files are hosted.\n public rootFolderURL = 'assets/img/rooms/';\n\t\tpublic foundImages: SpaceImageObject[] = [];\n\t\tpublic roomImages: SpaceImageObject[] = [];\n\n\n\t\tpublic get roomImagesFileSlug(): string {\n\t\t\treturn this.rowInfoData.email.split('@')[0];\n\t\t}\n\n constructor(\n private _spaces: SpacesService,\n private cd: ChangeDetectorRef,\n private _snackBar: MatSnackBar,\n private _router: Router,\n\t\tprivate _dialog: MatDialog,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _org:OrganisationService,\n\t\tprivate _service: ApplicationService,\n ) {\n\t\t\t\tsuper();\n this.room = {} as room;\n }\n\n public ngOnInit(): void {\n this.doc = new jsPDF();\n history.pushState({}, '');\n\n this.cityname = this?.rowInfoData?.building?.city;\n\n\t\t\t\tconst internalSubSet: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('internal_room_types');\n\t\t\t\tconst externalSubset: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('external_room_types');\n\t\t\t\tthis.roomSubsetOptions = {internal: internalSubSet, external: externalSubset};\n\n\t\t\t\tconst internal_or_external = this.rowInfoData?.roomobject?.internal_or_external; // ( this.rowInfoData?.roomobject?.filters?.external ? 'external' : 'internal') || this.rowInfoData?.settings;\n\n\t\t\t\tif(internal_or_external) {\n\t\t\t\t\tthis.givenRoomType = typeof(internal_or_external) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof(internal_or_external.value) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: internal_or_external.value.value; // temporary fix\n\t\t\t\t}\n\t\t\t\tconst roomSubType = this.rowInfoData?.roomobject?.room_type;\n\t\t\t\tthis.givenRoomSubType = Array.isArray(roomSubType) && roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? roomSubType[0]\n\t\t\t\t\t\t\t\t\t\t: Array.isArray(roomSubType) && !roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? 'conference'\n\t\t\t\t\t\t\t\t\t\t: roomSubType || 'conference';\n\t\t\t\tthis.givenCateringAvailability = this.rowInfoData?.roomobject?.filters?.catering ? 'yes-onsite' : 'no';\n\n\n\t\t\t\tthis.rowInfoData && this.setAllDropdowns(this.rowInfoData);\n\n\n this.reactiveForm = new FormGroup({\n\n roomname: new FormControl(this.rowInfoData.roomname, [\n Validators.required,\n Validators.maxLength(250),\n Validators.minLength(1),\n Validators.pattern('[^=`~!#$%*{};\\'\"]*'),\n noWhitespaceValidator,\n ]),\n\n city: new FormControl({ value: this.cityname, disabled: true }, []),\n level: new FormControl({ value: this.rowInfoData.level, disabled: true }, []),\n roomnumber: new FormControl({ value: this.rowInfoData.roomnum, disabled: true }, []),\n\n\n\n\n internal_or_external: new FormControl( this.givenRoomType , []),\n\t\t\t\t\t\troom_type: new FormControl( this.givenRoomSubType, [] ),\n\n capacity: new FormControl(this.rowInfoData.capacity.toString(), [\n Validators.required,\n Validators.maxLength(250),\n Validators.pattern(/^(?!0+$)[0-9]{1,10}$/),\n ]),\n\n\n roomvisibility: new FormControl(this.rowInfoData.bookable),\n\t\t\t\t\t\tcatering: new FormControl(this.rowInfoData?.roomobject?.filters?.catering || false),\n\n\t\t\t\t\t\t// equipment_code === booking charge code ! if possible change equipment_code key to booking_charge_code\n\t\t\t\t\t\tequipment_code: new FormControl( this.rowInfoData?.roomobject?.filters?.equipment_code || false), // || this.rowInfoData?.settings['equipment_code']\n\t\t\t\t\t\tcharge_code: new FormControl(this.rowInfoData?.roomobject?.filters?.charge_code || false), // || this.rowInfoData.settings.charge_code\n\n vc: new FormControl(this.isFeatureChecked('vc')),\n conference_phone: new FormControl(this.isFeatureChecked('conference_phone')),\n wireless_content_sharing: new FormControl( this.isFeatureChecked('wireless_content_sharing')),\n flipchart: new FormControl(this.isFeatureChecked('flipchart')),\n glassboard: new FormControl(this.isFeatureChecked('glassboard')),\n whiteboard: new FormControl(this.isFeatureChecked('whiteboard')),\n natural_light: new FormControl(this.isFeatureChecked('natural_light')),\n boardroom: new FormControl(this.isFeatureChecked('boardroom')),\n cocktail: new FormControl(this.isFeatureChecked('cocktail')),\n theatre: new FormControl(this.isFeatureChecked('theatre')),\n workshop: new FormControl(this.isFeatureChecked('workshop')),\n u_shape: new FormControl(this.isFeatureChecked('u_shape')),\n miscellaneous: new FormControl(this.isFeatureChecked('miscellaneous')),\n });\n\n\n\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\n\t\t\t\t\tthis.subscription(\n\t\t\t\t\t\t'found_images',\n\t\t\t\t\t\tthis.loadImages.subscribe((imgArr: SpaceImageObject[]) => {\n\t\t\t\t\t\t\tthis.roomImages = imgArr;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}));\n\n }\n\n\n\n public isFeatureChecked(param: string) {\n switch (param) {\n case 'vc': {\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData.roomobject['filters']?.vc;\n }\n case 'natural_light': {\n return this.rowInfoData.roomobject['filters']?.natural_light; // || this.rowInfoData['settings']?.natural_light;\n }\n default: {\n // const { extra_features } = this.rowInfoData['settings'];\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData['room_style']?.includes(param); //extra_features && extra_features?.includes(param) ||\n }\n }\n }\n\n get capacity() {\n\t\t\treturn this.reactiveForm.get('capacity');\n }\n\n get roomname() {\n\t\t\treturn this.reactiveForm.get('roomname');\n }\n\n public onSubmit(formValue: any) {\n\t\t\tlet roomObject = Object.assign({}, this.rowInfoData.roomobject);\n\n\t\t\tconst allowed_keys = [\n\t\t\t\t\t'edge_id',\n\t\t\t\t\t'name',\n\t\t\t\t\t'description',\n\t\t\t\t\t'email',\n\t\t\t\t\t'equipment',\n\t\t\t\t\t'capacity',\n\t\t\t\t\t'filters',\n\t\t\t\t\t'features',\n\t\t\t\t\t'bookable',\n\t\t\t\t\t'installed_ui_devices',\n\t\t\t\t\t'zones',\n\t\t\t\t\t'modules',\n\t\t\t\t\t'room_type',\n\t\t\t\t\t'room_style',\n\t\t\t\t\t'settings',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'support_url',\n\t\t\t\t\t'version',\n\t\t\t\t\t'id',\n\t\t\t];\n\n\t\t\t// this is to filter unwanted keys and make the request body match room model\n\t\t\troomObject = Object.keys(roomObject)\n\t\t\t\t\t.filter((key) => allowed_keys.includes(key))\n\t\t\t\t\t.reduce((obj, key) => {\n\t\t\t\t\t\t\tobj[key] = roomObject[key];\n\t\t\t\t\t\t\treturn obj;\n\t\t\t\t\t}, {});\n\n\n\t\t\t// roomObject.settings.room_name = formValue.roomname;\n\t\t\troomObject.simple_name = formValue.roomname;\n\n\t\t\tif(formValue.internal_or_external) {\n\t\t\t\t// roomObject.settings.internal_or_external = formValue.internal_or_external;\n\t\t\t\troomObject.filters['external'] = formValue.internal_or_external === 'external';\n\t\t\t}\n\t\t\troomObject.room_type = formValue.room_type;\n\t\t\troomObject.capacity = parseInt(formValue.capacity);\n\n\t\t\troomObject.bookable = formValue.roomvisibility;\n\t\t\t// roomObject.settings['equipment_code'] = formValue.equipment_code;\n\t\t\troomObject.filters['equipment_code'] = formValue.equipment_code;\n\n\t\t\t// roomObject.settings['catering'] = formValue.catering\n\t\t\troomObject.filters['catering'] = formValue.catering;\n\t\t\t// roomObject.settings['charge_code'] = formValue.charge_code;\n\t\t\troomObject.filters['charge_code'] = formValue.charge_code;\n\n\n\n\t\t\t// roomObject.features = getExtraFeatures();\n\t\t\t// roomObject.settings.extra_features = getExtraFeatures();\n\t\t\troomObject.filters.vc = formValue.vc;\n\t\t\t// roomObject.settings.vc = formValue.vc;\n\t\t\t// roomObject.settings.natural_light = formValue.natural_light;\n\t\t\troomObject.filters['natural_light'] = formValue.natural_light;\n\t\t\tgetExtraFeatures();\n\n\t\t\tfunction getExtraFeatures() {\n\t\t\t\t\tconst excludeFromExtraFeatures = ['capacity','charge_code','internal_or_external', 'roomvisibility', 'roomname', 'equipment_code', 'catering', 'room_type'];\n\t\t\t\t\t// let features = '';\n\n\t\t\t\t\tObject.keys(formValue).forEach((element) => {\n\t\t\t\t\t\t\tconst isEqAndDetail = formValue[element];\n\t\t\t\t\t\t\t// console.log(SpaceEquipments[element]);\n\t\t\t\t\t\t\tif (!excludeFromExtraFeatures.includes(element) && isEqAndDetail) {\n\t\t\t\t\t\t\t\t\t// features += ` ${element}`;\n\n\t\t\t\t\t\t\t\t\tif(SpaceEquipments[element]!==undefined && !roomObject?.equipment.includes(element) ) {\n\t\t\t\t\t\t\t\t\t\troomObject?.equipment.push(element);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t else if( SpaceStyles[element]!==undefined && !roomObject?.room_style.includes(element) ){\n\t\t\t\t\t\t\t\t\t\t roomObject.room_style.push(element);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t} else if(!isEqAndDetail) {\n\t\t\t\t\t\t\t\t// roomObject.features = roomObject.features.replace(element, '');\n\t\t\t\t\t\t\t\troomObject.equipment = SpaceEquipments[element]!==undefined ? roomObject.equipment.filter((value)=>value!=element) : roomObject.equipment;\n\t\t\t\t\t\t\t\troomObject.room_style = SpaceStyles[element]!==undefined ? roomObject.room_style.filter((value)=>value!=element) : roomObject.room_style;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// return features;\n\t\t\t}\n\n\t\t\tconst body = roomObject;\n\n\t\t\tif (this.reactiveForm.invalid) {\n\t\t\t\t\tfor (const control of Object.keys(this.reactiveForm.controls)) {\n\t\t\t\t\t\t\tthis.reactiveForm.controls[control].markAsTouched();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\tthis.disableButtons = true;\n\t\t\t\t\tthis.enableOverlay = true;\n\n\t\t\t\t\tthis._spaces.updateSpace(this.rowInfoData.id, body).subscribe(\n\t\t\t\t\t\t\t(data: any) => {\n\t\t\t\t\t\t\t\t\tthis.updateAllRooms(); // TO DO: this call enabled to pull all updated rooms to use on day/week view, In future remove this call here and day/week view should handle it there\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.reactiveForm.markAsPristine();\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t\t\tthis._service.notifySuccess('Operation Successful!');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\t\t\t\tthis._service.notifyError('There was an error');\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.room = this.reactiveForm.value;\n }\n\n public updateAllRooms(): void {\n\t\t // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n\t\t const option = {\n zone_ids: this._org.building.id\n }\n this._spaces.query(option, true).then(() => { }).catch(() => {});\n }\n\n public onCancel() {\n\t\t\tthis._router.navigate(['room-admin']);\n }\n\n\n\n\n\t\tpublic setAllDropdowns(rowInfoData) {\n\t\t\t// const {internal_or_external} = rowInfoData?.settings;\n\t\t\t// const roomType = typeof(internal_or_external) === 'string' ? internal_or_external : internal_or_external.value;\n\n\t\t\tthis.roomTypeDD = {\n\t\t\t\tddBoxClass: 'room-type',\n\t\t\t\toptions: roomTypeOptions,\n\t\t\t\tdefaultSelected: roomTypeOptions.filter(el => el.value === this.givenRoomType )[0],\n\t\t\t\tonChangeCallback: this.roomTypeChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomSubsetDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'room-subset',\n\t\t\t\t\toptions: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()],\n\t\t\t\t\tdefaultSelected: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()].filter(el => el.value === this.givenRoomSubType )[0],\n\t\t\t\t\tonChangeCallback: this.roomTypeSubsetChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomVisibilityDD = {\n\t\t\t\t\tddBoxClass: 'room-visibility',\n\t\t\t\t\toptions: roomVisibilityOptions,\n\t\t\t\t\tdefaultSelected: roomVisibilityOptions.filter(el => el.value === rowInfoData?.bookable.toString())[0],\n\t\t\t\t\tonChangeCallback: this.roomVisibilityChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.canteringAvailabilityDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'catering-availability',\n\t\t\t\t\toptions: canteringAvailabilityOptions,\n\t\t\t\t\tdefaultSelected: canteringAvailabilityOptions.filter(el => el.value === this.givenCateringAvailability )[0],\n\t\t\t\t\tonChangeCallback: this.roomCateringChanged.bind(this)\n\t\t\t};\n\t\t}\n\n /**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic roomTypeChanged(type: DropdownOpion) {\n\t\t\tthis.reactiveForm.controls.internal_or_external.setValue(type.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\n\t\t\tif(!this.roomSubsetDD.disabled) {\n\t\t\t\tthis.roomSubsetDD.options = this.roomSubsetOptions[type.value.toString()];\n this.roomSubsetDD.defaultSelected = type.value === this.givenRoomType ? this.roomSubsetDD.options.filter(el => el.value === this.givenRoomSubType )[0] : this.roomSubsetOptions[type.value.toString()][0];\n\t\t\t\tthis.reactiveForm.controls.room_type.setValue(this.roomSubsetDD.defaultSelected.value);\n\t\t\t}\n\t\t\tthis.reactiveForm.markAsDirty();\n\t\t\tthis.cdRef.detectChanges();\n\t}\n\tpublic roomTypeSubsetChanged(subset: DropdownOpion ) {\n\t\t\t// console.log(subset);\n\t\t\tthis.reactiveForm.controls.room_type.setValue(subset.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomVisibilityChanged(visibility: DropdownOpion) {\n\t\tthis.reactiveForm.controls.roomvisibility.setValue(visibility.value==='true');\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomCateringChanged(isCatering: DropdownOpion) {\n\t\tthis.reactiveForm.controls.catering.setValue(!(isCatering.value==='no'));\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img): string | HTMLCanvasElement | HTMLImageElement {\n\t\t\t// TO DO : move to enum/utility file, while room detail more editable field developement\n\t\t\tconst width = 500;\n\t\t\tconst height = 550;\n\t\t\tconst arcY = 300;\n\t\t\tconst arc_X_Center = width/2;\n\t\t\tconst otrRadius = arc_X_Center - 2 ;\n\t\t\tconst whtRadius = otrRadius - 12;\n\t\t\tconst innrRadius = otrRadius - 15;\n\n\t\t\tconst canvas: HTMLCanvasElement = document.createElement('canvas');\n\t\t\tcanvas.setAttribute('width', width.toString());\n\t\t\tcanvas.setAttribute('height', height.toString());\n\t\t\tconst ctx = canvas.getContext('2d');\n\n\t\t\tctx.strokeStyle = \"transparent\";\n\t\t\tctx.moveTo(arc_X_Center, 0);\n\t\t\tctx.lineTo(arc_X_Center, height);\n\t\t\tctx.stroke();\n\n\t\t\tctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.textAlign = \"center\";\n\t\t\tctx.fillText(this.rowInfoData?.roomname , arc_X_Center, 20);\n\n\t\t\t//oputer arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//inner white arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//second inner arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t// header text\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.font = '44px Bower';\n\t\t\tctx.fillText('Book Me', arc_X_Center, 166);\n\n\t\t\t//centeral rectangle\n\t\t\tctx.fillRect(137, 187, 225, 225);\n\t\t\t//fill central rectangle with color\n\t\t\tctx.fillStyle = '#FFFFFF';\n\n\t\t\t// fill text at the bottom\n\t\t\tctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.fillText('in Converge', arc_X_Center, 470);\n\n\t\t\t// draw QR code image into center of canvas\n\t\t\timg !== null && ctx.drawImage(img, 137, 187);\n\n\t\t\t// create data url\n\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement =\n\t\t\tcanvas.toDataURL('image/png');\n\t\t\treturn dataURL;\n }\n\n /**\n * Function downloadQRPdf\n * download generated QR code to the local system\n */\n public downloadQRPdf(roomid?: string): void {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector('.qr-code img');\n let imageData = this.drawCanvas(qrcode);\n // Add generated qr code image to the pdf\n this.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 5, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 3, 130, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 130, 100, 100);\n // this.doc.addImage(imageData, \"JPEG\", 10, 10); // left commented for alignment reference later in future\n // doc.addPage();\n\t\t\t\t// this.openQRInConverge();\n this.doc.save(`${this.rowInfoData.id}.pdf`);\n }\n\n /**\n * Not in use but keeping for future use\n * Function openQRInConverge\n * Open QR code in seperate tab\n */\n public openQRInConverge(): void {\n const qrcode = document.querySelector('.qr-code img');\n const dataURL = this.drawCanvas(qrcode);\n const win = window.open();\n win &&\n win.document.write(\n '
\\\n\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t
'\n );\n }\n\n\t\t/** Open modal for adding equipment requirements to booking */\n\t\tpublic openManagePhotosModal() {\n\t\t\tconst equipment_ref = this._dialog.open(ManagePhotosComponent, {\n\t\t\t\tmaxWidth: '95vw',\n\t\t\t\twidth: '70em',\n\t\t\t\tdata: {\n\t\t\t\t\tphotos: this.roomImages,\n\t\t\t\t\troom: this.rowInfoData\n\t\t\t\t\t}\n\t\t\t});\n\t\t\tthis.subscription(\n\t\t\t\t'equipments_modal_events',\n\t\t\t\tequipment_ref.componentInstance.event.subscribe((event: any) => {\n\t\t\t\t\t/* istanbul ignore else */\n\n\t\t\t\t\t\t// this.uploadedPhotos = event;\n\t\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\t\t\t\t\t\t//equipment_ref.close();\n\n\t\t\t\t})\n\t\t\t);\n\t\t\tequipment_ref.afterClosed().subscribe(() => {\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\tthis.unsub('equipments_modal_events')\n\t\t\t});\n\t\t}\n\n\n\t\tpublic get timestamp () {\n\t\t\treturn (new Date()).getTime()\n\t\t}\n\n\n}\n","
\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{ \troomname.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.maxlength \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters' \n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t ? 'Some special characters and are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t:\troomname.errors?.whitespace\n\t\t\t\t\t\t\t\t\t\t\t\t? 'Only spaces are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'System generated name '+ roomname.value + ' (can not be changed)' }} \t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {{\n\t\t\t\t\t\t\t\t\t\t\t\tcapacity.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.maxlength\n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t\t? 'Zero, letters and special characters are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t   Booking charge code required \n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t   Catering charge code required \n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Room equipment and detail \n\t\t\t\t\t\t\n\t\t\t\t\t\t

Room Equipment

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Video Conference (VC)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Conference phone

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Wireless content sharing

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Flipchart

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Glassboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Whiteboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

Room Detail

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Room with window only (natural light)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Boardroom room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Cocktail room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Theatre room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Workshop room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

U shape room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Miscellaneous

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\n\t\t
\n\t
\n\n\t\n\t\n\n\t
\n\t\n
\n\n
\n\t
\n\t\tRoom URL\n\t\t
\n\t\t\t{{ windowLocation.origin }}/staff/#/home?id={{ rowInfoData.id }}\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\n\t
\n\t\n\t
\n\t\t\n\t
\n
\n\n
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n\n","import { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { map } from 'rxjs/operators';\nimport { Observable, of as observableOf, merge } from 'rxjs';\nimport { Component, OnInit, Input, Injectable } from '@angular/core';\n\n\n// data model \nexport interface RoomsTableItem {\n roomname: string;\n roomnum: string;\n level: string;\n capacity: number;\n roomtype: string;\n bookable: boolean;\n}\n\n// sample data\nconst EXAMPLE_DATA: RoomsTableItem[] = [\n {\n roomname: 'test',\n roomnum: '02',\n level: '01',\n capacity: 4,\n roomtype: 'internal',\n bookable: true,\n}\n];\n\n/**\n * Data source for the RoomsTable view. This class should\n * encapsulate all logic for fetching and manipulating the displayed data\n * (including sorting, pagination, and filtering).\n */\n\n// convert this class into service and use provider:root\n@Injectable({\n providedIn: 'root',\n})\nexport class RoomsTableDataSource extends DataSource {\n data: RoomsTableItem[] = EXAMPLE_DATA;\n paginator: MatPaginator;\n sort: MatSort;\n\n\n constructor(public datatwo: RoomsTableItem[],\n ) {\n super();\n this.data = datatwo;\n }\n\n /**\n * Connect this data source to the table. The table will only update when\n * the returned stream emits new items.\n * @returns A stream of the items to be rendered.\n */\n \n \n connect(): Observable {\n // Combine everything that affects the rendered data into one update\n // stream for the data-table to consume.\n\n const dataMutations = [\n observableOf(this.data),\n this.paginator.page,\n this.sort.sortChange\n ];\n\n return merge(...dataMutations).pipe(map(() => {\n return this.getPagedData(this.getSortedData([...this.data]));\n }));\n }\n\n /**\n * Called when the table is being destroyed. Use this function, to clean up\n * any open connections or free any held resources that were set up during connect.\n */\n disconnect() {}\n\n /**\n * Paginate the data (client-side). If you're using server-side pagination,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getPagedData(data: RoomsTableItem[]) {\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.splice(startIndex, this.paginator.pageSize);\n }\n\n /**\n * Sort the data (client-side). If you're using server-side sorting,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getSortedData(data: RoomsTableItem[]) {\n if (!this.sort.active || this.sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const isAsc = this.sort.direction === 'asc';\n switch (this.sort.active) {\n case 'roomname': return compare(a.roomname, b.roomname, isAsc);\n case 'roomnum': return compare(+a.roomnum, +b.roomnum, isAsc);\n case 'level': return compare(+a.level, +b.level, isAsc);\n case 'capacity': return compare(+a.capacity, +b.capacity, isAsc);\n case 'roomtype': return compare(a.roomtype, b.roomtype, isAsc);\n case 'bookable': return compare(+a.bookable, +b.bookable, isAsc);\n default: return 0;\n }\n });\n }\n}\n\n\n/** Simple sort comparator for example ID/Name columns (for client-side sorting). */\nfunction compare(a: string | number, b: string | number, isAsc: boolean) {\n return (a < b ? -1 : 1) * (isAsc ? 1 : -1);\n}\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n SimpleChanges,\n} from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTable } from '@angular/material/table';\nimport { RoomsTableDataSource, RoomsTableItem } from './rooms-table-datasource';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'app-rooms-table',\n templateUrl: './rooms-table.component.html',\n styleUrls: ['./rooms-table.component.scss'],\n})\nexport class RoomsTableComponent extends BaseDirective implements AfterViewInit, OnInit {\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n @ViewChild(MatTable) table: MatTable;\n dataSource: RoomsTableDataSource;\n\n constructor(private _org: OrganisationService,\n private _router: Router,\n private route: ActivatedRoute,\n private cdref: ChangeDetectorRef,) {\n super();\n }\n\n public formattedInputValue: [];\n\n @Input() set inputValue(value: []) {\n this.formattedInputValue = value;\n }\n\n @Output() private onDetailsClick = new EventEmitter();\n\n @Output() public rowClicked = new EventEmitter<[]>();\n\n /** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */\n // tslint:disable-next-line: max-line-length\n public displayedColumns = [\n 'roomname',\n 'roomnum',\n 'level',\n 'capacity',\n 'roomtype',\n 'bookable',\n 'details',\n ];\n\n public detailsViewIndex = 0;\n\n public _onDetailsClick(index: number) {\n this.onDetailsClick.emit(index);\n }\n\n public ngOnInit() {\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n }\n public ngOnChanges(changes: SimpleChanges): void {\n // console.log(changes);\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n if(!changes.inputValue.firstChange) {\n this.dataSource.sort = this.sort;\n this.dataSource.paginator = this.paginator;\n this.table.dataSource = this.dataSource;\n this.paginator.firstPage();\n this.cdref.detectChanges();\n }\n\n }\n\n // ngAfterViewInit heavy on performance, figure out api\n // function that gives callback after html loads\n // eg, onchange, check mat table documentation\n\n public ngAfterViewInit() {\n // this.dataSource.sort = this.sort;\n // this.dataSource.paginator = this.paginator;\n // this.table.dataSource = this.dataSource;\n // this.paginator.firstPage();\n }\n\n public getRecord(row: []) {\n const navigationExtras = {\n relativeTo:this.route,\n skipLocationChange: true ,\n state: {\n details: { ...row }\n }\n }\n this._router.navigate(['room-details'], navigationExtras)\n }\n}\n","
\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
Room Name{{ row.roomname }}Room Number{{ row.roomnum }}Level{{ row.level }}Capacity{{ row.capacity }}Room Type\n Internal\n External\n Room visibility\n Bookable\n Non Bookable\n \n \n
\n\n \n \n
\n","export * from './resize.service';\nexport * from './read-local-pic.service';\n// export * from './room-admin.service';","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\n\nexport class ReadLocalPicService {\n /**\n * eventErrorDecoder\n * @param event \n * @returns errorMessage\n */\n private eventErrorDecoder(event: any): string {\n let errorMessage = null;\n\n switch (event.target.error.code) {\n case event.target.error.NOT_FOUND_ERR:\n errorMessage = 'NOT_FOUND_ERR';\n break;\n case event.target.error.SECURITY_ERR:\n errorMessage = 'SECURITY_ERR';\n break;\n case event.target.error.ABORT_ERR:\n errorMessage = 'ABORT_ERR';\n break;\n case event.target.error.NOT_READABLE_ERR:\n errorMessage = 'NOT_READABLE_ERR';\n break;\n case event.target.error.ENCODING_ERR:\n errorMessage = 'ENCODING_ERR';\n break;\n case event.target.error.NO_MODIFICATION_ALLOWED_ERR:\n errorMessage = 'NO_MODIFICATION_ALLOWED_ERR';\n break;\n case event.target.error.INVALID_STATE_ERR:\n errorMessage = 'INVALID_STATE_ERR';\n break;\n case event.target.error.SYNTAX_ERR:\n errorMessage = 'SYNTAX_ERR';\n break;\n case event.target.error.INVALID_MODIFICATION_ERR:\n errorMessage = 'INVALID_MODIFICATION_ERR';\n break;\n case event.target.error.QUOTA_EXCEEDED_ERR:\n errorMessage = 'QUOTA_EXCEEDED_ERR';\n break;\n case event.target.error.TYPE_MISMATCH_ERR:\n errorMessage = 'TYPE_MISMATCH_ERR';\n break;\n case event.target.error.PATH_EXISTS_ERR:\n errorMessage = 'PATH_EXISTS_ERR';\n break;\n default:\n errorMessage = 'Unknown Error: ' + event.target.error.code;\n break;\n }\n return errorMessage;\n }\n\n /**\n * \n * @param inputFile \n * @returns \n */\n async readFileInput(inputFile: any): Promise {\n return new Promise((resolve, reject) => {\n if (!inputFile ) {\n reject('No file selected');\n } else {\n if (\n !(window.File && window.FileReader && window.FileList && window.Blob)\n ) {\n reject('Your browser does not support reading files');\n }\n\n const reader = new FileReader();\n reader.onload = (e: any) => {\n resolve(e.target.result);\n };\n reader.onabort = (e: any) => {\n reject(\n 'Failed to convert file to base64img, aborted: ' +\n this.eventErrorDecoder(e)\n );\n };\n reader.onerror = (e: any) => {\n reject(\n 'Failed to convert file to base64img, error: ' +\n this.eventErrorDecoder(e)\n );\n };\n\n reader.readAsDataURL(inputFile);\n }\n });\n }\n\n\n b64toFile(dataURI): File {\n // convert the data URL to a byte string\n const byteString = atob(dataURI.split(',')[1]);\n\n // pull out the mime type from the data URL\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]\n\n // Convert to byte array\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n // new File\n // Create a blob that looks like a file.\n const blob = new File([ab],'room-photo.png', { 'type': mimeString });\n // blob['lastModifiedDate'] = (new Date()).toISOString();\n // blob['name'] = 'file';\n \n // Figure out what extension the file should have\n // switch(blob.type) {\n // case 'image/jpeg':\n // blob['name'] += '.jpg';\n // break;\n // case 'image/png':\n // blob['name'] += '.png';\n // break;\n // }\n // cast to a File\n return blob;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResizeService {\n private mainCanvas: HTMLCanvasElement;\n\n private isCanvasSupported(): boolean {\n const canvas = document.createElement('canvas');\n return !!(canvas.getContext && canvas.getContext('2d'));\n }\n\n /**\n * Create image on the fly using Image class \n * @param src \n * @param crossOrigin \n * @returns image\n */\n async createImage(\n src: string,\n crossOrigin?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n const img = new Image();\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.onload = () => {\n resolve(img);\n };\n\n img.onerror = (err) => {\n reject(err);\n };\n\n img.src = src;\n });\n }\n\n /**\n * Resize canvas - create canvas on the fly draw image with given diamension\n * @param cnv \n * @param width \n * @param height \n * @returns temp canvas instance\n */\n resizeCanvas(\n cnv: HTMLCanvasElement,\n width: number,\n height: number\n ): HTMLCanvasElement {\n if (!width || !height) {\n return cnv;\n }\n\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n const cnx = tmpCanvas.getContext('2d');\n cnx.drawImage(cnv, 0, 0, tmpCanvas.width, tmpCanvas.height);\n return tmpCanvas;\n }\n\n /**\n * Resize image \n * @param src \n * @param options \n * @returns \n */\n async resizeImage(src: string, options: any): Promise {\n if (!this.isCanvasSupported()) {\n throw new Error('Canvas is not supported on your browser');\n }\n if (!options || !src) {\n throw new Error('Missing argument when calling resizeImage function');\n }\n //Config options\n options = {\n height: options.height\n ? options.height\n : options.width\n ? null\n : options.size\n ? null\n : 1024,\n width: options.width\n ? options.width\n : options.height\n ? null\n : options.size\n ? null\n : 1024,\n size: options.size ? options.size : 500,\n sizeScale: options.sizeScale ? options.sizeScale : 'ko',\n step: options.step ? options.step : 3,\n outputFormat: options.outputFormat ? options.outputFormat : 'image/jpeg',\n crossOrigin: options.crossOrigin ? options.crossOrigin : null,\n };\n\n try {\n const img = await this.createImage(src, options.crossOrigin); // read image first by given base64 or blob image\n\n if (options.height || options.width) {\n // resize image as per height and width\n return this.resizeImageWidthHeight(\n img,\n options.width,\n options.height,\n options.step,\n options.outputFormat\n );\n } else if (options.size) {\n if (typeof options.sizeScale === 'string') {\n switch (options.sizeScale.toLowerCase()) {\n case 'ko':\n options.size *= 1024;\n break;\n case 'mo':\n options.size *= 1024 * 1024;\n break;\n case 'go':\n options.size *= 1024 * 1024 * 1024;\n break;\n }\n }\n return this.resizeImageBySize(img, options.size, options.outputFormat); //resize by size in diamension ration\n } else {\n throw new Error('Missing option to resize the image');\n }\n } catch (err) {\n throw new Error(err);\n }\n }\n\n /**\n * ResizeImageWidthHeight - Create canvas - draw image if given height and with OR use image original diamensions\n * and draw image data url\n * @param image \n * @param width \n * @param height \n * @param step \n * @param outputFormat \n * @returns \n */\n resizeImageWidthHeight(\n image: HTMLImageElement,\n width: number,\n height: number,\n step: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n\n if (!width && !height) {\n width = image.width;\n height = image.height;\n } else if (!width && height) {\n width = (height / image.height) * image.width;\n } else if (width && !height) {\n height = (width / image.width) * image.height;\n }\n\n const pixelStepWidth = image.width === width || !step ? 0 : (image.width - width) / step;\n const pixelStepHeight = image.height === height || !step ? 0 : (image.height - height) / step;\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n for (let i = 1; i < step; i++) {\n const newWidth = image.width - pixelStepWidth * i;\n const newHeight = image.height - pixelStepHeight * i;\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, newWidth, newHeight);\n }\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, width, height);\n\n return this.mainCanvas.toDataURL(outputFormat);\n }\n\n /**\n * resizeImageBySize - resize image by given size in ration \n * \n * @param image \n * @param targetSize \n * @param outputFormat \n * @returns \n */\n resizeImageBySize(\n image: HTMLImageElement,\n targetSize: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n\n let tmpResult = this.mainCanvas.toDataURL(outputFormat);\n let result = tmpResult;\n\n const sizeOfTheImage = this.calulateImageSize(tmpResult, outputFormat);\n let divideStrategy = Math.max(\n 1,\n Math.min(sizeOfTheImage / targetSize, 200)\n );\n\n let iteratorLimit = 20;\n while (sizeOfTheImage > targetSize && iteratorLimit !== 0) {\n iteratorLimit--;\n\n const newImageSize = {\n width: this.mainCanvas.width / divideStrategy,\n height: this.mainCanvas.height / divideStrategy,\n };\n const canvas = this.resizeCanvas(\n this.mainCanvas,\n newImageSize.width,\n newImageSize.height\n );\n\n tmpResult = canvas.toDataURL(outputFormat);\n const sizeOfTheImageTmp = this.calulateImageSize(tmpResult, outputFormat);\n\n if (sizeOfTheImageTmp / targetSize < 0.5 || sizeOfTheImageTmp === 0) {\n divideStrategy = divideStrategy / 2;\n if (divideStrategy < 1) {\n iteratorLimit = 0;\n }\n } else {\n this.mainCanvas = canvas;\n result = tmpResult;\n }\n\n this.mainCanvas = canvas;\n }\n\n return result;\n }\n\n calulateImageSize(imgString: string, outputFormat: string): number {\n switch (outputFormat) {\n case 'image/jpeg':\n outputFormat = 'image/jpg';\n break;\n default:\n outputFormat = 'image/jpg';\n break;\n }\n return Math.max(\n 0,\n Math.round(\n ((imgString.length - ('data:' + outputFormat + ';base64,').length) *3) / 4 \n )\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport jsPDF from 'jspdf';\n@Injectable({ \n providedIn: 'root' \n}) \nexport class RoomAdminService { \n \n public doc = new jsPDF();\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img, name, isForLevels = false, level): string | HTMLCanvasElement | HTMLImageElement {\n // TO DO : move to enum/utility file, while room detail more editable field developement \n const width = 500;\n const height = 550;\n const arcY = 300;\n const arc_X_Center = width/2;\n const otrRadius = arc_X_Center - 2 ;\n const whtRadius = otrRadius - 12;\n const innrRadius = otrRadius - 15;\n \n const canvas: HTMLCanvasElement = document.createElement('canvas');\n canvas.setAttribute('width', width.toString());\n canvas.setAttribute('height', height.toString());\n const ctx = canvas.getContext('2d');\n \n ctx.strokeStyle = \"transparent\";\n ctx.moveTo(arc_X_Center, 0);\n ctx.lineTo(arc_X_Center, height);\n ctx.stroke(); \n \n ctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.textAlign = \"center\"; \n ctx.fillText( isForLevels ? name : name + ' (L-' + level + \")\", arc_X_Center, 20 ); \n\n //oputer arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n //inner white arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#FFFFFF';\n ctx.fill();\n ctx.stroke();\n \n //second inner arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n // header text\n ctx.fillStyle = '#FFFFFF';\n ctx.font = '44px Bower';\n ctx.fillText( isForLevels ? 'Book a room' : 'Book Me', arc_X_Center, 166);\n \n //centeral rectangle\n ctx.fillRect(137, 187, 225, 225);\n //fill central rectangle with color\n ctx.fillStyle = '#FFFFFF';\n \n // fill text at the bottom\n ctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.fillText('in Converge', arc_X_Center, 470);\n \n // draw QR code image into center of canvas\n img !== null && ctx.drawImage(img, 137, 187);\n \n // create data url\n const dataURL: string | HTMLCanvasElement | HTMLImageElement =\n canvas.toDataURL('image/png');\n return dataURL;\n }\n \n}","import { Directive, HostListener, HostBinding, Output, EventEmitter, Input } from '@angular/core';\nimport { RequiredFileType } from './room-admin-utility';\n\n@Directive({\n selector: '[fileDragDrop]'\n})\n\nexport class FileDragNDropDirective {\n //@Input() private allowed_extensions : Array = ['png', 'jpg', 'bmp'];\n @Output() private filesChangeEmiter : EventEmitter = new EventEmitter();\n //@Output() private filesInvalidEmiter : EventEmitter = new EventEmitter();\n @HostBinding('style.background') private background = ''; //'#eee';\n @HostBinding('style.border') private borderStyle = '2px solid'; //'2px dashed';\n @HostBinding('style.border-color') private borderColor = '#E6E6E6';\n @HostBinding('style.border-radius') private borderRadius = '1px';\n\n constructor() { }\n\n @HostListener('dragover', ['$event']) public onDragOver(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = 'lightgray';\n this.borderColor = 'cadetblue';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('dragleave', ['$event']) public onDragLeave(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('drop', ['$event']) public onDrop(evt){\n evt.preventDefault();\n evt.stopPropagation();\n const ext = RequiredFileType.split(',');\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n // debugger;\n let files = [...new Set(evt.dataTransfer.files)].filter((f:File) => ext.includes(f.type)); //evt.dataTransfer.files;\n // let valid_files : Array = files;\n this.filesChangeEmiter.emit(files);\n }\n}","import { DropdownOpion } from '@mckinsey-converge/ui';\n\nexport interface RoomSubset {\n\tinternal: DropdownOpion[];\n\texternal: DropdownOpion[];\n}\n\nexport interface room {\n\troomname: string;\n\troomnumber: number;\n\tcity: string;\n\tlevel: number;\n\tcapacity: number;\n\troomtype: string;\n\troomvisibility: boolean;\n\tvc: boolean;\n\tconference_phone: boolean;\n\twireless_content_sharing: boolean;\n\tflipchart: boolean;\n\tglassboard: boolean;\n\twhiteboard: boolean;\n\tnatural_light: boolean;\n\tboardroom: boolean;\n\tcocktail: boolean;\n\ttheatre: boolean;\n\tworkshop: boolean;\n\tushape: boolean;\n\tmiscellaneous: boolean;\n}\n\nexport const roomTypeOptions: DropdownOpion[] = [\n { display: 'Internal', value: 'internal', meta: {} },\n { display: 'External', value: 'external', meta: {} },\n\t]\n\nexport const roomSubsetOptions: RoomSubset = {\n\t'external': [\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t],\n\t'internal': [\n\t\t{ display: 'Meeting', value: 'meeting', meta: {} },\n\t\t{ display: 'Partner', value: 'partner', meta: {} },\n\t\t{ display: 'Phonebooth', value: 'phonebooth', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t]\n}\n\nexport const roomVisibilityOptions: DropdownOpion[] = [\n\t{ display: 'Bookable', value: 'true', meta: {} },\n\t{ display: 'Non-bookable', value: 'false', meta: {} },\n]\n\nexport const canteringAvailabilityOptions: DropdownOpion[] = [\n\t{ display: 'Yes - Onsite', value: 'yes-onsite', meta: {} },\n\t// { display: 'Yes - Offsite', value: 'yes-offsite', meta: {} },\n\t{ display: 'No', value: 'no', meta: {} },\n]\n\nexport const RoomPhotoDiamension = {\n\twidth: 400,\n\theight: 225\n}\n\nexport const RequiredFileType = 'image/png,image/jpg,image/jpeg,image/webp';\n\nexport function timestamp(){ \n\treturn (new Date()).getTime(); \n} \n","import {\n NgModule,\n Type\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { EditorModule } from '@tinymce/tinymce-angular';\nimport { ComposerModule } from '@placeos/composer';\n\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CdkTableModule } from '@angular/cdk/table';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\nimport { APipesModule } from '@acaprojects/ngx-pipes';\nimport { ACustomEventsModule } from '@acaprojects/ngx-custom-events';\nimport { LoginComponent } from '../login/login.component';\nimport { TopbarHeaderComponent } from '../components/topbar-header/topbar-header.component';\n\nimport {\n CdkDropListScrollContainer,\n ReplacePipe\n} from '@mckinsey-converge/base';\nimport { SidebarComponent } from '../components/sidebar/sidebar.component';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { AccessDenied } from '../components/access-denied/access-denied.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst COMPONENTS: Type[] = [\n LoginComponent,\n TopbarHeaderComponent,\n SidebarComponent,\n AccessDenied\n];\n\nconst DIRECTIVES: Type[] = [\n CdkDropListScrollContainer\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\nconst CDK_MODULES: any[] = [\n ScrollingModule,\n DragDropModule,\n CdkTableModule\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n ...DIRECTIVES,\n ReplacePipe\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n APipesModule,\n ACustomEventsModule,\n RouterModule,\n EditorModule,\n ComposerModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n UiModule\n ],\n exports: [\n APipesModule,\n ACustomEventsModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...COMPONENTS,\n ...DIRECTIVES,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n ReplacePipe\n ]\n})\nexport class SharedContentModule {\n}\n","import { Component, OnInit } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLoadingState, LoadingState } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-shell-wrapper',\n templateUrl: './shell.component.html',\n styleUrls: ['./shell.component.scss'],\n})\nexport class ShellWrapperComponent extends BaseDirective implements OnInit {\n /** Loading state of the application */\n public loading_state: ApplicationLoadingState;\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n /** Whether the user needs to login */\n public get show_login(): boolean {\n return !this._users.is_logged_in;\n }\n\n /** Whether a module is still loading data */\n public get is_loading(): boolean {\n if (this.loading_state) {\n for (const mod in this.loading_state) {\n if (this.loading_state[mod] && this.loading_state[mod].state === 'loading') {\n return true;\n }\n }\n }\n return false;\n }\n\n /** List of modules with a loading state */\n public get loading_state_list(): LoadingState[] {\n const list: LoadingState[] = [];\n for (const mod in this.loading_state) {\n if (this.loading_state[mod]) {\n list.push(this.loading_state[mod]);\n }\n }\n return list;\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'loading',\n this._service.listen('loading').subscribe((loading) => {\n this.loading_state = loading;\n })\n );\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.logo = this._service.setting('app.logo_dark') || { type: 'icon' };\n });\n }\n}\n","\n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n \n
\n
Converge is loading
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseClass, Identity } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-event-form',\n templateUrl: './event-form.component.html',\n styleUrls: ['./event-form.component.scss'],\n})\nexport class EventFormComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Booking details to display */\n @Input() public form: FormGroup;\n\n /** List of attendees in the booking */\n public attendees: User[] = [];\n\n constructor() {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.event || changes.form) {\n this.attendees = this.form?.value.attendees || [];\n this.subscription(\n 'attendees',\n this.form\n .get('attendees')\n ?.valueChanges.subscribe((l) => (this.attendees = l || []))\n );\n }\n }\n\n public addVisitor() {\n const list = this.form.controls.attendees.value;\n const visitor = new User({ visitor: true, external: true, email: '' })\n list.push(visitor);\n //** Create visitor form group */\n const visitorFG = this.createVisitor(visitor);\n //** Push to visitor form array */\n this.getVisitors.push(visitorFG);\n this.form.controls.attendees.setValue(list);\n this.form.markAsDirty();\n }\n\n /**\n * Create visitor form group\n */\n createVisitor(visitor) {\n return new FormGroup({\n name: new FormControl(visitor.name, {validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(visitor.email, { validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n /** Replace visitor with updated values */\n public replaceVisitor(item: User, index: number) {\n const attendees = this.attendees;\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n attendees.splice(actualIndex, 1, item);\n this.form.controls.attendees.setValue(attendees);\n this.form.markAsDirty();\n }\n\n\n /** Remove visitor from attendee list */\n public removeVisitor(item: User, index: number) {\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n const attendees = this.attendees.filter((_, i) => i !== actualIndex);\n this.form.controls.attendees.setValue(attendees);\n \n if (index > -1) {\n this.getVisitors.removeAt(index);\n }\n this.form.markAsDirty();\n }\n\n /**\n * Get the visitor form array \n */\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n public trackByFn(index: number, item: Identity) {\n return index;\n }\n\n getFilteredAttendees() {\n return this.attendees.filter(item => item.external || item.visitor);\n }\n \n getFormControl(i: number) {\n return this.getVisitors.at(i);\n }\n}\n","
\n
\n
\n
\n \n
\n
{{ event.start_time }} - {{ event.duration > 0 ? event.end_time : '' }}
\n
\n
S
\n
{{ event.organiser?.name }}
\n
\n
\n \n \n \n Title is required\n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n \n
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-form',\n templateUrl: './visitor-form.component.html',\n styleUrls: ['./visitor-form.component.scss'],\n})\nexport class VisitorFormComponent extends BaseDirective {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Emitter for changes to the person */\n @Output() public personChange = new EventEmitter();\n /** Form fields for visitor details */\n // public form: FormGroup;\n @Input() public form: FormGroup\n\n constructor(private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void { \n this.form.valueChanges.subscribe( values => {\n this.person = new User({ ...values, visitor: true, external: true });\n this.personChange.emit(this.person);\n })\n }\n\n \n}\n","
\n \n
\n
\n
\n
\n \n \n \n Name is required\n \n
\n
\n \n \n \n A valid email address is required\n \n
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, Validators, FormControl, FormBuilder, FormArray } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nexport interface VisitorsFormModalData {\n /** Details of visitor listing */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-visitors-form-modal',\n templateUrl: './visitors-form-modal.component.html',\n styleUrls: ['./visitors-form-modal.component.scss'],\n})\nexport class VisitorsFormModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for visitor booking */\n public form: FormGroup;\n /** Display string for the loading state */\n public loading: string;\n attendeesStatus: boolean = true;\n\n /** Visitor booking data */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Whether form fields contain an attendee */\n public get has_attendees() {\n return (\n this.form &&\n this.form.controls.attendees.value &&\n this.form.controls.attendees.value.length\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n private fb: FormBuilder,\n @Inject(MAT_DIALOG_DATA) private _data: VisitorsFormModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this.form = new FormGroup({\n title: new FormControl(this.booking.title, [Validators.required]),\n attendees: new FormControl([...this.booking.attendees], [Validators.minLength(1)]),\n visitors: this.fb.array([])\n });\n if (this.booking.id) {\n this.form.controls.title.disable();\n }\n\n /** \n * Create visitor form for existing visitors\n */\n this.booking.attendees.forEach( (el) => {\n if(el.external || el.visitor) {\n const visitorFG = this.createVisitor(el.name, el.email);\n this.getVisitors.push(visitorFG);\n // (this.form.controls.visitors).markAsTouched();\n }\n });\n }\n\n createVisitor(name, email) {\n return new FormGroup({\n name: new FormControl(name, { validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(email, {validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n /** Delete visitor booking */\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: 'Delete meeting',\n content: 'Are you sure you wish to delete this meeting?',\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n /* istanbul ignore else */\n if (this.booking.id) {\n this.loading = 'Deleting visitor booking...';\n this._dialog_ref.disableClose = true;\n this.booking.delete().then(\n () => {\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess('Successfully removed visitors.');\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to remove visitors. Error: ${err.message || err}`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n }\n ref.close();\n })\n );\n }\n\n /** Save changes to visitor booking */\n public save() {\n this.timeout('save', () => {\n this.loading = 'Saving visitor booking...';\n this.form.markAllAsTouched();\n this._dialog_ref.disableClose = true;\n /* istanbul ignore else */\n if (this.form.dirty && this.form.valid) {\n const attendees = this.form.controls.attendees.value;\n for (const attendee of attendees) {\n if (!attendee.email) {\n attendee.email = `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`;\n }\n }\n const new_booking = new Booking({ ...this.booking.toJSON(), ...this.form.value });\n this._bookings.save(new_booking).then(\n (bkn) => {\n this.event.emit({ reason: 'done', metadata: bkn });\n this._service.notifySuccess(\n this.booking.id\n ? 'Successfully updated visitors.'\n : 'Successfully added visitors.'\n );\n this._booking_state.replace(new Booking({ ...this.booking, ...bkn.toApiJSON() }));\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to ${this.booking.id ? 'update' : 'add'} visitors. Error: ${\n err.message || err\n }`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n else {\n this.loading = null;\n this._dialog_ref.disableClose = false;\n this._dialog_ref.close();\n }\n });\n }\n}\n","
\n
{{ booking.id ? 'Edit' : 'New' }} Visitors
\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from '../../overlays/visitors-form-modal/visitors-form-modal.component';\nimport { BaseClass, unique } from '@mckinsey-converge/base';;\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-booking',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class VisitorBookingItemComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Whether attendee list should be shown */\n public show_attendees: boolean;\n /** Whether all the attendees have checked in */\n public checked_in: boolean = false;\n /** Whether all attendees are being checked in */\n public loading: boolean;\n\n public matched_attendees = [];\n\n /** Whether event will start soon or has started */\n public get upcoming() {\n const status = this.event.timeBasedStatusLabel;\n return status === 'upcoming' || status === 'in_progress';\n }\n\n /** Display string for checkin statuses of all attendees */\n public get status(): string {\n const { checked_in, count } = this.checkedInStatus();\n return `${checked_in} / ${count}`;\n }\n\n\n /** Whether user is a match for */\n public is_match(person: any): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n !search ||\n person.name.toLowerCase().indexOf(search) >= 0 ||\n person.email.toLowerCase().indexOf(search) >= 0\n );\n }\n\n constructor(private _service: ApplicationService, private _bookings: BookingsService, private _dialog: MatDialog) {\n super();\n }\n\n public checkedInStatus() {\n const checked_in_users = this.event.checkInsArray;\n return this.event.attendees.reduce(\n (counts, user) => {\n /* istanbul ignore else */\n if (user.external) {\n counts.count++;\n /* istanbul ignore else */\n if (checked_in_users.indexOf(user.email) >= 0) {\n counts.checked_in++;\n }\n }\n return counts;\n },\n { checked_in: 0, count: 0 }\n );\n }\n\n /**\n * Checkin the attendee\n */\n public async checkin() {\n this.loading = true;\n const value = await this._bookings\n .checkin(this.event.id, {\n host_email: this.event.organiser.email,\n attendees: unique(this.event.attendees.map(user => ({ name: user.name, email: user.email }))),\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n })\n .catch((err) => {\n this._service.notifyError(`Error checking in all attendees for booking. Error: ${err.message || err}`);\n });\n if (value) {\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins: value.check_ins\n });\n this.checked.emit();\n }\n this.loading = false;\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n const subject = encodeURIComponent(\n `${this.event.title}\" at ${this.event.start_time}, ${this.event.date_string}`\n );\n return `mailto:${this.event.attendees.filter(user => !user.email.includes('@guest'))\n .map((user) => user.email)\n .join(',')}?Subject=${subject}\"`;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.search) {\n if (!this.search) this.show_attendees = false;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n this.timeout('on_search', () => this.show_attendees = !!this.search, 50);\n }\n if (changes.event) {\n const { checked_in, count } = this.checkedInStatus();\n this.checked_in = checked_in >= count;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n }\n }\n\n public openEditModal() {\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking: this.event,\n },\n }\n );\n }\n}\n","
\n
\n
\n \n
\n
\n \n {{ event.start_time }}\n - {{ event.duration > 0 ? event.end_time : '' }}\n \n All Day\n
\n
\n
{{ event.organiser?.name }}
\n
\n
{{ event.company.length }}
\n
{{ event.title }}
\n
{{ event.multi_rooms?.simple_name || event.local_room_name }}
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n \n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, convertTimezonedTimestampToLocalDateTz} from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'visitor-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class VisitorTimelineComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Filter string */\n @Input() public search: string;\n /** Whether all bookings should be shown */\n @Input() public show_all: boolean;\n /** List of visitor bookings for the current date */\n public bookings: Booking[] = [];\n /** List of filtered bookings */\n public filtered_bookings: Booking[] = [];\n /** Whether visitor list is loading */\n public loading: boolean;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n\n public get nowTz(){\n return DateNow(new Date())\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _bookings: BookingStateService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._bookings.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .subscribe((_) => {\n this.search$.next(`${this.dateTz.ms}|${_.id}`);\n this._bookings.setZone(_.id);\n })\n );\n this.subscription(\n 'bookings',\n this._bookings.filtered.subscribe((list) => this.updateEvents(list))\n );\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz) {\n this.search$.next(`${this.dateTz.ms}`);\n }\n /* istanbul ignore else */\n if (changes.search || changes.show_all) {\n this.filtered_bookings = this.filter(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, booking: Booking) {\n return booking.id;\n }\n\n public resetPolling() {\n this.interval(\n 'update_bookings',\n () => this.search$.next(`${this.dateTz.ms}|${this.nowTz.ms}`),\n 30 * 1000\n );\n }\n\n /** Filter the visitor bookings */\n public filter(str: string = '') {\n const search = str.toLowerCase();\n return this.bookings\n .filter((booking) => {\n return (\n booking.attendees.find(\n (user) =>\n user.name.toLowerCase().indexOf(search) >= 0 ||\n user.email.toLowerCase().indexOf(search) >= 0\n ) ||\n booking.title.toLowerCase().includes(search) ||\n booking.local_room_name.toLowerCase().includes(search)\n );\n })\n .filter((bkn) => (this.show_all ? true : bkn.has_visitors));\n }\n\n private updateEvents(list: Booking[]) {\n const unsorted_bookings = list.filter(\n (bkn) =>\n !bkn.declined &&\n bkn.room.zones.includes(this._org.building.id)\n );\n const bookings = unsorted_bookings.sort((a, b) => {\n if (a.date === b.date) {\n if (a.creator.name === b.creator.name) {\n return a.space.name > b.space.name ? 1 : -1;\n }\n return a.creator.name > b.creator.name ? 1 : -1;\n }\n return a.date > b.date ? 1 : -1;\n })\n this.bookings = bookings;\n this.filtered_bookings = this.filter(this.search);\n }\n}\n","
\n
\n \n
\n
\n
\n
Time
\n
Host
\n
Company
\n
Title
\n
Location
\n
Status
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
\n No visitors {{ search ? 'matching ' + '\"' + search + '\"' : '' }} for {{ date_display }}\n
\n
\n
\n","import { Component, Input, SimpleChanges, Renderer2, ElementRef, OnChanges, Output, EventEmitter} from '@angular/core';\n\nimport { BookingCheckinParams, User } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor',\n templateUrl: './visitor.component.html',\n styleUrls: ['./visitor.component.scss'],\n})\nexport class VisitorComponent implements OnChanges {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Status of the visitor */\n public status: string;\n /** Whether attendee is being checked in */\n public loading: boolean;\n\n /** Whether attendee is late */\n public get late() {\n return this.event.timeBasedStatusLabel === 'in_progress' && this.person.external;\n }\n\n /** Whether attendee has checked in */\n public get approved() {\n return this.event.checkInsArray.includes(this.person.email);\n }\n\n /** Whether user is a match for */\n public get is_match(): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n this.person.name.toLowerCase().indexOf(search) >= 0 ||\n this.person.email.toLowerCase().indexOf(search) >= 0 ||\n this.event.title.toLowerCase().indexOf(search) >= 0 ||\n this.event.local_room_name.toLowerCase().indexOf(search) >= 0\n );\n }\n\n public get invalid_email(): boolean {\n return !this.person.email || this.person.email.includes('@guest.mckinsey.com');\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n return `mailto:${this.person.email}?subject=\"${this.event.title}\"%20at%20${\n this.event.start_time\n },%20${this.event.date_string}${\n this.event.organiser.email.toLowerCase() !== this.person.email\n ? '&cc=' + this.event.organiser.email\n : ''\n }`;\n }\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _bookings: BookingsService,\n private _service: ApplicationService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.search) {\n if (this.search && !this.is_match) {\n this._renderer.addClass(this._element.nativeElement, 'not-match');\n } else {\n this._renderer.removeClass(this._element.nativeElement, 'not-match');\n }\n }\n }\n\n /**\n * Checkin the attendee\n */\n public checkin() {\n this.loading = true;\n const fields: BookingCheckinParams= {\n host_email: this.event.organiser.email,\n attendees: [{ name: this.person.name, email: this.person.email }],\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n };\n this._bookings.checkinIndividualVisitor(this.event.id, fields).subscribe(result => {\n const check_ins = {...result.check_ins};\n check_ins[this.person.email] = true;\n this.event.check_ins = result.check_ins;\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins,\n });\n this.checked.emit();\n this.loading = false;\n }); \n }\n\n\n public get companyString(){\n return this.person.external ? this.event.company.join(',') : 'Mckinsey'\n }\n}\n","\n \n\n
\n
\n
{{ person?.name || person?.email }}
\n
\n
{{ companyString }}
\n
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-visitors',\n templateUrl: './visitors.component.html',\n styleUrls: ['./visitors.component.scss'],\n})\nexport class VisitorsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Search filter string */\n public search_str: string;\n /** Whether all bookings should be listed */\n public show_all: boolean;\n\n public get has_visitor_space(): boolean {\n const building = this._org.building;\n return building && !!this._spaces.find(building.visitor_space || building.holding_bay);\n }\n\n public has_access: boolean;\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Visitors';\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building')?.subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id },\n });\n })\n );\n })\n }\n\n public newVisitorMeeting() {\n const now = DateNow(new Date());\n const date = now.setValue({ minute: Math.ceil(now.minutes / 5) * 5 });\n const building = this._org.building;\n const space = this._spaces.find(building.visitor_space || building.holding_bay);\n const booking = new Booking({ \n start_epoch: date.seconds,\n end_epoch: date.addValue({ minutes: 60 }),\n room: space\n });\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking,\n },\n }\n );\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n \n \n \n
\n \n All meetings\n \n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Route, RouterModule } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { VisitorsComponent } from './visitors.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { VisitorTimelineComponent } from './timeline/timeline.component';\nimport { VisitorBookingItemComponent } from './timeline/item/item.component';\nimport { VisitorComponent } from './timeline/visitor/visitor.component';\nimport { VisitorsFormModalComponent } from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { EventFormComponent } from './overlays/visitors-form-modal/event-form/event-form.component';\nimport { VisitorFormComponent } from './overlays/visitors-form-modal/visitor-form/visitor-form.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: VisitorsComponent },\n { path: ':level', component: VisitorsComponent },\n { path: '**', redirectTo: '' },\n];\n\n@NgModule({\n declarations: [\n VisitorsComponent,\n VisitorTimelineComponent,\n VisitorBookingItemComponent,\n VisitorComponent,\n VisitorsFormModalComponent,\n EventFormComponent,\n VisitorFormComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n ],\n})\nexport class VisitorsModule {}\n","import { EnvironmentData } from '@mckinsey-converge/environment';\n\nexport const environment: EnvironmentData = {\n production: true,\n hmr: false,\n heap_io_id: 91016686,\n};\n","/**\n * GENERAL APPLICATION SETTINGS\n */\nimport { SettingsData } from '@mckinsey-converge/data-common';\n\nconst general = {\n menu: {\n items: [\n {\n name: 'Day View',\n route: '/day-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'wb_sunny',\n },\n },\n {\n name: 'Week View',\n route: '/week-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'date_range',\n },\n },\n {\n name: 'Catering',\n route: '/catering',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'room_service',\n },\n },\n {\n name: 'Visitors',\n route: '/visitors',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'face',\n },\n },\n {\n name: 'Reports',\n route: '/reports',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'warning',\n },\n },\n {\n name: 'Room Admin',\n route: '/room-admin',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'settings',\n }\n },\n ],\n copyright: 'PlaceOS',\n },\n};\n/*=========================*\\\n|| BOOKING FLOW SETTINGS ||\n\\*=========================*/\nconst booking = {\n booking_types: [\n { name: 'Internal', id: 'internal' },\n { name: 'External', id: 'external' },\n ],\n show_fields: [\n 'attendees',\n 'body',\n 'catering',\n 'dateTz',\n 'duration',\n 'organiser',\n 'title',\n 'type',\n 'all_day',\n 'has_catering',\n 'is_recurrent',\n 'company',\n 'is_multiroom',\n 'merged'\n ],\n html_body: false,\n multiple_spaces: true,\n desk_start: 9,\n};\n\n/*=========================*\\\n|| DAY VIEW SETTINGS ||\n\\*=========================*/\nconst day_view = {\n dragdrop: true,\n};\n\n/*=========================*\\\n|| VISITORS SETTINGS ||\n\\*=========================*/\nconst visitors = {};\n\n/*=========================*\\\n|| REPORTS SETTINGS ||\n\\*=========================*/\nconst reports = {};\n/**\n * ROOT APPLICATION SETTINGS\n */\nconst app = {\n title: 'McKinsey Concierge',\n description: 'McKinsey Concierge UI written with Angular Framework',\n short_name: 'CONCIERGE',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: '#0a0d2e',\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: '',\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/concierge/'\n },\n general,\n booking,\n day_view,\n visitors,\n reports,\n};\n\n/**\n * ROOT SETTIGNS\n */\nexport const DEFAULT_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/concierge',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false,\n },\n app,\n mock: false,\n frontend: 'concierge',\n};\n","\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/concierge/main-es5.js b/concierge/main-es5.js index 7f4d1808d..6fbe3963c 100644 --- a/concierge/main-es5.js +++ b/concierge/main-es5.js @@ -18078,15 +18078,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons exports.VERSION = { "dirty": false, - "raw": "dacd45ad9", - "hash": "dacd45ad9", + "raw": "f96712b73", + "hash": "f96712b73", "distance": null, "tag": null, "semver": null, - "suffix": "dacd45ad9", + "suffix": "f96712b73", "semverString": null, "version": "0.0.0", - "time": 1733434456096 + "time": 1733977368186 }; /* tslint:enable */ diff --git a/concierge/main-es5.js.map b/concierge/main-es5.js.map index 8b58f8aa4..bd567fa41 100644 --- a/concierge/main-es5.js.map +++ b/concierge/main-es5.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/angular-animations.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/animations.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/cdk-drop-list-scroll-container.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/general.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/image.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/numbers-only.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/replace.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.reducer.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/buildings/src/lib/buildings.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/api.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/app.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base-api.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking-filter.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.data.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.selectors.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/room-results/room-results.viewmodel.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking-state.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.types.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookings.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookingsPaginated.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/space.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-categories.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-category.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-item.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-items.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-menu.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-notes.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-order.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/close-modal-dialog-service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/collapse-accordion-service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/data-common.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/hotkeys.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/building.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/level.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/paginated.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/recurrence/recurrence.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/report.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/reports.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/service-manager.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/settings.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/spaces.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/users.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/validation.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/lib/date-tz.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/version.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/legacy-overlays.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/hover-class.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/legacy-ui.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.model.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.selectors.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/effects.testing.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/rooms/src/lib/rooms.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/localstorage.wrapper.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/storage.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/alert-banner/alert-banner.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/auto-complete-chip-select-item.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/groupHeader.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/base-template.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/dropdown-trigger-for.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/collapse-header/collapse-header.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-date-picker/date-tz-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-duration-field/date-tz-duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-time-field/date-tz-time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/duration-field/duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/error-message/error-message.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/calendar-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/chevron-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/close/close-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/informational-image/informational-image.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/label/label.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/legend-dropdown/legend-dropdown.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/mck-date-picker/mck-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal-button-row/modal-button-row.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal/modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/filter.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/sanitise.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/radio-select/radio-select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select-option/select-option.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/selected-chip-count/selected-chip-count.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/spacer/spacer.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/switch-group/switch-group.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/time-field/time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/toggle/toggle.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.enums.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/types.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/ui.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/utils/time.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.reducer.ts","webpack:///$_lazy_route_resource lazy namespace object","webpack:///src/app/app-routing.module.ts","webpack:///src/app/app.component.ts","webpack:///src/app/app.component.html","webpack:///src/app/app.module.ts","webpack:///src/app/bookings/booking-modal/booking-modal.component.ts","webpack:///src/app/bookings/booking-modal/booking-modal.component.html","webpack:///src/app/bookings/booking-modal/catering/catering.component.ts","webpack:///src/app/bookings/booking-modal/catering/catering.component.html","webpack:///src/app/bookings/booking-modal/catering/order-details/category/category.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-details/category/category.component.html","webpack:///src/app/bookings/booking-modal/catering/order-details/order-details.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-details/order-details.component.html","webpack:///src/app/bookings/booking-modal/catering/order-list/item/item.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-list/item/item.component.html","webpack:///src/app/bookings/booking-modal/catering/order-list/order-list.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-list/order-list.component.html","webpack:///src/app/bookings/booking-modal/find-space/filters/filters.component.ts","webpack:///src/app/bookings/booking-modal/find-space/filters/filters.component.html","webpack:///src/app/bookings/booking-modal/find-space/find-space.component.ts","webpack:///src/app/bookings/booking-modal/find-space/find-space.component.html","webpack:///src/app/bookings/booking-modal/find-space/item/item.component.ts","webpack:///src/app/bookings/booking-modal/find-space/item/item.component.html","webpack:///src/app/bookings/booking-modal/form/form.component.ts","webpack:///src/app/bookings/booking-modal/form/form.component.html","webpack:///src/app/bookings/bookings.module.ts","webpack:///src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.ts","webpack:///src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.html","webpack:///src/app/calendar/calendar.module.ts","webpack:///src/app/calendar/day-view/approvals-view/approvals-view.component.ts","webpack:///src/app/calendar/day-view/approvals-view/approvals-view.component.html","webpack:///src/app/calendar/day-view/approvals-view/event/event.component.ts","webpack:///src/app/calendar/day-view/approvals-view/event/event.component.html","webpack:///src/app/calendar/day-view/day-view.component.ts","webpack:///src/app/calendar/day-view/day-view.component.html","webpack:///src/app/calendar/day-view/day-view.module.ts","webpack:///src/app/calendar/day-view/space/event/event.component.ts","webpack:///src/app/calendar/day-view/space/event/event.component.html","webpack:///src/app/calendar/day-view/space/space.component.ts","webpack:///src/app/calendar/day-view/space/space.component.html","webpack:///src/app/calendar/day-view/timeline/timeline.component.ts","webpack:///src/app/calendar/day-view/timeline/timeline.component.html","webpack:///src/app/calendar/meeting-details-modal/catering/catering.component.ts","webpack:///src/app/calendar/meeting-details-modal/catering/catering.component.html","webpack:///src/app/calendar/meeting-details-modal/details/details.component.ts","webpack:///src/app/calendar/meeting-details-modal/details/details.component.html","webpack:///src/app/calendar/meeting-details-modal/meeting-details-modal.component.ts","webpack:///src/app/calendar/meeting-details-modal/meeting-details-modal.component.html","webpack:///src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.ts","webpack:///src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.html","webpack:///src/app/calendar/meeting-details-modal/private-details/private-details.component.ts","webpack:///src/app/calendar/meeting-details-modal/private-details/private-details.component.html","webpack:///src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.ts","webpack:///src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.html","webpack:///src/app/calendar/meeting-details-modal/requirements/requirements.component.ts","webpack:///src/app/calendar/meeting-details-modal/requirements/requirements.component.html","webpack:///src/app/calendar/week-view/day-display/day-display.component.ts","webpack:///src/app/calendar/week-view/day-display/day-display.component.html","webpack:///src/app/calendar/week-view/day-display/item/item.component.ts","webpack:///src/app/calendar/week-view/day-display/item/item.component.html","webpack:///src/app/calendar/week-view/timeline/timeline.component.ts","webpack:///src/app/calendar/week-view/timeline/timeline.component.html","webpack:///src/app/calendar/week-view/week-view.component.ts","webpack:///src/app/calendar/week-view/week-view.component.html","webpack:///src/app/calendar/week-view/week-view.module.ts","webpack:///src/app/catering/catering.component.ts","webpack:///src/app/catering/catering.component.html","webpack:///src/app/catering/catering.module.ts","webpack:///src/app/catering/catering.storage.ts","webpack:///src/app/catering/menu/item-list/item-list.component.ts","webpack:///src/app/catering/menu/item-list/item-list.component.html","webpack:///src/app/catering/menu/item/item.component.ts","webpack:///src/app/catering/menu/item/item.component.html","webpack:///src/app/catering/menu/menu.component.ts","webpack:///src/app/catering/menu/menu.component.html","webpack:///src/app/catering/orders/item/item.component.ts","webpack:///src/app/catering/orders/item/item.component.html","webpack:///src/app/catering/orders/orders.component.ts","webpack:///src/app/catering/orders/orders.component.html","webpack:///src/app/catering/overlays/category-modal/category-modal.component.ts","webpack:///src/app/catering/overlays/category-modal/category-modal.component.html","webpack:///src/app/catering/overlays/group-modal/group-modal.component.ts","webpack:///src/app/catering/overlays/group-modal/group-modal.component.html","webpack:///src/app/catering/overlays/item-modal/item-modal.component.ts","webpack:///src/app/catering/overlays/item-modal/item-modal.component.html","webpack:///src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.ts","webpack:///src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.html","webpack:///src/app/catering/overlays/order-details-modal/items/items.component.ts","webpack:///src/app/catering/overlays/order-details-modal/items/items.component.html","webpack:///src/app/catering/overlays/order-details-modal/messages/messages.component.ts","webpack:///src/app/catering/overlays/order-details-modal/messages/messages.component.html","webpack:///src/app/catering/overlays/order-details-modal/order-details-modal.component.ts","webpack:///src/app/catering/overlays/order-details-modal/order-details-modal.component.html","webpack:///src/app/components/access-denied/access-denied.component.ts","webpack:///src/app/components/access-denied/access-denied.component.html","webpack:///src/app/components/sidebar/sidebar.component.ts","webpack:///src/app/components/sidebar/sidebar.component.html","webpack:///src/app/components/topbar-header/topbar-header.component.ts","webpack:///src/app/components/topbar-header/topbar-header.component.html","webpack:///src/app/login/login.component.ts","webpack:///src/app/login/login.component.html","webpack:///src/app/reports/report-display/report-display.component.ts","webpack:///src/app/reports/report-display/report-display.component.html","webpack:///src/app/reports/report-table/report-table.component.ts","webpack:///src/app/reports/report-table/report-table.component.html","webpack:///src/app/reports/reports.component.ts","webpack:///src/app/reports/reports.component.html","webpack:///src/app/reports/reports.module.ts","webpack:///src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.ts","webpack:///src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.html","webpack:///src/app/room-admin/manage-photos/manage-photos.component.ts","webpack:///src/app/room-admin/manage-photos/manage-photos.component.html","webpack:///src/app/room-admin/room-admin-routing.module.ts","webpack:///src/app/room-admin/room-admin.component.ts","webpack:///src/app/room-admin/room-admin.component.html","webpack:///src/app/room-admin/room-admin.module.ts","webpack:///src/app/room-admin/room-details/room-details-wrapper.component.ts","webpack:///src/app/room-admin/room-details/room-details.component.ts","webpack:///src/app/room-admin/room-details/room-details.component.html","webpack:///src/app/room-admin/rooms-table/rooms-table-datasource.ts","webpack:///src/app/room-admin/rooms-table/rooms-table.component.ts","webpack:///src/app/room-admin/rooms-table/rooms-table.component.html","webpack:///src/app/room-admin/services/index.ts","webpack:///src/app/room-admin/services/read-local-pic.service.ts","webpack:///src/app/room-admin/services/resize.service.ts","webpack:///src/app/room-admin/services/room-admin.service.ts","webpack:///src/app/room-admin/util/file-drag-n-drop.directive.ts","webpack:///src/app/room-admin/util/room-admin-utility.ts","webpack:///src/app/shared/shared.module.ts","webpack:///src/app/shell/shell.component.ts","webpack:///src/app/shell/shell.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.html","webpack:///src/app/visitors/timeline/item/item.component.ts","webpack:///src/app/visitors/timeline/item/item.component.html","webpack:///src/app/visitors/timeline/timeline.component.ts","webpack:///src/app/visitors/timeline/timeline.component.html","webpack:///src/app/visitors/timeline/visitor/visitor.component.ts","webpack:///src/app/visitors/timeline/visitor/visitor.component.html","webpack:///src/app/visitors/visitors.component.ts","webpack:///src/app/visitors/visitors.component.html","webpack:///src/app/visitors/visitors.module.ts","webpack:///src/environments/environment.ts","webpack:///src/environments/settings.ts","webpack:///src/main.ts"],"names":["ANIMATION_SHOW_ENTER_LEAVE","trigger","transition","style","opacity","height","animate","ANIMATION_SHOW_CONTRACT_EXPAND","state","AnimationsModule","CommonModule","NgModule","imports","BaseClass","_timers","_intervals","_subscriptions","_initialised","BehaviorSubject","key","hasOwnProperty","clearTimeout","clearInterval","unsub","name","fn","delay","Function","setTimeout","Error","setInterval","Subscription","unsubscribe","getValue","BaseDirective","destroy","Directive","selector","BaseModule","NumbersOnlyDirective","declarations","exports","ScrollDirection","CdkDropListScrollContainer","_cdkDropList","_renderer","direction","X","last_scroll","x","y","changes","scrollContainer","element","nativeElement","closest","subscription","items","subscribe","list","toArray","forEach","i","index","listen","onDrop","onDrag","updateListPosition","timeout","scroll","scrollLeft","scrollTop","BOTH","Y","_dropListRef","_cacheOwnPosition","_siblings","isReceiving","CdkDrag","Input","ContentChildren","initialTime","mockDate","timeOverride","set","Date","resetDate","reset","closestToTimeSlot","date","stepMinute","start","millisecond","second","minute","Math","ceil","plus","minutes","closestToTimeSlotTz","dateTz","setValue","addValue","durationHumanized","duration","short","h","floor","d","m","weekDayMonthYearFormat","formatDate","extractDateFromInput","input","checkHour","startDate","dayjs","dayJsTimeFormatString","isValid","cleanedInput","times","split","undefined","length","dayJsHoursMinutes","month","year","hour","nearestStepToInput","step","currentStartDate","luxonDate","DateTime","fromMillis","valueOf","closestDate","toFormat","nearestDurationToInput","durationGroups","value","parseInt","indexOf","add","diff","closestDurationGroup","find","max","offset","reduce","previousValue","currentValue","resetSecondsOnTimestamp","timestamp","toMillis","formatDateWithSuffix","dateObj","day","getDate","toLocaleString","getFullYear","nthNumber","number","getListOfDateFormat","extend","utc","timezone","isToday","weekday","customParseFormat","log","type","msg","args","stream","force","app_name","window","debug","colors","console","getItemWithKeys","keys","map","slice","isMobileDevice","r","navigator","userAgent","match","isMobileSafari","agent","isAndroidChrome","padZero","str","toString","unique","array","filter","el","pos","arr","humaniseDuration","durationInput","size","singular","format","hours","filterList","fields","results","filters","toLowerCase","f","parts","push","word","count","regex","RegExp","sort","a","b","localeCompare","item_list","JSON","parse","stringify","item","match_count","match_index","field_list","matched","field","matches","replace","changed","tokens","k","join","matchToHighlight","timeToDate","time","DateNow","startOfValue","ms","randomInt","random","timeFormatString","is24HourTime","hoursMinutes","timezoneNameToDate","timeZoneName","zone","toZone","e","timezoneDisplay","gmtOffsetDisplay","timeWithZoneFormatString","toLocaleLowerCase","timeWithGmtOffsetFormatString","startEndTimeFormatString","startDateTz","endDateTz","startEndTimeWithZoneFormatString","dateLocalFormatString","comma","formatLocalDate","dateBuildingFormatString","shorterLocalDateFormatString","shorterBuildingDateFormatString","localeString","toLocaleTimeString","document","querySelector","getAttribute","language","downloadFile","filename","contents","createElement","setAttribute","encodeURIComponent","display","body","appendChild","click","removeChild","csvToJson","csv","lines","splice","v","line","part","jsonToCsv","json","Array","Object","valid_keys","detectIE","ua","msie","substring","trident","rv","edge","eventToPoint","event","MouseEvent","clientX","clientY","touches","flatten","an_array","stack","res","next","pop","isArray","reverse","seed","xmur3","rand","sfc32","predictableRandomInt","imul","charCodeAt","c","t","isLessThanBreakpoint","breakpoint","innerWidth","toTitleCase","toUpperCase","ImageDirective","_el","initalValue","stopPropagation","HostListener","ReplacePipe","from","to","Pipe","bookingStateSelector","bookings","loadBookingsWithQuery","createAction","props","loadHomepageBookingsResults","createLoadingAction","loadUpcomingBookingsResults","loadPastBookingsResults","loadCancelledBookingsResults","loadBookingByIdResults","clearBookingByIdResults","BookingsEffects","actions","bookingService","afterBookingsRequestResultsLoadOthersEffect","pipe","ofType","mergeMap","action","DateTZ","yourBookingsRequest","email","pagination","limit","show_cancelled","end_epoch","subtractValue","seconds","include_rooms","upcomingRequest","pastRequest","start_epoch","cancelledRequest","byIdRequest","id","effects","target","request","loadHomepageBookingsResultsEffect","createLoadingEffect","userBookings","loadUpcomingBookingsResultsEffect","loadPastBookingsResultsEffect","loadCancelledBookingsResultsEffect","loadBookingByIdResultsEffect","Effect","Injectable","BookingsModule","EffectsModule","forFeature","StoreModule","bookingsReducer","initialBookingsState","query","LoadingModel","empty","homepage","upcoming","past","cancelled","bookingById","createReducer","on","ons","initialBookingFormState","activeFormFilters","bookingFormReducer","storeBookingFormData","activeForm","payload","clearBookingFormData","openBookingSurvey","bookingCompleted","storeRoomFilters","clearRoomFilters","mapBookingToSelectOption","booking","loadBuildings","buildingStateSelector","buildings","selectLoadBuildingsSuccess","createSelector","selectors","optionalSuccess","selectBuildingOptionsGroupedByCity","success","mapped","Map","s","found","city","get","selectLevelByZoneId","param","levels","l","toQueryString","ApplicationService","store","analytics","_app_ref","_zone","_title","_settings","_hotkeys","_composer","_snackbar","_environment","snack","_subjects","_observers","isStable","first","_","run","waitForSettings","message","on_action","icon","content","openSnack","openSnackBar","notify","asObservable","initialised","init","setupComposer","select","selectCurrentUser","user","take","setupAnalytics","fmno","application","loading","composer","settings","protocol","location","host","domain","hostname","port","url","use_domain","origin","route","includes","mock","href","localStorage","getItem","config","scope","auth_uri","token_uri","redirect_uri","handle_login","local_login","setup","heap_io_id","heapIo","app_id","load","identify","frontend","isIt","_kioskFormFilter","title_suffix","setting","setTitle","getTitle","auth","api_endpoint","is_initialised","providedIn","BaseDataClass","raw_data","event_subject","Subject","events","_server_names","zone_id","_service","form","toJSON","Promise","resolve","reject","promise","update","then","metadata","task_name","parameters","task","obj","_changes","new_key","ServiceManager","serviceFor","BaseAPIService","settingsService","_subscribers","_promises","_compare","_list_filter","_name","_api_route","form_data","concierge","err","engine","endpoint","predicate","query_params","cache","result","http","process","processApiResult","catchError","error","of","new_item","post","injectConcierge","analyticsEvent","updateList","method","post_data","_task","put","removeItem","should_inject_concierge","apiSubRoute","token","sessionStorage","access_token","headers","HttpHeaders","requestOptions","q","label","raw_item","old_list","compareFn","new_list","mixed_list","spaceExtraFeatureToDisplayName","feature","SpaceFeatures","VideoConference","ConferencePhone","WirelessContentSharing","FlipChart","Glassboard","ElectronicWhiteboard","ConferenceRoom","TeamRoom","PartnerOffice","PhoneBooth","NaturalLight","BoardRoom","CocktailRoom","TheatreRoom","WorkshopRoom","UShapeRoom","Miscellaneous","Catering","instantBookOption","shortDisplay","instantBookOptions","mapSpaceFeaturesToSelectOption","roomEquipmentRequiredOptions","internalRoomTypeRequiredOptions","externalRoomTypeRequiredOptions","roomDetailsRequired","roomCateringAvailable","SpaceFilterReason","filterSpacesByAppliedFilters","formFilters","spaces","currentUser","isStaffMap","instantBook","some","onlyCatering","featureFilters","formFiltersEmpty","options","rulesCount","ruleReason","excludedByFiltersCount","statusMap","filteredSpaces","space","Space","raw_space","building","zones","rules","rulesForSpace","booking_rules","reason","valid","hide","hasAllFeatures","internalRoomTypeFilters","every","featuresArray","canBook","bookable","matchesType","bookingType","internal_or_external","hasCatering","has_catering","status","statusFromBookings","Booking","auto_approve","group","is_recurrent","availableOccurrences","totalOccurrences","buildingsInSameCity","meta","alternateBuildings","locationItem","specificReason","None","Filters","OfficeRules","AlternateBuildingsFound","DEFAULT_BOOKING_DURATION","internalBookingTypeOption","allBookingTypeOption","bookingTypeOptions","defaultRoomSizeOption","roomSizeOptions","roomSizeOptionsKiosk","roomCapacityToValue","roomSize","roomMaxCapacityToValue","roomFormDataToQuery","data","filteredLocationIds","groupChild","locations","capacity","capacity_max","is_multiroom","merged","recurrence_period","recurrence_interval","recurrence_endTz","recurrence_count","recurrence_starts","recurrence_exceptions","recurrence_days","ignore","now","defaultTestBookingForm","selectBookingFormsData","bookingForm","selectActiveForm","is_local_tz","building_tz","endTzDate","recEditingSearchPayload","SeriesAction","EDIT","selectBookingType","selectBookingLocations","groupHeader","selectIsInternal","selectFormFilters","selectRoomResultsFromState","roomStateSelector","loadRoomsForResults","model","selectRoomResultsFromState_map","loadRoomsForResultsMap","selectLaterThatDayResultsFromState","loadLaterThatDayResults","selectNextDayResultsFromState","loadNextDayResults","selectByIdResultsFromState","loadByIdResults","selectDiffSizeResultsFromState","loadDiffSizeResults","selectHomepageBookingsResultsFromState","selectUpcomingBookingsResultsFromState","selectPastBookingsResultsFromState","selectCancelledBookingsResultsFromState","selectBookingByIdResultsFromState","filterSpacesByAppliedFiltersIfSuccess","mutate","selectFilteredResults","selectMapFilteredResults","selectFilteredLaterDayResults","selectFilteredNextDayResults","selectFilteredByIdResults","selectFilteredDiffSizeResults","selectSelectedBuildingOptions","MAX_ABBREV_LOCATIONS","mapBuildingToSelectOption","dropdownOverride","code","address","groupId","mapCityToAllSelectOption","flattenDisplayOffices","grouped","toggleSelectedByGroup","selectedOptions","option","toSelect","selected","newGroup","remainingChildrenInGroup","o","ng","truncateLocationList","truncatedLocations","shouldTruncate","mapBuildingLevelToOption","level","flattenBuildingsWithLevels","flattenedLevels","placeholderRoute","num","setupRoomImages","componentReference","image_positions","rootFolderURL","fileSlug","imagesLoaded","foundImages","path","n","desiredImageName","desiredImage","pathname","tester","Image","onload","loadImages","src","bookingStatusDetails","image","text","title","roomHasCateringHours","catering_hours","cateringAllowed","disallowedStatus","opens","closed","end","openMinutes","closeMinutes","startOfDay","cateringOpenTime","cateringCloseTime","checkCollisions","service","availabilityParams","room_ids","breakdown","hide_bookings","recurrence_type","icaluid","available","start_time","end_time","has_conflict","bkn","b_setup","b_breakdown","recurrence_master_id","getStatusErrorMessage","RoomResultsViewModel","levelDisplay","short_name","local_name","office","mapResultsToViewModels","BookingStateService","_org","_spaces","ngZone","_poll","_long_poll","_long_poll_week","_bookings","_noOfMeetings","_filters","_dateTz","_loading","_state","combineLatest","filtered","bdTz","booking_date","startTz","endTz","endOfValue","filterBookings","shareReplay","filtered_week","bd","getEndOfWeek","filtered_month","search","debounceTime","switchMap","fzone","queryBooking","zone_ids","available_from","available_to","search_long_week","querySpace","space_list","processBookings","dailyCount","days","daily_count","buildSpaceLongQuery","counts","details","runOutsideAngular","interval","updateRoomList","new_bookings","concat","undo","attempted_to_delete","bkg","booking_master","period","replaceBookings","room_email","fromTz","toTz","intersects","timePeriodsIntersect","roomSatisfiesConditions","multi_rooms","room","in_zone","has_space","space_emails","in_zones","declined","getType","show","hide_type","dateWeekday","time_changed","SettingsService","is_concierge","nowTz","defaultTitle","defaultLocalTimezone","Intl","DateTimeFormat","resolvedOptions","timeZone","defaultBuildingZone","defaultOrgainiser","User","active_user","defaultBookingType","building_zone","booking_type","attendees","organiser","creator","booked_by","room_setup","room_breakdown","notes","equipment_codes","equipment_code","expected_attendees","headcount","check_ins","notify_users","company","booker","booker_concierge","level_zone","opt_out","outlook_opt_out","multiroom_master_id","room_id","findSpace","roomsData","roomId","newRoom","defaultStartTz","startEpochProvided","startDateTzProvided","round","created_epoch","all_day","show_as","approvalStatus","approval_status","catering","CateringOrder","edited_fields","edits","values","occurrence_edits","recurrence_end","occurrence_ids","occurrence_details","author","isEdit","opts","note","handleRecurrenceFields","recurrence_list","location_name","from_room","approve","old_start","old_end","creation_date","creationDateTz","cateringOrders","allAttendees","checked_in","checkInsArray","has_visitors","occurence","getTime","shift","_recurrence_endTz","byRequest","tentative","isAnyRoomDeclined","delivery_time","getTimezoneOffsetString","abs","dateDiff","displayEndDateTz","external","buildingTzDt","isBeforeDate","isAfterDate","recurrenEndFromOcurrences","mergeCateringOrders","order_list","orders","order","location_id","booking_timezone","BOOKING_STATUS","MINUTE","HOUR","DAY","WEEK","MONTH","DURATION_MAP","months","week","weeks","bookingOptionsToQuery","property","until","getFreeBookingSlots","min_size","dateTzMs","slots","bkn_start","bkn_end","getNextFreeBookingSlot","date_","block","generateBookingForm","use_fields","isConcierge","manualTimezone","user_service","current_user","current","FormControl","disabled","Validators","required","validators","minLength","updateOn","needs_space","is_before_date","setValidators","validateEndTime","disable","dateValidators","isFuture","validDateTZ","updateValueAndValidity","list_length","valueChanges","expected","codes","new_expected","new_codes","space_needed","simplified_fields","handleAllDay","clone","enable","occurrences","RecurrencePeriod","LIST","occurrence","CLONE","BookingAction","start_dateTz","d1","d2","_recurr_end","fields_with_recurrence","WEEKLY","recurrence_pattern","arrayWithValues","FormGroup","control","validDate","isSameDate","JSDate","getMinLength","rule_list","min","min_block","min_length","conditions","stringToMinutes","durationGreaterThanOrEqual","duration_1","duration_2","requestable","free_slots","next_free_slot","currently_free","time_until_next_block","free_tomorrow","free_today","available_until","spaceStatusToDisplay","filter_options","filtered_list","updated_list","start1","end1","start2","end2","formatWhen","startTZ","endTZ","displayEndTZ","isIncludes","searchVaue","searchRoomsAndBookings","allItems","searchValue","relevantItems","filteredItems","duplicateMultiroomEntriesIfAny","updatedBookings","duplicatesCount","duplicatedBooking","cloneDeep","BookingsService","setService","uniqueId","respond","series","toApiJSON","taskObsr","requests","booking_id","forkJoin","BookingsPaginatedService","getHoldingBay","queryHoldingBay","response","PaginatedAPIService","space_rules_for_user","rule_block","checkRules","ruleset","max_length","counter","condition","groups","j","last_location","check","CateringCategoriesService","CateringCategory","is_category","must_select","order_anytime","CateringItem","_amount","instance_id","from_month","to_month","description","prior_notice","notice","unit_price","price","supplier_cost","minimum_quantity","maximum_quantity","parent_categories","category_ids","categories","image_path","admin_only","restricted_from","root_category_restricted_from","catering_type","amount","allergy","cateringItems","filteredCateringItems","out_of_stock","availableItems","substr","expired","anytime","can_order_anytime","CateringItemsService","CateringMenuService","CateringNotesService","cateringNotes","hasBookingAttached","bookingDateTz","charge_code","kitchen","pantry","symbol","total","deliver_date","mergeCateringItemWithFormData","existing","override","CloseDialogService","dialogRefMap","dialogRef","close","DialogIds","CollapseService","collapseSubject","collapse$","DataCommonModule","INVALID_STANDALONE_KEYS","HotkeysService","keydown_states","keydown_observers","combo_end","registered_combos","addEventListener","mapKey","last_down","preventDefault","combo","combination","validCombination","last_key","updateCombinationEndList","presses","key_list","non_meta","MapLocation","map_id","desk_id","normalise","x_max","Organisation","BuildingLevel","levelWithID","fixed","confidence","at_desk","bld","building_id","LocationService","Building","disc_info","discovery_info","extras","extra_id","extra_name","loan_items","_roles","roles","_lockers","lockers","locker_structure","_systems","systems","_phone_numbers","phone_numbers","_location","longitude","latitude","searchables","neighbourhoods","lvl","lvl_features","level_id","booking_details","catering_restricted_from","currency","requires_equipment_code","requires_expected_attendees","holding_bay","visitor_space","sort_order","_data","bld_id","level_name","lower_name","map_url","floor_type","available_buildings","OrganisationService","_users","_spaceTypesSubject","_organisation","ids","bld_list","_active_building","organisation","loadOrganisation","loadLevels","space_types","loadSpaceTypes","tags","org_data","loadBuildingsWithOrg","bld_data","lvl_data","type_data","types","getOrganizationFiltersByRoomType","internalSubSet","getRoomTypeSubsetDDOptions","filterOptions","setItem","DaysOfWeek","RepeatsOn","recurrencePeriodToDurationType","DAILY","ABSOLUTE_MONTHLY","generateWeekDays","params","start_week","week_days","activeDate","active","full_name","day_index","getFirstDateFromList","getLastDateFromList","recurrenceDetails","recurr","getPeriod","recurrenceRecurringDetails","removeExpiredOcurrences","controls","tz","date_now","setStartAndEndDateFromArray","dates","setRecurrenceStartsTime","dateHour","Report","cleanData","txt","charAt","UNIX_timestamp","getMonth","getHours","suffix","getMinutes","timeConverter","formatCancelledBy","room_field","price_field","row","space_service","org_service","CurrencyPipe","transform","organizer","person","isCancelled","cancelled_by","cancelled_date","cancelled_at_epoch","remove_fields","output","idx_a","idx_b","csv_json","ReportsService","fromCSV","_service_list","findIndex","provider","provideFor","useValue","SETTINGS_TOKEN","SettingsObject","_app_name","_overrides","_observables","_bypass_bookings","VERSION","built","semver","hash","override_settings","Inject","OPTION_DEFAULTS","SpaceEquipments","SpaceStyles","EMPTY_ARRAY","allowStaffRoomWithBookings","room_style","equipment","bypass_bookings","defaultGlobalName","defaultSettings","room_name","support_url","features","extra_features","room_type","simple_name","rulesFor","nowMs","runningBookings","bks","startEpoch","endEpoch","spaceWithBookings","roomType","natural_light","Set","recurrence_availability","availabilityOptionsToQuery","hide_declined","blds","bld_b","a_has_zone","b_has_zone","SPACE_LIST","SpacesService","queryRooms","updateSpace","uploadSpacePhotos","setList","filterAvailableSpaces","faker","SERVICE","generateMockOrganisationService","jest","generateMockBuilding","getRoomFilterOptionsPerLocation","generateMockDataService","generateMockSpacesService","generateMockUsersService","loadCurrentUser","bookingState","setZone","setDate","setFilters","remove","startPolling","startPollingMonth","startPollingWeek","startPollingEveryFiveMin","test_app","logo_light","background","logo_dark","heap_io","force_ssl","secure_cookie","disable_text_capture","cookie_path","TEST_SETTINGS","app","generateMockSettingsService","overrides","provideMockSettingsObject","provide","generateMockAppService","settingsOverrides","notifyInfo","notifyWarn","notifySuccess","notifyError","navigate","navigateBack","Composer","Hotkeys","Users","Locations","Base","Menu","Spaces","Bookings","Reports","CateringItems","CateringCategories","Settings","generateMockUser","booking_list","fill","generateMockBooking","mockReturnValue","save","addFrom","removeFrom","clearList","removeFromList","accept","decline","checkin","is_logged_in","queryRoomsForQR","queryObsr","checkinIndividualVisitor","updateObsr","mockImplementation","SPACE_COUNT","generateMinimalRoomDetails","generateMockSpace","space_id","recurring_search","lastName","room_booking_screen","vc","linked","commerce","productName","searchable","controlable","hourly_rate","sort_priority","business","USER_DOMAIN","BOOKING_COUNT","BOOKING_DATE","setMockBookingStartDatetime","visitor","generateMockCateringOrder","menu","date_start","users","lorem","paragraph","BLD_COUNT","LVL_COUNT","generateMockLevel","levelGenerator","firstName","test","nested","level2","org","USER_COUNT","USER_EMAILS","companyName","delegates","delegate_count","first_name","last_name","phone","phoneNumber","department","staff_code","avatar","pickMenuItem","menu_map","category","generateMockLocation","fixed_locations","maps","ORG_COUNT","generateMockOrganisation","generateMockBuildingSetByCity","generateMockModalData","pendingDate","pendingDuration","mockDateToBuildingTz","windows_id","mobile","business_unit","organisation_id","organisation_name","officeLocation","desk","generateUserForm","pattern","maxLength","UsersService","uhttp","expiry","reload","client_id","Md5","hashStr","go","append","authorise","logout","tries","locate","loadDelegates","promises","del","all","HAS_ERROR","buildValidateDate","validateDate","is_from","buildValidateStartTime","validateStartTime","date_obj","buildValidateDuration","validateDuration","buildValidateAttendees","validateAttendees","invalid","dateControlTz","noWhitespaceValidator","isWhitespace","trim","whitespace","date_org","local_tz","zoneName","compare_to","unit","ans_unit","newDate","startOf","monday","sunday","later","endOf","isLastDayOfMonth","minus","hasSame","dateYear","dateMonth","dateDay","trunc","toSeconds","toUTC","toJSDate","getDay","convertLocalTimestampToTimezonedDateTz","buildingTimezone","convertTimezonedTimestampToLocalDateTz","localOffset","getTimezoneOffset","desiredOffset","eleA","localTimezone","offset_minutes","toMiddayUTC","timezoneOffset","EnvironmentModule","providers","ENVIRONMENT_TOKEN","EnvironmentService","environment","production","BookingConfirmComponent","_booking_state_service","_router","_dialog","_dialog_ref","closeDialogService","renderer","EventEmitter","show_attendees","lastMomentConflict","old_booking","is_request","approved","bookingDetails","bookedBy","disableClose","checkSpaceAvailability","newEmail","replaceObjects","constructor","replacement","nk","buffer","elem","has_note_buffer","updated","master_booking","pollOnce","closeDialog","MeetingDetails","emit","erroMessage","queryParams","ref","open","ConflictsModalComponent","maxWidth","width","local_room_name","conflicts","copy_conflicts","componentInstance","clipboard","writeText","conflictsText","afterClosed","listType","collapseList","attendeesListRef","expandList","show_locations","locationsListRef","show_orders","cateringListRef","listRef","listElement","listItems","getElementsByClassName","totalHeight","offsetHeight","setStyle","addClass","removeClass","duration_value","recurrenceDates","a_space","dateTZ","MAT_DIALOG_DATA","Component","templateUrl","styleUrls","Output","ViewChild","$event","BookingFormComponent","cdRef","user_list","fromDateTz","untilDateTz","localStart","localEnd","chipOptions","showTimeCateringWarning","updateCoachmarkTimes","skip","distinctUntilChanged","recurrenceStarts","clearValidators","arrayValidators","disableInputs","checkTimeCateringWarning","has_id","is_edit","patchValue","SpaceSelectModalComponent","multiple","needsCatering","noCatering","NewUserModalComponent","detectChanges","localTzOffset","buildingTzOffset","toggledControlName","startDateTime","fromISO","endDateTime","bookingDate","dayStartAt7am","dayEndAt8pm","markForCheck","changeDetection","ChangeDetectionStrategy","OnPush","BookingCateringConfirmModalComponent","CateringDetailsModalComponent","_cateringNotesService","head_counts","needs_charge_code","active_space","note_list","notes_field","generateFormFields","markAllAsTouched","is_valid","new_notes","setNotes","_scrollToBottom","_content_el","scrollTo","top","scrollHeight","left","behavior","active_form","errors","minlength","submit","CONFIRM_METADATA","maxHeight","ConfirmModalComponent","DECLARATIONS","NoCateringModalComponent","RequirementDetailsModalComponent","UserFormComponent","LegacyOverlaysModule","LegacyUiModule","FormsModule","ReactiveFormsModule","UiModule","EditorModule","new_user","confirm","cancel","codes_field","head_counts_field","firstSpaceEmail","head_count","anySpaceNeedsChargeCode","roomBasedEqCode","officeBasedEqCode","change$","selected_spaces","request_map","formGroup","triggerSearch","savedSelection","request_id","search_results$","active_building","resp","active_type","_space","setDefaultBuilding","grouped_by_city","city_buildings","noCateringDialogRef","panelClass","autoFocus","backdropClass","defaultBld","opt","space_a","space_b","withLatestFrom","formData","ActionIconComponent","hasSelectionRequirements","getActiveList","CateringMenuItemComponent","initial_state","an_cat","setAmount","cat","an_item","updatePackageSelection","setPrice","selectPackageOptions","confirmed_item","cart_item","active_items","updatedList","PackageOptionsModalComponent","done","a_list","animations","checkItemRequirements","getActiveItems","a_package","needed","CngSearchBarComponent","placeholder","totalFoundItem","showSrchWarning","searchStr","configChanges","clearSearch","box","onSearch","resetSearch","HoverClassDirective","elementRef","hoverClass","classList","ActionFieldComponent","show_tooltip","performAction","CounterComponent","useInput","previous_value","handleTimeout","ctrl_key","shift_key","new_value","changeInput","Number","isNaN","_onChange","_onTouch","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","DateFieldComponent","_from","position","onChange","old_date","new_d","new_date","_trigger","closeMenu","openMenu","_to","years","menuOpen","MatMenuTrigger","openDatePicker","closeDatePicker","DurationFieldComponent","specialPreprops","duration_options","generateDurationOptions","blocks","TimeFieldComponent","no_past_times","show_select","_time_options","generateAvailableTimes","select_field","focus","openedChange","datestamp","show_past","showSelect","UserListFieldComponent","search$","search_str","match_name","match_email","inputAutoComplete","openPanel","closePanel","active_list","a_user","file","files","reader","FileReader","readAsText","evt","processCsvData","srcElement","endsWith","addUser","template","MatAutocompleteTrigger","addUsersFromFile","downloadCSVTemplate","read","UserSearchFieldComponent","resetSearchString","onInputChange","FeedbackComponent","updateRoute","NavigationEnd","current_page","IconComponent","PopoutMenuComponent","SearchbarComponent","UserAvatarComponent","MATERIAL_MODULES","MatButtonModule","MatSnackBarModule","MatDialogModule","MatFormFieldModule","MatInputModule","MatProgressSpinnerModule","MatProgressBarModule","MatAutocompleteModule","MatSelectModule","MatChipsModule","MatRippleModule","MatMenuModule","MatCheckboxModule","MatTooltipModule","MatRadioModule","MatTabsModule","MatSlideToggleModule","ACA_PIPES_MODULE","valueChange","autofocus","focusField","input_field","actionPrefix","stateKey","buildAction","postfix","clear","wrapLoading","selectData","warn","selSuccess","selectSuccess","selOptionalSuccess","selectOptionalSuccess","selError","selectOptionalError","selLoading","selectIsLoading","actionObject","caller","flatMap","isLoading","hasError","hasSuccess","_success","isEmpty","isSuccess","isError","hasLoaded","shouldLoad","selectIsSuccess","selectIsError","selectHasLoaded","selectIsEmpty","generateMockActions","dispatcher","Actions","verifyActionSuccess","effect","expect","toBeDefined","toStrictEqual","verifyActionError","rooms","loadRoomsWithQuery","selectRoomResultsSuccess","LocalStorageWrapper","prefix","StorageModule","AcaDatePickerComponent","klass","show_last_selection","min_offset","max_offset","date_list","month_name","days_of_week","day_format","month_format","generateMonth","generateDaysOfTheWeek","updateOptions","counters","difference","today","end_","non_month","_change_timer","new_offset","updateDate","changeMonth","AlertMode","AlertBannerDisplay","AlertBannerComponent","mode","Warning","showClose","V1","iconPath","materialColor","closeIcon","_onModeChange","Coachmark","BlueCoachmark","AutoCompleteChipSelectItemComponent","optionSelected","feedbackOutput","chipsCleared","onClickConfirm","selectOnlyOneGroup","localFilter","selectOnlyOneGroupChange","separatorKeysCodes","ENTER","COMMA","filterFormControl","focused","mobileFullScreen","autocompleteOptions","filteredAutocompleteOptions","enableCTAs","hasChips","scrollEvent","panelOpen","contains","onFocus","blur","valueAccessor","color","enabled","selectedGroupHeader","getFilteredAutocompleteOptions","groupHeaders","g","searchString","exactMatches","moreOptions","joinedOptions","groupIds","parents","jo","matInput","feedbackInput","useCTAs","focusIn","fromPanel","componentInput","loseFocus","isDisabled","spl","removeEventListener","dirty","touched","keyedInput","onPanelFocusChange","selectOption","encapsulation","ViewEncapsulation","Self","Optional","GroupHeaderPipe","hasHeader","displayAsHeader","AutoCompleteSelectOptionComponent","filteredOptionsChange","inputTextChange","emptyBoxEvent","_options","updateFilteredOptions","selectedValue","resetInput","filteredOptions","startWith","_filter","filterValue","filterValues","matchesAll","onChangeInput","BaseTemplateComponent","vcRef","isRendered","attemptViewEmbed","createEmbeddedView","TemplateRef","CateringDropComponent","onCancel","onConfirm","CngSelectOptionsComponent","CngSelectComponent","isClosed","defaultSelected","onChangeCallback","DropdownTriggerForDirective","overlay","viewContainerRef","isDropdownOpen","dropdownClosingActionsSub","EMPTY","isPanelOpened","destroyDropdown","openDropdown","ddWidth","dropdownPanel","offsetWidth","overlayRef","create","hasBackdrop","scrollStrategy","scrollStrategies","positionStrategy","flexibleConnectedTo","withPositions","originX","originY","overlayX","overlayY","offsetY","templatePortal","TemplatePortal","templateRef","attach","dropdownClosingActions","backdropClick$","backdropClick","detachment$","detachments","dropdownClosed","merge","detach","dispose","CollapseHeaderComponent","collapseService","expandedIds","updateSectionIdOnOpen","isExpanded","collapseSubscription","expansionPanel","isOpen","expandedTitleId","updateOpenedSectionId","ConflictAlertModalComponent","dialogData","callback","dateIsToday","CustomSnackbarComponent","snackBar","dismiss","snackType","MAT_SNACK_BAR_DATA","closeSnackbar","SnackBarService","verticalPosition","horizontalPosition","_snackType","openFromComponent","DateTzCalendarWidgetComponent","className","selectedDateTz","_today","registerOnChange","registerOnTouched","startOfMonthDateTz","DateTzDatePickerComponent","icon_only","onSelect","can_pick_today","selectedDateTzValue","resetToLastSelection","_acaDatePicker","initialDateSelectionTz","writeValue","newValueTz","newDateTz","onDatePickerClose","DateTzDurationFieldComponent","defaultDurationGroups","DEFAULT_DURATION","currentStartDateTz","nearestStep","placeHolderOption","selectedOption","generateDurationOptionsFromGroups","extended","dopt","DateTzTimeFieldComponent","noPastTimes","show_current","startFromDateTz","selectedTimeString","generateAvailableTimesTz","generateOptionForDateTz","os","timeOptions","displayString","newTimeTz","setSelectedValues","ErrorMessageComponent","CalendarIconComponent","ChevronIconComponent","CloseIconComponent","InformationalImageComponent","LabelComponent","LegendDropdownComponent","placeholderOpen","MckDatePickerComponent","dateValue","initialDateSelection","goToToday","secondarySubmit","primarySubmit","ModalButtonRowComponent","primaryDisabled","disableFixed","secondaryDisabled","smallButtons","ModalComponent","shouldClose","OverrideChangesModalComponent","getDateString","epoch","toISOString","uniqueDates","filteredEdits","dateString","has","FilterPipe","searchText","objectKey","splitKeys","it","included","SecurityContext","SanitizePipe","sanitizer","sanitize","RESOURCE_URL","URL","SCRIPT","STYLE","HTML","RadioSelectComponent","RecurringBookingForm","recurrence_types","PATTERN","DATE","recurrencePeriod","current_type","pattern_form","recurrencePatternFormControl","RecurrencePatternForm","onChangeType","RecurrenceDateForm","selected_dates","setPickerToGivenDate","tempForSort","start_date","formDateTz","is_selected","setDateTzForm","dateTsValue","addDate","fromStartTz","untilTz","repeat_period_options","validateRecurrenceInterval","repeat_every_options","recurrenceIntervalFormControl","fromEndTz","setEndDateFromStartDate","recurrenceDateStartTzFormControl","recurrencePeriodFormControl","generateMaxIntervals","recurrenceDaysFormControl","current_days","generateOcurrenceList","recurrenceEndFormControl","end_date","updateActiveWeekday","updateValidators","date_diff","periodToDurationType","first_date","recurr_days","daysInMonth","_week_days","new_day","current_index","setRepeatEvery","setRepeatPeriod","SelectOptionComponent","ignoreDisabled","noEntriesFoundLabel","SelectComponent","searchEnabled","splitDisplay","showDivider","SelectedChipCountComponent","SpacerMode","SpacerComponent","Horizontal","SwitchGroupComponent","optionChecked","closestTimeSlot","buildingDate","newTime","ToggleComponent","selectedChange","TooltipComponent","isVisible","TooltipPosition","DEFAULT","theme","TooltipTheme","tooltip","visible","TooltipDirective","appRef","componentFactoryResolver","injector","showDelay","hideDelay","componentRef","triggerType","hasTrigger","initializeTooltip","setHideTooltipTimeout","touchTimeout","bind","componentFactory","resolveComponentFactory","attachView","hostView","rootNodes","tooltipDOMElement","setTooltipComponentProperties","showTimeout","showTooltip","instance","getBoundingClientRect","right","bottom","BELOW","ABOVE","RIGHT","LEFT","hideTimeout","detachView","MatIconModule","MatExpansionModule","OverlayModule","NgxMatSelectSearchModule","NgxSkeletonLoaderModule","ZoomWarningComponent","entryComponents","ALL_DAY_BOOKING_VALUE","showPast","inputDate","allDayOption","oneWeekOption","onCloseClick","loadUser","selectUserState","selectHasUserData","UserEffects","userService","UserModule","userReducer","initialUserState","webpackEmptyAsyncContext","req","module","routes","component","ShellWrapperComponent","children","loadChildren","DayViewModule","WeekViewModule","CateringModule","VisitorsModule","ReportsModule","RoomAdminModule","redirectTo","AppRoutingModule","RouterModule","forRoot","useHash","AppComponent","_uploads","_md5_workers","timezoneString","initUploads","adjustZoom","clientWidth","isMobileOrTablet","vendor","maxTouchPoints","mobileAgents","autoStart","UploadManager","addProvider","Amazon","localStorageSyncReducer","reducer","localStorageSync","rehydrate","metaReducers","AppModule","app_loaded","MAT_LABEL_GLOBAL_OPTIONS","DEFAULT_SETTINGS","BrowserModule","BrowserAnimationsModule","HttpClientModule","ComposerModule","CalendarModule","SharedContentModule","bootstrap","BookingModalComponent","iscloning","getModalTitle","flow_step","only_catering","loadFormData","modalTitle","toNextFlowStep","toPreviousFlowStep","resetForm","openRecurrenceConflictsModal","openEquipmentDetailsModal","confirmBooking","openCateringDetailsModal","markAsDirty","is_recurr_series_edit","available_fields","addControl","is_cloning_or_edit","isFromGrid","edit_recurrence","markAsTouched","equipment_ref","catering_ref","clearRecurrenceValidators","formValues","sanitizeBookingFromCloning","dialog_ref","emitEvent","acc","recurr_ref","BookingCateringComponent","active_order","an_order","CateringMenuCategoryComponent","BookingCateringOrderDetailsComponent","_menu","category_list","available_times","matched_items","initForm","_input_el","show_search","val","flattenArray","loadMenu","generateStartAndEndTimes","logDateTz","space_email","building_time","cat_start_time","cat_end_time","has_available_items","out_of_hours","form_controls","confirmOrder","CateringOrderListItemComponent","edit","BookingCateringOrderListComponent","previous","BookingSpaceFiltersComponent","initBuildings","locationsChange","building_list","now_","is_today","BookingFindSpaceComponent","_booking_state","searchQuery","selectedSpace","oldSpace","disableCondition","handleEditConflicts","occurrences_org","booking_org","ocurr","to_hours","to_minutes","new_conflicts","savedSpace","updatedSpaces","sp","spaceConflicts","OriginalSpaceList","sv","sh","isCloning","original_space","updateSelectedSpace","sortByRecurrenceAvailability","booking_space_list","idsFromUpadatedSpaceList","isExists","originalSpace","catering_order","has_catering_order","selected_space","openNoCateringModal","emitNextEvent","a_availability","b_availability","spaceToRemove","spaceName","toggle","BookingSpaceItemComponent","BookingSpaceFlowFormComponent","can_return","attendeesControl","setErrors","customError","isOutsideCateringHours","checkIfOutsideCateringHours","container","scrollIntoView","inline","DeleteConfirmModalComponent","ScrollingModule","MeetingDetailsModalComponent","PrivateDetailsModalComponent","MeetingDetailsDisplayComponent","MeetingRecurringDetailsDisplayComponent","MeetingDetailsRequirementsComponent","MeetingCateringDetailsComponent","MeetingPrivateDetailsComponent","DayViewApprovalsComponent","_bookings_service","inputText","incommingRequests","selectedSort","updatedRequest","sortOrderByOptions","isMissingRoom","bkng","hasInvalidEndDateInMasterBookings","endDateString","masterIds","filterMasterBookings","filterStandardBookings","filterStandardAndMasterBookings","expiredBkngs","pendingBkngs","timeBasedStatusLabel","declineExpiredBookings","searchRequest","sortingValue","date_string","street_and_city","att","weekdayLong","weekdayShort","applyOrderBy","declineMultiple","resArray","STATES","DayViewApprovalsEventComponent","_booking_state_sevice","datePipe","acting","showCateringNote","showEquipmentNote","cateringNote","equipmentNote","cateringOrderItems","isRecurrentBooking","recurrenceExceptions","updateData","createdDate","createdTime","creationDate","officeAddress","specific_occurances","ocurrence","specificDates","length_string","bookingOptions","acceptedBooking","is_conflict","total_Conflicts","dateBuildingString","endDate","DatePipe","view","DayViewComponent","_route","active_level","legend","legend_list","legend_keys","banner_mode","showBanner","undo_banner_mode","event_list","foundSearchLength","searchedCounter","paramMap","has_access","updateLevel","initSpace","numeric","ignorePunctuation","spaceTypeOptions","spaceTypesObservable","spaceTypesSubscription","spaceTypes","undo_action","_undo_timer","attentToDelete","configureIfLinksFromEmail","filterEvents","filterd_booking","startsWith","bookingId","snapshot","dispatch","levelId","updateDateTz","replaceUrl","checked","ROUTES","forChild","DayViewTimelineComponent","DayViewSpaceComponent","DayViewSpaceEventComponent","registerDialog","reattach","calculatePosition","overlap","storeOrder","shown_date","from_previous_day","toFixed","overflow_top","overflow_bottom","time_period","_temp","cdr","eventMovingLoader","inView","dragging","moving","overlap_details","position_list","time_blocks","generateTimeBlocks","overflow_only","checkInView","last_update","calculateOverlaps","override_state","isRecurrentMaster","isRoomEmailMatch","isIncludedInSetupOrBreakdown","collisions","cmp","cmp_start","cmp_end","in_view","offsetLeft","delta","pointerPosition","scroll_top","top_minutes","previousContainer","new_start","handleDropError","isMoving","movingId","room_list","room_count","new_booking","cateringWillBeDropped","isOutsideCatering","roomDoesNotHaveCatering","moveBooking","startDateTimeLuxon","endDateTimeLuxon","confirm_msg","selectedBlockStart","selectedBlockEnd","hasValidBreakdown","topMinutes","closestDateTz","isConflict","checkAvailabilityOnGivenTime","drop","gridBookingOnClick","UPDATE_INTERVAL","scroll_left","scroll_offset","filtered_spaces","loading_space","show_holding_bay","space_zones","modalInitialized","isEventMoving","scroll_area","initSpaces","updateTime","virtualScroll","space_type","stopPolling","queryParamMap","view_id","spaceJson","active_hour","searchData","column","spaceId","bookingEl","timeoutID","scroll_box","date_percent","scrollWidth","is_dragging","scrollView","cancelScroll","isDragging","subscribeToMouseMove","unsubscribeFromMouseMove","calculateScrollDirection","runAutoScroll","tolerance","calculateDirection","CdkVirtualScrollViewport","clearSelected","updateScroll","updateBooking","isApproved","_updateOrders","closeAll","ord","editMeetingCatering","edited","setDetails","isMasterApproved","_on_error","setLoading","acceptOptions","declineOptions","deleteMeeting","booking_data","book","available_durations","old_notes","openPrivateDetailsModal","confirmDelete","_specific_dates","expired_ocurrences","recurrence_startTz","specific_dates","duplicate","_recurrence_startTz","_recurrence_period","_recurrence_interval","_occurrence_details","_master_booking","editSeries","cloneSeries","cancelSeries","bookingChange","roomNames","standalone","temp","WeekViewDayDisplayComponent","WeekViewItemComponent","WeekViewTimelineComponent","dateListTz","generateDatesTz","weekends","WeekViewComponent","orderDetailsExpanded","CateringComponent","cateringStorage","order_type","menuWithOthers","allCategories","childItems","catering_menu","orderDetails","page","loadAllCategory","relativeTo","filtered_menu","otherCategories","mailEl","isThere","subEl","parent","CateringStorage","CateringOrdersComponent","CateringMenuComponent","CateringMenuItemListComponent","CateringCategoryModalComponent","CateringGroupModalComponent","CateringItemModalComponent","CateringOrdersItemComponent","OrderDetailsModalComponent","OrderDetailsItemsComponent","OrderBookingDetailsComponent","OrderDetailsNotesComponent","CateringMenuOrderComponent","removeValue","orderDetailsKey","openGroupModal","parent_id","_menu_items","_menu_categories","updateItemList","old_item","itm","openItemModal","deleteItem","removeFromMenu","loadCateringMenu","openCategoryModal","depth","item_details","showIndividualItem","statuses","colour","active_status","updateItemDetails","show_items","updated_booking","sub_item","sub_sub_item","viewOrderDetails","expandMore","filtered_orders","display_orders","deliver_at_time","isOtherCategory","orderList","filterOrdersByCategory","filterOrdersByCategoryType","itemSearchResults","filterOrdersByItemName","filteredOrders","matchingItems","findItemsMatchingSearch","locationMatches","organiserMatches","newOrder","itemMatches","subItems","newItem","findMatchingOrders","categoryName","findCategoryName","subOrder","itemName","subCategoryName","categoryType","filterMatchingItems","filteredSubItems","flat","toFlatten","_upload_manager","fileReader","uploading","arrayBuffer","blob","blobUtil","arrayBufferToBlob","upload","file_name","uploads","complete","access_url","readAsArrayBuffer","storeBooking","editing","new_note","order_id","pending_booking","addNote","AccessDenied","SidebarComponent","TopbarHeaderComponent","show_add_item","show_events","dateChangeTz","timezone_value","event_map","dateInputTz","changeDate","noOfCount","applyDatePickerValue","LoginComponent","username","password","logo","login","ReportDisplayComponent","_reports","multipleLocations","locationChanged","report","report_data","downloadCSV","checkDates","generateReport","downloadReport","NewlineToBRPipe","pure","ReportTableComponent","sortField","sortOrder","hide_fields","isSortingDisabled","sortTable","sortedList","aValue","bValue","dateWithTimeRegex","parseDateString","datePart","timePart","formattedDate","disabledFields","ReportsComponent","reports","multi_locations","active_report","BulkQrOverlayComponent","selectItemChange","selectAllChange","downloadQrCodeRequested","cancelClick","qrCodeUrlsChange","qrCodeUrls","qrTabClick","itemsCheckboxes","newArr","isLevel","checkbox","selectAll","roomname","checkedRoomObj","checkedLevelObj","checkedFlag","assign","allLevels","onSubmit","onSelectAllChange","ManagePhotosComponent","resizeService","readLocalPicService","httpClient","imageInitial","imageToModify","photoArray","photoUploadArray","uploadError","uploadingStatus","resizedFiles","requiredFileType","RequiredFileType","photos","indexToReplace","canvas","context","getContext","ext","unusedIdx","readFileInput","base64Img","that","resizeImage","RoomPhotoDiamension","outputFormat","imgResized","createImage","clearRect","drawImage","dataURL","toDataURL","uploadProgress","obs","img","FormData","b64toFile","tap","updateProgressMeter","suffixes","failedNo","photo","photoName","deleteSpacePhotos","photo_name","RoomAdminComponent","RoomDetailsWrapperComponent","RoomAdminRoutingModule","cdref","roomAdminService","detailsViewIndex","rowInfo","enableOverlay","updatePayload","roomDataSource","roomnum","roomtype","roomobject","newUrls","doc","isRoom","qrcode","imageData","drawCanvas","addImage","addPage","ResizeService","ReadLocalPicService","RoomAdminService","MatTableModule","MatPaginatorModule","MatSortModule","QRCodeModule","RoomsTableComponent","RoomDetailsComponent","FileDragNDropDirective","cd","getCurrentNavigation","getToRoomList","_snackBar","givenRoomType","givenRoomSubType","uploadedPhotos","parentFun","disableButtons","windowLocation","roomImages","history","pushState","cityname","rowInfoData","externalSubset","roomSubsetOptions","internal","roomSubType","givenCateringAvailability","setAllDropdowns","reactiveForm","roomnumber","roomvisibility","isFeatureChecked","conference_phone","wireless_content_sharing","flipchart","glassboard","whiteboard","boardroom","cocktail","theatre","workshop","u_shape","miscellaneous","roomImagesFileSlug","imgArr","formValue","roomObject","allowed_keys","getExtraFeatures","excludeFromExtraFeatures","isEqAndDetail","updateAllRooms","markAsPristine","roomTypeDD","ddBoxClass","roomTypeOptions","roomTypeChanged","roomSubsetDD","roomTypeSubsetChanged","roomVisibilityDD","roomVisibilityOptions","roomVisibilityChanged","canteringAvailabilityDD","canteringAvailabilityOptions","roomCateringChanged","subset","visibility","isCatering","arcY","arc_X_Center","otrRadius","whtRadius","innrRadius","ctx","strokeStyle","moveTo","lineTo","stroke","font","textAlign","fillText","beginPath","arc","PI","fillStyle","fillRect","roomid","win","write","downloadQRPdf","openManagePhotosModal","EXAMPLE_DATA","RoomsTableDataSource","datatwo","dataMutations","paginator","sortChange","getPagedData","getSortedData","startIndex","pageIndex","pageSize","isAsc","compare","DataSource","onDetailsClick","rowClicked","displayedColumns","dataSource","formattedInputValue","inputValue","firstChange","table","firstPage","navigationExtras","skipLocationChange","MatPaginator","MatSort","MatTable","errorMessage","NOT_FOUND_ERR","SECURITY_ERR","ABORT_ERR","NOT_READABLE_ERR","ENCODING_ERR","NO_MODIFICATION_ALLOWED_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","QUOTA_EXCEEDED_ERR","TYPE_MISMATCH_ERR","PATH_EXISTS_ERR","inputFile","File","FileList","Blob","onabort","eventErrorDecoder","onerror","readAsDataURL","dataURI","byteString","atob","mimeString","ab","ArrayBuffer","ia","Uint8Array","crossOrigin","cnv","tmpCanvas","cnx","isCanvasSupported","sizeScale","resizeImageWidthHeight","resizeImageBySize","mainCanvas","pixelStepWidth","pixelStepHeight","newWidth","newHeight","resizeCanvas","targetSize","tmpResult","sizeOfTheImage","calulateImageSize","divideStrategy","iteratorLimit","newImageSize","sizeOfTheImageTmp","imgString","isForLevels","filesChangeEmiter","borderStyle","borderColor","borderRadius","dataTransfer","HostBinding","COMPONENTS","DIRECTIVES","CDK_MODULES","DragDropModule","CdkTableModule","APipesModule","ACustomEventsModule","loading_state","mod","EventFormComponent","visitorFG","createVisitor","getVisitors","filteredAttendees","getFilteredAttendees","actualIndex","removeAt","at","VisitorFormComponent","personChange","VisitorsFormModalComponent","fb","attendeesStatus","visitors","attendee","VisitorBookingItemComponent","matched_attendees","checked_in_users","host_email","response_type","is_match","checkedInStatus","subject","VisitorTimelineComponent","filtered_bookings","updateEvents","show_all","unsorted_bookings","VisitorComponent","_element","VisitorsComponent","hmr","general","copyright","booking_types","show_fields","html_body","multiple_spaces","desk_start","day_view","dragdrop","enableProdMode","platformBrowser","bootstrapModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAE,KALN;AAMNc,mBAAW,EAAE;AANP,OAF4C;AAUtDk7B,SAAG,EAAHA,GAVsD;AAWtD57B,UAAI,EAAE,KAXgD;AAYtDiB,cAAQ,EAAE;AAZ4C,KAA7C;;;;;;;;;;;;;;;;;;;;AChJb;AAAA;AAAA;;AAIA;AAAA;AAAA;;;;;;;;;;AAEA,QAAI,cAAAsmC,WAAA,CAAYC,UAAhB,EAA4B;AAC1B,aAAAyoD,cAAA;AACD;;AAED,wBAAAC,eAAA,GAAyBC,eAAzB,CAAyC,mBAAD,UAAxC,WACS,UAAApsF,GAAG;AAAA,aAAIxX,OAAO,CAACmY,KAAR,CAAcX,GAAd,CAAJ;AAAA,KADZ","file":"main-es5.js","sourcesContent":["export * from './lib/animations.module';\nexport * from './lib/angular-animations'\n","import { trigger, transition, style, animate, state } from '@angular/animations';\n\nexport const ANIMATION_SHOW_ENTER_LEAVE = trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(300, style({ opacity: 1, height: '*' }))\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(300, style({ opacity: 0, height: 0 }))\n ])\n]);\n\nexport const ANIMATION_SHOW_CONTRACT_EXPAND = trigger('show', [\n state('show', style({ opacity: 1, height: '*' })),\n state('hide', style({ opacity: 0, height: 0 })),\n transition('show <=> hide', animate('200ms ease-in'))\n]);\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class AnimationsModule {}\n","export * from './lib/base.module';\nexport * from './lib/types.utilities';\nexport * from './lib/general.utilities';\nexport * from './lib/base.class';\nexport * from './lib/base.directive';\nexport * from './lib/date.utils'\nexport * from './lib/date.spec-helpers'\nexport * from './lib/replace.pipe'\nexport * from './lib/cdk-drop-list-scroll-container.directive'\nexport * from './lib/image.directive';\n","import { Subscription, BehaviorSubject } from \"rxjs\";\n\nexport class BaseClass {\n /** Store for named timers */\n protected _timers: { [name: string]: number } = {};\n /** Store for named intervals */\n protected _intervals: { [name: string]: number } = {};\n /** Store for named subscription unsub callbacks */\n protected _subscriptions: { [name: string]: (Subscription | (() => void)) } = {};\n /** Subject which stores the initialised state of the object */\n protected readonly _initialised = new BehaviorSubject(false);\n\n /** Observable of the initialised state of the object */\n public get initialised(): BehaviorSubject {\n return this._initialised;\n }\n /** Whether the object has been initialised */\n public get is_initialised(): boolean {\n return this._initialised.getValue();\n }\n\n protected destroy() {\n for (const key in this._timers) {\n if (this._timers.hasOwnProperty(key)) {\n this.clearTimeout(key);\n }\n }\n for (const key in this._intervals) {\n if (this._intervals.hasOwnProperty(key)) {\n this.clearInterval(key);\n }\n }\n for (const key in this._subscriptions) {\n if (this._subscriptions.hasOwnProperty(key)) {\n this.unsub(key);\n }\n }\n }\n\n /**\n * Creates a named timer\n * @param name Name of the timer\n * @param fn Callback function for the timer\n * @param delay Callback delay\n */\n protected timeout(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearTimeout(name);\n this._timers[name] = setTimeout(() => {\n fn();\n this._timers[name] = null;\n }, delay);\n } else {\n throw new Error(\n name ? 'Cannot create named timeout without a name' : 'Cannot create a timeout without a callback'\n );\n }\n }\n\n /**\n * Clears the named timer\n * @param name Timer name\n */\n protected clearTimeout(name: string) {\n if (this._timers[name]) {\n clearTimeout(this._timers[name]);\n this._timers[name] = null;\n }\n }\n\n /**\n * Creates a named interval\n * @param name Name of the interval\n * @param fn Callback function for the interval\n * @param delay Callback delay\n */\n protected interval(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearInterval(name);\n this._intervals[name] = setInterval(() => fn(), delay);\n } else {\n throw new Error(\n name ? 'Cannot create named interval without a name' : 'Cannot create a interval without a callback'\n );\n }\n }\n\n /**\n * Clears the named interval\n * @param name Timer name\n */\n protected clearInterval(name: string) {\n if (this._intervals[name]) {\n clearInterval(this._intervals[name]);\n this._intervals[name] = null;\n }\n }\n\n /**\n * Store named subscription\n * @param name Name of the subscription\n * @param unsub Unsubscribe callback or Subscription object\n */\n protected subscription(name: string, unsub: Subscription | (() => void)) {\n this.unsub(name);\n this._subscriptions[name] = unsub\n }\n\n /**\n * Call unsubscribe callback with the given name\n * @param name\n */\n protected unsub(name: string) {\n if (this._subscriptions && this._subscriptions[name]) {\n this._subscriptions[name] instanceof Subscription\n ? (this._subscriptions[name] as Subscription).unsubscribe()\n : (this._subscriptions[name] as any)();\n this._subscriptions[name] = null;\n }\n }\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\n\n@Directive({\n selector: 'a-very-basic-component-base-that-should-not-be-used'\n})\nexport class BaseDirective extends BaseClass implements OnDestroy {\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NumbersOnlyDirective } from './numbers-only.directive';\n\n@NgModule({\n imports: [CommonModule,],\n declarations: [\n NumbersOnlyDirective\n ],\n exports: [\n NumbersOnlyDirective\n ]\n})\nexport class BaseModule {\n}\n","import {\n Directive,\n Input,\n Renderer2,\n SimpleChanges,\n OnChanges,\n ContentChildren,\n QueryList,\n AfterContentInit\n} from '@angular/core';\nimport { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport { BaseDirective } from './base.directive';\n\nexport enum ScrollDirection {\n NONE,\n X,\n Y,\n BOTH\n}\n\n@Directive({\n selector: '[cdkDropList][scrollContainer]'\n})\nexport class CdkDropListScrollContainer extends BaseDirective\n implements OnChanges, AfterContentInit {\n /** Direction of scroll to determine updating the position of the drop list */\n @Input() direction: ScrollDirection = ScrollDirection.X;\n /** Name of the scroll container for the list */\n @Input() scrollContainer: string;\n /** Scroll container element */\n public element: HTMLElement;\n /** Last scroll position */\n public last_scroll: { x: number; y: number } = { x: 0, y: 0 };\n\n /** Draggable children elements */\n @ContentChildren(CdkDrag) private items: QueryList;\n\n constructor(private _cdkDropList: CdkDropList, private _renderer: Renderer2) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.scrollContainer && this.scrollContainer) {\n this.element = this._cdkDropList.element.nativeElement.closest(\n this.scrollContainer\n ) as HTMLElement;\n }\n }\n\n public ngAfterContentInit(): void {\n this.subscription(\n 'drag_items',\n this.items.changes.subscribe((items: QueryList) => {\n const list = items.toArray();\n list.forEach((i, index) => {\n this.subscription(\n `list-item-${index}`,\n this._renderer.listen(i.element.nativeElement, 'mousedown', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'mouseup', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n this.subscription(\n `list-item-touch-${index}`,\n this._renderer.listen(i.element.nativeElement, 'touchstart', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'touchend', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n });\n })\n );\n }\n\n /** Start listing for scroll events on the container */\n public onDrag() {\n if (this.element) {\n this.subscription(\n 'scroll',\n this._renderer.listen(this.element, 'scroll', () => this.updateListPosition())\n );\n }\n }\n\n /** Stop listening for scroll events on the container */\n public onDrop() {\n this.unsub('scroll');\n }\n\n /**\n * Forcefully update the position data of the drop list\n */\n private updateListPosition() {\n this.timeout(\n 'update_positions',\n () => {\n const scroll = { x: this.element.scrollLeft, y: this.element.scrollTop };\n if (\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.Y) &&\n scroll.y !== this.last_scroll.y) ||\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.X) &&\n scroll.x !== this.last_scroll.x)\n ) {\n (this._cdkDropList._dropListRef as any)._cacheOwnPosition();\n (this._cdkDropList._dropListRef as any)._siblings.forEach(i =>\n i.isReceiving() ? i._cacheOwnPosition() : null\n );\n }\n this.last_scroll = scroll;\n },\n 50\n );\n }\n}\n","import MockDate from 'mockdate';\n\n/**\n * August 13, 2020 at 7:22:12 UTC\n */\nconst initialTime = 1597346532 * 1000;\n\nexport const mockDate = (timeOverride = initialTime) => MockDate.set(new Date(timeOverride));\n\nexport const resetDate = () => MockDate.reset();\n","import { DateNow, DateTZ } from '@mckinsey-converge/date-tz'\nimport { DateTime } from 'luxon';\nimport * as dayjs from 'dayjs';\nimport {\n dayJsHoursMinutes,\n dayJsTimeFormatString,\n} from './general.utilities';\n\n/**\n * Allows you to split up durations into a group.\n */\nexport interface DurationGroup {\n /**\n * Step amount to generate between start and max.\n */\n step: number;\n /**\n * Where to start in minutes.\n */\n start: number;\n /**\n * Where to end in minutes.\n */\n max: number;\n}\n\n/**\n * Find the multiple of `stepMinute` which is closest to the 'minutes' property of the given date.\n * @param date - Any Lexon date.\n * @param stepMinute - The number of minutes between one timeslot and the next. Integer value\n * 1 to 59, inclusive.\n */\n// R--- depreciate this one\nexport const closestToTimeSlot = (date: DateTime, stepMinute: number, start: number = 0) : DateTime => {\n return date.set({ millisecond: 0, second: 0, minute: Math.ceil(date.minute / stepMinute) * stepMinute })\n .plus({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\nexport const closestToTimeSlotTz = (dateTz: DateTZ, stepMinute: number, start: number = 0) : DateTZ => {\n return dateTz.setValue({ millisecond: 0, second: 0, minute: Math.ceil(dateTz.minutes / stepMinute) * stepMinute })\n .addValue({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as hrs, or minutes as mins\n */\nexport function durationHumanized(duration: number, short: boolean = false): string {\n if (!duration || duration < 0) {\n return '';\n }\n const h = Math.floor(duration / 60);\n let d = `${h >= 1 ? h + (short ? ' hr' : ' hour' + (h === 1 ? '' : 's')) : ''}`;\n if (duration % 60 !== 0) {\n if (d) {\n d += short ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${m >= 1 ? m + (short ? ' min' : ' minute' + (m === 1 ? '' : 's')) : ''}`;\n }\n return d;\n}\n\nexport const weekDayMonthYearFormat = (date: DateTZ): string => date.formatDate('ccc dd MMM yyyy');\n\n/**\n * Tries to extract best-fit input\n * @return undefined if not valid. otherwise if good\n */\nexport const extractDateFromInput = (input: string,\n checkHour,\n startDate: dayjs.Dayjs): dayjs.Dayjs | undefined => {\n // check if input has am/pm or normal 24 hour time.\n // let date = dayjs(input, 'HH:mm');\n // let date = dayjs(input, 'h:mma');\n let date = dayjs(input, dayJsTimeFormatString());\n if (!date.isValid()) {\n // patch if time is in format xx:x to assume you meant xx:x0\n let cleanedInput = input;\n const times = input.split(':');\n if(!input){\n return undefined\n }\n if (times.length === 2) {\n if (times[1].length === 1) {\n cleanedInput = `${times[0]}:${times[1]}0`;\n }\n }\n // may be other input, lets try next value (without am/pm)\n date = dayjs(cleanedInput, dayJsHoursMinutes());\n // might be just purely an hour\n if (!date.isValid() && checkHour) {\n date = dayjs(input, 'H');\n }\n }\n // We expect input times to be in the future. If now is in the afternoon, this\n // simple block will ensure the returned date is also in the afternoon.\n //\n // NB: dayjs parses times as morning by default.\n if (date.isValid()) {\n // Move to the selected start date\n date = date.month(startDate.month()).date(startDate.date()).year(startDate.year());\n if (startDate.hour() > date.hour() && date.date() === startDate.date()) {\n date = date.set('hour', date.hour() + 12);\n }\n }\n\n return date.isValid() ? date : undefined;\n};\n\n\n/**\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 3. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n * @param step The step between time slots.\n * @param input The input text.\n */\nexport const nearestStepToInput = (\n step: number,\n input: string,\n currentStartDate: number,\n start: number = 0\n): string => {\n let date = extractDateFromInput(input, false, dayjs(currentStartDate));\n if (date) {\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, step, start);\n return closestDate.toFormat(dayJsHoursMinutes());\n } else {\n return input;\n }\n};\n/**\n * Similiar to {@link nearestStepToInput} instead:\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds which duration group is closest to the currentStartDate. If not found\n * return vanilla text.\n * 3. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 4. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n */\nexport const nearestDurationToInput = (durationGroups: DurationGroup[],\n currentStartDate: number,\n value: string): string => {\n\n let date = extractDateFromInput(value, false, dayjs(currentStartDate));\n\n if (!date) {\n // Check if the input is a duration \n const duration = parseInt(value);\n if (typeof (duration) === 'number' && value.indexOf(':') === -1 && duration > 12) {\n date = dayjs(currentStartDate).add(duration, 'm');\n }\n }\n\n if (date) {\n const minutes = date.diff(currentStartDate, 'minute');\n const closestDurationGroup = durationGroups.find(d => {\n return (minutes <= d.max);\n });\n if (closestDurationGroup) {\n const offset = [closestDurationGroup].reduce((previousValue, currentValue) => {\n return previousValue + currentValue.start;\n }, 0);\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, closestDurationGroup.step, 0);\n return closestDate.toFormat(dayJsHoursMinutes());\n }\n }\n\n return value;\n};\n\nexport const resetSecondsOnTimestamp = (timestamp: number) => {\n return DateTime.fromMillis(timestamp).set({ second: 0, millisecond: 0 }).toMillis();\n}\n\nexport const formatDateWithSuffix = (date: string): string => {\n const dateObj = new Date(date);\n const day = dateObj.getDate();\n const month = dateObj.toLocaleString(\"default\", { month: \"short\" });\n const year = dateObj.getFullYear();\n return `${day}${nthNumber(day)} ${month} ${year}`; //this.event.date_string;\n}\n\nconst nthNumber = (number) => {\n return number > 0\n ? [\"th\", \"st\", \"nd\", \"rd\"][\n (number > 3 && number < 21) || number % 10 > 3 ? 0 : number % 10\n ]\n : \"\";\n};\n\nexport const getListOfDateFormat = () => {\n return [\t\n 'MMMM dd y', \t//March 07 2023\n 'MMM dd, y',\t//Mar 07 2023\n 'MMMM dd',\t\t//March 07\n 'MMM dd', \t\t//Mar 07\n 'MM dd', \t\t//03 07\n\n 'MM-dd-yy',\t\t//03-07-23\n 'MM-dd-yyyy',\t//03-07-2023\n 'MMMM-dd-yyyy', //March-07-2023\n 'MMMM-dd-yy',\t//March-07-23\n\n 'MMMM-dd',\t\t//March-07\n 'MMM-dd',\t\t//Mar-07\n \n 'MMM-dd-y',\t\t//Mar-07-2023\n\n 'MM/dd',\t\t//03/07\n 'MM/dd/yy',\t\t//03/07/23\n 'MM/dd/yyyy',\t//03/07/2023\n \n 'dd/MM',\t\t//07/03\n 'dd/MM/yy',\t\t//07/03/23\n 'dd/MM/yyyy',\t//07/03/2023\n \n 'dd-MMMM',\t\t//07-March\n 'dd MMMM',\t\t//07 March\n 'dd-MMM',\t\t//07-Mar\n 'dd MMM',\t\t//07 Mar\n\n 'dd-MM-y',\t\t//07-03-23\n 'dd MMMM yy',\t//07 March 23\n \n 'dd/MMM/y',\t //07/Mar/2023\n 'dd/MMMM/y', //07/March/2023\n 'dd/MMM/yy', //07/Mar/23\n 'dd/MMMM/yy', //07/March/23\n \n\n 'dd-MMMM-yy',\t//07-March-23\n 'dd-MMM-yy',\t//07-Mar-23\n 'dd-MM-yy',\t\t//07-03-23\n 'MMMM-dd-yy',\t//March-07-23\n 'MMM-dd-yy',\t//Mar-07-23\n\n 'MMMM dd yy',\t//March 07 23\n 'MMM dd, yy',\t//Mar 07 23\n 'MM dd, yy',\t//03 07 23\n\n 'dd MMMM y',\t//07 March 2023\n 'dd MMM, y',\t//07 Mar 2023\n 'dd MM, yy',\t//07 03, 23\n 'dd-MMM-y',\t//07-Mar-2023\n\n 'h:mm a', // 3:30 pm\n 'h:mma' // 3:30 pm\n\n ];\n}","import { HashMap, Point } from './types.utilities';\n\nimport * as dayjs from 'dayjs';\nimport * as utc from 'dayjs/plugin/utc';\nimport * as timezone from 'dayjs/plugin/timezone';\nimport * as isToday from 'dayjs/plugin/isToday';\nimport * as weekday from 'dayjs/plugin/weekday';\nimport * as customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n// TODO: this is not the best place to import this timezone addition\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isToday);\ndayjs.extend(weekday);\ndayjs.extend(customParseFormat);\n\n/** Available console output streams. */\nexport type ConsoleStream = 'debug' | 'warn' | 'log' | 'error' | 'info';\n\n/**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\nexport function log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false,\n app_name: string = 'STAFF'\n) {\n if ((window as any).debug || force) {\n const colors: string[] = [\n 'color: #E91E63',\n 'color: #3F51B5',\n 'color: default',\n ];\n if (args) {\n console[stream](\n `%c[${app_name}]%c[${type}] %c${msg}`,\n ...colors,\n args\n );\n } else {\n console[stream](`%c[${app_name}]%c[${type}] %c${msg}`, ...colors);\n }\n }\n}\n\n/**\n * Get item from the nested object\n * @param keys List of sub-keys to search for\n * @param map Object to search\n */\n export function getItemWithKeys(keys: string[], map: HashMap) {\n const key = keys[0];\n if (map && key in map) {\n return keys.length > 1\n ? getItemWithKeys(keys.slice(1), map[key] || {})\n : map[key];\n }\n return null;\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the platform is a mobile device.\n */\nexport function isMobileDevice(): boolean {\n const r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;\n return !!navigator.userAgent.match(r);\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Mobile Safari.\n */\nexport function isMobileSafari(): boolean {\n const agent = navigator.userAgent;\n return !!(\n agent.match(/iPhone|iPad|iPod/) &&\n agent.match(/AppleWebKit/) &&\n !agent.match('CriOS')\n );\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Android Chrome.\n */\nexport function isAndroidChrome(): boolean {\n const agent = navigator.userAgent;\n return !!(agent.match(/Android/) && agent.match(/Chrome/));\n}\n\n/**\n * Generate string representation of a number with zeros padding the length\n * @param value Number to pad with zeros\n * @param length Length of the resulting string\n */\nexport function padZero(value: number, length: number): string {\n let str = value.toString();\n while (str.length < length) {\n str = '0' + str;\n }\n return str;\n}\n\n/**\n * Remove duplicates from the given array\n * @param array List of items to remove duplicates from\n * @param key Key on array objects to compare for uniqueness\n */\nexport function unique(array: T[], key: keyof T | undefined = undefined) {\n return array.filter(\n (el, pos, arr) =>\n el &&\n arr.indexOf(\n key\n ? arr.find((i) => i && i[key] === el[key])\n : arr.find((i) => i === el)\n ) === pos\n );\n}\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as h\n */\nexport function humaniseDuration(durationInput: number, size: string = 'long') {\n const duration = Math.floor(durationInput);\n if (!duration || duration < 0) {\n return '';\n }\n let singular = false;\n let format = { hours: ' hour', minutes: ' minute' };\n switch (size) {\n case 'medium':\n format = { hours: 'hr', minutes: 'min' };\n break;\n case 'short':\n format = { hours: 'h', minutes: 'm' };\n singular = true;\n break;\n }\n const h = Math.floor(duration / 60);\n let d = `${\n h >= 1\n ? h +\n (singular ? format.hours : format.hours + (h === 1 ? '' : 's'))\n : ''\n }`;\n if (duration % 60 !== 0) {\n if (d) {\n d += singular ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${\n m >= 1\n ? m +\n (singular\n ? format.minutes\n : format.minutes + (m === 1 ? '' : 's'))\n : ''\n }`;\n }\n return d;\n}\n\n/**\n * Get a filtered list of items\n * @param filter Value to filter on\n * @param items List of results to filter\n * @param fields Fields to check for matches on each item\n */\nexport function filterList(\n filter: string,\n items?: T[],\n fields: string[] = ['id']\n): T[] {\n let results: any[];\n // Tokenise filter string\n const filters = (filter || '').toLowerCase().split(' ');\n const list = {};\n for (const f of filters) {\n /* istanbul ignore else */\n if (f) {\n /* istanbul ignore else */\n if (!list[f]) {\n list[f] = 0;\n }\n list[f]++;\n }\n }\n // Group similar tokens\n const parts = [];\n for (const f in list) {\n /* istanbul ignore else */\n if (list.hasOwnProperty(f)) {\n parts.push({ word: f, count: list[f], regex: new RegExp(f, 'gi') });\n }\n }\n parts.sort(\n (a, b) => b.word.length - a.word.length || a.word.localeCompare(b.word)\n );\n const item_list = JSON.parse(JSON.stringify(items || []));\n /* istanbul ignore else */\n if (filter) {\n results = item_list.filter((item) => {\n let match_count = 0;\n item.match_index = 65535;\n item.match = '';\n const field_list = {};\n // Initialise field match variables\n for (const f of fields) {\n field_list[f] = {\n value: (item[f] || '').toLowerCase(),\n index: 65536,\n matched: 0,\n };\n }\n // Search for matches with the tokenised filter string\n for (const i of parts) {\n /* istanbul ignore else */\n if (i.word) {\n // Check fields for matches\n for (const f of fields) {\n const field = field_list[f];\n const index = field.value.indexOf(i.word);\n field.index = index < field.index ? index : field.index;\n field.matches = (\n field.value.match(i.regex) || []\n ).length;\n field.value = field.value.replace(i.regex, ' ');\n }\n // Update token match count\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.matches >= i.count) {\n match_count++;\n // Update field matches\n let changed = 0;\n const tokens = (\n item[`match_${f}`] ||\n item[f] ||\n ''\n ).split(' ');\n for (const k of tokens) {\n /* istanbul ignore else */\n if (changed >= i.count) {\n break;\n }\n /* istanbul ignore else */\n if (\n k.toLowerCase().indexOf(i.word) >= 0 &&\n k.indexOf('`') < 0\n ) {\n tokens[tokens.indexOf(k)] = k.replace(\n i.regex,\n '`$&`'\n );\n changed++;\n }\n }\n item[`match_${f}`] = tokens.join(' ');\n break;\n }\n }\n }\n }\n // Get field with the most relevent match\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.index < item.match_index && field.index >= 0) {\n item.match_index = field.index;\n item.match = f;\n }\n }\n return (\n item.match_index >= 0 &&\n item.match &&\n match_count >= parts.length\n );\n });\n } else {\n results = item_list;\n }\n // Sort by order of relevence then name\n results.sort((a, b) => {\n const diff = a.match_index - b.match_index;\n return diff === 0 ? a.name.localeCompare(b.name) : diff;\n });\n return results;\n}\n\n/**\n * Convert a match string from `filterList` to renderable HTML\n * @param str Match string to change\n */\nexport function matchToHighlight(str: string): string {\n /* istanbul ignore else */\n if (str) {\n str = str.replace(\n /\\`[a-zA-Z0-9\\@\\.\\_]*\\`/g,\n '$&'\n );\n str = str.replace(/\\`/g, '');\n }\n return str;\n}\n\n/**\n * Convert time string to ms from UTC epoch for today\n * @param time Time string in the format `HH:mm`\n */\nexport function timeToDate(time: string): number {\n const parts = time.split(':');\n const date = DateNow(new Date())\n .setValue({\n hour: +parts[0],\n minute: +parts[1],\n })\n .startOfValue('minute');\n return date.ms;\n}\n\n/**\n * Generate a random number\n * @param ceil Biggest value to generate not inclusive\n * @param floor Smallest value to generate. Defaults to 0\n */\nexport function randomInt(ceil: number, floor: number = 0) {\n return Math.floor(Math.random() * (ceil - floor)) + floor;\n}\n\n/**\n * Get time format string for locale\n * @param isLowerCaseAmPm - if true, we use lowercase for am/pm.\n */\nexport function timeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const hoursMinutes = (): string => (is24HourTime() ? 'HH:mm' : 'h:mma');\n\nexport function dayJsTimeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const dayJsHoursMinutes = (): string =>\n is24HourTime() ? 'HH:mm' : 'h:mm';\n\n/**\n * Converts a timeZone name into a date object.\n * @param timeZoneName - name of timezone\n */\nexport const timezoneNameToDate = (\n timeZoneName: string | undefined\n): DateTZ | undefined => {\n let zone: DateTZ | undefined;\n if (timeZoneName) {\n try {\n zone = DateNow(new Date()).toZone(timeZoneName);\n } catch (e) {\n // invalid timezone. Suppress logs here.\n // console.error(e);\n }\n }\n return zone;\n};\n\nexport const timezoneDisplay = (date: DateTZ) =>\n !!date ? `${date.formatDate('ZZZZ')}` : '';\nexport const gmtOffsetDisplay = (date: DateTZ) =>\n !!date ? `(GMT${date.formatDate('ZZ')})` : '';\n\n/**\n * Returns a full time with timezone.\n * @param date\n */\nexport function timeWithZoneFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${timezoneDisplay(date)}`;\n}\n\nexport function timeWithGmtOffsetFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(date)}`;\n}\n\n/**\n * Returns a full start end range.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}`;\n}\n\n/**\n * Returns a full start end range with timezone.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeWithZoneFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(startDateTz)}`;\n}\n\n/**\n * Returns a full date with weekday day month year.\n * @param date\n * @param comma optional boolean to display a comma after the month\n */\nexport function dateLocalFormatString(date: DateTZ, comma?: boolean): string {\n if (comma) {\n return date.formatLocalDate('cccc d MMMM, yyyy');\n }\n return date.formatLocalDate('cccc d MMMM yyyy');\n}\n\nexport function dateBuildingFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('cccc d MMMM, yyyy');\n }\n return date.formatDate('cccc d MMMM yyyy');\n}\n\nexport function shorterLocalDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatLocalDate('ccc d MMM, yyyy');\n }\n return date.formatLocalDate('ccc d MMM yyyy');\n}\n\nexport function shorterBuildingDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('ccc d MMM, yyyy');\n }\n return date.formatDate('ccc d MMM yyyy');\n}\n\n/** Whether locale string is displayed in 24 hour time */\nexport function is24HourTime(): boolean {\n const date = new Date();\n const localeString = date\n .toLocaleTimeString(\n document.querySelector('html').getAttribute('lang') ||\n navigator.language\n )\n .toLowerCase();\n return localeString.indexOf('am') < 0 && localeString.indexOf('pm') < 0;\n}\n\n/* istanbul ignore next */\n/**\n * Downloads a file to the users computer with the given filename and contents\n * @param filename Name of the file to download\n * @param contents Contents of the file to download\n */\nexport function downloadFile(filename: string, contents: string) {\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' +\n encodeURIComponent('\\uFEFF' + contents)\n );\n element.setAttribute('download', filename);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\n/**\n * Parse raw CSV data into a JSON object\n * @param csv CSV data to parse\n */\nexport function csvToJson(csv: string) {\n const lines = csv.split('\\n');\n let fields = lines.splice(0, 1)[0].split(',');\n fields = fields.map((v) => v.replace('\\r', ''));\n const list: any[] = [];\n for (const line of lines) {\n let parts = line.split(',');\n parts = parts.map((v) => v.replace('\\r', ''));\n /* istanbul ignore else */\n if (parts.length >= fields.length) {\n const item: any = {};\n for (let i = 0; i <= parts.length; i++) {\n let part = null;\n part = parts[i];\n /* istanbul ignore else */\n if (part !== undefined) {\n item[(fields[i] || '').split(' ').join('_').toLowerCase()] =\n part;\n }\n }\n list.push(item);\n }\n }\n\n return list;\n}\n\n/**\n * Convert javascript array to CSV string\n * @param json Javascript array to convert\n */\nexport function jsonToCsv(json: HashMap[]) {\n /* istanbul ignore else */\n if (json instanceof Array && json.length > 0) {\n const keys = Object.keys(json[0]);\n const valid_keys = keys.filter((key) => json[0].hasOwnProperty(key));\n return `${valid_keys.join(',')}\\n${json\n .map((item) =>\n valid_keys\n .map((key) => {\n return typeof item[key] !== 'boolean'\n ? `\"${item[key] || ''}\"`\n : item[key];\n })\n .join(',')\n )\n .join('\\n')}`;\n }\n return '';\n}\n\n/* istanbul ignore next */\n/**\n * detect IE\n * returns version of IE or false, if browser is not Internet Explorer\n */\nexport function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n/**\n * Grab point details from mouse or touch event\n * @param event Event to grab details from\n */\nexport function eventToPoint(event: MouseEvent | TouchEvent): Point {\n if (!event) {\n return { x: -1, y: -1 };\n }\n if (event instanceof MouseEvent) {\n return { x: event.clientX, y: event.clientY };\n } else {\n return event.touches && event.touches.length > 0\n ? { x: event.touches[0].clientX, y: event.touches[0].clientY }\n : { x: -1, y: -1 };\n }\n}\n\n/* istanbul ignore next */\n/**\n * Flatten nested array\n * @param an_array Array to flatten\n */\nexport function flatten(an_array: T[]) {\n const stack = [...an_array];\n const res = [];\n while (stack.length) {\n // pop value from stack\n const next = stack.pop();\n if (Array.isArray(next)) {\n // push back array items, won't modify the original input\n stack.push(...next);\n } else {\n res.push(next);\n }\n }\n // reverse to restore input order\n return res.reverse();\n}\n\nconst seed = xmur3('PlaceOS');\nconst rand = sfc32(0x9e3779b9, 0x243f6a88, 0xb7e15162, seed());\n\nexport function predictableRandomInt(ceil: number = 100, floor: number = 0) {\n return Math.floor(rand() * (ceil - floor)) + floor;\n}\n\n// https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript\nfunction xmur3(str) {\n for (var i = 0, h = 1779033703 ^ str.length; i < str.length; i++)\n (h = Math.imul(h ^ str.charCodeAt(i), 3432918353)),\n (h = (h << 13) | (h >>> 19));\n return function () {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n}\n\nfunction sfc32(a, b, c, d) {\n return function () {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n var t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n\nexport function isLessThanBreakpoint(breakpoint: number): boolean {\n if (window) {\n return window.innerWidth < breakpoint;\n }\n return false;\n}\n\nexport function toTitleCase(str: string): string {\n return typeof str === 'string'\n ? str\n .toLowerCase()\n .split(' ')\n .map(function (word) {\n return word.replace(word[0], word[0].toUpperCase());\n })\n .join(' ')\n : '';\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\nimport { SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n@Directive({\n selector: 'a-very-basic-component-image-that-should-not-be-used'\n})\nexport class ImageDirective extends BaseClass implements OnDestroy {\n public foundImages?: SpaceImageObject[];\n public loadImages?: BehaviorSubject\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import {\n Directive,\n ElementRef,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=number], input[numbersOnly]'\n})\nexport class NumbersOnlyDirective {\n\n constructor(private _el: ElementRef) {\n }\n\n @HostListener('input', ['$event']) onInputChange(event) {\n const initalValue = this._el.nativeElement.value;\n this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');\n if (initalValue !== this._el.nativeElement.value) {\n event.stopPropagation();\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'replace'\n})\nexport class ReplacePipe implements PipeTransform {\n\n transform(value: string, from: string = '_', to: string = ' '): string {\n return (value|| '').split(from).join(to);\n }\n}\n","export * from './lib/bookings.module';\nexport * from './lib/bookings.actions'\nexport * from './lib/bookings.reducer'\nexport * from './lib/bookings.types'\nexport * from './lib/bookings.utils'\n","\nimport { IBookingQueryOptions, PaginatedBooking } from '@mckinsey-converge/data-common';\nimport { \n createLoadingAction\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n MyBookingsState,\n MyBookingsStoreState,\n} from './bookings.types';\nimport {\n createAction,\n props\n} from '@ngrx/store';\n\nexport const bookingStateSelector = (state: MyBookingsStoreState) => state.bookings;\n\nexport const loadBookingsWithQuery = createAction('[Bookings] Load Bookings with query', props());\n\nexport const loadHomepageBookingsResults = createLoadingAction('HomepageBookings', 'homepage');\n\nexport const loadUpcomingBookingsResults = createLoadingAction('UpcomingBookings', 'upcoming');\n\nexport const loadPastBookingsResults = createLoadingAction('PastBookings', 'past');\n\nexport const loadCancelledBookingsResults = createLoadingAction('CancelledBookings', 'cancelled');\n\nexport const loadBookingByIdResults = createLoadingAction('BookingById', 'bookingById');\n\nexport const clearBookingByIdResults = createAction('[BookingById] Clear Booking Data');\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType\n} from '@ngrx/effects';\nimport {\n IBookingQueryOptions,\n BookingsPaginatedService\n} from '../../../data-common/src/lib/bookings';\nimport {\n createLoadingEffect,\n LoadingAction\n} from '@mckinsey-converge/loading';\nimport {\n loadHomepageBookingsResults,\n loadPastBookingsResults,\n loadUpcomingBookingsResults,\n loadCancelledBookingsResults,\n loadBookingsWithQuery,\n loadBookingByIdResults\n} from './bookings.actions';\nimport { mergeMap } from 'rxjs/operators';\nimport {\n\n} from './bookings.utils';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Injectable()\nexport class BookingsEffects {\n constructor(private actions: Actions,\n private bookingService: BookingsPaginatedService) {\n }\n\n @Effect()\n public afterBookingsRequestResultsLoadOthersEffect = this.actions.pipe(\n ofType(loadBookingsWithQuery),\n mergeMap((action: LoadingAction) => {\n const date = new DateTZ({date: action.from})\n const yourBookingsRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.subtractValue({ minutes: 5 }).seconds}`,\n },\n include_rooms: true\n };\n const upcomingRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.seconds}`,\n },\n include_rooms: true\n };\n const pastRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n end_epoch: `<${date.seconds}`,\n },\n include_rooms: true\n };\n const cancelledRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: true,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n },\n include_rooms: true\n };\n const byIdRequest = {\n email: action.email,\n id: action.id,\n pagination: true,\n limit: 1,\n include_rooms: true\n };\n\n const effects = [];\n switch(action.target) {\n case 'upcoming':\n effects.push(loadUpcomingBookingsResults.request(upcomingRequest));\n break;\n case 'past':\n effects.push(loadPastBookingsResults.request(pastRequest));\n break;\n case 'cancelled':\n effects.push(loadCancelledBookingsResults.request(cancelledRequest));\n break;\n case 'bookingById':\n effects.push(loadBookingByIdResults.request(byIdRequest));\n break\n case 'homepage':\n effects.push(loadHomepageBookingsResults.request(yourBookingsRequest));\n // effects.push(loadPastBookingsResults.request(pastRequest));\n break\n default:\n }\n return effects;\n })\n );\n\n @Effect()\n public loadHomepageBookingsResultsEffect = createLoadingEffect(this.actions, loadHomepageBookingsResults,\n (action) => this.bookingService.userBookings(action, `homepage-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadUpcomingBookingsResultsEffect = createLoadingEffect(this.actions, loadUpcomingBookingsResults,\n (action) => this.bookingService.userBookings(action, `upcoming-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n \n @Effect()\n public loadPastBookingsResultsEffect = createLoadingEffect(this.actions, loadPastBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `past-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadCancelledBookingsResultsEffect = createLoadingEffect(this.actions, loadCancelledBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `cancelled-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadBookingByIdResultsEffect = createLoadingEffect(this.actions, loadBookingByIdResults,\n (action) => \n this.bookingService.userBookings(action, `bookingById-${action.id}`));\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { bookingsReducer } from './bookings.reducer';\nimport { BookingsEffects } from './bookings.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n EffectsModule.forFeature([BookingsEffects]),\n StoreModule.forFeature('bookings', bookingsReducer)\n ]\n})\nexport class BookingsModule {\n}\n","import { LoadingModel } from '@mckinsey-converge/loading';\nimport {\n createReducer,\n on\n} from '@ngrx/store';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n clearBookingByIdResults,\n} from './bookings.actions';\nimport { MyBookingsState } from './bookings.types';\n \nimport { \n BookingFormState,\n clearBookingFormData,\n clearRoomFilters,\n openBookingSurvey,\n storeBookingFormData,\n storeRoomFilters\n} from '@mckinsey-converge/data-common';\n\n\nexport const initialBookingsState: MyBookingsState = {\n query: LoadingModel.empty(),\n homepage: LoadingModel.empty(),\n upcoming: LoadingModel.empty(),\n past: LoadingModel.empty(),\n cancelled: LoadingModel.empty(),\n bookingById: LoadingModel.empty(),\n};\n\nexport const bookingsReducer = createReducer(initialBookingsState,\n on(clearBookingByIdResults, (state: MyBookingsState) => ({\n ...state,\n bookingById: LoadingModel.empty(),\n }) as MyBookingsState),\n ...loadHomepageBookingsResults.ons,\n ...loadUpcomingBookingsResults.ons,\n ...loadPastBookingsResults.ons,\n ...loadCancelledBookingsResults.ons,\n ...loadBookingByIdResults.ons,\n );\n\n\n\n export const initialBookingFormState: BookingFormState = {\n activeFormFilters: []\n };\n \n export const bookingFormReducer = createReducer(initialBookingFormState,\n on(storeBookingFormData, (state: BookingFormState, action) => {\n return {\n ...state,\n activeForm: {\n ...state.activeForm,\n ...action.payload\n }\n } as BookingFormState;\n }),\n on(clearBookingFormData, state => ({\n ...state,\n activeForm: undefined\n }) as BookingFormState),\n on(openBookingSurvey, state => ({\n ...state,\n bookingCompleted: new Date()\n }) as BookingFormState),\n on(storeRoomFilters, (state: BookingFormState, action) => {\n return {\n ...state,\n activeFormFilters: action.payload\n } as BookingFormState;\n }),\n on(clearRoomFilters, (state: BookingFormState) => ({\n ...state,\n activeFormFilters: initialBookingFormState.activeFormFilters\n }) as BookingFormState)\n );\n \n","import { Booking } from '@mckinsey-converge/data-common';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport const mapBookingToSelectOption = (booking?: Booking): SelectOption => booking ? ({\n value: booking.id,\n display: booking.name\n}) : undefined;\n","import { \n createLoadingAction,\n} from '../../../loading/src/lib/loading.actions';\nimport {\n Building,\n BuildingCity,\n} from '../../../data-common/src/lib/organisation/building.class';\nimport {\n BuildingLevel,\n} from '../../../data-common/src/lib/organisation/level.class'\nimport {\n Organisation,\n} from '../../../data-common/src/lib/organisation/organisation.class'\nimport { createSelector } from '@ngrx/store';\nimport {\n BuildingState,\n BuildingStoreState\n} from './buildings.types';\n\nexport const loadBuildings = createLoadingAction('Buildings', 'data');\n\nexport const buildingStateSelector = (state: BuildingStoreState) => state.buildings;\n\nexport const selectLoadBuildingsSuccess = createSelector(buildingStateSelector, loadBuildings.selectors.optionalSuccess);\n\n/**\n * Groups buildings by city\n */\nexport const selectBuildingOptionsGroupedByCity = createSelector(loadBuildings.selectors.optionalSuccess, (success) => {\n if (success) {\n const mapped = new Map();\n success.forEach(s => {\n const found = Array.from(mapped.keys()).find(c => c.name === s.city);\n let list = found ? mapped.get(found) : undefined;\n if (!list) {\n list = [];\n mapped.set({\n name: s.city,\n timezone: s.timezone\n }, list);\n }\n list.push(s);\n });\n return mapped;\n }\n return new Map();\n});\n\nexport const selectLevelByZoneId = createSelector(selectLoadBuildingsSuccess,\n (buildings, param: string) => {\n if (buildings) {\n return buildings.map(b => b.levels.find((l: BuildingLevel) => l.id === param))\n ?.[0] ?? undefined;\n }\n return undefined;\n });\n","export * from './lib/data-common.module';\nexport * from './lib/booking';\nexport * from './lib/bookings';\nexport * from './lib/catering';\nexport * from './lib/location';\nexport * from './lib/organisation';\nexport * from './lib/spaces';\nexport * from './lib/users';\nexport * from './lib/app.service';\nexport * from './lib/hotkeys.service';\nexport * from './lib/base.service';\nexport * from './lib/base-api.class';\nexport * from './lib/reports'\nexport * from './lib/service-manager.class';\nexport * from './lib/settings.service';\nexport * from './lib/spec-helpers';\nexport * from './lib/settings.interfaces';\nexport * from './lib/validation.utilities';\nexport * from './lib/status.interfaces';\nexport * from './lib/recurrence/recurrence.utils';\nexport * from './lib/close-modal-dialog-service';\nexport * from './lib/validation.utilities';\nexport * from './lib/collapse-accordion-service';","import { HashMap } from '@mckinsey-converge/base';\n\n/**\n * Convert map into a query string\n * @param map Key value pairs to convert\n */\nexport function toQueryString(map: HashMap) {\n let str = '';\n if (map) {\n for (const key in map) {\n if (map.hasOwnProperty(key) && map[key] !== undefined && map[key] !== null) {\n str += `${(str ? '&' : '')}${key}=${map[key]}`;\n }\n }\n }\n return str;\n}\n","import {\n ApplicationRef,\n Injectable,\n NgZone,\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { take, first } from 'rxjs/operators';\n\nimport { ComposerService } from '@placeos/composer';\nimport { PlaceOSOptions } from '@placeos/ts-client';\nimport { HeapIoService } from '@acaprojects/ngx-heap-io';\n\nimport {\n BehaviorSubject,\n Observable,\n Subject\n} from 'rxjs';\n\nimport {\n ApplicationLoadingState,\n BaseClass,\n ConsoleStream,\n log\n} from '@mckinsey-converge/base';\nimport { SettingsService } from './settings.service';\n\nimport { HotkeysService } from './hotkeys.service';\nimport {\n ApplicationIcon,\n ComposerSettings\n} from './settings.interfaces';\nimport { EnvironmentService } from '../../../environment/src/lib/environment.service'; // '@mckinsey-converge/environment';\nimport {\n Store\n} from '@ngrx/store';\nimport { selectCurrentUser } from '../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../user/src/lib/user.types';\nimport { Booking } from './bookings';\nimport { filter } from 'rxjs/operators';\nimport { SnackBarService } from '../../../ui/src/lib/custom-snackbar-component/custom-snackbar-component.service';\n\ndeclare global {\n interface Window {\n application: ApplicationService;\n mock: {\n enabled: boolean;\n backend: any;\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApplicationService extends BaseClass {\n /** Map of state variables for Service */\n protected _subjects: {\n [key: string]: BehaviorSubject | Subject;\n } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n _kioskFormFilter: boolean;\n\n constructor(\n public store: Store,\n public analytics: HeapIoService,\n private _app_ref: ApplicationRef,\n private _zone: NgZone,\n private _title: Title,\n private _settings: SettingsService,\n private _hotkeys: HotkeysService,\n private _composer: ComposerService,\n private _snackbar: MatSnackBar,\n private _environment: EnvironmentService,\n private snack: SnackBarService\n\n ) {\n super();\n this.set('system', null);\n this.set('title', 'Home');\n this.set('loading', {});\n this.set('CONCIERGE.day_view.viewing', null);\n this.set('undo', new BehaviorSubject<{\n action: 'series' | 'booking',\n booking: Booking\n } | null>(null));\n\n this.set('APP.breakdown', false);\n\n this._app_ref.isStable.pipe(first(_ => _)).subscribe(() => {\n this._zone.run(() => {\n this.log('APP', `Application has stablised.`);\n this.waitForSettings();\n });\n });\n }\n\n public set kioskFormFilter(isIt: boolean) {\n this._kioskFormFilter = isIt;\n }\n\n public get kioskFormFilter():boolean {\n return this._kioskFormFilter \n }\n\n /** Analytics service */\n public get Analytics() {\n return {};\n }\n\n /** Hotkeys service */\n public get Hotkeys() {\n return this._hotkeys;\n }\n\n /**\n * Get a setting from the settings service\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n return this._settings.get(key);\n }\n\n /**\n * Title of the page\n */\n public set title(value: string) {\n const title_suffix = this.setting('app.title');\n this.set('title', value);\n this._title.setTitle(`${value ? value + ' | ' : ''}${title_suffix}`);\n }\n\n /**\n * Title of the page\n */\n public get title(): string {\n return this._title.getTitle();\n }\n\n /** Root API Endpoint */\n public get endpoint() {\n return `/api/staff/`;\n }\n\n /** Root API Endpoint for engine */\n public get engine_endpoint() {\n return this._composer.auth.api_endpoint + '/';\n }\n\n /** Whether settings has been loaded */\n public get has_settings(): boolean {\n return this._settings.is_initialised;\n }\n\n /**\n * Create notification popup\n * @param type CSS Class to add to the notification\n * @param message Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n * @param icon Icon to render to the left of the notification message\n */\n public notify(\n type: string,\n message: string,\n action: string = 'OK',\n on_action?: () => void,\n icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'info'\n }\n ): void {\n this.openSnack(message, type);\n // const snackbar_ref = this._snackbar.open(message, action, {\n // panelClass: [type],\n // duration: 5000\n // });\n // this.subscription(\n // 'snackbar_close',\n // snackbar_ref.afterDismissed().subscribe(() => {\n // this.unsub('snackbar_close');\n // this.unsub('notify');\n // })\n // );\n // if (action) {\n // on_action = on_action || (() => snackbar_ref.dismiss());\n // this.subscription(\n // 'notify',\n // snackbar_ref.onAction().subscribe(() => on_action())\n // );\n // }\n }\n\n public openSnack(message, type) {\n this.snack.openSnackBar(message, type, 5000);\n }\n \n /**\n * Create success notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifySuccess(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'done'\n };\n this.notify('success', msg, action, on_action, icon);\n }\n\n /**\n * Create error notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyError(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'error'\n };\n this.notify('error', msg, action, on_action, icon);\n }\n\n /**\n * Create warning notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyWarn(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'warning'\n };\n this.notify('warn', msg, action, on_action, icon);\n }\n\n /**\n * Create info notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyInfo(msg: string, action?: string, on_action?: () => void): void {\n this.notify('info', msg, action, on_action);\n }\n\n /**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\n public log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false\n ): void {\n log(type, msg, args, stream, force);\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n return this._subjects[name] && this._subjects[name] instanceof BehaviorSubject\n ? (this._subjects[name] as BehaviorSubject).getValue()\n : null;\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n public set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /** Wait for settings to be initialised before setting up the application */\n private waitForSettings() {\n // Wait until the settings have loaded before initialising\n this._settings.initialised.pipe(first(_ => _)).subscribe(() => this.init());\n }\n\n /**\n * Initialise application services\n */\n private init(): void {\n this.setupComposer();\n this.subscription('currentUser', this.store.select(selectCurrentUser)\n .pipe( filter(user => user !== undefined) )\n .pipe(take(1))\n .subscribe((user: any) => {\n // Once we know we have the user loaded.\n this.setupAnalytics(user?.fmno);\n })\n );\n this._composer.initialised.pipe(first(_ => _)).subscribe(() => {\n this._initialised.next(true);\n });\n // Add service to window if in debug mode\n if (window.debug) {\n window.application = this;\n }\n }\n\n /**\n * Initialise the composer library comms\n */\n private setupComposer(): void {\n this.log('SYSTEM', 'Setup up composer...');\n const loading: ApplicationLoadingState = this.get('loading');\n loading.composer = {\n message: 'Initialising service connection',\n state: 'loading'\n };\n this.set('loading', loading);\n // Get application settings\n const settings: ComposerSettings = this._settings.get('composer') || {};\n const protocol = settings.protocol || location.protocol;\n const host = settings.domain || location.hostname;\n const port = settings.port || location.port;\n const url = settings.use_domain ? `${protocol}//${host}:${port}` : location.origin;\n const route = host.includes('localhost') && port === '4200' ? '' : settings.route || '';\n const mock =\n this._settings.get('mock') ||\n location.href.includes('mock=true') ||\n localStorage.getItem('mock') === 'true';\n // Generate configuration object\n const config: PlaceOSOptions = {\n scope: 'public',\n host: `${host}:${port}`,\n auth_uri: `${url}/auth/oauth/authorize`,\n token_uri: `${url}/auth/token`,\n redirect_uri: `${location.origin}${route}/oauth-resp.html`,\n handle_login: !settings.local_login,\n mock\n };\n this._composer.setup(config);\n loading.composer = {\n message: 'Initialising service connection',\n state: 'complete'\n };\n this.set('loading', loading);\n }\n\n private setupAnalytics(fmno: string) {\n this.log('HEAP', `Loading heap ${this._environment?.heap_io_id}`);\n // Default Heap app ID via the default setting\n const heapIo = this._settings.get('app.heap_io');\n if (this._environment?.heap_io_id) {\n // Apply Heap app ID via the environmental setting\n heapIo.app_id = this._environment.heap_io_id;\n }\n if (heapIo) {\n this.analytics.load(heapIo);\n if (fmno) {\n this.analytics.identify(fmno);\n }\n } else {\n this.log('HEAP', `Heap could not be found for the current frontend ${this._settings.frontend}`);\n }\n }\n\n}\n","import { Subject } from 'rxjs';\n\nimport {\n BaseClass,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n ServiceLike,\n ServiceManager\n} from './service-manager.class';\n\nexport type ApiEventType = 'value_change' | 'item_saved' | 'reset' | 'other';\n\nexport interface ApiEvent {\n type: ApiEventType;\n metadata: T;\n}\n\n\nexport class BaseDataClass extends BaseClass {\n /** Subject for emitting events on the object */\n protected readonly event_subject = new Subject();\n /** Observable for events on this object */\n public readonly events = this.event_subject.asObservable();\n /** Unique Identifier of the object */\n public readonly id: string;\n /** Human readable name of the object */\n public readonly name: string;\n /** Email address associated with the object */\n public readonly email: string;\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(BaseDataClass);\n }\n\n constructor(raw_data: HashMap) {\n super();\n this.id = raw_data.id || raw_data.zone_id || raw_data.email || '';\n this.name = raw_data.name || '';\n this.email = `${raw_data.email || ''}`.toLowerCase();\n }\n\n /**\n * Save pending changes to server\n */\n public save(): Promise {\n if (this._service) {\n const form = this.toJSON();\n return new Promise((resolve, reject) => {\n const promise = this.id\n ? this._service.update(this.id, form)\n : this._service.add(form);\n promise.then(\n (d) => {\n this.event_subject.next({ type: 'item_saved', metadata: d });\n resolve(d);\n },\n (_) => reject(_)\n );\n });\n } else {\n Promise.reject('No service to process request');\n }\n }\n\n /**\n * Delete this item from the server\n */\n public delete(): Promise {\n if (this.id) {\n return this._service.delete(this.id);\n }\n }\n\n /**\n * Run task for this item on the service\n * @param task_name Name of the task\n * @param parameters Parameters to pass to the task request\n */\n public runTask(task_name: string, parameters: HashMap): Promise {\n if (this.id) {\n return this._service.task(this.id, task_name, parameters);\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: BaseDataClass): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._service;\n delete obj._changes;\n delete obj.event_subject;\n delete obj.events;\n // Remove parent private members\n delete obj._timers;\n delete obj._intervals;\n delete obj._subscriptions;\n delete obj._server_names;\n delete obj._initialised;\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substring(1)] || key.substring(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): BaseDataClass {\n return new BaseDataClass(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): BaseDataClass {\n return new BaseDataClass({ ...this, id: null, email: null });\n }\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseDataClass } from './base-api.class';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class BaseAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = typeof query_params.cache !== 'boolean' ? query_params.cache || 1000 : 1000;\n typeof query_params.cache !== 'boolean' && delete query_params.cache;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n // Bring back once implemented in the API\n // if (this.settingsService.concierge) {\n // query = query + '&check_access=true';\n // }\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: T[] | HashMap[] = [];\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n result =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryObsr(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );;\n }\n\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse | HashMap[]{\n let result: IEngineResponse | HashMap[] =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n return result;\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryRoomsForQR(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url);\n }\n \n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public \n task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * V-2\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public taskObsr( \n id: string, \n task_name: string, \n form_data: HashMap = {}, \n method: 'post' | 'get' = 'post' ):Observable{\n const query = toQueryString(this.injectConcierge(form_data));\n let engine = false;\n let cache = 1000;\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n\n const request = method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n \n return request;\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param id url id with respect to update api\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public updateObsr(id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n \n return this.http.put(url, body)\n .pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) \n ),\n catchError((error: any, result?: T) => {\n console.log(error);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n return of(error as T);\n })\n );\n\n }\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${apiSubRoute}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n\n const token = sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\n const headers = new HttpHeaders({\n 'Authorization': `Bearer ${token}`,\n });\n \n const requestOptions = { headers: headers };\n\n // return this.httpClient.post(url, body, {\n // ...requestOptions \n // });\n\n return this.http.post(url, body);\n\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { Building } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { User } from '../users';\nimport { Space } from '../spaces';\nimport { SpaceBookingRuleOptions } from '../spaces/space.class';\nimport {\n BookingFormData,\n} from './booking.form.data';\nimport { statusFromBookings } from '../bookings/booking.utilities';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { SpaceStatus } from '../bookings/space.types';\nimport { SpaceFeatures } from '../spaces/space.class';\nimport { HashMap } from 'libs/base/src/lib/types.utilities';\n\nexport const spaceExtraFeatureToDisplayName = (feature: SpaceFeatures) => {\n switch (feature) {\n case SpaceFeatures.VideoConference:\n return 'Video conference (VC)';\n case SpaceFeatures.ConferencePhone:\n return 'Conference phone';\n case SpaceFeatures.WirelessContentSharing:\n return 'Wireless content sharing';\n case SpaceFeatures.FlipChart:\n return 'Flip chart';\n case SpaceFeatures.Glassboard:\n return 'Glassboard';\n case SpaceFeatures.ElectronicWhiteboard:\n return 'Whiteboard';\n case SpaceFeatures.ConferenceRoom:\n return 'Conference';\n case SpaceFeatures.TeamRoom:\n return 'Team';\n case SpaceFeatures.PartnerOffice:\n return 'Partner';\n case SpaceFeatures.PhoneBooth:\n return 'Phone booth';\n case SpaceFeatures.NaturalLight:\n return 'Room with window only (natural light)';\n case SpaceFeatures.BoardRoom:\n return 'Boardroom room style';\n case SpaceFeatures.CocktailRoom:\n return 'Cocktail room style';\n case SpaceFeatures.TheatreRoom:\n return 'Theatre room style';\n case SpaceFeatures.WorkshopRoom:\n return 'Workshop room style';\n case SpaceFeatures.UShapeRoom:\n return 'U Shape room style';\n case SpaceFeatures.Miscellaneous:\n return 'Miscellaneous room style'\n case SpaceFeatures.Catering:\n return 'Rooms with catering';\n // TODO: add any special display handling here.\n default:\n return feature;\n }\n};\n\n\nexport const instantBookOption: SelectOption = {\n value: 'instant-book',\n display: 'Listing you can book without waiting for a host approval',\n shortDisplay: 'Instant book'\n};\nexport const instantBookOptions: SelectOption[] = [\n instantBookOption\n];\n\nexport const mapSpaceFeaturesToSelectOption = (f: SpaceFeatures): SelectOption => {\n const display = spaceExtraFeatureToDisplayName(f);\n return ({\n value: f,\n display,\n // Useful for long text, like that of the instant-book\n // option.\n //\n // We do not expect this option object to be modified\n // at any further point before it appears on screen -\n // although that may change in future releases.\n shortDisplay: display\n });\n};\n\nexport const roomEquipmentRequiredOptions: SelectOption[] = [\n SpaceFeatures.VideoConference,\n SpaceFeatures.ConferencePhone,\n SpaceFeatures.WirelessContentSharing,\n SpaceFeatures.FlipChart,\n SpaceFeatures.Glassboard,\n SpaceFeatures.ElectronicWhiteboard\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const internalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.PartnerOffice,\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom,\n SpaceFeatures.PhoneBooth\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const externalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomDetailsRequired: SelectOption[] = [\n SpaceFeatures.NaturalLight,\n SpaceFeatures.BoardRoom,\n SpaceFeatures.CocktailRoom,\n SpaceFeatures.TheatreRoom,\n SpaceFeatures.WorkshopRoom,\n SpaceFeatures.UShapeRoom,\n SpaceFeatures.Miscellaneous\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomCateringAvailable: SelectOption[] = [\n SpaceFeatures.Catering,\n].map(mapSpaceFeaturesToSelectOption);\n\n/**\n * Defines the reason by which spaces are filtered out / missing.\n */\nexport enum SpaceFilterReason {\n /**\n * Spaces were shown and not all filtered out.\n */\n None = 'None',\n\n /**\n * If room filters are applied to the set of rooms,\n * and rooms are available if not applied by filtering.\n */\n Filters = 'Filters',\n\n /**\n * We check office rules first to determine if its been filtered.\n */\n OfficeRules = 'OfficeRules',\n\n /**\n * Fallback as the end case if no results are found.\n */\n DateTime = 'DateTime',\n\n /**\n * In case there are no results for a buiding but there are other office buidings in the same city.\n */\n AlternateBuildingsFound = 'AlternateBuildingsFound',\n\n /**\n * If room is non-bookable in the system\n */\n NonBookable = 'NonBookable'\n}\n\nexport interface FilteredSpaces {\n spaces: Space[] | undefined;\n reason: SpaceFilterReason;\n statusMap: HashMap;\n specificReason?: SpaceFilterReason;\n}\n\n/**\n * Filter spaces by filters locally. TBD in the future for real API pagination.\n *\n * @param formFilters - the set of filters to apply on the list of spaces.\n * @param spaces - the list of spaces to filter\n * @param activeForm - the landing page set of filters.\n * @param buildings - the list of buildings loaded, used to retrieve building-specific booking rules.\n * @param currentUser - the current user\n */\nexport const filterSpacesByAppliedFilters = (\n formFilters: SelectOption[],\n spaces: Space[] | undefined, // the resultshere are raw JSON Spaces, not an array of the Space class\n activeForm: BookingFormData,\n buildings: Building[] = [],\n currentUser: User | undefined,\n isStaffMap: boolean = false): FilteredSpaces => {\n const instantBook: boolean = formFilters.some(f => f.value === instantBookOption.value);\n const onlyCatering: boolean = formFilters.some(f => f.value === SpaceFeatures.Catering);\n // Drop incompatible spaces. If no filters were given, just return the array unchanged.\n const featureFilters = formFilters.filter(filter => ![instantBookOption.value, SpaceFeatures.Catering].includes(filter.value));\n const formFiltersEmpty = featureFilters.length === 0;\n\n // R--- refactor activeForm? Only after forms can handle dateTz\n // Blocked by date time input refactor\n const options: SpaceBookingRuleOptions = {\n duration: activeForm.duration,\n host: currentUser,\n dateTz: activeForm.dateTz,\n };\n let rulesCount = 0;\n let ruleReason = '';\n let excludedByFiltersCount = 0;\n const statusMap: HashMap = {};\n // console.group();\n const filteredSpaces = spaces?.map(space => space instanceof Space ? space : new Space(space)).filter(raw_space => {\n const space = new Space(raw_space); // Construct the full fledged space\n const building = buildings.find(b => space.zones.includes(b.id));\n const rules = rulesForSpace({\n time: options?.dateTz?.ms,\n duration: options.duration,\n user: options.host,\n rules: building?.booking_rules,\n space\n });\n ruleReason = rules.reason;\n let valid = !rules.hide;\n if (!valid) {\n rulesCount++;\n return false;\n }\n\n\n // Check for all the form filters ( except 'catering' )\n let hasAllFeatures: boolean;\n const internalRoomTypeFilters = [\n 'conference',\n 'meeting_room',\n 'partner',\n 'phone_booth',\n 'team_room',\n ];\n\n if (featureFilters.length === 0) {\n hasAllFeatures = true;\n } else if(featureFilters.every(f => internalRoomTypeFilters.includes(f.value))) { // If all featureFilters(selected filters) are present in internalRoomTypeFilters, make the filtering inclusive(return on first true) \n hasAllFeatures = featureFilters.some(f => space.featuresArray.includes(f.value));\n } else { // If any featureFilters(selected filters) are not present in internalRoomTypeFilters, make the filtering exclusive(return on first false)\n hasAllFeatures = featureFilters.every(f => space.featuresArray.includes(f.value));\n }\n\n const canBook = instantBook ? space.bookable : true;\n const matchesType = activeForm?.bookingType?.value === 'allRooms'\n ? true\n : space?.internal_or_external?.length\n ? space.internal_or_external === activeForm?.bookingType?.value\n : true;\n valid = valid && matchesType && (formFiltersEmpty || hasAllFeatures) && canBook;\n let hasCatering = building?.has_catering;\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n // need the room catering to override.\n if (onlyCatering && !hasCatering) {\n valid = false;\n // console.log('Excluded by Catering');\n }\n\n // count this space if the only reason it can't be shown is because one of the filters excluded it\n if (!hasAllFeatures) {\n valid = false;\n // console.log('Excluded by Status');\n }\n\n const status = statusFromBookings(\n space.bookings.length ? space.bookings.map(b => new Booking(b)) : space.settings.bookings.map(b => new Booking(b)),\n space.bookable && !rules.hide,\n !rules.auto_approve,\n activeForm.dateTz,\n space\n );\n\n // only compute room availability here right now if instant book option is chosen and room still valid.\n if (instantBook && valid) {\n valid = status.status === SpaceStatus.Available;\n if (!valid) console.group('Excluded by Status');\n \n }\n\n\n /** \n * If there are rooms that are recurring but not available at all during the queried times, we filter them out from the results displayed on the page.\n * The \"Available\" status indicates whether a room can be booked during the queried times.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\n if(activeForm.is_recurrent && !space.availableOccurrences && !isStaffMap) {\n valid = false;\n }\n /** */\n\n // cache space status\n if (valid) {\n if(activeForm.is_recurrent && space.availableOccurrences && space.availableOccurrences<= space.totalOccurrences) {\n // space is available and requested for recurrence booking and few occurences are available to book then let the space select/bookable from map with limited availability\n statusMap[space.id] = !rules.auto_approve ? SpaceStatus.Requestable : SpaceStatus.Available;\n }else\n {\n statusMap[space.id] = status.status;\n }\n \n } else {\n excludedByFiltersCount++;\n }\n // console.log('Valid:', valid);\n return valid;\n });\n\n const buildingsInSameCity = buildings.filter(\n (_) =>activeForm?.location!==undefined && activeForm?.location?.length && _.city === activeForm?.location[0]?.meta?.building?.city\n ) || [];\n const alternateBuildings = buildingsInSameCity.filter(building =>\n !activeForm.location.some(locationItem =>\n locationItem.meta?.building?.id === building.id\n )\n );\n\n // console.groupEnd();\n let reason, specificReason = SpaceFilterReason.None;\n // console.log('Spaces:', filteredSpaces?.length, excludedByFiltersCount, rulesCount, ruleReason)\n if (filteredSpaces?.length === 0) {\n if (excludedByFiltersCount > 0 && (!formFiltersEmpty || onlyCatering)) {\n reason = SpaceFilterReason.Filters;\n } else if (rulesCount > 0) {\n reason = SpaceFilterReason.OfficeRules;\n } else if(alternateBuildings){\n reason = SpaceFilterReason.AlternateBuildingsFound;\n }\n else {\n reason = SpaceFilterReason.DateTime;\n }\n\n if (ruleReason === SpaceFilterReason.OfficeRules) {\n specificReason = SpaceFilterReason.OfficeRules;\n }\n }\n\n return { spaces: filteredSpaces, reason, statusMap, specificReason };\n};\n","import { BookingFormData } from './booking.form.data';\nimport {\n createAction,\n props\n} from '@ngrx/store';\nimport { Payload } from '../../../../loading/src/lib/loading.actions';;\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\n\nexport const storeBookingFormData = createAction('[BookingForm] Store Form Data',\n props>>());\n\nexport const clearBookingFormData = createAction('[BookingForm] Clear Form Data');\n\nexport const storeRoomFilters = createAction('[BookingForm] Store Room Filters',\n props[]>>());\n\nexport const clearRoomFilters = createAction('[BookingForm] Clear Room Filters');\n\nexport const openBookingSurvey = createAction('[BookingSurvey] Open Survey Modal');\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { RoomQueryOptions } from '../../../../rooms/src/lib/rooms.types';\nimport { User } from '../users/user.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { Building } from '../organisation';\n\nexport const DEFAULT_BOOKING_DURATION = 30;\n\nexport const internalBookingTypeOption = {\n value: 'internal',\n display: 'Internal',\n};\n\nexport const allBookingTypeOption = {\n value: 'allRooms',\n display: 'All Rooms',\n};\n\nexport const bookingTypeOptions: SelectOption[] = [\n internalBookingTypeOption,\n {\n value: 'external',\n display: 'External',\n }\n];\n\nexport const defaultRoomSizeOption = {\n value: '2',\n display: '3-9 People',\n};\n\nexport const roomSizeOptions: SelectOption[] = [\n {\n value: '1',\n display: '1-2 People',\n },\n defaultRoomSizeOption,\n {\n value: '3',\n display: '10+ People',\n }\n];\n\nexport const roomSizeOptionsKiosk: SelectOption[] = [\n ...roomSizeOptions,\n {\n value: '4',\n display: 'All Rooms',\n },\n];\n\nexport const roomCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 1;\n case '2':\n return 3;\n case '3':\n return 10;\n case '4':\n return null;\n }\n};\n\nexport const roomMaxCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 2;\n case '2':\n return 9;\n default:\n return null;\n }\n};\n\nexport interface BookingFormData {\n // R--- off the rails, define these \"any's\"\n id?: string;\n location: SelectOption[];\n dateTz: DateTZ;\n /**\n * Duration, in minutes.\n */\n duration: number;\n bookingType: SelectOption;\n roomSize: SelectOption;\n selectedRoom?: any;\n organiser?: SelectOption;\n title?: string;\n attendees?: any[];\n code?: string;\n notes?: string;\n head_count?: number;\n creator?: User;\n company?: any[];\n //Recurrence fields\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array;\n recurrence_exceptions?: Array; //SHOULD BE DATETZ\n recurrence_days?: Array;\n timezone?: string;\n offset?: number;\n buildings?: Building[];\n is_recurrent?: boolean;\n is_multiroom?: boolean;\n merged?: boolean;\n action?: string; // helping to set staff app recurring action flag for edit/clone in the active form\n ignore?: string; // helping while editing - recurring series rooms search api call\n bookable?: boolean; // set while editing - recurring series rooms search api call\n occurrence_edits?: string[];\n opt_out?:boolean;\n nextBusinessDay?: boolean; // set property if user room selection from next business day section on result page\n outlook_opt_out?:boolean;\n expanded_section_ids?: string[]; // set property if user room selection from next business day section on result page\n resultLoaded?: number; // set property if user room selection from any section on result page after clicking load more button\n}\n\n/**\n * Converts form data into API query parameters.\n */\nexport const roomFormDataToQuery = (\n data: BookingFormData\n): RoomQueryOptions => {\n // remove all buildings chip from query\n const filteredLocationIds = data?.location\n .filter((l) => l.groupChild)\n .map((l) => l.value)\n .join(',');\n return {\n dateTz: data?.dateTz,\n duration: data?.duration,\n locations: filteredLocationIds,\n capacity: roomCapacityToValue(data?.roomSize?.value),\n capacity_max: roomMaxCapacityToValue(data?.roomSize?.value),\n\n is_recurrent: data?.is_recurrent,\n is_multiroom: data?.is_multiroom,\n merged: data?.merged,\n recurrence_period: data?.recurrence_period,\n recurrence_interval: data?.recurrence_interval,\n recurrence_endTz: data?.recurrence_endTz,\n recurrence_count: data?.recurrence_count,\n recurrence_starts: data?.recurrence_starts,\n recurrence_exceptions: data?.recurrence_exceptions, //SHOULD BE DATETZ\n recurrence_days: data?.recurrence_days,\n timezone: data?.timezone,\n offset: data?.offset,\n buildings: data?.buildings,\n bookable: data?.bookable,\n ignore: data?.ignore\n };\n};\n","import { BookingFormState } from './booking.form.types';\nimport {\n DEFAULT_BOOKING_DURATION,\n defaultRoomSizeOption,\n internalBookingTypeOption\n} from './booking.form.data';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nconst now = DateNow(new Date())\n\nexport const defaultTestBookingForm = (): BookingFormState => ({\n activeForm: {\n dateTz: now,\n duration: 2 * DEFAULT_BOOKING_DURATION,\n location: [],\n bookingType: internalBookingTypeOption,\n roomSize: defaultRoomSizeOption\n },\n activeFormFilters: []\n});\n","import { createSelector } from '@ngrx/store';\nimport {\n RoomStoreState\n} from '../../../../rooms/src/lib/rooms.types';\nimport {\n loadLaterThatDayResults,\n loadNextDayResults,\n loadRoomsForResults,\n roomStateSelector,\n loadByIdResults,\n loadDiffSizeResults,\n loadRoomsForResultsMap\n} from '../../../../rooms/src/lib/rooms.actions';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n bookingStateSelector\n} from '../../../../bookings/src/lib/bookings.actions';\nimport { Building } from '../organisation/building.class';\nimport { BuildingStoreState } from '../../../../buildings/src/lib/buildings.types';\nimport { selectLoadBuildingsSuccess } from '../../../../buildings/src/lib/buildings.actions';\nimport { Space } from '../spaces/space.class';\nimport { User } from '../users/user.class';\nimport { selectCurrentUser } from '../../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../../user/src/lib/user.types';\nimport { LoadingModel } from '../../../../loading/src/lib/loading.model';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\nimport {\n SpaceFilterReason,\n filterSpacesByAppliedFilters,\n FilteredSpaces\n} from './booking-filter.utils';\nimport {\n BookingFormData,\n internalBookingTypeOption,\n} from './booking.form.data';\nimport {\n BookingFormState,\n BookingStoreState,\n} from './booking.form.types';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\n\n\nexport const selectBookingFormsData =\n (state: BookingStoreState | RoomStoreState | BuildingStoreState | UserStoreState) =>\n (state as any).bookingForm as BookingFormState;\n\nexport const selectActiveForm = createSelector(selectBookingFormsData, state => {\n // Recreate because serialized form dateTz doesn't have DateTZ class methods\n if (!state.activeForm?.dateTz) {\n return state.activeForm\n }\n const { date, is_local_tz, building_tz} = state.activeForm?.dateTz;\n const endTzDate = state.activeForm?.recurrence_endTz?.date;\n const recurrence_endTz = endTzDate ? {\n recurrence_endTz : new DateTZ({ date: endTzDate.valueOf(), is_local_tz, building_tz })\n } : {};\n\n const recurrence_starts = state.activeForm?.recurrence_starts\n\t\t\t? {\n\t\t\t\t\trecurrence_starts: state.activeForm?.recurrence_starts.map( el =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// at final step of booking creation process recurrence_start becomes Array which need to be Array\n\t\t\t\t\t\t\t// To Do: Refactor - apps/staff/src/app/booking/booking-create/booking-form-base.component.ts lno: 186\n\t\t\t\t\t\t\treturn new DateTZ({ date: typeof el === 'number' ? el * 1000 : el.date.valueOf(), is_local_tz, building_tz })\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\n const recEditingSearchPayload = (state.activeForm.action === SeriesAction.EDIT && state.activeForm.is_recurrent)\n\t\t\t?\n\t\t {\n\t\t\t\tid: state.activeForm.id,\n\t\t\t\tignore: state.activeForm.ignore,\n\t\t\t\tbookable: state.activeForm.bookable\n\t\t\t}\n\t\t\t: {};\n\n\n\n\n return {\n ...state.activeForm,\n dateTz: new DateTZ({ date: date.valueOf(), is_local_tz, building_tz }),\n ...recurrence_endTz,\n ...recurrence_starts,\n\t\t\t\t...recEditingSearchPayload\n }\n});\n\nexport const selectBookingType = createSelector(selectActiveForm,\n (form) => form?.bookingType);\n\nexport const selectBookingLocations = createSelector(selectActiveForm,\n (form) => (form?.location || []).filter(f => !f.groupHeader));\n\nexport const selectIsInternal = createSelector(selectBookingType,\n (type) => type?.value === internalBookingTypeOption.value);\n\nexport const selectFormFilters = createSelector(selectBookingFormsData,\n (state) => state.activeFormFilters || []);\n\nconst selectRoomResultsFromState = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.model);\n\nconst selectRoomResultsFromState_map = createSelector(roomStateSelector,\n loadRoomsForResultsMap.selectors.model);\n\nconst selectLaterThatDayResultsFromState = createSelector(roomStateSelector,\n loadLaterThatDayResults.selectors.model);\nconst selectNextDayResultsFromState = createSelector(roomStateSelector,\n loadNextDayResults.selectors.model);\nconst selectByIdResultsFromState = createSelector(roomStateSelector,\n loadByIdResults.selectors.model);\nconst selectDiffSizeResultsFromState = createSelector(roomStateSelector,\n loadDiffSizeResults.selectors.model);\n\nexport const selectHomepageBookingsResultsFromState = createSelector(bookingStateSelector,\n loadHomepageBookingsResults.selectors.model);\nexport const selectUpcomingBookingsResultsFromState = createSelector(bookingStateSelector,\n loadUpcomingBookingsResults.selectors.model);\nexport const selectPastBookingsResultsFromState = createSelector(bookingStateSelector,\n loadPastBookingsResults.selectors.model);\nexport const selectCancelledBookingsResultsFromState = createSelector(bookingStateSelector,\n loadCancelledBookingsResults.selectors.model);\nexport const selectBookingByIdResultsFromState = createSelector(bookingStateSelector,\n loadBookingByIdResults.selectors.model);\n\n/**\n * Wraps {@link filterSpacesByAppliedFilters} with {@link LoadingModel} interop.\n * This will only filter data if there is data to filter, and returns a success {@link LoadingModel}.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\nconst filterSpacesByAppliedFiltersIfSuccess = (\n results: LoadingModel,\n formFilters: SelectOption[],\n activeForm: BookingFormData,\n buildings: Building[] | undefined,\n currentUser: User | undefined,\n isStaffMap: boolean = false): LoadingModel => {\n const data = results.optionalSuccess;\n\n // don't filter model if no success found\n return !activeForm ? results.mutate({\n spaces: data, // the result here is a raw JSON Space, not the Space class\n reason: SpaceFilterReason.None,\n statusMap: {}\n }) : results.mutate(\n filterSpacesByAppliedFilters(formFilters, data, activeForm, buildings || activeForm.buildings, currentUser, isStaffMap));\n};\n\nexport const selectFilteredResults = createSelector(selectRoomResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectMapFilteredResults = createSelector(selectRoomResultsFromState_map,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser, isStaffMap) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser, true));\n\nexport const selectFilteredLaterDayResults = createSelector(selectLaterThatDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectFilteredNextDayResults = createSelector(selectNextDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n\nexport const selectFilteredByIdResults = createSelector(selectByIdResultsFromState,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser));\n\nexport const selectFilteredDiffSizeResults = createSelector(selectDiffSizeResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n/**\n * Maps selected options by loaded buildings.\n */\nexport const selectSelectedBuildingOptions = createSelector(\n selectBookingLocations,\n selectLoadBuildingsSuccess,\n (locations, buildings) => (locations\n .map(l => buildings?.find(b => b.id === l.value))\n .filter(f => !!f) as Building[])\n);\n\n","import { Building, BuildingCity } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { BuildingLevel } from '../organisation/level.class';\nimport { Space } from '../spaces/space.class';\nimport { SpacesService } from '../spaces/spaces.service';\nimport {\n timezoneDisplay,\n timezoneNameToDate,\n unique,\n ImageDirective,\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * If more than 3 are selected, we truncate location display.\n */\nconst MAX_ABBREV_LOCATIONS = 3;\n\nexport const mapBuildingToSelectOption = (\n city: string,\n building: Building\n): SelectOption => ({\n display: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n dropdownOverride: `${building.code}-${building.name}, ${building.address}`,\n value: building.id,\n groupId: city,\n groupChild: true,\n shortDisplay: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n meta: { building, city },\n});\n\nexport const mapCityToAllSelectOption = (\n city: BuildingCity\n): SelectOption => ({\n display: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n value: city.name,\n groupHeader: true,\n groupId: city.name,\n shortDisplay: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n meta: { city },\n});\n\n/**\n * Flattens a map of {@link BuildingCity} to {@link Building} array into a list of {@link SelectOption}.\n * @param grouped The grouping\n */\nexport const flattenDisplayOffices = (\n grouped: Map\n) => {\n const options: SelectOption[] = [];\n grouped.forEach((value, key) => {\n options.push(mapCityToAllSelectOption(key));\n value.forEach((b) =>\n options.push(mapBuildingToSelectOption(key.name, b))\n );\n });\n return options;\n};\n\n/**\n * This method will either add or remove a selected option from the selectedOptions list based on\n * these conditions:\n * 1. If the option EXISTS in the list AND is a groupHeader, de-select all of its children.\n * 2. If the option EXISTS in the list AND is a groupChild, remove it and its associated header from the list.\n * 3. If the option does NOT EXIST in the list AND is a groupHeader, select all other children.\n * 4. If the option does NOT EXIST in the list AND is a groupChild, add it to the list.\n *\n * Special note regarding item 4:\n * 4a. If that selection completes the children selection, select its associated header as well.\n */\nexport const toggleSelectedByGroup = (\n options: SelectOption[],\n selectedOptions: SelectOption[],\n option: SelectOption\n) => {\n if (selectedOptions.find((s) => s.value === option.value)) {\n return selectedOptions.filter((s) => {\n let filter = s.value !== option.value;\n // if group header, also remove any option that is the child of it.\n if (option.groupHeader) {\n filter =\n filter &&\n (!s.groupChild ||\n (s.groupChild && s.groupId !== option.groupId));\n } else if (option.groupChild) {\n // if child removing, remove the associated header.\n filter =\n filter &&\n (!s.groupHeader ||\n (s.groupHeader && s.groupId !== option.groupId));\n }\n return filter;\n });\n }\n // option does NOT EXIST\n // if adding header, add the other children to the selected list, ensuring no dupes.\n if (option.groupHeader) {\n const toSelect = options.filter(\n (v) =>\n v.groupChild &&\n v.groupId === option.value &&\n !selectedOptions.find((selected) => selected.value === v.value)\n );\n return [...selectedOptions, option, ...toSelect];\n }\n // add group child, add the group header if all satisfied\n const newGroup = [...selectedOptions, option];\n\n // check if we have selected all children from options by filtering down by city and checking if\n // they're in the selected options list.\n const remainingChildrenInGroup = options.filter(\n (o) =>\n o.groupChild &&\n o.groupId === option.groupId &&\n !newGroup.find((ng) => ng.value === o.value)\n );\n // if we dont have remaining children, add the group\n if (remainingChildrenInGroup.length === 0) {\n return [\n ...newGroup,\n options.find((o) => o.groupHeader && o.groupId === option.groupId),\n ];\n }\n return newGroup;\n};\n\n/**\n * If the list of locations are larger than {@link MAX_ABBREV_LOCATIONS}, then truncate\n * and display the remaining count.\n */\nexport const truncateLocationList = (\n locations: readonly SelectOption[]\n): string => {\n // comma separate the locations\n let truncatedLocations = [...locations];\n const shouldTruncate = locations.length > MAX_ABBREV_LOCATIONS;\n if (shouldTruncate) {\n truncatedLocations = truncatedLocations.splice(0, MAX_ABBREV_LOCATIONS);\n }\n let display = truncatedLocations\n .map((l) => l.shortDisplay || l.display)\n .join(', ');\n if (shouldTruncate) {\n display += `...(${locations.length})`;\n }\n return display;\n};\n\nexport const mapBuildingLevelToOption = (\n level?: BuildingLevel\n): SelectOption =>\n level\n ? {\n value: level.id,\n display: level.name,\n }\n : undefined;\n\n/**\n * Returns all levels included with the building, deduped.\n * @param buildings\n */\nexport const flattenBuildingsWithLevels = (buildings: Building[]) => {\n const flattenedLevels = unique(\n buildings.reduce((next: BuildingLevel[], building: Building) => {\n next.push(...building.levels);\n return next;\n }, []),\n 'id'\n );\n return {\n flattenedLevels,\n buildings,\n };\n};\n\n/** Gets route to image placeholder if room image isn't found */\n\nexport const placeholderRoute = (num: number): string => {\n let index: number;\n if (num <= 3) {\n index = num;\n } else if (num % 3 === 0) {\n index = 3;\n } else {\n index = 1;\n }\n return `assets/img/rooms/placeholder-${index}.png`;\n};\n\n/**\n * Method takes the rootFolderURL and fileSlug to create an array of three images\n * that should exist. If a room image exists, it replaces the placehoder image.\n */\nexport const setupRoomImages = (\n componentReference: ImageDirective,\n image_positions: number[],\n rootFolderURL: string,\n fileSlug: string,\n imagesLoaded: boolean = false\n): void => {\n let foundImages: any[] = image_positions.map((i) =>\n i ? { path: placeholderRoute(i) } : false\n );\n image_positions.forEach((n) => {\n const desiredImageName = `${rootFolderURL}${fileSlug}-part-${n}.png`;\n const desiredImage = location.pathname.includes('concierge') ? `${location.origin}/staff/${desiredImageName}` : desiredImageName;\n if (!imagesLoaded) {\n const tester = new Image();\n tester.onload = () => {\n // Will never run on unit test\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = [...foundImages.slice()];\n componentReference?.loadImages && componentReference?.loadImages.next([...foundImages.slice()]);\n };\n tester.src = desiredImage;\n }\n\n // Force valid image output on unit test\n if (imagesLoaded) {\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = foundImages.slice();\n }\n });\n};\n\nexport const bookingStatusDetails = (booking: Booking) => {\n const now = DateNow(new Date());\n let image = '';\n let text = '';\n let title = '';\n\n if (booking?.status) {\n const status = now > booking.endDateTz ? 'expired' : booking.status;\n switch (status) {\n case 'unavailable':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Unavailable';\n text = 'Unavailable';\n break;\n case 'declined':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'cancelled':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'expired':\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n case 'tentative':\n image = 'assets/icon/booking_pending.svg';\n title = 'Requested';\n text = 'Pending';\n break;\n case 'accepted':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n case 'approved':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n default:\n // TODO\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n }\n }\n return { text, title, image };\n};\n\nexport const roomHasCateringHours = (building: Building, space: Space) => {\n let hasCatering = building\n ? building.has_catering && building.catering_hours\n : false;\n // Room catering status as false overrides building status\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n return hasCatering;\n};\n\nexport const cateringAllowed = (booking: Booking, building: Building) => {\n const status = bookingStatusDetails(booking);\n const disallowedStatus = ['declined', 'cancelled', 'expired'].includes(\n status.text\n );\n const opens = building?.catering_hours?.start;\n const closed = building?.catering_hours?.end;\n\n if (disallowedStatus) {\n return false;\n }\n\n if (typeof opens === 'undefined' || typeof closed === 'undefined') {\n return false;\n }\n\n // Catering time could be a decimal so convert to a date\n const openMinutes = opens * 60;\n const closeMinutes = closed * 60;\n\n const startOfDay = booking.startDateTz.startOfValue('day');\n const cateringOpenTime = startOfDay.addValue({ minutes: openMinutes });\n const cateringCloseTime = startOfDay.addValue({ minutes: closeMinutes });\n\n if (\n cateringOpenTime.ms <= booking.startDateTz.ms ||\n cateringCloseTime.ms > booking.startDateTz.ms\n ) {\n // Booking ends before catering opens\n if (booking.endDateTz.ms <= cateringOpenTime.ms) {\n return false;\n }\n // Booking starts after catering closes\n if (booking.startDateTz.ms > cateringCloseTime.ms) {\n return false;\n }\n\n // Start time is OK\n if (booking.startDateTz.ms > DateNow(new Date()).ms) {\n // Due to COVID, no orders are available once a meeting begins.\n return true;\n }\n }\n\n return false;\n};\n\nexport const checkCollisions = (\n service: SpacesService,\n booking: Booking\n): Promise => {\n return new Promise((resolve, reject) => {\n\n let availabilityParams: {\n room_ids: string;\n dateTz: DateTZ;\n duration: number;\n setup: number;\n breakdown: number;\n hide_bookings: boolean;\n [key: string]: any;\n } = {\n room_ids: booking.space.id,\n dateTz: booking.startDateTz,\n duration: booking.duration,\n setup: booking.setup[booking.space.email],\n breakdown: booking.breakdown[booking.space.email],\n hide_bookings: false,\n };\n\n if (booking.recurrence_type === \"master\" || booking.recurrence_type === null) {\n availabilityParams = {\n ...availabilityParams,\n ignore: booking?.icaluid,\n recurrence_count: booking?.recurrence_count,\n recurrence_period: booking?.recurrence_period,\n recurrence_endTz: booking?.recurrence_endTz,\n recurrence_interval: booking?.recurrence_interval,\n recurrence_starts: booking?.recurrence_starts,\n is_recurrent: booking?.is_recurrent,\n recurrence_days: booking?.recurrence_days\n } as typeof availabilityParams;\n }\n\n service\n .available(\n availabilityParams,\n null,\n false\n )\n .then(\n (list) => {\n const space = list.length ? list[0] : null;\n if (space) {\n if (!space.bookable) return reject('Has conflict');\n const setup = booking?.setup[space?.email] || 0;\n const breakdown = booking?.breakdown[space?.email] || 0;\n const start_time = booking?.startDateTz.seconds - setup;\n const end_time = booking.endDateTz.seconds + breakdown;\n\n const bookings = space.settings.bookings;\n // console.log('Bookings:', bookings);\n // Compare the existing bookings to see if any truely conflict.\n if (bookings.length) {\n const has_conflict = bookings.find(bkn => {\n const b_setup = bkn.setup[space.email] || 0;\n const b_breakdown = bkn.setup[space.email] || 0;\n const start = (bkn.start_epoch || bkn.start) - b_setup;\n const end = (bkn.end_epoch || bkn.end) + b_breakdown;\n return (\n (end_time > start && end_time <= end) || // Booking ends during the meeting\n (start_time >= start && start_time < end) || // Booking starts during a meeting\n (start_time <= start && end_time >= end) // Booking overlaps entire meeting\n ) && \n ( \n bkn.id !== booking.id \n || \n ( !!booking.is_recurrent && (booking.recurrence_type === \"master\" || booking.recurrence_type === null ) ) \n ?\n bkn.recurrence_master_id !== booking.id\n :\n false\n \n )\n\n\n\n });\n // Conflicts found, reject\n if (has_conflict) return reject('has booking conflict');\n }\n return resolve(space.bookable);\n }\n reject('space not found');\n },\n () => reject('available error')\n );\n });\n};\n\nexport const getStatusErrorMessage = (status?: number) => {\n let msg = '';\n switch (status) {\n\t\t\tcase 400:\n\t\t\t\tmsg = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 403:\n\t\t\t\tmsg = 'Your do not have permission to update this booking.';\n\t\t\t\tbreak;\n\t\t\tcase 409:\n\t\t\t\tmsg = 'Sorry, your booking time conflicts with another booking.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmsg = 'Your booking failed to update, please try again';\n }\n return msg;\n};\n","export * from './room-results/room-results.viewmodel'\nexport * from './booking-filter.utils'\nexport * from './booking.form.actions'\nexport * from './booking.form.data'\nexport * from './booking.form.spec-helpers'\nexport * from './booking.form.types'\nexport * from './booking.selectors'\nexport * from './booking.utils'","import { Space } from '../../spaces/space.class';\nimport { BuildingLevel } from '../../organisation/level.class';\nimport { Building } from '../../organisation/building.class';\n\nexport class RoomResultsViewModel {\n\n public levelDisplay: string;\n public title: string;\n public office: string;\n public capacity: string;\n\n constructor(public space: Space,\n public level?: BuildingLevel,\n public building?: Building) {\n\n this.levelDisplay = `Level ${this.space?.level?.short_name}`;\n this.title = this.space.local_name;\n this.office = this.building ? `(${this.building?.code}) ${this.building?.name}` : '';\n this.capacity = `Capacity: ${this.space.capacity} people`;\n }\n}\n\n/**\n * For each result from results, we find its level and building from the lists.\n */\nexport const mapResultsToViewModels = (results: Space[],\n flattenedLevels: BuildingLevel[],\n buildings: Building[]): RoomResultsViewModel[] =>\n results.map((r: Space) => {\n const level = flattenedLevels.find(l => r.zones.includes(l.id));\n const building = buildings.find(b => r.zones.includes(b.id));\n return new RoomResultsViewModel(\n r,\n level,\n building\n );\n });\n","import { Injectable, NgZone } from '@angular/core';\nimport { BehaviorSubject, combineLatest, of, Observable } from 'rxjs';\nimport {\n catchError,\n debounceTime,\n filter,\n first,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { replaceBookings, timePeriodsIntersect } from './booking.utilities';\nimport { SpacesService } from '../spaces/spaces.service';\nimport { Booking } from '../bookings/booking.class';\nimport { Space } from '../spaces/space.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { OrganisationService } from '../organisation/organisation.service';\n\nexport type BookingType =\n | 'internal'\n | 'client'\n | 'external'\n | 'setup'\n | 'training'\n | 'interview'\n | 'declined';\n\nexport interface BookingFilters {\n /** List of zone ids to get bookings for */\n zone_ids?: string[];\n space_emails?: string[];\n hide_type?: BookingType[];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BookingStateService extends BaseClass {\n /** List of bookings */\n private _poll = new BehaviorSubject(false);\n /** List of bookings */\n private _long_poll = new BehaviorSubject<'month' | ''>('');\n private _long_poll_week = new BehaviorSubject<'week' | ''>('');\n /** List of bookings */\n private _bookings = new BehaviorSubject([]);\n /** List of meeting count per date */\n public _noOfMeetings = new BehaviorSubject<{}>({});\n /** Filter details for bookings */\n private _filters = new BehaviorSubject({});\n /** Currently active date */\n private _dateTz = new BehaviorSubject(DateNow(new Date()));\n /** Currently displayed zone */\n private _zone = new BehaviorSubject(' ');\n /** Whether booking data is being loaded */\n private _loading = new BehaviorSubject(false);\n /** Observable for filter and booking list changes */\n private _state = combineLatest(\n this._bookings,\n this._filters,\n this._dateTz,\n this._zone\n );\n\n /** Observable for list of bookings */\n public readonly bookings = this._bookings.asObservable();\n /** Observable for active date */\n public readonly dateTz = this._dateTz.asObservable();\n /** Observable for active zone */ // R-- zone was this._date.asObservable(); this looks like a mistake but it exists from the beginning of time\n public readonly zone = this._dateTz.asObservable();\n /** Observable for loading state of bookings */\n public readonly loading = this._loading.asObservable();\n\n public get booking_date() {\n // When this class is initialized this._dateTz is local timezone\n return this._dateTz.value;\n }\n\n public get timezone() {\n return localStorage.getItem('CONCIERGE.timezone');\n }\n\n /** Obsevable for filtered list of bookings */\n public readonly filtered = this._state.pipe(\n map((state) => {\n const bdTz = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const startTz = bdTz.startOfValue('day');\n const endTz = startTz.addValue({}).endOfValue('day');\n return this.filterBookings(startTz, endTz);\n }),\n shareReplay(1)\n );\n\n /** Obsevable for filtered list of bookings of the active week */\n public readonly filtered_week = this._state.pipe(\n map(() => {\n // Tested to be valid in building time now.\n const bd = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const start = bd.startOfValue('week').startOfValue('day');\n const end = this.getEndOfWeek(bd);\n return this.filterBookings(start, end);\n })\n );\n\n /** Obsevable for filtered list of bookings for active month */\n public readonly filtered_month = this._state.pipe(\n map(() => {\n const start = this.booking_date.startOfValue('month');\n const end = this.booking_date.endOfValue('month');\n return this.filterBookings(start, end);\n })\n );\n\n /** Active filters */\n public get filters() {\n return this._filters.getValue();\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private ngZone: NgZone,\n ) {\n super();\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Just to get the timezone correct\n this._dateTz.next(\n new DateTZ({\n date: this._dateTz.value.ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone,\n })\n );\n });\n\n /** Generate observable for updating bookings */\n const search = combineLatest(this._poll, this._zone, this._dateTz).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap(() => {\n const fzone = this._zone.getValue();\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n const start = this.booking_date.startOfValue('day');\n const end = start.endOfValue('day');\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start.seconds,\n available_to: end.seconds,\n });\n }),\n catchError(() => of([]))\n );\n\n const search_long_week = combineLatest(\n this._long_poll_week,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, false);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n\n //TO DO: make sure both spaces have same booking\n /** Subscribe to update observable */\n search.subscribe((space_list) => {\n this.processBookings(space_list);\n this._loading.next(false);\n });\n search_long_week.subscribe((space_list) => {\n this.processBookings(space_list, this._long_poll_week.getValue() as any);\n this._loading.next(false);\n });\n }\n\n /**\n * Function to build\n */\n private buildSpaceLongQuery(dailyCount: boolean = false): Observable {\n return combineLatest(\n this._long_poll,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = dailyCount ? this._org.building.id : props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, dailyCount);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n }\n\n private querySpace(type: string, fzone: string, dateTz: DateTZ, dailyCount: boolean = false) : Observable | Observable{\n const start = () => {\n const s = dateTz;\n if (type === 'week') {\n return s.startOfValue('week');\n } else {\n return s.startOfValue('month');\n }\n };\n\n const end = () => {\n const e = start();\n if (type === 'week') {\n /**\n * To Do: date-tz.class.ts endOfValue subtracts 1 day from end of week for 7 days a week type which returns Friday instead of Saturday\n * below is the adjustment -\n */\n return e.addValue({ days: 1 }).endOfValue('week');\n } else {\n return e.endOfValue('month');\n }\n /**\n * R--- when testing March 2022 London offices, the month is an hour short.\n * Is this a Luxon bug or London DST?\n */\n };\n\n // dates here are ok\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start().seconds,\n available_to: end().seconds,\n ...(dailyCount) ? { daily_count: true } : ''\n });\n }\n\n\n public getDailyMeetingCount() : void {\n this._long_poll.next('month');\n this.buildSpaceLongQuery(true).subscribe((counts) => {\n this._noOfMeetings.next(counts);\n this._loading.next(false);\n });\n }\n\n /**\n * Update the booking filters\n * @param details\n */\n public setFilters(details: BookingFilters) {\n this._filters.next(details);\n }\n\n /**\n * Update the booking date\n * @param details\n */\n public setDate(dateTz: DateTZ) {\n this._dateTz.next(dateTz);\n }\n\n /**\n * Update the booking's zone\n * @param details\n */\n public setZone(zone: string) {\n this._zone.next(zone);\n }\n\n /**\n * update day view once\n */\n public pollOnce(){\n this._poll.next(true);\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPolling(delay: number = 30 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingWeek(delay: number = 4 * 30 * 1000 ) {\n this._long_poll_week.next('week');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll_week.next('week'),\n delay\n );\n });\n }\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingEveryFiveMin(delay: number = 60 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingMonth(delay: number = 5 * 60 * 1000) {\n this._long_poll.next('month');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll.next('month'),\n delay\n );\n });\n }\n\n\n /**\n * Stop polling to update bookings;\n */\n public stopPolling() {\n this._poll.next(false);\n this.clearInterval('polling');\n this._long_poll.next('');\n this.clearInterval('polling_long');\n }\n\n public updateRoomList() {\n this._spaces.updateRoomList();\n }\n\n /**\n * Add booking to bookings listing\n * @param booking\n */\n public add(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Update booking in the bookings list\n * @param booking\n */\n public replace(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings\n .filter(\n (bkn) =>\n bkn.icaluid !== booking.icaluid && bkn.id !== booking.id\n )\n .concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Remove booking in the bookings list\n * @param booking\n */\n public remove(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.filter(\n (bkn) => bkn.icaluid !== booking.icaluid\n );\n this._bookings.next(new_bookings);\n }\n\n public attentToDelete(\n booking: Booking,\n action: 'series' | 'booking' = 'booking',\n undo: boolean = false\n ) {\n const bookings = this._bookings.getValue();\n const attempted_to_delete = ((action) => {\n return (bkg: Booking) => {\n switch (action) {\n case 'booking': {\n const booking_master = bookings.find(\n (bkn) => bkn.icaluid === booking.icaluid\n );\n if (!booking_master) return false;\n return bkg.id === booking.id;\n }\n case 'series': {\n const booking_master = bookings.find(\n (bkg) =>\n bkg.id ===\n (booking.recurrence_type === 'occurrence'\n ? booking.recurrence_master_id\n : booking.id)\n );\n if (!booking_master) return false;\n return (\n booking_master.id === bkg.id ||\n bkg.recurrence_master_id === booking_master.id\n );\n }\n default:\n false;\n }\n };\n })(action);\n\n const new_bookings = [...bookings].map((bkg) => {\n if (!undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = action;\n }\n\n if (undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = null;\n }\n\n return bkg;\n });\n\n this._bookings.next(new_bookings);\n }\n\n private processBookings(\n space_list: Space[],\n period: 'day' | 'week' | 'month' = 'day'\n ) {\n const start = () => {\n switch (period) {\n case 'month':\n return this.booking_date.startOfValue('month');\n case 'week':\n return this.booking_date.startOfValue('week');\n default:\n return this.booking_date.startOfValue('day');\n }\n };\n const end = () => {\n const s = start();\n switch (period) {\n case 'month':\n return s.endOfValue('month');\n case 'week':\n return s.endOfValue('week');\n default:\n return s.endOfValue('day');\n }\n };\n\n let bookings = this._bookings.getValue();\n space_list.forEach((space) => {\n return (bookings = replaceBookings(\n bookings,\n space.bookings.map((bkn) => new Booking(bkn)),\n {\n room_email: space.email,\n fromTz: start(),\n toTz: end(),\n }\n ));\n });\n this._bookings.next(bookings);\n }\n\n // private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n // const filters = this._filters.getValue();\n // const bookings = this._bookings.getValue();\n // const fzone = this._zone.getValue();\n // return bookings.filter((bkn) => {\n // const intersects = timePeriodsIntersect(\n // startTz.ms,\n // endTz.ms,\n // bkn.startDateTz.ms,\n // bkn.endDateTz.ms\n // );\n // const in_zone = bkn.room.zones.includes(fzone);\n // const has_space =\n // !filters.space_emails?.length ||\n // filters.space_emails.includes(bkn.room.email);\n // const in_zones =\n // !filters.zone_ids?.length ||\n // !!bkn.room.zones.find((zone) =>\n // filters.zone_ids.includes(zone)\n // );\n // const type = bkn.declined ? 'declined' : bkn.getType();\n\n // const show =\n // !filters.hide_type?.length ||\n // !filters.hide_type.includes(type as any);\n // return intersects && has_space && in_zone && in_zones && show;\n // });\n // }\n\n private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n const filters = this._filters.getValue();\n const bookings = this._bookings.getValue();\n const fzone = this._zone.getValue();\n return bookings.filter((bkn) => {\n const intersects = timePeriodsIntersect(\n startTz.ms,\n endTz.ms,\n bkn.startDateTz.ms,\n bkn.endDateTz.ms\n );\n // Check if any room in the booking satisfies the conditions\n const roomSatisfiesConditions = bkn.multi_rooms.some((room) => {\n const in_zone = room.zones.includes(fzone);\n const has_space =\n !filters.space_emails?.length ||\n filters.space_emails.includes(room.email);\n const in_zones =\n !filters.zone_ids?.length ||\n !!room.zones.find((zone) => filters.zone_ids.includes(zone));\n return in_zone && has_space && in_zones;\n });\n \n const type = bkn.declined ? 'declined' : bkn.getType();\n \n const show =\n !filters.hide_type?.length ||\n !filters.hide_type.includes(type as any);\n return intersects && roomSatisfiesConditions && show;\n });\n } \n\n /**If Sunday add one day to get Saturday as end of week */\n private getEndOfWeek(date: DateTZ): DateTZ {\n return date.dateWeekday === 7\n ? date.addValue({ days: 1 }).endOfValue('week').endOfValue('day')\n : date.endOfValue('week').endOfValue('day');\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport { CateringOrder } from '../catering';\nimport { User } from '../users';\nimport {\n flatten,\n HashMap,\n humaniseDuration,\n shorterBuildingDateFormatString,\n shorterLocalDateFormatString,\n toTitleCase,\n unique\n} from '@mckinsey-converge/base';\nimport { Space } from '../spaces/space.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport {\n BookingNote,\n} from './booking.types';\nimport { convertLocalTimestampToTimezonedDateTz, DateNow, DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, getLastDateFromList, handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { findSpace } from '../spaces';\nimport { DateTime } from 'luxon';\n\n\nexport interface IBookingQueryOptions {\n /** booking ID */\n id?: string;\n email?: string;\n target?: string;\n from?: number; // R--- depreciate\n until?: number; // R--- depreciate\n fromTz?: DateTZ;\n untilTz?: DateTZ;\n show_cancelled?: boolean;\n pagination?: boolean;\n limit?: number;\n offset?: number;\n sort?: string,\n filters?: any;\n include_rooms?: boolean;\n building_zone?: string;\n}\n\nexport class Booking extends BaseDataClass {\n /** Unique calendar event ID */\n // public readonly icaluid: string;\n /** Subject or title of the booking */\n public title: string;\n /** Luxon based date class of the booking start time */\n public startDateTz: DateTZ;\n /** Luxon based date class of the booking start time */\n public endDateTz: DateTZ;\n /** Description or details of the booking */\n public readonly body: string;\n /** Type of booking */\n public readonly booking_type: string;\n /** List of catering orders for the booking */\n public catering: readonly CateringOrder[];\n /** Whether booking's duration covers all day */\n public readonly all_day: boolean;\n /** Mapping of emails to approval statuses */\n public approval_status: HashMap;\n /**\n * New booking approval status set in constructor\n *\n * timeBasedStatusLabel is a getter calculated via current time, some parts of the application\n * may use status when it should use timeBasedStatusLabel\n */\n public status: 'tentative' | 'accepted' | 'approved' | 'declined' | 'cancelled' | 'expired' | 'unavailable';\n /** Host/Organiser of the booking */\n public organiser: User;\n /** List of people invited to attend the booking */\n public attendees: User[];\n /** Author of the booking */\n public readonly creator: User;\n\n /** List of notes associated with the booking */\n public notes: readonly BookingNote[];\n /** Mapping of spaces to equipment charge codes */\n public equipment_codes: HashMap;\n /** Mapping of spaces to expected number of attendees */\n public expected_attendees: HashMap;\n /** Map of space emails to the setup time before the meeting in minutes */\n public setup: HashMap;\n /** List of checked in attendees */\n public check_ins: object;\n /** Map of space emails to the breakdown time before the meeting in minutes */\n public breakdown: HashMap;\n /** List of fields edited since creation */\n public readonly edits: string[];\n /** List of users to be notified on visitor arrivals */\n public readonly notify_users: readonly string[];\n /** Whether the time or duration has changed */\n public time_changed = false;\n /**\n * Booking Space\n * Bookings only have one room on MCK\n */\n public room: Space;\n /** building_zone */\n public building_zone: string;\n /** Initialized Timezone */\n public timezone: string;\n /** Array of company names */\n public company?: string[];\n /** Flag for multiroom booking */\n public is_multiroom: boolean;\n /** Multiroom booking ID */\n public multiroom_master_id: string; \n /** Merged - field holds flag for merged-multiroom booking which tightly coupled with multiroom booking only */\n public merged: boolean;\n /** Type of recurrence, Shows whether this is a master or an occurence in the series. */\n public readonly recurrence_type: string;\n /** The frequency of the recurring booking. */\n public readonly recurrence_period: RecurrencePeriod;\n /** The interval time between each period. Defaults to 1. For example, with a period of \"weekly\" and an interval of 2, the recurrencd happen every 2 weeks. */\n public readonly recurrence_interval: number;\n /** Unix epoch in seconds of the recurrence end date */\n private _recurrence_endTz: DateTZ;\n /** The number of times to repeat the recurring booking. */\n public readonly recurrence_count: number;\n /** ID of the booking considered the master */\n public readonly recurrence_master_id: string;\n /** An array of booking IDs which belong to this recurring series. This INCLUDES the master booking ID. */\n public readonly occurrence_ids: string[];\n /** A list of INDIVIDUAL edits to any of the bookings in the series. This is so we can prompt the user if they are going to override previously updated bookings with a whole-series update. */\n public readonly occurrence_edits: string[];\n /** A list of Ocurrences */\n public readonly occurrence_details: { id: string, start_epoch: number }[];\n /** When the booking was created */\n public created_epoch: number;\n /** Is the Application concierge */\n public is_concierge: boolean;\n /**helper to know if recurring toggle is on */\n public is_recurrent: boolean;\n /**array of start dates of each ocurrence in the series */\n public recurrence_starts: Array\n /**array of conflicting dates not to be included in the recurrence series */\n public recurrence_exceptions: Array\n\n public recurrence_days?: Array\n\n /** Master recurrence start */\n public recurrence_start: number;\n\n /** Start Epoch */\n public start_epoch: number;\n public end_epoch: number;\n public level_zone: string;\n public opt_out: boolean;\n public outlook_opt_out: boolean;\n public multi_rooms: Space[];\n public room_setup: any;\n public room_breakdown: any;\n public headcount: number;\n public equipment_code: string;\n\n /** Currently back-end is not properly setting the recurrence_end property, this is a workaround */\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz;\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date;\n }\n\n /** Mark a booking for deleting */\n public attempted_to_delete?: 'series' | 'booking' | null;\n\n // No specific reason to set readonly but canm be change if needed to update in future\n public readonly booked_by : string | { name: string };\n public readonly booker: Object;\n public readonly booker_concierge: Object\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = settingsService.concierge;\n\n /**\n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = new DateTZ();\n\n const defaultTitle = ''; // Blank since the create booking form will init with test values.\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n const defaultBuildingZone = null // R --- no idea, should be a building.id but which and how\n const defaultOrgainiser = User.active_user || new User(); // meh, non American use.\n const defaultBookingType = 'internal';\n\n /**\n * Process the simple raw_data with defaults mixed in\n */\n this.title = raw_data.title || defaultTitle;\n this.timezone = raw_data.timezone || defaultLocalTimezone;\n // Used by components to get the building details\n this.building_zone = raw_data.building_zone || defaultBuildingZone;\n this.body = raw_data.body || '';\n // Provided booking type\n this.booking_type = raw_data.booking_type || defaultBookingType;\n // Attendees provided in API booking data\n this.attendees = (raw_data.attendees || []).map((i) => new User(i));\n // Provided organiser, active user, or empty user?\n this.organiser = raw_data.organiser ? new User(raw_data.organiser) : defaultOrgainiser;\n // Creator is provided or defaults to the organizer\n this.creator = (raw_data.booked_by ? new User(raw_data.booked_by) : defaultOrgainiser) || this.organiser;\n // Setup and breakdown times can conflict but not the true event start and end times\n this.setup = raw_data.setup || {};\n this.breakdown = raw_data.breakdown || {};\n this.room_setup = raw_data.room_setup;\n this.room_breakdown = raw_data.room_breakdown;\n // Notes are assigned by room but we only support a single room\n this.notes = raw_data.notes || [];\n this.equipment_codes = raw_data.equipment_codes || {};\n this.equipment_code = raw_data.equipment_code || '';\n this.expected_attendees = raw_data.expected_attendees || {};\n this.headcount = raw_data.headcount;\n this.check_ins = raw_data.check_ins || {};\n this.notify_users = raw_data.notify_users?.length ? raw_data.notify_users : [this.organiser?.name];\n this.company = raw_data.company || [];\n // retain booked by if there : helps to get correct creator above\n this.booked_by = raw_data.booked_by;\n this.booker = raw_data.booker;\n this.booker_concierge = raw_data.booker_concierge;\n this.level_zone = raw_data.level_zone;\n this.opt_out = raw_data.opt_out;\n this.outlook_opt_out = raw_data.outlook_opt_out;\n\n /**\n * \n */\n this.merged = raw_data?.merged || null;\n\n /**\n * Multiroom fields\n */\n this.is_multiroom = raw_data.is_multiroom || null;\n this.multiroom_master_id = raw_data.multiroom_master_id || null;\n\n /**\n * Setup Defaults when raw_data values are not provided\n *\n * all room_ids and space_list inputs can be refactored into just room like an API booking\n *\n * raw_data.room can be provides as the Space class or JSON object\n */\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n // this.room = raw_data?.room ? (Array.isArray(raw_data?.room) && raw_data.room.length > 0) ? raw_data?.room.map((element) => new Space(element))[0]: [new Space(raw_data.room)][0] : [new Space()][0];\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n\n if (raw_data && raw_data.room) {\n if (Array.isArray(raw_data.room) && raw_data.room.length) {\n this.room = raw_data.room.map((element) => new Space(element))[0];\n } else if (Array.isArray(raw_data.room) && raw_data.room.length === 0) {\n this.room = [new Space()][0];\n } else {\n this.room = [new Space(raw_data.room)][0];\n }\n } else {\n this.room = [new Space()][0];\n }\n\n\n const room_id = raw_data.room_id || raw_data.room_ids // Not sure why we have room_id and room_ids\n if (!this.room?.id && room_id?.length) {\n this.room = findSpace(room_id[0]) || this.room;\n }\n\n const roomsData = raw_data?.multi_rooms || raw_data?.room;\n this.multi_rooms = roomsData\n ? Array.isArray(roomsData)\n ? roomsData.map((element) => new Space(element))\n : [new Space(roomsData)]\n : [new Space()];\n\n \n const room_ids = [...(raw_data?.room_id || []), ...(raw_data?.room_ids || [])];\n\n room_ids.forEach(roomId => {\n const newRoom = findSpace(roomId);\n // Check if the room is found and not already included in this.room\n if (newRoom && !this.multi_rooms.some(room => room.id === newRoom.id)) {\n // Add the new room to this.room\n this.multi_rooms.push(newRoom);\n }\n });\n\n // this.room is sometimes getting set to undefined when raw_data?.room is coming as an object\n if(this.multi_rooms.length && this.room === undefined){\n this.room = this.multi_rooms[0];\n }\n \n /**\n * Setup the booking start and end time\n *\n *\n * Booking defaults to now if start is not defined.\n * Booking durration is now a getter\n */\n // now rounded to the next 5 minute increment\n const defaultStartTz = new DateTZ({ date: nowTz.ms, is_local_tz: false, building_tz: this.timezone }).setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n\n /**\n * When saving a booking the BaseDataClass doens't know to use the toAPIJson\n * so startDateTz isn't being convert to the epoch timestamp\n *\n * I'm not testing for the end time values because we can assume those follow the same pattern.\n */\n const startEpochProvided = !!(raw_data.start_epoch || raw_data.start);\n const startDateTzProvided = !!raw_data.startDateTz;\n\n /**\n * Not trying to be fancy here, just clear.\n */\n if (!startEpochProvided && startDateTzProvided) {\n /**\n * Once a booking is saved the BaseDataClass recreates the Booking\n * but doesn't use the toApiJSON method adapt the class input, mainly the\n * startDateTz isn't converted to the start_epoch timestamp.\n */\n this.startDateTz = raw_data.startDateTz;\n this.endDateTz = raw_data.endDateTz;\n } else if (startEpochProvided) {\n /**\n * A Booking created from the API responses arrives with the booking\n * start_epoch and end_epoch timestamps.\n */\n this.startDateTz = new DateTZ({\n date: ((raw_data.start_epoch || raw_data.start) * 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n this.endDateTz = new DateTZ({\n date: ((raw_data.end_epoch || raw_data.end)* 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n } else {\n /**\n * And there are uses of new Booking where there are no inputs\n * and defaults are necessary.\n */\n this.startDateTz = defaultStartTz;\n this.endDateTz = defaultStartTz.addValue({ minutes: 60 });;\n }\n\n /**\n * End time was by design ending at one minute before, IE 4:00PM is 3:59PM,\n * because of calendar and conflcit checking\n *\n * Check and finesse it.\n * Not sure why but some booking endtime added extra seconds\n */\n if ((this.endDateTz.minutes % 5) !== 0 || this.endDateTz.second > 0) {\n // Not sure of the source but some bookings do not conform.\n this.endDateTz = this.endDateTz.setValue({ second: 0, minute: Math.round(this.endDateTz.minutes / 5) * 5 });\n }\n\n\n\n /**\n * Setup the booking created_date\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n this.created_epoch = raw_data.created_epoch || nowTz.seconds;\n\n\n /**\n * Setup the booking all_day boolean\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n if ('all_day' in raw_data) {\n this.all_day = raw_data.all_day;\n } else {\n this.all_day = !!raw_data.all_day || this.duration > 23 * 60;\n }\n\n\n // R--- TODO Concierge will use startDateTz so i'm not sure if this is needed.\n if (!this.is_concierge && this.all_day && this.timezone) {\n /**\n * Concierge has a all_day form field, I can see it may need this for that, does it really?\n */\n this.startDateTz = this.startDateTz.startOfValue('day')\n }\n\n /**\n * Setup the booking approval status\n */\n let status = raw_data.status;\n // If not provided default to approved.\n if (!raw_data.status) {\n status = 'accepted';\n }\n // \"show_as\" is a special rule to override how the applications display the status\n if (raw_data.show_as && raw_data.show_as === 'cancelled') {\n status = 'declined';\n }\n const approvalStatus = {};\n this.multi_rooms.forEach(room => {\n approvalStatus[room.email] = status;\n });\n // Tracking new \"status\" and legacy \"approval_status\" from raw_data.status.\n this.status = status;\n this.approval_status = raw_data.approval_status || {};\n\n /**\n * Catering setup\n *\n * Bring in and sort the catering order by delivery time\n */\n\n this.catering = (raw_data.catering instanceof Array ? raw_data.catering : []).map(\n (i) => new CateringOrder(i)\n );\n\n\n\n /**\n * Edited fields setup\n *\n * Bring in and sort the catering order by delivery time\n *\n * cateringOrders can return the order sorted\n */\n const edited_fields = Array.isArray(raw_data.edits)\n ? raw_data.edits\n : unique(\n flatten(\n Object.keys(raw_data.edits || {}).map((room) => {\n return flatten(Object.values(raw_data.edits[room]));\n })\n )\n );\n this.edits = edited_fields;\n\n /**\n * New Recurring booking feilds\n *\n * New fields do not match the BookingRecurrenceDetails type\n * and are simpler to manage this way\n */\n this.recurrence_count = raw_data.recurrence_count || null;\n this.recurrence_days = raw_data.recurrence_days || null;\n this.occurrence_edits = raw_data.occurrence_edits || null;\n this.recurrence_endTz = raw_data.recurrence_end ? new DateTZ({date: raw_data.recurrence_end * 1000, is_local_tz: false, building_tz: this.timezone}) : null;\n this.recurrence_exceptions = raw_data.recurrence_exceptions || null;\n this.occurrence_ids = raw_data.occurrence_ids || null;\n this.recurrence_interval = raw_data.recurrence_interval || null;\n this.recurrence_period = raw_data.recurrence_period || null;\n this.recurrence_type = raw_data.recurrence_type || null;\n this.recurrence_master_id = raw_data.recurrence_master_id\n this.occurrence_details = raw_data.occurrence_details\n this.is_recurrent = raw_data.is_recurrent || (!!this.recurrence_type && !!this.recurrence_period) || null;\n this.recurrence_starts = raw_data.recurrence_starts || []\n this.start_epoch = raw_data.start_epoch\n this.end_epoch = raw_data.end_epoch\n\n /**\n * I'm not clear why, but the booking body, aka description is copied into the notes.\n * R--- In concerge data description is only a key when saving, also in the note array?\n */\n if (raw_data.body && !this.notes.find((i) => i.type === 'description')) {\n this.notes = [\n ...this.notes,\n {\n type: 'description',\n date: 0,\n message: raw_data.body,\n author: this.organiser.email\n }\n ];\n }\n\n /**\n * In case there is a cancellation in progress the property attempted_to_delete is set to false\n * And it is persisted until the booking is gone\n */\n this.attempted_to_delete = raw_data.attempted_to_delete || null;\n }\n\n\n /** Service for managing Bookings */\n protected get _service() {\n return ServiceManager.serviceFor(Booking);\n }\n\n /** Alias to approval_status */\n public get auto_approve(): boolean {\n // if concierge we auto_approve always.\n if (this.is_concierge) {\n return true;\n }\n return !this.multi_rooms.some(room => room.byRequest({\n dateTz: this.startDateTz,\n duration: this.duration,\n host: this.organiser\n }));\n }\n\n /** Whether booking has been approved */\n public get approved(): boolean {\n return !this.declined && !this.tentative;\n }\n\n /** All of the booking attendees including the organizer */\n public get allAttendees(): User[] {\n return unique([this.organiser].concat(this.attendees), 'email');\n }\n\n /** Computer format for booking type */\n public get bookingTypeId(): string {\n return this.booking_type.toLowerCase();\n }\n\n /** Human format for booking type */\n public get bookingTypeLabel(): string {\n return toTitleCase(this.booking_type);\n }\n\n /** Get accessor for the check in object, app expect array */\n public get checkInsArray(): string[] {\n return Object.keys(this.check_ins || {})\n }\n\n /** Legacy getter for \"class\" */ // R-- TODO remove\n public get class(): string {\n return this.booking_type;\n }\n\n /** */\n public get displayEndDateTz(): DateTZ {\n if ((this.endDateTz.minutes % 5) !== 0) {\n // All the bookings should end in 59 seconds\n return this.endDateTz.addValue({ seconds: 1 });\n }\n // but if not they return 00\n return this.endDateTz;\n }\n\n /** Whether booking has been declined */\n public get declined(): boolean {\n /**\n * I'm not sure, nor is Cam if this is ever used to decline\n * all booking for a specific room\n */\n const isAnyRoomDeclined = this.multi_rooms.some(room => room.name.toLowerCase().includes('decline'));\n if (isAnyRoomDeclined) {\n return true;\n }\n\n if (this.status.includes('decline')) {\n return true;\n }\n\n return false;\n }\n\n /** Description of the booking purpose */\n public get description(): string {\n const note = (this.notes || []).find((i) => i.type === 'description');\n return note ? note.message : '';\n }\n\n /** Catering getter */\n public get cateringOrders() {\n // Return the catering orders sorted by delivery time\n return this.catering ? this.catering.slice().sort((a, b) => {\n if (a?.delivery_time > b?.delivery_time) return 1;\n if (b?.delivery_time > a?.delivery_time) return -1;\n\n return 0;\n }) : [];\n }\n\n /** Get the created date as DateTz */\n public get creationDateTz() {\n return new DateTZ({ date: this.created_epoch * 1000, is_local_tz: false, building_tz: this.timezone })\n }\n\n public get tz_offset() {\n return getTimezoneOffsetString(this.timezone);\n }\n\n /** Display value for the date */\n public get date_string(): string {\n return this.startDateTz.formatDate('dd MMM yyyy');\n }\n\n /**\n * Get the booking durration based on start and end times\n */\n public get duration(): number {\n return Math.abs(this.startDateTz.startOfValue('minute').dateDiff(this.displayEndDateTz, 'minutes'));\n }\n\n /** Unix timestamp of the booking start */\n public get date() { // R--- remove if not necessary\n return this.startDateTz.ms;\n }\n\n /** Whether booking contains external visitors in the attendee list */\n public get has_visitors(): boolean {\n return this.attendees.reduce((a, v) => a || v.external, false);\n }\n\n /** Does the booking have catering orders */\n public get has_catering(): boolean {\n return !!this.catering.length;\n }\n\n /**\n * Unique calendar event ID\n * same as this.id, used to support existing component usage\n */\n public get icaluid(): string {\n return this.id;\n }\n\n /**\n * Get the booking room id\n */\n public get room_id(): string {\n return this.room.id;\n }\n\n /** Legacy getter of room, aka space */\n public get space(): Space {\n return this.room;\n }\n\n /** Status of the booking */\n public get timeBasedStatusLabel(): 'future' | 'upcoming' | 'done' | 'started' | 'in_progress' | 'expired_yesterday' {\n const buildingTzDt = DateNow(new Date()).toZone(this.timezone) ; // building time\n\n if (DateNow(new Date()).isBeforeDate(this.startDateTz.subtractValue({ minutes: 15 }))) {\n return 'future';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz)) {\n return 'upcoming';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: 15 }))) {\n return 'started';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: this.duration }))) {\n return 'in_progress';\n }\n // if current time is 12 AM (as per timezone) and booking expired yesterday\n else if(buildingTzDt.startOfValue('day').addValue({ minutes: 1 }).isAfterDate(this.startDateTz, 'day') ) {\n return 'expired_yesterday'\n }\n\n return 'done';\n }\n\n /** Whether booking is tentative */\n public get tentative(): boolean {\n if (\n this.status &&\n this.status.indexOf('tentative') >= 0\n ) {\n return true;\n }\n\n return false;\n }\n\n /** Display valuie for the start and end times of the booking */\n public get time_period(): string {\n return `${this.startDateTz.formatDate('h:mma')} - ${this.displayEndDateTz.formatDate('h:mma')}`;\n }\n\n /** Display value for the start time of the booking */\n public get start_time(): string {\n return this.startDateTz.formatDate('h:mma');\n }\n\n /** Display value for the end time of the booking */\n public get end_time(): string {\n return this.endDateTz.formatDate('h:mma');\n }\n\n /** Display value for the duration of the booking */\n public get length_string(): string {\n return humaniseDuration(this.duration);\n }\n\n /** Display value for the location of the booking */\n // public get local_room_name(): string {\n // return this.room?.local_name || 'No location';\n // }\n public get local_room_name(): string {\n if (this.multi_rooms.length === 0) {\n return 'No location';\n } else {\n return this.multi_rooms.map(room => room.local_name).join(', ');\n }\n } \n\n /** Display value for the level of the first space in the booking */\n public get level(): string {\n return this.space.level.name;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Booking {\n return new Booking(this.toJSON());\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(isEdit = false): Booking {\n return new Booking({\n ...this.toJSON(),\n id: isEdit ? this.id : null,\n });\n }\n\n /**\n *\n * @param status\n * @returns void\n */\n public undo(status?: 'accept' | 'decline', opts: { series?: boolean } = {}): Promise {\n return this._service.undo(\n this.id, status || 'accept',\n opts\n );\n }\n\n /**\n * Delete booking from the server\n */\n public delete(opts: { series?: boolean } = {}): Promise {\n if (this.id) {\n return this._service.delete(this.id, { ...opts });\n\n // R-- ask Cam again is he's positive these extra params are not needed for anything\n // return this._service.delete(this.id, {\n // concierge: this.is_concierge,\n // host: this.organiser.email,\n // room_id: this.space?.id,\n // icaluid: this.icaluid,\n // start: json.start,\n // end: json.end\n // });\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Booking): HashMap {\n let data = super.toJSON();\n // Remove the description from the notes\n data.notes = Array.isArray(data.notes) ? data.notes.filter((note) => note.type !== 'description') : data.notes;\n // Encode the nested objects\n data.room = data.room.toJSON();\n\n\n\n data.organiser = data.organiser.toJSON();\n data.creator = data.creator?.toJSON ? data.creator.toJSON(): data.creator;\n // Map the attendees User objects\n data.attendees = data.attendees.map((i: User) => i.toJSON());\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n return data;\n }\n\n /**\n * Convert object into plain object\n */\n public toApiJSON(this: Booking): HashMap {\n let data = super.toJSON();\n\n // Update booking payload contains additional fields\n data.icaluid = \"\";\n if (data.id) {\n data.icaluid = data.id;\n data.location_name = this.multi_rooms.map((item)=>{return item.local_name}).join(', ');\n data.from_room = this.multi_rooms.map((item)=>{return item.email}).join(', ');\n data.building_zone = this.room?.building?.id;\n }\n\n /**\n * These fields are rather in flux\n * According to Cam \"approve\" will be the prefered field\n * and auto_approve and approval_status can be removed.\n */\n data.approve = this.auto_approve; // this value appear incorrect on update\n data.auto_approve = [this.auto_approve]; // Needed to update approval status until BE accepts \"approve\"\n // delete data.approval_status;\n\n // Booking start and end data\n delete data.startDateTz;\n delete data.endDateTz;\n data.start = this.startDateTz.seconds;\n data.end = this.endDateTz.seconds;\n data.old_start = this.startDateTz.seconds; // remove is not necessary\n data.old_end = this.endDateTz.seconds; // remove is not necessary\n\n // Creation date value\n delete data.created_epoch;\n data.creation_date = this.creationDateTz.seconds;\n\n // Catering fields\n // data.catering = data.catering.toJSON();\n data.catering = this.cateringOrders;\n data.has_catering = this.has_catering;\n delete data.cateringOrders\n\n // Attendees appear quite incomplete\n // Map the attendees User objects\n data.attendees = this.allAttendees.map((i: User) => i.toJSON ? i.toJSON() : i);\n\n // Orgainizer and Creator data\n data.organiser = data.organiser.toJSON ? data.organiser.toJSON() : data.organiser;\n data.creator = data.creator.toJSON ? data.creator.toJSON() : data.creator;\n\n // Convert check_ins to checked_in array\n delete data.check_ins;\n data.checked_in = this.checkInsArray;\n\n // edits - edit booking is showing all fields even w/o an edit :(\n\n // Room data\n data.room_ids = this.multi_rooms.map((item)=>{return item.email});\n delete data.room;\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n // Not found in dev data\n delete data.name;\n delete data.email;\n delete data.is_concierge;\n // delete data.building_zone;\n // delete data.status;\n\n return data;\n }\n\n public getType(): string {\n if (!this || this.status?.includes('decline')) {\n return 'cancelled';\n }\n const booking_type = this.booking_type;\n if (booking_type === 'internal' && this.has_visitors) {\n return 'external';\n }\n return booking_type;\n }\n\n /** fallback for a booking when the recurrence_end is null but it's a series booking */\n public recurrenEndFromOcurrences(occurrence_details: { id: string, start_epoch: number }[]): DateTZ {\n const date = occurrence_details?.map(occurence => occurence)\n .sort((a, b) => new Date(a.start_epoch * 1000).getTime() - new Date(b.start_epoch * 1000).getTime())\n .reverse()\n .shift()\n .start_epoch * 1000\n return new DateTZ({date, is_local_tz: false, building_tz: this.timezone});\n }\n\n public get dateString() {\n return shorterLocalDateFormatString(this.startDateTz);\n }\n public get dateBuildingString() {\n return shorterBuildingDateFormatString(this.startDateTz);\n }\n\n public get endDateString(): string {\n return shorterLocalDateFormatString(this.recurrenEndFromOcurrences(this.occurrence_details));\n }\n}\n\n/**\n * Merge catering orders with same time and location\n * @param order_list List of catering orders\n */\nexport function mergeCateringOrders(order_list: CateringOrder[]) {\n // R--- investigate when this is used. Staff doesn't use it when adding catering orders.\n for (let i = 0; i < order_list.length; i++) {\n const orders = order_list.filter(\n (order) =>\n order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time\n );\n if (orders.length > 1) {\n const new_list = order_list.filter(\n (order) =>\n !(order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time)\n );\n new_list.push(new CateringOrder({\n ...order_list[i],\n items: flatten(orders.map(order => order.items)),\n booking_date: this.startDateTz.ms,\n booking_timezone: this.booking_timezone,\n }));\n order_list = new_list;\n i = 0;\n }\n }\n return order_list;\n}\n","import { DateTZ } from \"@mckinsey-converge/date-tz\";\n\nexport interface SpaceRules {\n auto_approve: boolean; // if false sapce is requestable else bookable\n hide: boolean;\n max_length?: number;\n min_length?: number;\n reason?: string // specially for non-bookable rooms\n}\n\nexport interface BookingNote {\n /** Type of note */\n type: 'equipment' | 'catering' | 'description' | 'private' | 'other' | 'catering-private';\n /** Name of the note's author */\n author: string;\n /** Contents of the note */\n message: string;\n /** Time the note was added to the booking */\n date: number;\n /** Display value for the time */\n time?: string;\n /** ID of the space associated with the note */\n space?: string;\n /** ID of the catering order associated with the note */\n order_id?: string;\n}\n\nexport interface DateDurationData {\n dateTz: DateTZ,\n duration: number,\n mobile: boolean,\n save?: boolean,\n}\n\nexport enum BOOKING_STATUS {\n approved = 'approved',\n declined = 'declined',\n tentative = 'tentative',\n unavailable = 'unavailable'\n}","import {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { AvailableBookingFields } from '../settings.interfaces';\nimport {\n HashMap,\n humaniseDuration,\n mockDate as mockDateBase,\n resetDate as resetDateBase,\n timeFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { CateringOrder } from '../catering/catering-order.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { User } from '../users/user.class';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport {\n BookingRule,\n SpaceStatus\n} from './space.types';\nimport { validateEndTime } from '../validation.utilities';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\nimport { Space } from '../spaces';\nimport * as cloneDeep from 'lodash/cloneDeep';\n\nconst MINUTE = 1;\nconst HOUR = 60;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\n\nconst DURATION_MAP: { [duration: string]: number } = {\n month: MONTH,\n months: MONTH,\n week: WEEK,\n weeks: WEEK,\n day: DAY,\n days: DAY,\n hour: HOUR,\n hours: HOUR,\n minute: MINUTE,\n minutes: MINUTE\n};\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const mockDate = mockDateBase;\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const resetDate = resetDateBase;\n\nexport interface IBookingSlot {\n start: number;\n end: number;\n}\n\n\nexport function bookingOptionsToQuery(options: IBookingQueryOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n delete query.type;\n if (options.filters) {\n delete query.filters;\n for (const property in options.filters) {\n if (!query[property]) {\n query[property] = options.filters[property]\n }\n }\n }\n\n // id?: string;\n // cancelled?: boolean;\n if (options.until) {\n query.to = options.until;\n delete query.until;\n }\n \n }\n return query;\n}\n\n\n/**\n * Generate a list of free time slots between the given bookings\n * @param list List of bookings to find slots between\n * @param min_size Minimum length of a free slot in minutes\n */\nexport function getFreeBookingSlots(list: Booking[]=[], min_size: number = 30, dateTzMs: number = DateNow(new Date()).ms,): IBookingSlot[] {\n /* istanbul ignore else */\n if (!list.length) {\n return [\n {\n start: 0,\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n }\n ];\n }\n const slots: IBookingSlot[] = [];\n let start = new DateTZ({ date: dateTzMs });\n list.sort((a, b) => a.date - b.date);\n for (const booking of list) {\n const bkn_start = booking.startDateTz;\n const bkn_end = booking.endDateTz;\n if (bkn_start.isAfterDate(start)) {\n const diff = Math.abs(bkn_start.dateDiff(start, 'minutes'));\n /* istanbul ignore else */\n if (diff >= min_size) {\n slots.push({ start: start.ms, end: bkn_start.ms });\n }\n start = bkn_end;\n } else if (start.startOfValue('minute').ms === bkn_start.startOfValue('minute').ms) {\n start = bkn_end;\n }\n }\n slots.push({\n start: start.ms,\n // R--- these X 10's make no sense. why not + 2 years?\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n });\n\n return slots;\n}\n\n/**\n * Get the next free time slot from the given bookings\n * @param list List of bookings to find the next slot\n * @param date Date to find next slot after in ms since UTC epoch\n * @param min_size Minimum length of the free slot in minutes\n * \n * R--- Possibly depreciate, I don't see it used anywhere except for its own test\n */\nexport function getNextFreeBookingSlot(\n list: Booking[],\n date: number = DateNow(new Date()).ms,\n min_size: number = 15\n): IBookingSlot {\n const slots = getFreeBookingSlots(list, min_size, date);\n const date_ = new DateTZ({date})\n const time = date_.startOfValue('minute').setValue({ second: 1 });\n for (const block of slots) {\n const start = new DateTZ({date: block.start});\n const end = new DateTZ({date: block.end});\n if (start.startOfValue('minute').isAfterDate(time)) {\n return block;\n } else if (time.isBeforeDate(end.startOfValue('minute'))) {\n const duration = end.startOfValue('minute').dateDiff(time, 'minutes');\n /* istanbul ignore else */\n if (duration >= min_size) {\n return block;\n }\n }\n }\n return slots[slots.length - 1];\n}\n\n/**\n * Generate form fields for the given booking\n * @param booking Booking to generate form for\n * @param current_user Current user of the system to default as the host\n */\nexport function generateBookingForm(\n booking: Booking,\n use_fields: AvailableBookingFields[],\n isConcierge: boolean = false,\n manualTimezone?: string,\n action?: SeriesAction | BookingAction | null\n ): FormGroup {\n if (!booking) {\n throw Error('No booking passed');\n }\n\n const user_service = ServiceManager.serviceFor(User);\n const current_user =\n user_service.current ||\n new User({ id: 'local-user', name: 'Local User', email: 'local@place.tech' });\n\n const fields: HashMap = {\n id: new FormControl(booking.id || ''),\n space_list: new FormControl( booking.is_multiroom? booking.multi_rooms : [booking.room], []),\n room: new FormControl(booking.room, {}),\n dateTz: new FormControl({ value: booking.startDateTz || DateNow(), disabled: false }, [Validators.required]),\n duration: new FormControl({ value: booking.duration, disabled: false }),\n organiser: new FormControl(booking.organiser || current_user, [Validators.required]),\n attendees: new FormControl(booking.attendees, []),\n title: new FormControl(booking.title || '', { validators: [ Validators.required, Validators.minLength(1) ], updateOn: 'blur' }), //Validators.pattern(\"[^=`~!@#$%*{};:'\\\",_.<>]*\")\n booking_type: new FormControl(booking.booking_type),\n body: new FormControl(booking.body),\n notes: new FormControl(booking.notes),\n equipment_codes: new FormControl(booking.equipment_codes),\n expected_attendees: new FormControl(booking.expected_attendees),\n company: new FormControl(booking.company),\n is_multiroom: new FormControl(booking.is_multiroom),\n merged: new FormControl({value: booking?.merged, disabled: true}),\n catering: new FormControl(\n booking.cateringOrders.map(\n (order) => new CateringOrder({\n ...order,\n booking_date: booking.startDateTz.ms,\n booking_timezone: booking.timezone,\n })\n )\n ),\n all_day: new FormControl(!!booking.all_day),\n has_catering: new FormControl(!!booking.has_catering),\n needs_space: new FormControl(true),\n action: new FormControl(''),\n timezone: new FormControl(manualTimezone || \"\"),\n is_before_date: new FormControl(false)\n };\n if (!isConcierge) {\n fields.duration.setValidators([Validators.required, validateEndTime(fields.dateTz)]);\n }\n /* istanbul ignore else */\n if (booking.id && booking.id !== 'ad-hoc') {\n fields.organiser.disable();\n /* istanbul ignore else */\n if (booking.endDateTz.ms < DateNow(new Date()).ms) {\n fields.dateTz.disable();\n }\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n fields.dateTz.setValidators(dateValidators);\n fields.dateTz.updateValueAndValidity();\n }\n let list_length = -1;\n fields.space_list.valueChanges.subscribe((list) => {\n const expected = fields.expected_attendees.value || {};\n const matches = Object.keys(expected).filter((key) =>\n list?.find((space) => space.email === key)\n ).length;\n if (list && list.length && matches === 0) {\n const codes = fields.equipment_codes.value || {};\n if (Object.keys(expected).length >= 0 || Object.keys(codes).length >= 0) {\n const key = Object.keys(expected)[0] || Object.keys(codes)[0];\n const new_expected = {};\n const new_codes = {};\n const notes = fields.notes.value;\n notes.forEach((note) => (note.space === key ? (note.space = list[0].email) : ''));\n new_expected[list[0].email] = expected[key];\n new_codes[list[0].email] = codes[key];\n fields.expected_attendees.setValue(new_expected);\n fields.equipment_codes.setValue(new_codes);\n }\n }\n list_length = list?.length;\n });\n fields.dateTz.valueChanges.subscribe((_) => {\n fields.duration.updateValueAndValidity();\n });\n fields.needs_space.valueChanges.subscribe((space_needed) => {\n if (!space_needed) {\n fields.space_list.setValue([]);\n }\n });\n fields.has_catering.valueChanges.subscribe((has_catering) => {\n if (!has_catering) {\n fields.catering.setValue([]);\n }\n });\n const simplified_fields: HashMap = [\n 'id',\n 'space_list',\n 'space_ids',\n 'notes',\n 'dateTz',\n 'booking_type',\n 'equipment_codes',\n 'expected_attendees',\n 'timezone',\n 'is_before_date',\n ...use_fields\n ].reduce((map, key) => {\n /* istanbul ignore else */\n if (fields[key]) {\n map[key] = fields[key];\n }\n return map;\n }, {});\n \n if (simplified_fields.all_day) {\n const handleAllDay = (value) => {\n if (value) {\n let startOfDay = simplified_fields.dateTz.value.clone();\n // When the booking space isn't set we still need a way to determine midnight\n // and here we use the current concierge building selection's timezone.\n if (manualTimezone) {\n startOfDay = startOfDay.toZone(manualTimezone);\n }\n\n simplified_fields.dateTz.setValidators([Validators.required]);\n simplified_fields.dateTz.setValue(simplified_fields.all_day.value\n ? startOfDay.startOfValue('day')\n : simplified_fields.dateTz.value);\n simplified_fields.duration.setValue(simplified_fields.all_day.value\n ? 24 * 60\n : simplified_fields.duration.value);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.disable();\n // simplified_fields.dateTz.disable();\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n simplified_fields.dateTz.setValidators(dateValidators);\n simplified_fields.duration.setValue(booking.duration || 30);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.enable();\n simplified_fields.dateTz.enable();\n }\n };\n simplified_fields.all_day.valueChanges.subscribe(handleAllDay);\n handleAllDay(simplified_fields.all_day.value);\n }\n\n const occurrences = booking.occurrence_details || [];\n\n //Add recurrence fields\n if(action && booking.recurrence_period === RecurrencePeriod.LIST){\n booking.recurrence_starts = occurrences\n .filter(occurrence => occurrence.id !== booking.recurrence_master_id)\n .map((occurrence) => new DateTZ({date: occurrence.start_epoch * 1000, is_local_tz: false, building_tz: booking.timezone})\n ) \n }\n /**If series exists then set the start and end dates from the first and last bookings in the occurrences array\n * this prevents prefilled form errors due to individual edits\n */\n if(action && action !== SeriesAction.CLONE && action !== BookingAction.CLONE && occurrences && occurrences.length && !booking.id){\n const start_dateTz = new DateTZ({\n date: occurrences.sort((d1, d2) => d1.start_epoch - d2.start_epoch)[0].start_epoch * 1000, \n is_local_tz: false, building_tz: booking.timezone\n })\n simplified_fields.dateTz.setValue(start_dateTz)\n const end = occurrences.sort((d1, d2) => d2.start_epoch - d1.start_epoch)[0].start_epoch * 1000\n booking.recurrence_endTz = new DateTZ({date: end, is_local_tz: false, building_tz: booking.timezone}) \n }\n\n // R-- needs TZ aware fields\n const _recurr_end = simplified_fields.dateTz?.value || new DateTZ({ date: 1 }); // new DateTZ({date: simplified_fields.date?.value}) \n const fields_with_recurrence = {\n ...simplified_fields,\n recurrence_period: new FormControl(booking.recurrence_period || RecurrencePeriod.WEEKLY),\n recurrence_interval: new FormControl(booking.recurrence_interval || 1),\n recurrence_endTz: new FormControl(booking.recurrence_endTz || _recurr_end.addValue({days: 1})),\n recurrence_count: new FormControl(booking.recurrence_count || 0),\n is_recurrent: new FormControl(booking.is_recurrent),\n recurrence_starts: new FormControl(booking.recurrence_starts || []),\n recurrence_exceptions: new FormControl([]),\n recurrence_pattern: new FormControl(RecurrencePeriod.WEEKLY), //Helper value to store the last selected pattern (daily, weekly, monthly),\n recurrence_days: new FormControl(booking.recurrence_days || [])\n }\n\n if(booking.is_recurrent && action !== BookingAction.CLONE){\n fields_with_recurrence.recurrence_starts.setValidators([arrayWithValues])\n fields_with_recurrence.recurrence_starts.updateValueAndValidity()\n fields_with_recurrence.recurrence_endTz.setValidators([Validators.required, validDateTZ]);\n }\n // Generate form group for booking item\n const form = new FormGroup(fields_with_recurrence);\n return form;\n}\n\n/**\n * Validate whether date is in the future\n * @param control Control to check value\n */\nexport function isFuture(control: AbstractControl) {\n const dateTz = control.value; // new DateTZ({date: control.value});\n return dateTz.isBeforeDate(DateNow(new Date()).subtractValue({ minutes: 5 }))\n ? { dateTz: 'Date needs to be in the future' }\n : null;\n}\n\n/**\n * Validate whether an array has values\n * @param control Control to check value\n */\nexport function arrayWithValues (control: AbstractControl) {\n return control.value.length !== 0 ? null : { field: 'Needs at least one value'}\n}\n\n/**\n * Validate whether a date has a valid value (future or current date)\n * @param control Control to check value\n */\n export function validDate (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = new DateTZ({date: control.value})\n const now = DateNow(new Date())\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Validate whether a date has a valid DateTZ value (future or current date)\n * @param control Control to check value\n */\n export function validDateTZ (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = DateNow(control.value.JSDate);\n const now = DateNow(new Date());\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Get minimum duration from ruleset in minutes\n * Default to 5min\n */\nexport function getMinLength(rule_list: HashMap): number {\n return Object.values(rule_list).reduce((min, block) => {\n const min_block = block.reduce((min_length, el) => {\n if (el.conditions.min_length && stringToMinutes(el.conditions.min_length) > min) {\n return stringToMinutes(el.conditions.min_length);\n } else {\n return min_length;\n }\n }, 5);\n if (min_block > min) {\n return min_block;\n } else {\n return min;\n }\n }, 5) as number;\n}\n\n/**\n * Whether the first input is greater than the last. Converts duration strings into minutes\n * @param duration_1 First input can be a number in minutes or a duration string e.g. `1 hour`\n * @param duration_2 Second input can be a number in minutes or a duration string e.g. `30 minutes`\n */\nexport function durationGreaterThanOrEqual(\n duration_1: string | number,\n duration_2: string | number\n) {\n const first: number = typeof duration_1 === 'string' ? stringToMinutes(duration_1) : duration_1;\n const second: number =\n typeof duration_2 === 'string' ? stringToMinutes(duration_2) : duration_2;\n return first >= second;\n}\n\n/**\n * Conver time string into minutes\n * @param str timestring e.g. `'1 day'`, `'15 minutes'`, `'2 weeks'`\n */\nexport function stringToMinutes(str: string): number {\n const parts = str.split(' ');\n return +parts[0] * DURATION_MAP[parts[1]];\n}\n\n/**\n * Get current status within bookings\n * @param bookings List of bookings\n * @param host Host of the new event\n * @param date Datetime of the new event\n */\nexport function statusFromBookings(\n bookings: Booking[] = [],\n bookable: boolean = true,\n requestable: boolean = false,\n dateTz: DateTZ = DateNow(),\n space?: Space\n) {\n const free_slots = getFreeBookingSlots(bookings.filter((bkn) => !bkn.declined));\n const now = DateNow() // new DateTZ({date}); // now should be now\n // commeted bellow piece as correct way to get next free booking slot is at line- 488\n // const next_free_slot = free_slots.find((slot) => {\n // return slot && (slot.start > now.ms || now.ms > slot.start - slot.start % 1000 || now.ms < slot.end - slot.end % 60 * 1000);\n // // const start = new DateTZ({date: slot?.start || 0 });\n // // const end = new DateTZ({date: slot?.end || 0}); // slot end isn't late enough? or after now/\n // // return start.isAfterDate(now) || (now.isAfterDate(start.startOfValue('second')) && now.isBeforeDate(end.startOfValue('minute')))\n // });\n\n const next_free_slot = getNextFreeBookingSlot(bookings.filter((bkn) => !bkn.declined), dateTz.ms);\n \n const start = new DateTZ({date: next_free_slot?.start || 0});\n const end = new DateTZ({date: next_free_slot?.end || 0});\n const currently_free = dateTz.isAfterDate(start.startOfValue('second')) && dateTz.isBeforeDate(end.startOfValue('minute'));\n const time_until_next_block = humaniseDuration(\n currently_free ? end.dateDiff(dateTz, 'minutes') : start.dateDiff(dateTz, 'minutes'),\n 'short'\n );\n\n const free_tomorrow = !currently_free && !start.isSameDate(dateTz, 'day');\n const free_today = currently_free && !end.isSameDate(dateTz, 'day');\n \n return {\n status: (!bookable\n ? SpaceStatus.NotBookable\n : currently_free\n ? requestable\n ? SpaceStatus.Requestable\n : SpaceStatus.Available\n : SpaceStatus.InProgress) as SpaceStatus,\n available_until: free_today\n ? 'No meetings today'\n : currently_free\n ? `Free until ${end.formatDate(timeFormatString())}(${time_until_next_block})`\n : free_tomorrow\n ? 'Unavailable today'\n : `Free at ${start.formatDate(timeFormatString())}(${time_until_next_block})`\n };\n}\n\n/**\n * V1 version display.\n */\nexport const spaceStatusToDisplay = (status: SpaceStatus): string => {\n switch (status) {\n case SpaceStatus.NotBookable:\n return 'Not Bookable';\n case SpaceStatus.Requestable:\n return 'Available by Request';\n case SpaceStatus.Unavailable:\n return 'Unavailable';\n case SpaceStatus.InProgress:\n return 'Meeting in Progress';\n case SpaceStatus.Available:\n default:\n return 'Available';\n }\n};\n\nexport function replaceBookings(\n list: Booking[],\n new_bookings: Booking[],\n filter_options: { room_email: string; fromTz: DateTZ; toTz: DateTZ }\n) {\n const filtered_list = list.filter((booking) => {\n return (\n !(booking.multi_rooms.some(room => room?.email === filter_options.room_email)) ||\n !timePeriodsIntersect(filter_options.fromTz.ms, filter_options.toTz.ms, booking.startDateTz.ms, booking.endDateTz.ms)\n );\n });\n const updated_list = filtered_list.concat(new_bookings);\n updated_list.sort((a, b) => a.date - b.date);\n return unique(updated_list, 'icaluid');\n}\n\nexport function timePeriodsIntersect(\n start1: number,\n end1: number,\n start2: number,\n end2: number,\n type = ''\n) {\n return (\n (start1 >= start2 && start1 < end2) ||\n (end1 > start2 && end1 <= end2) ||\n (start2 >= start1 && start2 < end1) ||\n (end2 > start1 && end2 <= end1)\n );\n}\n\nexport function formatWhen({\n all_day,\n startTZ,\n endTZ,\n displayEndTZ\n}): string {\n if (all_day) {\n return `${startTZ.formatDate('dd MMM yyyy')} - All Day`;\n } else {\n if (startTZ.isSameDate(endTZ, 'day')) {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('h:mma')}`;\n } else {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('dd MMM yyyy, h:mma')}`;\n }\n }\n}\n\nexport const isIncludes = (item: any, field: string, searchVaue: string) => (item && item[field] && item[field].toLowerCase().includes(searchVaue));\n\nexport function searchRoomsAndBookings(allItems: (Space | Booking)[], searchValue: string, isConcierge:boolean = false) {\n\n let relevantItems: (Space | Booking)[] = [];\n\n if(isConcierge) {\n relevantItems = allItems.filter( (item: any ) => \n isIncludes(item, 'title', searchValue) ||\n isIncludes(item.creator, 'name', searchValue) ||\n isIncludes(item.organiser, 'name', searchValue) ||\n isIncludes(item, 'simple_name', searchValue) || // search with room name \n (item?.attendees && !!item?.attendees.filter(el => el.name.toLowerCase().includes(searchValue)).length ) \n );\n } else {\n relevantItems = allItems.filter( (item: any ) => \n this.isIncludes(item.creator, 'name', searchValue) ||\n this.isIncludes(item.organiser, 'name', searchValue) ||\n this.isIncludes(item, 'simple_name', searchValue) \n );\n }\n\n const filteredItems = this.duplicateMultiroomEntriesIfAny(relevantItems);\n \n return filteredItems;\n} \n\nexport function duplicateMultiroomEntriesIfAny(bookings) {\n // Initialize an array to hold the original and duplicated entries \n const updatedBookings = [...bookings];\n\n // Loop through the original bookings array \n [...bookings].forEach(booking => {\n if(booking?.is_multiroom) {\n // calculate the number of times to duplicates the booking\n const duplicatesCount = booking.multi_rooms.filter(el => el.id !== booking.space.id);\n\n // Create the duplicate and add them to the updatedBookings array.\n for(let i = 0; i < duplicatesCount.length; i++) {\n // Deep copy the booking to ensure references are not copied\n const duplicatedBooking = cloneDeep(booking); \n duplicatedBooking.room = duplicatesCount[i]; \n updatedBookings.push(duplicatedBooking);\n }\n }\n });\n\n // Return the array with duplicated entries \n return updatedBookings;\n\n}\n \n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { DateNow } from \"@mckinsey-converge/date-tz\";\nimport { Observable } from 'rxjs/internal/Observable';\nimport { forkJoin } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n const now = DateNow(new Date())\n if (!options.from) {\n options.from = now\n .startOfValue('day')\n .subtractValue({ days: 2 })\n .ms;\n }\n if (!options.until) {\n options.until = null;\n }\n\n const key = `bookings|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Booking[]) => {\n delete this._promises[key];\n resolve(list);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking, series?: boolean): Promise {\n const body = booking.toApiJSON()\n if(series){\n body.series = true\n }\n return booking.id ? this.update(booking.id, body) : this.add(body);\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n public checkinIndividualVisitor(id: string, fields: BookingCheckinParams) {\n return this.taskObsr(id, 'checkin', fields); \n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n public declineMultiple(bookings: Booking[]): Observable {\n const requests = [];\n bookings.forEach(bkg => {\n const booking = bkg.toJSON();\n const id = booking.id;\n const fields = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: booking.space?.email,\n icaluid: booking.icaluid,\n start: booking.startDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n end: booking.endDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n };\n if (bkg.is_recurrent && bkg.recurrence_type === 'master') {\n // Add series=true for recurrent bookings\n fields['series'] = true;\n } \n requests.push(this.taskObsr(id, 'concierge_decline', fields) ); \n });\n return forkJoin(requests);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { PaginatedAPIService } from '../paginated.service';\nimport { Booking, IBookingQueryOptions, } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { Observable } from 'rxjs';\n\nexport interface PaginatedBooking {\n results: Booking[];\n total: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsPaginatedService extends PaginatedAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n\n const key = `bookingsPaginated|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (response: any) => {\n delete this._promises[key];\n resolve(response);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking): Promise {\n return booking.id ? this.update(booking.id, booking.toJSON()) : this.add(booking.toJSON());\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n // public getHoldingBay(query: IBookingQueryOptions): Promise {\n // const key = `bookingsPaginated|holding-bay`;\n // if (!this._promises[key]) {\n // this._promises[key] = new Promise((resolve, reject) => {\n // const respond = (response: any) => {\n // delete this._promises[key];\n // resolve(response);\n // };\n // const error = e => {\n // reject(e);\n // delete this._promises[key];\n // }; \n // this.query(query, { url: '/api/staff/bookings/holding_bay' }).then(respond, error);\n // });\n // }\n\n // return this._promises[key];\n // }\n\n public getHoldingBay = (query: IBookingQueryOptions): Observable => this.queryHoldingBay(query, { url: '/api/staff/bookings/holding_bay' });\n}\n","export * from './booking.class'\nexport * from './space.types'\nexport * from './bookings.service'\nexport * from './bookingsPaginated.service'\nexport * from './booking.utilities'\nexport * from './booking-state.service'\nexport * from './space.utilities'\nexport * from './booking.types'\n","import { SpaceRules } from './booking.types';\n\nimport {\n durationGreaterThanOrEqual,\n stringToMinutes\n} from './booking.utilities';\nimport {\n SpaceCheckOptions,\n SpaceRuleOptions\n} from './space.types';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * Get booking rules for the given user and space\n * @param options\n */\nexport function rulesForSpace(options: SpaceRuleOptions): SpaceRules {\n if (!options) {\n throw Error('Options are needed to check for rule matches');\n }\n const space_rules_for_user: SpaceRules = {\n auto_approve: true,\n hide: true,\n reason: ''\n };\n let match = false;\n /* istanbul ignore else */\n if (options.space) {\n for (const type in options.rules) {\n if (\n options.rules.hasOwnProperty(type) &&\n options.rules[type] instanceof Array &&\n options.space.zones.find((zone) => zone === type)\n ) {\n for (const rule_block of options.rules[type]) {\n /* istanbul ignore else */\n if (\n checkRules({\n user: options.user,\n space: options.space,\n time: options.time,\n duration: options.duration,\n rules: rule_block.conditions\n })\n ) {\n const ruleset = rule_block.rules;\n const conditions = rule_block.conditions;\n space_rules_for_user.hide = false;\n /* istanbul ignore else */\n if (conditions.max_length) {\n space_rules_for_user.max_length = stringToMinutes(\n conditions.max_length as string\n );\n }\n /* istanbul ignore else */\n if (conditions.min_length) {\n space_rules_for_user.min_length = stringToMinutes(\n conditions.min_length as string\n );\n }\n // NOTE: use max_length in conditions instead of book_length in rules\n // if (ruleset.book_length) {\n // space_rules_for_user.max_length = stringToMinutes(ruleset.book_length as string);\n // }\n /* istanbul ignore else */\n if (ruleset.auto_approve !== undefined) {\n space_rules_for_user.auto_approve = ruleset.auto_approve;\n }\n match = true;\n space_rules_for_user.reason = '';\n break;\n }\n else {\n space_rules_for_user.reason = 'OfficeRules';\n }\n }\n }\n \n /* istanbul ignore else */\n if (!space_rules_for_user.hide) {\n break;\n }\n }\n }\n if (!match) {\n space_rules_for_user.hide = true;\n }\n return space_rules_for_user;\n}\n\n\n/**\n * Check if user matches the given ruleset\n * @param options\n */\nfunction checkRules(options: SpaceCheckOptions): boolean {\n /* istanbul ignore else */\n if (options.rules) {\n const time = new DateTZ({date: options.time});\n const count = Object.keys(options.rules).length;\n let matches = 0;\n Object.keys(options.rules).forEach((key) => {\n let counter = 0;\n const condition: string[] =\n options.rules[key] instanceof Array\n ? (options.rules[key] as [])\n : [options.rules[key] as string];\n switch (key) {\n case 'groups':\n /* istanbul ignore else */\n if (options.user && options.user.groups) {\n counter = 0;\n condition.forEach((i) =>\n options.user.groups.find((j) => j === i) ? counter++ : null\n );\n /* istanbul ignore else */\n if (counter > 0) {\n matches++;\n }\n }\n break;\n case 'locations':\n /* istanbul ignore else */\n if (options.user && options.user.location) {\n counter = 0;\n condition.forEach((i) =>\n (options.user.last_location.name || '').indexOf(i) >= 0\n ? counter++\n : null\n );\n /* istanbul ignore else */\n if (counter >= options.rules[key].length) {\n matches++;\n }\n }\n break;\n case 'is_before':\n /* istanbul ignore else */\n if (options.time) {\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date()).addValue({ minutes: duration });\n let match = time.isBeforeDate(check);\n /* istanbul ignore else */\n matches += match ? 1 : 0;\n }\n break;\n case 'is_after':\n /* istanbul ignore else */\n if (options.time) {\n\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date());\n time.isAfterDate(check.addValue({ minutes: duration })) ? matches++ : '';\n }\n break;\n case 'min_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(options.duration, condition[0])\n ) {\n matches++;\n }\n break;\n case 'max_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(condition[0], options.duration)\n ) {\n matches++;\n }\n break;\n }\n });\n return matches >= count;\n }\n return false;\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringCategoriesService extends BaseAPIService {\n\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringCategory, this);\n this._name = 'catering category/group';\n this._api_route = 'catering/category';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering categories. Use catering menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering categories. Use catering menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringCategory(raw_item);\n }\n\n public format(item: CateringCategory) {\n return { ...item };\n }\n}\n","import { CateringItem } from \"./catering-item.class\";\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport class CateringCategory extends CateringItem {\n /** Whether item is a category */\n public is_category = true;\n public admin_only: boolean;\n public restricted_from: number;\n\n constructor(data: HashMap) {\n super(data);\n this.is_category = true;\n (this as any).must_select = this.must_select || 0;\n (this as any).order_anytime = !!data.order_anytime && this.package;\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj = super.toJSON();\n obj.order_anytime = !!obj.order_anytime && obj.package;\n return obj;\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nexport interface CateringAvailability {\n /** Month of the year that the item starts being available */\n readonly from_month: number;\n /** Month of the year that the item ends being available */\n readonly to_month: number;\n}\n\nexport class CateringItem {\n /** Unique ID of the catering item */\n public readonly id: string;\n /** Display name of the catering item */\n public readonly name: string;\n /** Description of the item */\n public readonly description: string;\n /** URL to the image associated with the item */\n public readonly image_path: string;\n /** Type of catering item */\n public readonly catering_type: string;\n /** Availability of the item */\n public readonly available: CateringAvailability;\n /** Time in hours that is needed to prepare the item beforehand */\n public readonly prior_notice: number;\n /** Cost of the item without decimals */\n private unit_price: number;\n /** Cost of the item without decimals */\n public readonly supplier_cost: number;\n /** Minimum number this item allowed in an order */\n public readonly minimum_quantity: number;\n /** Maximum number this item allowed in an order */\n public readonly maximum_quantity: number;\n /** List of categories that the item is contained in */\n public readonly parent_categories: readonly string[];\n /** Allegen information associated with the item */\n public readonly allergy: string;\n /** Whether the supply of this item has run out */\n public out_of_stock: boolean;\n /** Whether item can be ordered within the time limit set by the building */\n public readonly order_anytime: boolean;\n /** Number of child items that must be selected as part of the package */\n public readonly must_select: number;\n /** List of associated items */\n public readonly items: CateringItem[];\n public readonly availableItems: CateringItem[];\n /** Whether child items are part of a package */\n public readonly package: boolean;\n /** List of zone ids associated with the category */\n public readonly zones: readonly string[];\n /** Number of this item in the assoicated order */\n private _amount = 0;\n /** Unique ID of the catering item */\n private instance_id: string;\n /** Whether item is a category */\n public is_category: boolean = false;\n /** Whether item is disabled in Staff App */\n public admin_only: boolean;\n /** restricted_from indicates category restriction from hours ahead of delivery time */\n public restricted_from: number;\n\n public get can_order_anytime(): boolean {\n return (\n this.order_anytime ||\n !this.package && this.items.reduce(\n (anytime, item) => anytime || item.can_order_anytime,\n false,\n )\n );\n }\n\n /** Number of this item in the assoicated order */\n public get amount(): number {\n return this._amount || 0;\n }\n\n /** Unit price in the assoicated order */\n public get price(): number {\n return this.unit_price || 0;\n }\n\n /** Total cost of the amount of items set */\n public get total(): number {\n return (this._amount * this.unit_price) || 0;\n }\n\n constructor(data: HashMap) {\n this.instance_id = `item-${Math.floor(Math.random() * 999_999_999)}`;\n this.id = data.id || '';\n this.name = data.name || '';\n this.is_category = this.id.includes('category-');\n this.available = {\n from_month: (data.available ? data.available.from_month : data.available_from) || -1,\n to_month: (data.available ? data.available.to_month : data.available_to) || -1,\n };\n this.description = data.description || '';\n this.prior_notice = data.prior_notice || data.notice;\n this.unit_price = data.unit_price || data.price || 0;\n this.supplier_cost = data.supplier_cost;\n this.minimum_quantity = Math.max(0, data.minimum_quantity || 0);\n this.maximum_quantity = Math.max(1, data.maximum_quantity || 999);\n this.parent_categories = data.category_ids || data.parent_categories || data.categories;\n this.order_anytime = !!data.order_anytime;\n this.image_path = data.image_path || '';\n this.admin_only = data.admin_only;\n this.restricted_from = data.restricted_from || data?.root_category_restricted_from || 0;\n \n this.catering_type = data.catering_type;\n this.must_select = data.must_select ?? 0;\n this._amount = data._amount || data.amount || 0;\n this.allergy = data.allergy || '';\n const cateringItems: CateringItem[] = (data.items || []).map(item => new CateringItem(item));\n this.items = cateringItems;\n const filteredCateringItems = cateringItems.filter(c => !c.out_of_stock);\n this.availableItems = filteredCateringItems;\n this.out_of_stock = !!data.out_of_stock ||\n // if original items are empty, we hit the bottom, so if we filter out items then its out of stock.\n (cateringItems.length > 0 && filteredCateringItems.length === 0);\n this.package = data.package === 'true' || data.package === true;\n this.zones = data.zones && data.zones.length ? [...data.zones] : [];\n }\n\n public setAmount(amount: number = 0): void {\n if (amount <= this._amount) {\n if (amount < this.minimum_quantity) {\n amount = 0;\n }\n } else {\n if (amount < this.minimum_quantity) {\n amount = this.minimum_quantity;\n }\n }\n this._amount = Math.max(0, Math.min(this.maximum_quantity, amount));\n }\n\n /**\n * Updates the unit_price in the assoicated order if necessary\n * @param price value to compare to unit_price\n */\n public setPrice(price: number = 0): void {\n if(this.unit_price !== price) this.unit_price = price;\n }\n\n /**\n * Increase amount of the item the order\n * @param amount Amount to increase by\n */\n public addToOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount += amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = this.minimum_quantity;\n } else if (this._amount > this.maximum_quantity) {\n this._amount = this.maximum_quantity;\n }\n }\n\n /**\n * Decrease amount of the item the order\n * @param amount Amount to decrease by\n */\n public removeFromOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount -= amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = 0;\n }\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._changes;\n delete obj._server_names;\n // Convert remaining members to be public\n obj.price = obj.unit_price;\n obj.categories = obj.parent_categories;\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n return obj;\n }\n\n\n\n public within_category_restricted_time(dateTz): boolean {\n /**\n * Update : https://mckinsey.atlassian.net/browse/CNG-574\n * Right now the frontend is restricting catering orders based off the field .settings.discovery_info.catering_restricted_from,\n * so for this ticket change it’s best we keep that field as the default time restriction, then add a new field to catering categories called \n * restricted_from which will override the old field if it’s present!\n * restricted_from can be set by concierge admin to restrict item from being order before set time ex if it been set to 24 then the item should\n * available to order before 24 hours of booking/order time!\n */\n\n if(!!this?.restricted_from) {\n const expired = DateNow(new Date()).addValue({ hours: this?.restricted_from }).startOfValue('minute');\n return dateTz.isBeforeDate(expired);\n } else {\n return false;\n }\n \n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { CateringItem } from './catering-item.class';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringItemsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringItem, this);\n this._name = 'Catering Menu';\n this._api_route = 'catering/item';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering items. Use menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering items. Use menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringItem(raw_item);\n }\n\n public format(item: CateringItem) {\n return item instanceof CateringItem ? item.toJSON() : item;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { CateringItem } from './catering-item.class';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringMenuService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Catering Menu';\n this._api_route = 'menu';\n }\n\n /**\n * Convert user data to local format\n * @param user User data\n */\n protected processItem(item: HashMap) {\n return item.items ? new CateringCategory(item) : new CateringItem(item);\n }\n}\n","\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringNotesService {\n\n public cateringNotes = [];\n\n \n public setNotes(notes) {\n this.cateringNotes = notes;\n }\n\n public getNotes() {\n return this.cateringNotes;\n }\n}","import { CateringItem } from './catering-item.class';\nimport { HashMap } from '@mckinsey-converge/base';\n\nimport { CateringCategory } from './catering-category.class';\nimport { Booking } from '../bookings';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport type CateringOrderMutableProperties =\n | 'items'\n | 'location_id'\n | 'location'\n | 'delivery_time'\n | 'charge_code'\n | 'notes'\n | 'status';\n\nexport type CateringOrderStatus = 'accepted' | 'preparing' | 'ready' | 'delivered' | 'cancelled';\n\nconst now = DateNow(new Date());\n\n// R--- refactor booking date to be dateTz\nexport class CateringOrder {\n /**\n * Booking fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Unique Booking ID for the catering order */\n readonly booking_id: string;\n /** \n * Timestamp based booking time of the booking associated with the order\n * \n * Must be provide as the true Booking startDateTz or as a new DateTZ with \n * the correct date: timestamp, local_tz = false and bulding_tz values\n */\n readonly booking_date: number;\n /**\n * Timezone of the booking associated with the order\n */\n readonly booking_timezone: string;\n /** ID of the location to deliver the items to */\n location_id: string = '';\n /** Display text for the location to deliver the items to */\n location: string = '';\n /**\n * Smart timezone aware catering datetime with timezone\n */\n readonly bookingDateTz: DateTZ;\n\n /** \n * Booking associated with the order \n * \n * The booking attached to the CateringOrder is a special case used \n * mainly on the Concierge catering reports because someone created \n * a bad pattern to save catering changes to the booking. \n * \n * Avoid when possible.\n */\n public booking: Booking = null;\n\n /**\n * Catering specific fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Whether the order status change is loading */\n public loading: boolean;\n /** Unique ID for the catering order */\n readonly id: string;\n /** Number of minutes after the start of the associated meeting to delivery the order */\n readonly delivery_time: number = 0;\n /** Status of the catering order */\n readonly status: CateringOrderStatus;\n /** Whether items in the order need to be prepared in the kitchen */\n readonly kitchen: boolean;\n /** Whether items in the order are in the pantry */\n readonly pantry: boolean;\n /** List of items */\n readonly items: readonly (CateringItem | CateringCategory)[] = [];\n /** Creation time of the order */\n readonly created_at: number;\n /** Charge code associated with the order */\n readonly charge_code: string;\n /** Notes associated with the order */\n readonly notes: string;\n // /** Mapping of properties to their changes */\n // private _changes: HashMap = {};\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n /** Currency code for the location of the order */\n public symbol: string;\n /** Whether the is an error with the order */\n public error: boolean;\n\n\n constructor(data: HashMap) {\n /** \n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = DateNow(new Date());\n // now rounded to the next 5 minute increment\n const defaultStartTz = nowTz.setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n\n this.id = data.id || `order-${Math.floor(Math.random() * 999_999_999)}`;\n\n // If the booking is provided default the booking values to the true booking values\n this.booking = data.booking || null;\n\n \n // Has a booking so init with those values\n if (this.hasBookingAttached) {\n this.booking_date = this.booking.startDateTz.ms;\n this.booking_timezone = this.booking.timezone;\n this.bookingDateTz = this.booking.startDateTz;\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n } else {\n this.booking_date = data.booking_date || defaultStartTz.ms;\n this.booking_timezone = data.booking_timezone || defaultLocalTimezone;\n this.bookingDateTz = new DateTZ({ date: this.booking_date, is_local_tz: false, building_tz: this.booking_timezone });\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n }\n \n this.delivery_time = typeof data.delivery_time === 'number' ? data.delivery_time : 0;\n this.status = data.status || 'accepted';\n this.charge_code = data.charge_code || data.code;\n this.notes = data.notes;\n this.kitchen = data.kitchen instanceof Array ? !!data.kitchen.length : data.kitchen;\n this.pantry = data.pantry instanceof Array ? !!data.pantry.length : data.pantry;\n this.symbol = data.symbol || 'USD';\n this.items = (data.items || [])\n .map(item => (item.items ? new CateringCategory(item) : new CateringItem(item)))\n .filter(item => !!item.amount);\n }\n\n /** Special Case, check if a full booking is attached */\n public get hasBookingAttached(): boolean {\n return !!this.booking;\n }\n\n /** Display string for the types of items in the order */\n public get type(): string {\n let type = '';\n /* istanbul ignore else */\n if (this.kitchen) type += 'Kitchen';\n /* istanbul ignore else */\n if (this.pantry) {\n /* istanbul ignore else */\n if (type) type += ' + ';\n type += 'Pantry';\n }\n return type;\n }\n\n /** Total cost of the order */\n public get total(): number {\n return this.items.reduce((total, item) => total + (item.total || 0), 0);\n }\n\n /** Total number of items in the order */\n public get item_count(): number {\n return this.items.reduce((total, item) => total + (item.amount || 0), 0);\n }\n\n public get deliver_date(): DateTZ {\n return (this.bookingDateTz || this.booking?.startDateTz).addValue({ minutes: this.delivery_time })\n }\n\n /** Display string for the delivery time of the order (short version) */\n public get deliver_at(): string {\n return this.deliver_date.formatDate('h:mm a');\n }\n\n /** Display string for the delivery time of the order */\n public get deliver_at_time(): string {\n return this.deliver_date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Display string for the delivery date of the order */\n public get deliver_on_date(): string {\n return this.deliver_date.formatDate('dd MMM yyyy');\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): CateringOrder {\n return new CateringOrder(this.toJSON());\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringOrder): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._server_names;\n // Remove local public members\n delete obj.booking;\n delete obj.loading;\n delete obj.bookingDateTz;\n\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substr(1)] || key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n\n return obj;\n }\n}\n","import { CateringItem } from './catering-item.class';\n\nexport const mergeCateringItemWithFormData = (existing: CateringItem, override: any) =>\n new CateringItem({\n ...(existing instanceof CateringItem ? existing.toJSON() : existing),\n ...override\n });\n","export * from './catering-item.class';\nexport * from './catering-category.class';\nexport * from './catering-menu.service';\nexport * from './catering-order.class';\nexport * from './catering-categories.service';\nexport * from './catering-items.service';\nexport * from './catering.utilities';\nexport * from './catering-notes.service';\n","import { Injectable } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloseDialogService {\n private dialogRefMap = new Map>();\n\n constructor() { }\n\n // Register a dialog with its ID\n registerDialog(id: string, dialogRef: MatDialogRef): void {\n this.dialogRefMap.set(id, dialogRef);\n }\n\n // Close a specific dialog by ID\n closeDialog(id: string): void {\n const dialogRef = this.dialogRefMap.get(id);\n if (dialogRef) {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n }\n }\n\n // Optional: Close all dialogs\n closeAllDialogs(): void {\n this.dialogRefMap.forEach((dialogRef, id) => {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n });\n }\n}\n\nexport enum DialogIds {\n MeetingDetails = 'meetingDetailsDialogId',\n BookingConfirmation = 'bookingConfirmationDialogId',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CollapseService {\n private collapseSubject = new BehaviorSubject(false);\n collapse$ = this.collapseSubject.asObservable();\n\n collapsePanel() {\n this.collapseSubject.next(false);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class DataCommonModule {}\n","import { Injectable } from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subscription\n} from 'rxjs';\n\nimport {\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\n/** List of keys that cannot be in a combination by themselves or with each other */\nconst INVALID_STANDALONE_KEYS: string[] = ['control', 'shift', 'alt', 'meta', 'os'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HotkeysService {\n /** Map of subjects which store press states of keys */\n private keydown_states: HashMap> = {};\n /** Map of obserers for key state subjects */\n private keydown_observers: HashMap> = {};\n /** List of keys at the end of a combination */\n private combo_end: string[] = [];\n /** List of registered hotkey combinations */\n private registered_combos: string[][] = [];\n /** Counter for the number of keydown events. Used for checking order of key presses */\n private counter: number = 0;\n /** Last key code to be pressed */\n private last_down: string;\n\n constructor() {\n window.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.last_down !== code) {\n /* istanbul ignore else */\n if (!this.keydown_states[code]) {\n this.keydown_states[code] = new BehaviorSubject(null);\n this.keydown_observers[code] = this.keydown_states[code].asObservable();\n }\n this.keydown_states[code].next(++this.counter);\n /* istanbul ignore else */\n if (this.combo_end.indexOf(code) >= 0) {\n event.preventDefault();\n }\n this.last_down = code;\n }\n });\n\n window.addEventListener('keyup', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.keydown_states[code]) {\n this.keydown_states[code].next(null);\n }\n /* istanbul ignore else */\n if (this.last_down === code) {\n this.last_down = null;\n }\n });\n }\n\n /**\n * Listen to the given key combination\n * @param combo Array of key codes to listen to or a hotkey string e.g. `Alt+Shift+KeyK`\n * @param next Callback for combination presses\n */\n public listen(combo: string | string[], next: () => void): Subscription {\n combo = (combo instanceof Array ? combo : combo.split('+'));\n const combination: string[] = combo.map(i => this.mapKey(i.toLowerCase()));\n /* istanbul ignore else */\n if (combination.length > 0 && this.validCombination(combination)) {\n this.registered_combos.push(combination);\n const last_key = combination[combination.length - 1];\n /* istanbul ignore else */\n if (!this.keydown_states[last_key]) {\n this.keydown_states[last_key] = new BehaviorSubject(null);\n this.keydown_observers[last_key] = this.keydown_states[last_key].asObservable();\n }\n this.updateCombinationEndList();\n return this.keydown_observers[last_key].subscribe((count) => {\n /* istanbul ignore else */\n if (count) {\n const presses: number[] = [];\n /* istanbul ignore else */\n if (combination.length > 0) {\n // Check that keys are pressed\n for (const key of combination) {\n const state = this.keydown_states[key];\n presses.push(state ? state.getValue() || -1 : -1);\n }\n // Check that keys are pressed in the correct order\n for (let i = 0; i < combination.length - 1; i++) {\n if (presses[i] > presses[i + 1]) {\n return;\n }\n }\n }\n const total = presses.reduce((a, v) => a + (v > 0 ? 1 : -1), 0);\n /* istanbul ignore else */\n if (total >= combination.length) {\n next();\n }\n }\n });\n }\n return null;\n }\n\n /**\n * Map key codes with multiple versions to simple form\n * @param code Code to transform\n */\n private mapKey(code: string): string {\n /* istanbul ignore else */\n if (code.indexOf('alt') >= 0 || code.indexOf('shift') >= 0 || code.indexOf('control') >= 0) {\n return code.replace('left', '').replace('right', '');\n }\n return code;\n }\n\n /**\n * Update the list of the last keys in combinations to allow for prevent default actions on pre-existing hotkeys\n */\n private updateCombinationEndList(): void {\n const key_list = [];\n for (const combo of this.registered_combos) {\n this.combo_end.push(combo[combo.length - 1]);\n }\n this.combo_end = unique(key_list);\n }\n\n /**\n * Checks if the given hotkey combination is allowed and valid\n * @param combo Array of key codes\n */\n private validCombination(combo: string[]): boolean {\n let non_meta = 0;\n for (const key of combo) {\n /* istanbul ignore else */\n if (INVALID_STANDALONE_KEYS.indexOf(key) < 0) {\n non_meta++;\n }\n }\n return non_meta > 0;\n }\n}\n","export * from './location.class';\nexport * from './location.service';\n","import { HashMap } from '@mckinsey-converge/base';\n\nimport { Organisation } from '../organisation/organisation.class';\nimport {\n ServiceLike,\n ServiceManager\n} from '../service-manager.class';\nimport { BuildingLevel } from '../organisation/level.class';\n\nexport class MapLocation {\n /** ID of the element on the associated map */\n public readonly id?: string;\n /** Name of the location */\n public readonly name?: string;\n /** X coordinate of the location */\n public readonly x?: number;\n /** Y coordinate of the location */\n public readonly y?: number;\n /** Level details for the location */\n public readonly level: BuildingLevel;\n /** Whether the position is fixed */\n public readonly fixed: boolean;\n /** Accuracy of the location when not fixed */\n public readonly confidence?: number;\n /** Whether location is at a desk */\n public readonly at_desk?: boolean;\n /** Whether location is set */\n public readonly empty: boolean;\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(MapLocation);\n }\n\n /** Display string for the building and level of the location */\n public get display(): string {\n const service = ServiceManager.serviceFor(Organisation);\n if (!service) {\n return this.level.name;\n }\n const bld = service.buildings.find((bld) => bld.id === this.level.building_id);\n return bld ? `${bld.name}, ${this.level.name}` : this.level.name;\n }\n\n /** Whether location is in a different building from the active one */\n public get in_another_building(): boolean {\n const service = ServiceManager.serviceFor(Organisation);\n return service && service.building.id !== this.level.building_id;\n }\n\n constructor(raw_data: HashMap) {\n this.id = raw_data.id || raw_data.map_id || raw_data.desk_id;\n this.name = raw_data.name || '';\n this.x = raw_data.x\n ? Math.floor(this.normalise(raw_data.x, raw_data.x_max || 10000) * 10000)\n : null;\n this.y = raw_data.y\n ? Math.floor(this.normalise(raw_data.y, raw_data.x_max || 10000) * 10000)\n : null;\n const service = ServiceManager.serviceFor(Organisation);\n this.level =\n raw_data.level instanceof BuildingLevel\n ? raw_data.level\n : service\n ? service.levelWithID(raw_data.level)\n : new BuildingLevel(raw_data.level);\n this.fixed = this.x === null && this.y === null;\n this.confidence = Math.max(5, Math.min(15, raw_data.confidence || 0));\n this.at_desk = this.id && this.id.indexOf('area-') === 0;\n this.empty = !(this.name && this.level && (this.id || this.x || this.y));\n }\n\n /** Normalise the given value within the max */\n private normalise(value: number, max: number): number {\n return value / (max * 1.0);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { MapLocation } from './location.class';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocationService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(MapLocation, this);\n this._name = 'Location';\n this._api_route = 'people';\n }\n\n public add(...args): never {\n throw new Error('Create not allowed for location service')\n }\n\n public update(...args): never {\n throw new Error('Update not allowed for location service')\n }\n\n public delete(...args): never {\n throw new Error('Delete not allowed for location service')\n }\n\n public process(item: HashMap) {\n return new MapLocation(item) as any;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { BookingRule } from '../bookings';\nimport { ServiceManager } from '../service-manager.class';\n\nexport interface BuildingCity {\n timezone: string\n name: string\n}\n\nexport interface IBuildingRoleUser {\n name: string;\n email: string;\n phone: string;\n}\n\nexport interface LockerMap {\n [zone: string]: {\n [area: string]: {\n [type: string]: (string | boolean)[][];\n };\n };\n}\n\nexport interface ICoordinates {\n longitude: number;\n latitude: number;\n}\n\nexport interface LevelFeature {\n id: string;\n level_id: string;\n name: string;\n}\n\nexport interface BookingRuleDetails {\n /** List of booking rules details for the building */\n readonly rules: readonly string[];\n /** Custom booking rules for the map */\n readonly map_rules?: readonly string[];\n /** Custom booking rules for the map */\n readonly other_rules?: readonly string[];\n /** Contact email address for the building */\n readonly contact?: string;\n /** Information string to display before the rule listings */\n readonly info?: string;\n /** Link for more details */\n readonly link?: { url?: string, name?: string };\n /**\n * Allow buildings to define their own rules formats where needed or for special messages.\n */\n readonly custom_html?: string;\n}\n\nexport class Building extends BaseDataClass {\n /** Service for managing buildings */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Engine Zone ID for the building */\n public readonly zone_id: string;\n /** Organisation Code for the building */\n public readonly code: string;\n /** Geographical address of the building */\n public readonly address: string;\n /** Details about the booking rules for the building */\n public readonly booking_details: BookingRuleDetails;\n /** Details about the booking rules for the building */\n public readonly booking_rules: HashMap;\n /** Number of hour before a booking catering is restricted */\n public readonly catering_restricted_from: number;\n /** Currency code for the country assoicated with the building */\n public readonly currency: string;\n /** Map of fields that are required on the form */\n public readonly required: HashMap;\n /** IANA timezone database string for the location the building resides */\n public readonly timezone: string;\n /** Whether catering is available in this building */\n public readonly has_catering: boolean;\n /** ID of the system used for the holding bay */\n public readonly holding_bay: string;\n /** ID of the system used for standalone visitors bookings */\n public readonly visitor_space: string;\n /** List of zones to determine sort order spaces */\n public readonly sort_order: readonly string[];\n /** Searchable map features */\n public readonly searchables: readonly LevelFeature[];\n /** List of available extras for the building */\n public readonly extras: readonly Identity[];\n /** List of available extra equipment for loan at the building */\n public readonly loan_items: readonly Identity[];\n /** List of available levels for the building */\n public readonly levels: readonly BuildingLevel[];\n /** The city the building belongs in **/\n public readonly city: string;\n\n public readonly catering_hours: { readonly start: number, readonly end: number };\n /** Map of custom settings for the building */\n private _settings: HashMap;\n /** Map of roles and list of the associated users */\n private _roles: HashMap;\n /** Map of the locker ID arrays */\n private _lockers: LockerMap;\n /** Map of important system ids for the building */\n private _systems: HashMap;\n /** Map of important phone numbers for the building */\n private _phone_numbers: HashMap;\n /** Globe coordiates for the build */\n private _location: ICoordinates;\n /** List of zones associated with the building */\n public readonly zones: readonly string[];\n\n constructor(raw_data: HashMap) {\n super(raw_data);\n const settings = raw_data.settings || {};\n const disc_info = settings.discovery_info || {};\n this.zone_id = raw_data.zone_id || raw_data.zone;\n this.extras = (raw_data.extras || disc_info.extras || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.loan_items = (raw_data.loan_items || disc_info.loan_items || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.levels = (raw_data.levels || disc_info.levels || []).map(i => new BuildingLevel({\n ...i,\n building_id: this.id\n }));\n this._roles = raw_data.roles || disc_info.roles || {};\n this._lockers = raw_data.lockers || raw_data.locker_structure || disc_info.locker_structure || {};\n this._systems = raw_data.systems || disc_info.systems || {};\n this._settings = settings;\n this._phone_numbers = raw_data.phone_numbers || disc_info.phone_numbers || {};\n this._location = raw_data.location || disc_info.location || { longitude: null, latitude: null };\n this.catering_hours = raw_data.catering_hours || disc_info.catering_hours || settings.catering_hours || {\n start: 7,\n end: 20\n };\n const searchables = [];\n if (raw_data.neighbourhoods) {\n for (const lvl in raw_data.neighbourhoods) {\n if (raw_data.neighbourhoods.hasOwnProperty(lvl)) {\n const lvl_features = raw_data.neighbourhoods[lvl] || {};\n for (const feature in lvl_features) {\n if (lvl_features.hasOwnProperty(feature)) {\n searchables.push({\n id: lvl_features[feature],\n name: feature,\n level_id: lvl\n });\n }\n }\n }\n }\n }\n this.searchables = searchables;\n this.code = raw_data.code || disc_info.code || settings.code || '';\n this.address = raw_data.address || disc_info.address || settings.address || '';\n this.booking_details = raw_data.booking_details || disc_info.booking_details || settings.booking_details || {};\n this.booking_rules = raw_data.booking_rules || disc_info.booking_rules || settings.booking_rules || {};\n this.catering_restricted_from = raw_data.catering_restricted_from || disc_info.catering_restricted_from || settings.catering_restricted_from || 0;\n this.currency = raw_data.currency || disc_info.currency || settings.currency || 'USD';\n this.required = raw_data.required || disc_info.required || settings.required || {};\n if (disc_info.requires_equipment_code) {\n this.required.equipment_code = true;\n }\n if (disc_info.requires_expected_attendees) {\n this.required.expected_attendees = true;\n }\n this.timezone = raw_data.timezone || disc_info.timezone || settings.timezone || '';\n this.has_catering = raw_data.has_catering || disc_info.has_catering || settings.has_catering || false;\n this.holding_bay = raw_data.holding_bay || disc_info.holding_bay || settings.holding_bay || '';\n this.visitor_space = raw_data.visitor_space || disc_info.visitor_space || settings.visitor_space || '';\n this.sort_order = raw_data.sort_order || disc_info.sort_order || settings.sort_order || [];\n this.city = raw_data.city || disc_info.city || 'No City';\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings) || getItemWithKeys(['discovery_info', ...keys], this._settings);\n return value;\n }\n\n /**\n * Get list of users with the associated role\n * @param name Role to find users for\n */\n public role(name: string): IBuildingRoleUser[] {\n return [...(this._roles[name] || [])];\n }\n\n /**\n * Get list of the names of available user role lists\n */\n public get role_names(): string[] {\n return Object.keys(this._roles).filter(i => this._roles.hasOwnProperty(i));\n }\n\n /** Map of the locker ID arrays */\n public get lockers(): LockerMap {\n return { ...(this._lockers || {}) };\n }\n\n /** Map of important system ids for the building */\n public get systems(): HashMap {\n return { ...(this._systems || {}) };\n }\n\n /** Map of important phone numbers for the building */\n public get phone_numbers(): HashMap {\n return { ...(this._phone_numbers || {}) };\n }\n\n /** Real coordinates */\n public get location(): ICoordinates {\n return { ...this._location };\n }\n\n /**\n * Get search map feature for the given level ID\n * @param level_id ID of level to grab features for\n */\n public featuresForLevel(level_id: string): LevelFeature[] {\n return (this.searchables || []).filter(i => i.level_id === level_id);\n }\n\n /**\n * Building objects are readonly and cannot be changed\n */\n public async save(): Promise {\n throw new Error('Building objects are readonly and cannot be changed');\n }\n\n /**\n * Building objects are readonly and cannot be deleted\n */\n public async delete(): Promise {\n throw new Error('Building objects are readonly and cannot be deleted');\n }\n}\n","export * from './building.class';\nexport * from './level.class';\nexport * from './organisation.class';\nexport * from './organisation.service';\n","import { HashMap } from 'libs/base/src/lib/types.utilities';\n\n/** Building Level data */\nexport class BuildingLevel {\n /** ID of the building level zone */\n readonly id: string;\n /** ID of the building zone associated with the level */\n readonly building_id: string;\n /** Name of the level */\n readonly name: string;\n /** Number or short identifier of the level */\n readonly short_name: string;\n /** Map URL for the level */\n readonly map_url: string;\n /** Usage type for the level */\n readonly type: 'staff' | 'client' | 'any';\n /** Setting for the level */\n readonly settings: HashMap;\n\n constructor(_data: HashMap = {}) {\n this.id = _data.id || _data.level_id || '';\n this.building_id = _data.bld_id || _data.building_id || '';\n this.name = _data.name || _data.level_name || '';\n const lower_name = this.name.toLowerCase();\n const num = lower_name.indexOf('level') >= 0 ? lower_name.replace(/ ?level ?/gi, '') : lower_name.substr(0, 1).toUpperCase();\n this.short_name = _data.short_name || num || '';\n this.map_url = _data.map_url || '';\n this.type = _data.type || _data.floor_type || 'any';\n this.settings = _data.settings;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap\n} from '@mckinsey-converge/base';\n\n/* istanbul ignore next */\n\nexport class Organisation extends BaseDataClass {\n /** List of available building zone ids for the organisation */\n public readonly available_buildings: readonly string[];\n /** Map of custom settings for the building */\n private _settings: HashMap;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this._settings = raw_data.settings || {};\n this.available_buildings = (raw_data.settings?.discovery_info?.buildings || []).map(\n (bld) => bld.zone_id\n );\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings);\n return value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { Organisation } from './organisation.class';\nimport { Building } from './building.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { first } from 'rxjs/operators';\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { UsersService } from '../users';\nimport { SettingsService } from '../settings.service';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganisationService extends BaseAPIService {\n /** Organisation data for the application */\n private _organisation: Organisation;\n /** Actively displayed building */\n private _active_building: string;\n\n private _spaceTypesSubject: Subject = new Subject();\n\n constructor(\n protected _composer: ComposerService,\n private _service: ApplicationService,\n private _users: UsersService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Organisation, this);\n ServiceManager.setService(Building, this);\n this._name = 'Organisation';\n this._api_route = 'zones';\n this.set('buildings', []);\n this.set('active_building', null);\n this._users.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /**\n * Add is not available on organisation service\n */\n public async add(form_data: HashMap, query_params?: HashMap): Promise {\n throw new Error('Add is not available on the organisation service');\n }\n\n /**\n * Update is not available on organisation service\n */\n public async update(\n id: string,\n form_data: HashMap,\n query_params?: HashMap\n ): Promise {\n throw new Error('Update is not available on the organisation service');\n }\n\n /**\n * Delete is not available on organisation service\n */\n public async delete(id: string): Promise {\n throw new Error('Delete is not available on the organisation service');\n }\n\n /**\n * Get list of levels for the given building ID\n * @param bld_id Building ID\n */\n public levels(bld_id: string): readonly BuildingLevel[] {\n return (this.buildings.find((i) => i.id === bld_id) || ({} as Building)).levels;\n }\n\n /**\n * Get a setting from the organisation or active building\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string) {\n return this.building.setting(key) || this._organisation.setting(key);\n }\n\n /** Active building */\n public get building(): Building {\n return this.buildings.find((i) => i.id === this._active_building);\n }\n\n /** List of types of spaces */\n public get space_types(): Identity[] {\n return this.get('space_types') || [];\n }\n\n public set building(bld: Building) {\n if (bld instanceof Building) {\n this._active_building = bld.id;\n } else {\n this._active_building = bld;\n }\n this.set('active_building', this.building);\n this.loadSpaceTypes();\n localStorage.setItem('PlaceOS.building', this._active_building);\n localStorage.setItem('CONCIERGE.timezone', bld.timezone);\n }\n\n /** List of buildings for the organisation */\n public get buildings(): Building[] {\n return this.get('buildings') || [];\n }\n\n /**\n * Get list of available equipment\n * @param id ID of the building to get the list from. i.e. Defaults to the active building\n */\n public getExtras(id: string, bld_id?: string) {\n const bld = this.buildings.find((i) => i.id === bld_id) || this.building;\n if (bld && id) {\n return bld.extras.filter((i) => `${i.id}`.indexOf(id) >= 0);\n }\n return [];\n }\n\n /**\n * Get the first level matching the list of given IDs\n * @param ids List of ID to search with\n */\n public levelWithID(ids: string | string[]): BuildingLevel {\n const list = ids instanceof Array ? ids : [ids];\n const bld_list = this.buildings;\n for (const id of list) {\n for (const bld of bld_list) {\n for (const lvl of bld.levels) {\n if (lvl.id === id) {\n return lvl;\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Initialise service data\n */\n protected async load(): Promise {\n /* istanbul ignore else */\n if (localStorage) {\n this._active_building = localStorage.getItem(`${this.settingsService.frontend.toUpperCase()}.building`);\n }\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.organisation = { message: 'Loading organisation data', state: 'loading' };\n await this.loadOrganisation();\n loading.organisation = { message: 'Loading organisation data', state: 'complete' };\n loading.buildings = { message: 'Loading building data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadBuildings();\n loading.buildings = { message: 'Loading building data', state: 'complete' };\n loading.levels = { message: 'Loading building floor data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadLevels();\n loading.levels = { message: 'Loading building floor data', state: 'complete' };\n this._service.set('loading', loading);\n loading.space_types = { message: 'Loading space type data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadSpaceTypes();\n loading.space_types = { message: 'Loading space type data', state: 'complete' };\n this._service.set('loading', loading);\n const user = this._users.current;\n\n if (user) {\n const id = localStorage.getItem('PlaceOS.building');\n const building = this.buildings.find(bld => id && bld.id === id) || this.buildings.find((bld) => bld.code === user.location);\n if (building) {\n this._active_building = building.id;\n this.set('active_building', building);\n } else if(this.building) {\n // This conditional solves a problem of infinite loop when user building doesn't exist.\n this._active_building = this.building.id;\n this.set('active_building', this.building);\n }\n }\n }\n\n /**\n * Load organisation data for application\n */\n public async loadOrganisation(): Promise {\n const org_data = await this.query({ tags: 'org', engine: true });\n this._organisation = new Organisation(org_data[0]);\n this.set('organisation', this._organisation);\n return this._organisation;\n }\n\n /**\n * Load building data for the organisation already stored in the service..\n */\n public async loadBuildings(): Promise {\n return this.loadBuildingsWithOrg(this._organisation);\n }\n\n /**\n * Load building data for the organisation passed.\n */\n public async loadBuildingsWithOrg(organisation: Organisation): Promise {\n const bld_data = await this.query({ tags: 'building', engine: true, limit: 1000 });\n const buildings = (bld_data as HashMap[])\n .map((i) => new Building(i))\n .filter((bld) => organisation.available_buildings.includes(bld.id));\n this.set('buildings', buildings);\n /* istanbul ignore else */\n if (!this._active_building && buildings && buildings.length > 0) {\n this._active_building = buildings[0].id;\n }\n return buildings;\n }\n\n /**\n * Load level data for the buildings\n */\n public async loadLevels(): Promise {\n const lvl_data = await this.query({ tags: 'level', engine: true, limit: 1000 });\n const levels = (lvl_data as HashMap[]).map((i) => new BuildingLevel(i));\n this.set('levels', levels);\n return levels;\n }\n\n /**\n * Load space type data for the buildings\n */\n public async loadSpaceTypes(): Promise {\n const type_data = await this.query({ tags: 'room', engine: true, limit: 1000, building_id: this._active_building });\n const types = (type_data as HashMap[]).map((i) => ({ id: i.id, name: i.name }));\n this.set('space_types', types);\n // Emit the updated space_types\n this._spaceTypesSubject.next(types);\n }\n\n /**\n * Observable to listen for changes in space_types\n */\n public get spaceTypesObservable(): Observable {\n return this._spaceTypesSubject.asObservable();\n }\n\n public getOrganizationFiltersByRoomType(key: string) {\n if (!this._organisation) {\n return {}\n }\n const discovery_info = this._organisation.setting('discovery_info')\n\n return discovery_info && discovery_info[key] ? discovery_info[key] : {}\n }\n\n public getRoomTypeSubsetDDOptions(type:string) {\n const filters = this.getOrganizationFiltersByRoomType(type) || {}\n return [...Object.keys(filters).map((key) => {\n const display = filters[key].toString();\n return {\n display,\n value: key,\n meta: {}\n }\n }) ];\n }\n\n\n\n /**\n * The function will generate filter options, excluding London. London has its own set of options as per the request. \n * The filter options pertain to a subset of room type options managed by the room admin module.\n * @returns filterOptions: filter options for day view space type filter\n */\n public getRoomFilterOptionsPerLocation() {\n let internalSubSet = this.getRoomTypeSubsetDDOptions('internal_room_types');\n if(this.building.name.toLowerCase().includes('london')) {\n internalSubSet = internalSubSet.filter(e => !e.value.includes('meeting') && !e.value.includes('partner') );\n }\n const filterOptions = [];\n internalSubSet.forEach(el => filterOptions.push({name: el.display, id: el.value} ) ); \n return filterOptions\n }\n\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseAPIService } from './base.service';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class PaginatedAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}, config: { url?: string } = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = query_params.cache || 1000;\n delete query_params.cache;\n }\n const query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = config && config.url ? `${config.url}${query ? '?' + query : ''}` : `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: IEngineResponse;\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * \n * @param query_params \n * @param config \n * @returns \n */\n queryHoldingBay(query_params: HashMap = {}, config: { url?: string } = {}):Observable {\n const query = toQueryString(query_params);\n const url = `${config.url}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );\n }\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse{\n let result: IEngineResponse;\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n return result;\n }\n \n\n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => {\n result = this.process(d); \n },\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { FormGroup } from \"@angular/forms\";\nimport { HashMap } from \"@mckinsey-converge/base\"\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\n\nexport enum RecurrencePeriod {\n LIST = 'list',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n //RELATIVE_MONTHLY = 'relativeMonthly', for the moment we will only support absoluteMonthly\n ABSOLUTE_MONTHLY = 'monthly'\n}\n\nexport enum DaysOfWeek {\n SUNDAY = 'sunday',\n MONDAY = 'monday',\n TUESDAY = 'tuesday',\n WEDNESDAY = 'wednesday',\n THURSDAY = 'thursday',\n FRIDAY = 'friday',\n SATURDAY = 'saturday'\n\n}\n\nexport enum SeriesAction {\n EDIT = 'edit',\n CLONE = 'clone'\n}\n\nexport enum BookingAction {\n CLONE = 'booking_clone',\n EDIT = 'booking_edit'\n}\n\nexport interface WeekDays {\n id: string;\n active: boolean;\n day_index: number;\n full_name: string;\n}\n\nexport interface RepeatPeriod {\n id: RecurrencePeriod;\n label: string\n}\n\nexport enum RepeatsOn {\n PATTERN = 'pattern',\n DATE = 'date'\n}\n\nexport interface RecurrenceType {\n type: RepeatsOn;\n label: string;\n}\n\nexport interface RecurrenceDetails {\n period: RecurrencePeriod,\n end: DateTZ,\n list: Array\n interval: number\n}\n\nexport interface RecurrenceRecurringDetails extends RecurrenceDetails {\n start: number\n}\n\nexport const recurrencePeriodToDurationType = (period: RecurrencePeriod) =>{\n switch (period) {\n case RecurrencePeriod.DAILY:\n return 'days'\n case RecurrencePeriod.WEEKLY:\n return 'weeks' \n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return 'months' \n default:\n return 'days'\n }\n}\n\n/**\n * Generate weekdays from monday to saturday\n */\nexport const generateWeekDays = (date: number, params: { building_tz?: string } = {}): Array=> {\n const { building_tz } = params;\n let start_week = DateNow(new Date()).startOfValue('week').addValue({days : 1}); //set monday as start of week\n const week_days: Array = []\n for (let i = 1; i <= 7; i++) {\n const activeDate = new DateTZ({date, building_tz, is_local_tz: false })\n const active = activeDate.dateWeekday === i\n const full_name = start_week.formatDate('EEEE')\n const day_index = i === 7 ? 0 : i //Sunday must be indexed as day 0\n week_days.push({id: full_name.substring(0, 1), active, day_index, full_name: full_name.toLocaleLowerCase()});\n start_week = start_week.addValue({ days : 1 });\n }\n return week_days\n}\n\nexport const getFirstDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isBeforeDate(b) ? a : b; });\n}\n\nexport const getLastDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isAfterDate(b) ? a : b; });\n}\n\nexport const recurrenceDetails = (recurr: RecurrenceDetails): string => {\n const end = getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `Occurs Every ${period} until ${end}`\n }else{\n return `Occurs Every ${recurr.interval} ${period}s until ${end}`\n }\n } \n \n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `Occurs on Specific Dates until ${getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')}`\n default:\n return ''\n }\n}\n\nexport const recurrenceRecurringDetails = (recurr: RecurrenceRecurringDetails): string => {\n const end = recurr.end\n const start = new DateTZ({ date: recurr.start })\n\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `occurs every ${period} effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }else{\n return `occurs every ${recurr.interval} ${period}s effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }\n }\n\n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `occurs on Specific Dates`\n default:\n return ''\n }\n}\n\nexport const handleRecurrenceFields = (data: HashMap) => {\n if(data.is_recurrent){\n if(data.recurrence_period !== RecurrencePeriod.LIST){\n delete data.recurrence_starts\n delete data.recurrence_endTz\n if(data.recurrence_period !== RecurrencePeriod.WEEKLY){\n delete data.recurrence_days\n }\n } else if(data.recurrence_period){\n data.recurrence_list = [...(data.recurrence_starts || []).map((date: DateTZ) => date.startOfValue('minute').seconds)]\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.recurrence_days\n }\n delete data.is_recurrent\n }else{\n delete data.recurrence_period;\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.is_recurrent\n delete data.recurrence_exceptions\n delete data.recurrence_days\n }\n\n return data\n}\n\n/** Removes expired occurrences and updates start and end dates when cloning a series */\nexport const removeExpiredOcurrences = (form: FormGroup) =>{\n if(form.controls.action?.value === SeriesAction.CLONE ){\n const tz = form.controls.space_list.value[0].timezone\n const date_now = new DateTZ({ is_local_tz: false, building_tz: tz });\n const occurrences = form.controls.recurrence_starts.value.filter((date: DateTZ) =>\n date_now.isBeforeDate(date, 'day') || date_now.isSameDate(date, 'day')\n )\n form.controls.recurrence_starts.setValue(occurrences)\n const { start, end } = setStartAndEndDateFromArray(occurrences, tz)\n form.controls.dateTz.setValue(start)\n form.controls.recurrence_endTz.setValue(end)\n }\n}\n\n/** \n * Returns starts and end dates from an array of dates in milliseconds \n **/\n export const setStartAndEndDateFromArray = (dates: Array, tz: string): {start: DateTZ, end: DateTZ} =>{\n if(dates.length !== 0){\n return {\n start: dates.sort((d1, d2) => d1.ms - d2.ms)[0] ,\n end: dates.sort((d1, d2) => d2.ms - d1.ms)[0]\n }\n }\n //if the dates array is empty set the start and end dates as the current and next day\n const now = DateNow(new Date()).toZone(tz)\n return {start: now, end: now.addValue({days: 1})}\n}\n\nexport const setRecurrenceStartsTime = (form: FormGroup) => {\n const { recurrence_starts, dateTz } = form.value\n const list = (recurrence_starts || []).map((date: DateTZ) => date.setValue({hour: dateTz.dateHour, minute: dateTz.minutes}))\n form.controls.recurrence_starts.setValue(list)\n}","export * from './report.class'\nexport * from './reports.service'\n","import { CurrencyPipe } from '@angular/common';\n\nimport {\n csvToJson,\n downloadFile,\n HashMap,\n humaniseDuration,\n jsonToCsv,\n} from '@mckinsey-converge/base';\n\nimport { ServiceManager } from '../service-manager.class';\nimport { Space } from '../spaces';\nimport { Organisation } from '../organisation';\n\nexport class Report {\n /** Type of report */\n public readonly type: string;\n /** List of data associated with the report */\n public readonly data: T[];\n\n constructor(raw_data: HashMap = {}) {\n this.type = raw_data.type || '';\n this.data = this.cleanData(raw_data.data);\n }\n\n /** Create report data structure from CSV */\n public static fromCSV(type: string, data: string): Report {\n const csv_json = csvToJson(data);\n return new Report({ type, data: csv_json });\n }\n\n /** Download report data as CSV format */\n public downloadCSV(name: string = 'unnamed.csv'): void {\n downloadFile(name, jsonToCsv(this.data));\n }\n\n /** Download report data as JSON format */\n public downloadJSON(name: string = 'unnamed.json'): void {\n downloadFile(name, JSON.stringify(this.data, undefined, 4));\n }\n\n public formatCancelledBy(email: string) {\n if (email !== null && email !== undefined) {\n let name = email.split('@')[0];\n name = name.split('_').join(' '); //get name from email and convert it to title case\n name = name.replace(/\\w\\S*/g, function (txt) {\n return `${txt\n .charAt(0)\n .toUpperCase()}${txt.substr(1).toLowerCase()}`;\n });\n return name;\n } else {\n return email;\n }\n }\n\n public timeConverter( UNIX_timestamp: number ){\n if(!UNIX_timestamp) return '';\n let a = new Date(UNIX_timestamp * 1000);\n let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n let year = a.getFullYear();\n let month = months[a.getMonth()];\n let date = a.getDate();\n let hour = ((a.getHours() + 11) % 12 + 1);\n let suffix = a.getHours() >= 12 ? \"PM\":\"AM\";\n let min = a.getMinutes() === 0 ? '00':a.getMinutes();\n let time = date + ' ' + month + ' ' + year + ' - ' + hour + ':' + min + ' ' + suffix;\n return time;\n }\n\n private cleanData(data: T[] = []) {\n if (data.length > 0 && this.type === 'day') {\n for (let i = 0; i < data.length; i++) {\n data[i]['booker'] = data[i]['booker'].name;\n data[i]['expected_attendees'] = Object.values(data[i]['expected_attendees'])[0];\n }\n } else if (data.length > 0 && this.type === 'audit') {\n for (let i = 0; i < data.length; i++) {\n data[i]['created_at'] = this.timeConverter(data[i]['created_at']);\n }\n } else if (data.length > 0 && this.type === 'catering') {\n for (let i = 0; i < data.length; i++) {\n data[i]['Cancelled By'] = this.formatCancelledBy(\n data[i]['Cancelled By']\n );\n }\n const fields = Object.keys(data[0]);\n const room_field = fields.find(\n (key) =>\n key.toLowerCase().includes('room') &&\n key.toLowerCase().includes('email')\n );\n const price_field = fields.find((key) =>\n key.toLowerCase().includes('price')\n );\n\n for (let row of data) {\n /* istanbul ignore else */\n const space_service = ServiceManager.serviceFor(Space);\n if (room_field && price_field && space_service) {\n const room = space_service.find(\n row[room_field].toLowerCase()\n );\n const org_service = ServiceManager.serviceFor(Organisation);\n const bld = org_service.buildings.find(\n (bld: { id: any }) =>\n bld.id === room?.level?.building_id\n );\n row[price_field] = new CurrencyPipe('en_us').transform(\n row[price_field] / 100,\n bld?.currency\n );\n }\n /* istanbul ignore else */\n for (let field of fields) {\n row[field] =\n typeof row[field] === 'string'\n ? row[field].replace(/\\,/g, '٫')\n : row[field];\n }\n }\n } else if (this.type === 'bookings') {\n data = data.map((i: HashMap) => {\n const booking = i;\n try {\n if (booking.setup instanceof Object) {\n booking.setup = booking.setup[booking.room_email];\n }\n if (booking.breakdown instanceof Object) {\n booking.breakdown =\n booking.breakdown[booking.room_email];\n }\n booking.setup = humaniseDuration((booking.setup || 0) / 60);\n booking.breakdown = humaniseDuration(\n (booking.breakdown || 0) / 60\n );\n booking.description = (booking.description || '')\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ');\n booking['Meeting Host'] =\n booking.organizer?.name || booking.organizer;\n booking['Booked By'] =\n booking.booked_by?.name ||\n booking.booked_by?.email ||\n '';\n booking.charge_code =\n booking.equipment_codes[booking.room_email] || '';\n // booking.expected_attendees = Object.keys(booking.expected_attendees).map(key => booking.expected_attendees[key]).join(', ');\n booking.attendees = (booking.attendees || [])\n .map((person) => person.name || person.email || person)\n .join('٫ ');\n booking.notes = (booking.notes || [])\n .map((note) =>\n note.author &&\n (note.type === 'description' ||\n note.type === 'private')\n ? `[${note.author}|${note.type}]${note.message\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ')}`\n : ''\n )\n .join(' | ');\n booking.cancelled = booking.isCancelled;\n booking.status = booking.status[booking.room_email] || '';\n booking.company = booking.company.join(', ');\n if (booking.cancelled_by) {\n booking.cancelled_by = this.formatCancelledBy(\n booking.cancelled_by\n );\n }\n booking.cancelled_date = this.timeConverter(booking.cancelled_at_epoch);\n\n } catch (e) {}\n const remove_fields = [\n 'id',\n 'icaluid',\n 'accepted_at',\n 'accepted_by',\n 'check_ins',\n 'changeKey',\n 'created',\n 'booking_type',\n 'edit_history',\n 'end_epoch',\n 'old_attendees',\n 'start_epoch',\n 'expected_attendees',\n 'isAllDay',\n 'isCancelled',\n 'body',\n 'is_free',\n 'lastModifiedDateTime',\n 'locationType',\n 'locations',\n 'organizer',\n 'booked_by',\n 'originalEndTimeZone',\n 'originalStartTimeZone',\n 'room_booking_status',\n 'room_email',\n 'room_emails',\n 'room_id',\n 'sensitivity',\n 'seriesMasterId',\n 'show_as',\n 'notes',\n 'subject',\n 'type',\n 'previous_booking',\n 'catering',\n 'responseStatus',\n 'equipment_codes',\n 'cancelled_at_epoch',\n ];\n for (const field of remove_fields) {\n if (booking[field] !== undefined) {\n delete booking[field];\n }\n }\n const output = {};\n const order = [\n 'title',\n 'start',\n 'end',\n 'location',\n 'Meeting Host',\n 'Booked By',\n 'booked_at',\n 'booked_ahead_by',\n 'all_day',\n 'attendees',\n 'company',\n 'description',\n 'cancelled',\n 'cancelled_by',\n 'cancelled_date',\n ];\n const keys = Object.keys(booking);\n keys.sort((a, b) => {\n const idx_a = order.indexOf(a);\n const idx_b = order.indexOf(b);\n return (\n (idx_a === -1 ? keys.length : idx_a) -\n (idx_b === -1 ? keys.length : idx_b)\n );\n });\n for (const key of keys) {\n output[key] = booking[key];\n }\n return output;\n }) as any;\n }\n return data;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { Report } from './report.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReportsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Reports';\n this._api_route = 'reports';\n }\n\n protected process(raw_data: any): Report {\n return raw_data instanceof Array\n ? new Report({ data: raw_data })\n : Report.fromCSV('', raw_data);\n }\n}\n","import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { HashMap } from '@mckinsey-converge/base';\n\n\nexport interface ServiceLike extends HashMap {\n parent: any;\n add: (_: HashMap) => Promise;\n update: (id: string, _: HashMap) => Promise;\n delete: (id: string, params?: HashMap) => Promise;\n task: (id: string, name: string, data: HashMap) => Promise;\n listen: (prop: string) => Observable;\n}\n\nexport interface ServiceProvider {\n provideFor: Type;\n useValue: T;\n}\n\nexport class ServiceManager {\n /** Map of available services for child classes */\n private static _service_list: ServiceProvider[] = [];\n\n /** Set the services used to handle data model requests */\n public static setService(type: Type, service: any): void {\n if (window.debug) {\n (window as any).ServiceManager = this._service_list;\n }\n const index = ServiceManager._service_list.findIndex(provider => provider.provideFor === type);\n if (index >= 0) {\n ServiceManager._service_list.splice(index, 1, { provideFor: type, useValue: service });\n } else {\n ServiceManager._service_list.push({ provideFor: type, useValue: service });\n }\n }\n\n /** Get the services used to handle data model requests */\n public static serviceFor(type: Type): ServiceLike {\n const provider = ServiceManager._service_list.find(provider => provider.provideFor === type) || { useValue: null };\n return provider.useValue;\n }\n\n constructor() {\n throw new Error('ServiceMananger is static class');\n }\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\n\nimport { VERSION } from '@mckinsey-converge/environment';\nimport {\n BaseClass,\n getItemWithKeys,\n HashMap,\n log\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from './service-manager.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ndeclare global {\n interface Window {\n debug: boolean;\n }\n}\n\nexport const SETTINGS_TOKEN = 'settings_service_data';\n\ntype SettingsAppData = T & {\n title: string;\n description: string;\n short_name: string;\n logo_light: {\n type: string;\n src: string;\n background: string;\n }\n logo_dark: {\n type: string;\n src: string;\n background: string;\n }\n heap_io: {\n app_id: number;\n force_ssl: boolean;\n secure_cookie: boolean;\n disable_text_capture: boolean;\n cookie_path: string;\n }\n}\n\nexport interface SettingsData {\n debug: boolean;\n mock: boolean;\n frontend: 'staff' | 'concierge' | 'booking';\n composer: {\n domain: string;\n route: string;\n protocol: string;\n port: string;\n use_domain: boolean;\n local_login: boolean;\n }\n app: SettingsAppData;\n}\n\nexport class SettingsObject {\n constructor(public data: SettingsData) {\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SettingsService extends BaseClass {\n /** Name of the application */\n private _app_name = 'Converge';\n /** List of override settings in order of priority */\n private _overrides = new BehaviorSubject([]);\n /** Mapping of behaviour subjects */\n private _subjects: HashMap> = {};\n /** Mapping of observables */\n private _observables: HashMap> = {};\n /** Which frontend we're in. staff, concierge, or bookings **/\n public readonly frontend: string;\n private _bypass_bookings: boolean = false;\n\n /**\n * @hidden\n */\n public set overrides(value: HashMap[]) {\n this._overrides.next(value);\n }\n\n /** Get observable for key */\n public listen(name: string): Observable {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n return this._observables[name];\n }\n\n /** Update observable value for key */\n public post(name: string, value: T): void {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n this._subjects[name].next(value);\n }\n\n public value(name: string): T {\n return !this._observables[name] ? null : this._subjects[name].getValue();\n }\n\n /** Page title */\n public get title() {\n return this._title.getTitle();\n }\n\n public set title(value: string) {\n this._title.setTitle(`${value} | ${this._app_name}`);\n }\n\n constructor(private _title: Title,\n @Inject(SETTINGS_TOKEN)\n private settings: SettingsObject) {\n super();\n ServiceManager.setService(SettingsService, this);\n const time = new DateTZ({date: VERSION.time});\n const built = DateNow(new Date()).isSameDate(time, 'day')\n ? `Today at ${time.formatDate('h:mma')}`\n : time.formatDate('do MMM yyyy, h:mma');\n const frontend = this.get('frontend') || 'Unknown';\n this.frontend = frontend;\n log('CORE', `${VERSION.semver}`, null, 'debug', true, frontend?.toUpperCase());\n log('APP', `${VERSION.hash} | Built: ${built}`, null, 'debug', true, frontend?.toUpperCase());\n this.init();\n }\n\n /**\n * Initialise the settings\n */\n public async init() {\n if (this.get('debug')) {\n window.debug = true;\n }\n if (this.get('app')?.name) {\n this._app_name = this.get('app').name;\n }\n log('Settings', 'Successfully loaded settings');\n this._initialised.next(true);\n }\n\n /** Whether settings service has initialised */\n public get app_name() {\n return this._app_name;\n }\n\n public get concierge() {\n return this.frontend === 'concierge';\n }\n\n public set bypass_bookings(value: boolean) {\n this._bypass_bookings = value;\n }\n\n public get bypass_bookings() {\n return this._bypass_bookings;\n }\n\n /**\n * Get a setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public get(key: string): any {\n const keys = key.split('.');\n if (keys[0] !== 'app') {\n return getItemWithKeys(keys, this.settings.data);\n }\n const override_settings = this._overrides.getValue();\n for (const override of override_settings) {\n const value = getItemWithKeys(keys.slice(1), override);\n if (value != null) {\n return value;\n }\n }\n return getItemWithKeys(keys, this.settings.data);\n }\n}\n","export * from './space.class';\nexport * from './spaces.service';\nexport * from './space.utilities';\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n} from '@mckinsey-converge/base';\nimport {\n Building,\n BuildingLevel,\n Organisation\n} from '../organisation';\nimport { User } from '../users';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { SpaceRules } from '../bookings/booking.types';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { DateTime } from 'luxon';\n\nexport interface ISpaceAvailabilityOptions {\n /** Start date and time of the availability block */\n dateTz?: DateTZ;\n /** Length of the availability block */\n duration: number;\n /** */\n id?: string;\n /** List of spaces to look at the availability for */\n room_ids?: string;\n /** Whether the spaces looked at should be bookable */\n bookable?: boolean;\n /** List of spaces or zones to ignore */\n ignore?: string;\n /** List of zones to look at the availability for */\n zone_ids?: string | string[];\n /** Whether space bookings should not be returned */\n hide_bookings?: boolean;\n /** Min capacity on the room **/\n capacity?: number\n clear?: boolean;\n /** Length of the setup */\n setup?: number;\n /** Length of the breakdown */\n breakdown?: number;\n /** Hide declined bookings */\n hide_declined?: boolean;\n /** Max capacity on the room **/\n capacity_max?: number\n\n diff_capacity?: boolean\n\n /** Fields to include recurrence in the availability search */\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array\n is_recurrent?: boolean\n is_multiroom?: boolean\n merged?: boolean\n recurrence_days?: Array\n}\n\nexport interface SpaceBookingRuleOptions {\n dateTz: DateTZ;\n duration: number;\n host: User;\n}\n\nexport const OPTION_DEFAULTS: ISpaceAvailabilityOptions = {\n duration: 60\n};\n\nexport interface RecurrenceAvailability {\n /** Unix epoch in seconds */\n readonly date: number;\n /** Whetehr space is available at this time */\n readonly available: boolean;\n}\n\n/**\n * Room Settings Type\n *\n * Exmaple:\n * available: true\n * available_until: 1644344999\n * bookings: []\n * catering: false\n * charge_code: false\n * extra_features: \"meeting_room boardroom\"\n * internal_or_external: \"internal\"\n * map_id: \"08.8.15\"\n * natural_light: false\n * room_booking_screen: true\n * room_name: \"8.15 Meeting\"\n * vc: false\n * recurrence_availability: {\n * date: \"1642596300\",\n * available: false,\n * }\n */\nexport interface RoomSettings {\n // Local room name is required.\n room_name?: string\n // TBD if anything else should be required\n available?: boolean\n available_until?: number\n bookings?: HashMap[]\n catering?: boolean\n charge_code?: boolean\n extra_features?: string\n internal_or_external?: string\n map_id?: string\n natural_light?: boolean\n room_booking_screen?: boolean\n vc?: boolean\n recurrence_availability?: RecurrenceAvailability[]\n equipment_code?: boolean\n external?: boolean\n}\n\n/**\n * List of space features that come from settings.\n *\n * Im sure this list will grow. It is not the most comprehensive list.\n */\nexport enum SpaceFeatures {\n BoardRoom = 'boardroom',\n Catering = 'catering',\n CocktailRoom = 'cocktail',\n ConferencePhone = 'conference_phone',\n ConferenceRoom = 'conference',\n ElectronicWhiteboard = 'whiteboard',\n FlipChart = 'flipchart',\n Glassboard = 'glassboard',\n PartnerOffice = 'partner',\n PhoneBooth = 'phone_booth',\n TheatreRoom = 'theatre',\n TeamRoom = 'team_room',\n VideoConference = 'vc',\n NaturalLight = 'natural_light',\n WirelessContentSharing = 'wireless_content_sharing',\n WorkshopRoom = 'workshop',\n UShapeRoom = 'u_shape',\n Miscellaneous = 'miscellaneous'\n}\n\nexport enum SpaceEquipments {\n conference_phone,\n whiteboard,\n vc,\n flipchart,\n glassboard,\n wireless_content_sharing\n}\nexport enum SpaceStyles {\n boardroom,\n cocktail,\n conference,\n partner,\n theatre,\n team_room,\n // natural_light,\n workshop,\n u_shape,\n miscellaneous\n}\n\nconst EMPTY_ARRAY = [];\n\nexport class Space extends BaseDataClass {\n /** Whether space can be booked by users */\n public readonly bookable: boolean;\n /** People capacity of the space */\n public readonly capacity: number;\n /** Index to force order when sorting multiple spaces */\n public readonly sort_priority: number;\n /** Settings has extensive info displayed in the app. */\n public readonly settings: RoomSettings;\n /** URL for the control interface of the space */\n public readonly support_url: string;\n /** Engine zones associated with the space */\n public readonly zones: readonly string[];\n /** Is the Application concierge */\n public is_concierge: boolean = false;\n /** To allow bookings with rooms for staff calendar view only */\n public allowStaffRoomWithBookings: boolean = false;\n\n /** Simple name == local name being using in seeting.room_name\n\t\t *\n\t\t*/\n public simple_name: string;\n\n /** Room style set of all room style one room has\n * [\"boardroom\", \"cocktail\", \"miscellaneous\", \"natural_light\", \"theatre\", \"u-shape\", \"workshop\"] */\n public room_style: string[] = [];\n\n /** Equipment set of all room equipment one room has\n * [\"conference_phone\", \"whiteboard\", \"vc\", \"flipchart\", \"glassboard\", \"whiteboard\", \"wireless_content_sharing\"] */\n public equipment: string[] = [];\n\n /** Filters has charge code settings for booking and catering */\n public filters: RoomSettings;\n\n /** room_type subset of internal or external rooms */\n public room_type: string[] | string;\n /**\n * Features used in identifying room types.\n *\n * Both features and extra_features are space delimited strings.\n *\n * There is a getter featuresArray that returns the\n * combination of the two as an array.\n */\n public readonly features: string;\n public readonly extra_features: string;\n public map_id: string;\n\n\n /** Service for managing spaces */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Return the rooms' building */\n public get building() {\n return this._service?.buildings.find((bld) => {\n return this.zones.includes(bld.id);\n });\n }\n\n /** Return building timezone */\n public get timezone() {\n return this.building?.timezone;\n }\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = !!settingsService?.concierge;\n this.allowStaffRoomWithBookings = settingsService?.bypass_bookings || false;\n\n const defaultGlobalName = raw_data.name || raw_data.email || 'Meeting Room';\n const defaultSettings = {\n room_name: defaultGlobalName\n }\n /**\n * Duplicate of base-api.class just for readability\n * .name is the full, mckinsey standardised name of the room.\n * You can think of it was what people would call the room when\n * considering every office and room globally.\n *\n * this.name = raw_data.name;\n */\n /**\n * Settings has extensive info displayed in the app.\n * setting.room_name is always used when displaying the room name in the applications\n * setting.room_name is the more office-specific room name, you can think of this as\n * the one people in that office would refer to the room as.\n *\n */\n this.settings = raw_data.settings || defaultSettings;\n this.filters = raw_data?.filters;\n // Room fields\n this.bookable = raw_data.bookable || false;\n this.capacity = raw_data.capacity || 0;\n this.support_url = raw_data.support_url;\n this.zones = raw_data.zones instanceof Array ? raw_data.zones : [];\n // Feature fields\n this.features = raw_data.features || '';\n this.extra_features = raw_data.settings?.extra_features || '';\n\n\t\tthis.room_type = raw_data?.room_type;\n this.simple_name = raw_data?.simple_name;\n this.map_id = raw_data?.map_id || raw_data.settings?.map_id || '';\n this.room_style = raw_data?.room_style || [];\n this.equipment = raw_data?.equipment || [];\n\n }\n\n /**\n * Return the global room name\n * IE LDN-4-408-06\n */\n public get global_name(): string {\n return this.name || ''\n }\n\n /**\n * Return the local room name\n * i.e. 4.08\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.room_name\n */\n public get local_name(): string {\n return this.simple_name || this.name || ''; // this.settings?.room_name\n }\n\n public get street_and_city(): string {\n return this.building ? `${this.building.address}, ${this.building.city}` : '';\n }\n\n /**\n * Return the map_id from settings\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.map_id and use map_id from space modal( after testing over prod)\n */\n // public get map_id(): string {\n // return this?.map_id || this.settings?.map_id || '';\n // }\n\n /** Internal / External status */\n public get internal_or_external(): string {\n const external = this.filters?.external;\n return external ? 'external' : 'internal'; // ( external ? 'external' : this.settings?.internal_or_external ) || 'internal';\n }\n\n /**\n * Works in conjunction with available_until.\n *\n * If a room is bookable that only means you can make a booking but not when.\n * Available indicates that it is available to be booked durring the queried times.\n */\n public get available(): boolean {\n return this.settings?.available ?? false;\n }\n\n public get currently_in_use(): boolean {\n const nowMs = new DateTZ({ date: DateTime.now(), is_local_tz: false, building_tz: this.timezone }).ms;\n const runningBookings = this.settings?.bookings?.filter( bks => {\n const startEpoch = new DateTZ({ date: bks.start_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n const endEpoch = new DateTZ({ date: bks.end_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n return startEpoch <= nowMs && endEpoch >= nowMs;\n })\n // console.log(raw_data.settings.room_name+' : '+ nowMs.ms);\n // console.log('IS IN USER CURRENTLY : ', isinUsernow);\n return !!runningBookings.length;\n }\n\n /** Last returned availability time */\n public get available_until(): number {\n return this.settings?.available_until;\n }\n\n /** Bookings associated with the space */\n public get bookings(): HashMap[] {\n // We should need to care if a room as bookings in Staff\n if (!this.is_concierge && !this.allowStaffRoomWithBookings) {\n return EMPTY_ARRAY;\n }\n\n if (this.settings?.bookings?.length) {\n /**\n * When we're dealing with Concierge the API data arriving is rooms, and those rooms contain booking,\n * but those bookings don't contain a room since the room is the root.\n * In order for Concierge to filter bookings by room we need to reattach this room\n * to each of the bookings, with it's own bookings.\n *\n * It's loopy and kooky but correcting for this pattern is beyond the scope of this refactor.\n */\n const spaceWithBookings = new Space(this.toJSON());\n return this.settings?.bookings.map(b => {\n b.room = spaceWithBookings;\n return b;\n });\n }\n return EMPTY_ARRAY;\n }\n\n /**\n\t\t * Whether space has catering\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.catering and use filters?.catering instead\n\t\t */\n public get has_catering(): boolean {\n return this.filters?.catering || this.settings?.catering || false;\n }\n\n /** Returns an array of the space delimited feature and extra_feature strings.\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove features, extra_features\n */\n public get featuresArray(): (SpaceFeatures | string)[] {\n // (this.simple_name === \"Entresol M-06\" ) && console.log('raw_data : ', this)\n const roomType = Array.isArray(this.room_type) ? this.room_type : [this.room_type]\n const features = [\n ...this.features.split(' '),\n ...this.extra_features?.split(' '),\n\n ...roomType, // required to work with staff>result>filters\n ...this?.room_style,\n ...this?.equipment,\n\n (this.filters?.natural_light) && SpaceFeatures.NaturalLight || undefined, // || this.settings?.natural_light\n // this.settings?.natural_light && SpaceFeatures.NaturalLight || undefined,\n // this.settings?.vc && SpaceFeatures.VideoConference || undefined,\n ].filter(f => !!f).map(f => f.toLowerCase());\n //will be an array... new Set() turns it into a set, but [... ] turns it back into an array again\n return [ ...new Set(features) ];\n }\n\n /** Level in which the space is associated */\n public get level(): BuildingLevel {\n const service = ServiceManager.serviceFor(Organisation);\n return (service ? service.levelWithID(this.zones as any) : null) || new BuildingLevel({});\n }\n\n /**\n * Return the new recurrence_availability from settings\n */\n public get recurrence_availability(): RecurrenceAvailability[] {\n return this.settings?.recurrence_availability || [];\n }\n\n public get availableOccurrences(): number {\n if(this?.recurrence_availability) {\n return this?.recurrence_availability?.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this?.recurrence_availability.length;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Space {\n return new Space(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): Space {\n const space = { ...this };\n space.settings.bookings = []; // clear out bookings\n return new Space({ ...space, id: null, email: null });\n }\n\n /**\n * Generate the booking rules for space with given options\n * @param options Conditions for generating the space rules\n */\n public rulesFor(options: SpaceBookingRuleOptions): SpaceRules {\n if (!this._service || !this.level) {\n return { auto_approve: true, hide: false };\n }\n\n const building = this.is_concierge ? this.level.building_id : this.building\n\n if (!building) {\n return { auto_approve: true, hide: false };\n }\n const { dateTz, duration, host } = options;\n const rules: SpaceRules = rulesForSpace({\n time: dateTz.ms,\n duration,\n space: this,\n user: host,\n rules: building.booking_rules\n });\n return rules;\n }\n\n /**\n * Whether space can only be booked by request\n * @param options Conditions for checking the space rules\n */\n public byRequest(options: SpaceBookingRuleOptions) {\n const rules = this.rulesFor(options);\n return !rules.auto_approve;\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Space): HashMap {\n return { ...super.toJSON(), settings: { ...this.settings, bookings: [] }, filters: { ...this.filters }, equipment: [ ...this.equipment] };\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport {\n ISpaceAvailabilityOptions,\n Space\n} from './space.class';\nimport { Building } from '../organisation/building.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\n\nexport function availabilityOptionsToQuery(options: ISpaceAvailabilityOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n if (options.dateTz) {\n const date = options.dateTz.startOfValue('minute');\n query.available_from = date.seconds; // Add one second or API will not allow end to end booking\n query.available_to = date.addValue({ minutes: options.duration || 60 }).subtractValue({ seconds: 1 }).seconds;\n\n if (options.setup) query.setup = options.setup ;\n if (options.breakdown) query.breakdown = options.breakdown;\n \n delete query.dateTz;\n delete query.duration;\n }\n\n if (!options.capacity_max) delete query.capacity_max\n\n if (options.hide_declined) query.hide_declined = options.hide_declined;\n query = handleRecurrenceFields(query)\n }\n return query;\n}\n\n/**\n * Compare two spaces to determine order\n * @param first\n * @param second\n */\nexport function sort(first: Space, second: Space, blds: Building[] = []) {\n const bld = blds.find(bld => first.zones.includes(bld.id));\n const bld_b = blds.find(bld => second.zones.includes(bld.id));\n if (bld) {\n if (bld !== bld_b) {\n return (bld.name).localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = first.zones.indexOf(zone_id) >= 0;\n const b_has_zone = second.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n }\n return first.name.localeCompare(second.name);\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { BaseAPIService } from '../base.service';\nimport { ISpaceAvailabilityOptions, Space } from './space.class';\nimport { ApplicationLoadingState, HashMap } from '@mckinsey-converge/base';\nimport { availabilityOptionsToQuery } from './space.utilities';\nimport { ServiceManager } from '../service-manager.class';\nimport { OrganisationService } from '../organisation';\nimport { ApplicationService } from '../app.service';\nimport { SettingsService } from '../settings.service';\nimport { DateNow } from '@mckinsey-converge/date-tz';\nimport { Observable } from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\n\nlet SPACE_LIST = [];\n\nexport function findSpace(id: string) {\n return SPACE_LIST.find((_) => _.id === id || _.email === id);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SpacesService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n private _org: OrganisationService,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n \n super(_composer, settingsService);\n ServiceManager.setService(Space, this);\n this._name = 'Space';\n this._api_route = 'rooms';\n this._compare = (a, b) =>\n !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this._list_filter = (a: Space) => {\n const bld = this._org.building;\n return a.level.building_id === bld.id;\n };\n this._org.initialised\n .pipe(first((_) => _))\n .subscribe(() => this.init());\n }\n\n public async query(query: HashMap = {}, setList:boolean = false) {\n const list = await super.query(query);\n if ( (query.hasOwnProperty('cache') && query.cache === false) || !Object.keys(query).length || setList) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n return list;\n }\n\n public filterAvailableSpaces(list: Space[]) {\n return list.filter((i) => {\n if (i.recurrence_availability?.length) return i; //if recurrence, send the space regardless of availability (needed for edit and cloning series)\n return i.available;\n });\n }\n\n /**\n * Get available spaces\n * @param options\n */\n public available(\n options: ISpaceAvailabilityOptions,\n uniqueId?: string,\n filter: boolean = true\n ): Promise {\n if (!options) {\n throw new Error('Space avilability requires request options');\n }\n\n const now = DateNow(new Date());\n if (!options.dateTz) {\n options.dateTz = now.startOfValue('minute');\n }\n\n if (options.hide_declined === undefined) {\n options.hide_declined = true;\n }\n\n const key = `available|${options.id ? options.id : ''}|${\n uniqueId ?? ''\n }`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Space[]) => {\n delete this._promises[key];\n resolve(filter ? this.filterAvailableSpaces(list) : list);\n };\n const error = (e) => {\n reject(e);\n delete this._promises[key];\n };\n const query = availabilityOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(\n (i) => respond([i]),\n error\n );\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n const loading: ApplicationLoadingState =\n this._service.get('loading') || {};\n if (!loading.spaces) {\n loading.spaces = {\n message: 'Loading space data',\n state: 'loading',\n };\n this._service.set('loading', loading);\n }\n // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n const option = {\n zone_ids: this._org.building.id\n }\n await this.query(option, true).catch(() => {\n loading.spaces = { message: 'Loading space data', state: 'failed' };\n this._service.set('loading', loading);\n });\n loading.spaces = { message: 'Loading space data', state: 'complete' };\n this._service.set('loading', loading);\n }\n\n /**\n * Convert raw data into API object\n * @param raw_data Raw API data\n */\n public process(raw_data: HashMap): Space {\n return new Space(raw_data);\n }\n /**\n * \n * Special observable function to make http call for rooms\n * @param query \n * @returns observable\n */\n public queryRooms = (query: HashMap = {}): Observable => super.queryRoomsForQR(query);\n\n public setSpaceList(list) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n\n public queryBooking = (query: HashMap = {}) : Observable | Observable => super.queryObsr(query);\n public updateSpace = (id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.updateObsr(id, form_data, should_inject_concierge, query_params);\n public uploadSpacePhotos = (apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.uploadSpacePhotos(apiSubRoute, form_data, should_inject_concierge, query_params);\n \n public updateRoomList() {\n this.load().then((_) => null)\n }\n}\n","import {\n BehaviorSubject,\n of\n} from 'rxjs';\nimport {\n Building,\n Organisation\n} from './organisation';\nimport { BaseDataClass } from './base-api.class';\nimport { MapLocation } from './location';\nimport { User } from './users';\nimport { Booking } from './bookings';\nimport {\n RoomSettings,\n Space,\n SpaceFeatures\n} from './spaces';\nimport { ServiceManager } from './service-manager.class';\nimport {\n CateringCategory,\n CateringItem\n} from './catering';\nimport {\n HashMap,\n padZero,\n predictableRandomInt,\n unique\n} from '@mckinsey-converge/base';\n\nimport * as faker from 'faker';\n\nimport {\n SETTINGS_TOKEN,\n SettingsData,\n SettingsObject,\n SettingsService\n} from './settings.service';\nimport { Report } from './reports';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nfaker.seed(2560);\n\nlet SERVICE: any;\n\ndeclare global {\n interface Jest {\n fn: () => any\n }\n}\n\n\ndeclare let jest: Jest;\n\n/* istanbul ignore file */\n\nexport function generateMockOrganisationService(): HashMap {\n return {\n levelWithID: jest.fn(),\n listen: jest.fn(),\n loadOrganisation: jest.fn(),\n initialised: of(true),\n building: new Building(generateMockBuilding({ id: 'bld-01' })),\n loadBuildingsWithOrg: jest.fn(),\n getOrganizationFiltersByRoomType: jest.fn(),\n getRoomTypeSubsetDDOptions: jest.fn(),\n getRoomFilterOptionsPerLocation: jest.fn(),\n ...generateMockDataService('OrganisationService')\n };\n}\n\nexport const generateMockSpacesService = (): HashMap => ({\n available: jest.fn(),\n ...generateMockDataService('SpacesService')\n});\n\nexport const generateMockUsersService = (): HashMap => ({\n loadCurrentUser: jest.fn(),\n ...generateMockDataService('UsersService')\n});\n\nexport const bookingState = () => ({\n bookings: of([]),\n filtered: of([]),\n filtered_week: of([]),\n filtered_month: of([]),\n setZone: jest.fn(),\n setDate: jest.fn(),\n setFilters: jest.fn(),\n add: jest.fn(),\n replace: jest.fn(),\n remove: jest.fn(),\n startPolling: jest.fn(),\n startPollingMonth: jest.fn(),\n startPollingWeek: jest.fn(),\n startPollingEveryFiveMin: jest.fn(),\n _noOfMeetings: of([])\n});\n\nconst test_app = {\n title: 'McKinsey & Company',\n description: 'McKinsey & Company Staff UI written with Angular Framework',\n short_name: 'STAFF',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: ''\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: ''\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/staff/'\n }\n};\n\nexport const TEST_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/test',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false\n },\n app: test_app,\n mock: false,\n frontend: 'staff'\n};\n\nexport const generateMockSettingsService = (overrides: Partial> = {}) => new SettingsService({ getTitle: () => jest.fn() } as any,\n new SettingsObject({\n ...TEST_SETTINGS,\n ...overrides\n }));\n\n/**\n * Provides an injectable instance for settings.\n */\nexport const provideMockSettingsObject = (settings: Partial> = {}) => ({\n provide: SETTINGS_TOKEN,\n useValue: new SettingsObject({\n ...TEST_SETTINGS,\n ...settings\n })\n});\n\n/**\n * Generate a mocked version of the application service\n */\nexport function generateMockAppService(settingsOverrides: Partial> = {}) {\n SERVICE = {\n setting: jest.fn(),\n notify: jest.fn(),\n notifyInfo: jest.fn(),\n notifyWarn: jest.fn(),\n notifySuccess: jest.fn(),\n notifyError: jest.fn(),\n log: jest.fn(),\n navigate: jest.fn(),\n navigateBack: jest.fn(),\n get: jest.fn(),\n listen: jest.fn(),\n set: jest.fn(),\n Composer: { auth: { token: 'test' } },\n Hotkeys: { listen: jest.fn() },\n Users: generateMockUsersService(),\n Organisation: generateMockOrganisationService(),\n Locations: generateMockDataService('LocationsService'),\n Base: generateMockDataService('BaseService'),\n Menu: generateMockDataService('CateringMenuService'),\n Spaces: generateMockSpacesService(),\n Bookings: generateMockDataService('BookingsService'),\n Reports: generateMockDataService('ReportsService'),\n CateringItems: generateMockDataService('CateringItemsService'),\n CateringCategories: generateMockDataService('CateringCategoriesService'),\n Settings: generateMockSettingsService(settingsOverrides),\n initialised: of(true)\n };\n ServiceManager.setService(BaseDataClass, SERVICE.Base);\n ServiceManager.setService(Organisation, SERVICE.Organisation);\n ServiceManager.setService(Building, SERVICE.Organisation);\n ServiceManager.setService(User, SERVICE.Users);\n ServiceManager.setService(Booking, SERVICE.Bookings);\n ServiceManager.setService(Space, SERVICE.Spaces);\n ServiceManager.setService(MapLocation, SERVICE.Locations);\n ServiceManager.setService(Report, SERVICE.Reports);\n ServiceManager.setService(CateringItem, SERVICE.CateringItems);\n ServiceManager.setService(CateringCategory, SERVICE.CateringCategories);\n SERVICE.Organisation.buildings = [SERVICE.Organisation.building];\n SERVICE.Users.current = new User(generateMockUser());\n SERVICE.Users.initialised = of(true);\n SERVICE.Bookings.booking_list = new BehaviorSubject(new Array(10).fill(0).map(_ => new Booking(generateMockBooking())));\n SERVICE.listen.mockReturnValue(of(null, []));\n return SERVICE;\n}\n\nexport function generateMockDataService(name: string) {\n const service = {\n find: jest.fn(),\n filter: jest.fn(),\n listen: jest.fn(),\n get: jest.fn(),\n set: jest.fn(),\n setting: jest.fn(),\n query: jest.fn(),\n show: jest.fn(),\n add: jest.fn(),\n save: jest.fn(),\n remove: jest.fn(),\n delete: jest.fn(),\n update: jest.fn(),\n addFrom: jest.fn(),\n removeFrom: jest.fn(),\n task: jest.fn(),\n available: jest.fn(),\n process: jest.fn(),\n updateList: jest.fn(),\n clearList: jest.fn(),\n removeFromList: jest.fn(),\n accept: jest.fn(),\n decline: jest.fn(),\n checkin: jest.fn(),\n is_logged_in: false,\n initialised: of(true),\n getHoldingBay: jest.fn(),\n name,\n queryRooms: of(true),\n queryRoomsForQR: of([]),\n queryObsr: of([]),\n queryBooking: of(true),\n checkinIndividualVisitor: jest.fn(),\n taskObsr: of(true),\n updateSpace: jest.fn(),\n updateObsr: of([]),\n uploadSpacePhotos: of([])\n\n };\n\n service.getHoldingBay.mockImplementation(_ => Promise.resolve([new Booking({})]));\n service.save.mockImplementation(_ => Promise.resolve(new Booking({})));\n\n service.listen.mockReturnValue(of(null));\n service.filter.mockReturnValue([]);\n return service;\n}\n\nlet SPACE_COUNT: number = 0;\n\nexport function generateMinimalRoomDetails(count: number) {\n return {\n name: `space-0${count}`,\n email: `space-0${count}@test.com`,\n settings: {\n name: `localname-0${count}`,\n catering: true\n }\n }\n}\n\nexport function generateMockSpace(overrides: HashMap = {}, space_id: number = null, recurring_search: boolean = false ): Space {\n const id = `space-${space_id || SPACE_COUNT++}`;\n const name = overrides.name || `${faker.name} ${faker.name.lastName()} Space`;\n const startOfDay = DateNow(new Date()).startOfValue('day');\n let settings: RoomSettings = {\n available: true,\n available_until: startOfDay.addValue({ days: 1 }).seconds, // (Date.now() / 1000) + (60 * 60 * 24), // now plus 24 hrs\n bookings: Array(10).fill(0).map(i => generateMockBooking()),\n catering: true,\n charge_code: true,\n extra_features: \"meeting_room boardroom\",\n internal_or_external: \"internal\",\n map_id: \"1\",\n natural_light: false,\n room_booking_screen: true,\n room_name: `${name} - Local Name`,\n vc: false,\n }\n if (overrides.settings) {\n settings = { ...settings, ...overrides.settings };\n delete overrides.settings;\n }\n if (recurring_search) {\n settings.recurrence_availability = [\n {\n date: startOfDay.seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 1 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 2 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 3 }).seconds,\n available: false,\n },\n ]\n }\n\n const linked = Math.floor(predictableRandomInt(99999)) % 2 === 0 && SPACE_COUNT > 1;\n return new Space({\n id,\n name: `${name} - Global Name`,\n map_id: `${space_id || SPACE_COUNT}`,\n type: faker.commerce.productName(),\n searchable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n controlable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n hourly_rate: Math.floor(predictableRandomInt(300)) * 100,\n bookable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n capacity: 15,\n sort_priority: 0,\n setup: Math.floor(predictableRandomInt(6)) * 5,\n breakdown: Math.floor(predictableRandomInt(6)) * 5,\n support_url: `/control/#/${id}`,\n image: faker.image.business(),\n zones: ['zone_lvl-0'],\n features: `${SpaceFeatures.BoardRoom} ${SpaceFeatures.ElectronicWhiteboard}`,\n email: `${name.toLowerCase().split(' ').join('.')}@${USER_DOMAIN}`,\n settings,\n ...overrides\n });\n}\n\nlet BOOKING_COUNT = 0;\nlet BOOKING_DATE = DateNow(new Date()).setValue({ hour: 6 }).setValue({minute: 0}).subtractValue({ days: 10 }).startOfValue('minute');\n\n/**\n * Set the initial time used for generating mock bookings\n * @param time New initial time as ms from UTC epoch\n */\nexport function setMockBookingStartDatetime(time: number) {\n const date = new DateTZ({date: time})\n BOOKING_DATE = date.startOfValue('minute');\n}\n\n/**\n * Create mock raw API data for a booking\n * @param override Overrides the properties of the generated booking with it's own\n */\nexport function generateMockBooking(override: HashMap = {}) {\n const id = `booking-${BOOKING_COUNT++}`;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4) + 2) * 15 });\n const start = BOOKING_DATE.ms;\n const duration = Math.floor(predictableRandomInt(4) + 2) * 15;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4)) * 15 });\n const organiser = generateMockUser({ external: false, visitor: false });\n const orders = Array(Math.floor(predictableRandomInt(5)))\n .fill(0)\n .map(_ => generateMockCateringOrder({ booking_date: start }, override.room_ids, override.menu));\n const hasCatering = Math.floor(predictableRandomInt(34567)) % 3 === 0;\n const date_start = new DateTZ({date: start})\n return {\n id,\n title: `${faker.commerce.productName()} Meeting`,\n attendees: Array(Math.floor(predictableRandomInt(5) + 2))\n .fill(0)\n .map((_, i) => generateMockUser(override.users)),\n organiser,\n start_epoch: date_start.seconds,\n end_epoch: date_start.addValue({ minutes: duration }).seconds,\n body: faker.lorem.paragraph(),\n notes: [{ type: 'other', message: faker.lorem.paragraph() }],\n location: faker.address.city(),\n // Mckinsey only has internal or external meetings\n booking_type: ['internal', 'external'][predictableRandomInt(2)],\n setup: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n breakdown: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n status: 'accepted',\n catering: hasCatering ? orders : [],\n room: new Space(generateMinimalRoomDetails(1)), // returns space-01 type values\n equipment_codes: {},\n company:[],\n ...override\n };\n}\n\nlet BLD_COUNT = 0;\nlet LVL_COUNT = 0;\n\n/**\n * Generate raw mock data for creating a building\n * @param id Forced ID for the mock\n * @param overrides Supply object value overrides in place. Supports a levelGenerator function\n * to stabilize level ids for testing.\n */\nexport function generateMockBuilding(overrides: HashMap = {}): HashMap {\n const id = `zone_bld-${BLD_COUNT++}`;\n const levels = Array(10)\n .fill(0)\n .map((_, i) => generateMockLevel(undefined, overrides.levelGenerator?.(i)));\n const features: any = {};\n for (const lvl of levels) {\n const count = Math.floor(predictableRandomInt(3) + 2);\n features[lvl.level_id] = {};\n for (let i = 0; i < count; i++) {\n features[lvl.level_id][faker.commerce.productName()] = `feature-${i + 1}`;\n }\n }\n return {\n id,\n zone_id: id,\n extras: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n code: 'NYO',\n name: faker.name.firstName(),\n address: 'building address field',\n city: 'building city',\n loan_items: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n levels,\n roles: {\n 'first-aiders': Array(10)\n .fill(0)\n .map(i => generateMockUser())\n },\n neighbourhoods: features,\n settings: {\n test: {\n nested: {\n level2: true,\n org: false\n }\n },\n city: faker.address.city()\n },\n timezone: 'America/Chicago',\n ...overrides\n };\n}\n\n/**\n * Generate raw mock data for a building level\n * @param id Forced ID for the mock\n * @param overrides value overrides\n */\nexport function generateMockLevel(id?: string, overrides: HashMap = {}): HashMap {\n if (!id) {\n id = `zone_lvl-${LVL_COUNT++}`;\n }\n return {\n id,\n level_id: id,\n level_name: `Level ${LVL_COUNT}`,\n short_name: `L ${LVL_COUNT}`,\n ...overrides\n };\n}\n\nlet USER_COUNT = 0;\n\nexport let USER_DOMAIN = 'acaprojects.com';\n\nconst USER_EMAILS: string[] = [];\n\n/**\n * Generate raw mock data for a user\n * @param id Forced ID for the mock\n * @param name Forced name for the user\n * @param external Whether user is external of the organisation\n */\nexport function generateMockUser(override: HashMap = {}): HashMap {\n const id = `user-${USER_COUNT++}`;\n const name = `${faker.name.firstName()} ${faker.name.lastName()}`;\n const external = override.external || !(predictableRandomInt(99999) % 2);\n const organisation = external ? faker.company.companyName() : USER_DOMAIN.split('.')[0];\n let delegates: {email: string, opt_out: boolean}[] = [];\n const delegate_count = Math.min(predictableRandomInt(4) + 1, USER_EMAILS.length);\n for (let i = 0; i < delegate_count; i++) {\n delegates.push({email: USER_EMAILS[Math.floor(predictableRandomInt(USER_EMAILS.length))], opt_out: false});\n }\n delegates = unique(delegates);\n const email = `${name\n .split(' ')\n .join('.')\n .toLowerCase()}@${external ? 'not-' : ''}${USER_DOMAIN}`;\n USER_EMAILS.push(email);\n return {\n id,\n name,\n first_name: name.split(' ')[0],\n last_name: name.split(' ')[1],\n email,\n phone: faker.phone.phoneNumber(),\n visitor: external,\n organisation: {\n id: organisation\n .split(' ')\n .join('.')\n .toLowerCase(),\n name: organisation\n },\n department: faker.commerce.department(),\n staff_code: padZero(Math.floor(predictableRandomInt(99999)), 5),\n delegates,\n image: faker.image.avatar(),\n ...override\n };\n}\n\nexport function generateMockCateringOrder(overrides: HashMap = {}, room_id: string = '', menu: HashMap = {}) {\n return {\n id: `order-${predictableRandomInt(9999_9999)}`,\n delivery_time: predictableRandomInt(6) * 5,\n location_id: room_id, // R--- could be undefined\n items: new Array(predictableRandomInt(5, 1)).fill(0).map(i => pickMenuItem(menu)),\n ...overrides\n };\n}\n\nfunction pickMenuItem(menu_map: HashMap = {}) {\n const zones = Object.keys(menu_map);\n const menu = menu_map[zones[predictableRandomInt(zones.length)]] || [];\n const category = menu[predictableRandomInt(menu.length)] || { items: [] };\n const group = { ...(category.items[predictableRandomInt(category.items.length)] || {}) };\n if (!group.package && group.items?.length) {\n const item = { ...group.items[predictableRandomInt(group.items.length)] };\n item.amount = predictableRandomInt(5, 1);\n return item;\n }\n group.amount = predictableRandomInt(5, 1);\n return group;\n}\n\nexport function generateMockLocation(overrides: HashMap, fixed_locations: string[], maps: string[]): HashMap {\n const fixed = predictableRandomInt(999_999_999) % 2 === 0;\n if (fixed && (!overrides || overrides.fixed)) {\n return {\n map_id: fixed_locations[predictableRandomInt(fixed_locations.length)],\n level: maps[predictableRandomInt(maps.length)],\n ...overrides\n };\n } else {\n return {\n x: predictableRandomInt(900, 100),\n x_max: 1000,\n y: predictableRandomInt(500, 100),\n level: maps[predictableRandomInt(maps.length)],\n confidence: predictableRandomInt(30),\n ...overrides\n };\n }\n}\n\nlet ORG_COUNT = 0;\n\nexport function generateMockOrganisation(): HashMap {\n const buildings = Array(3).fill(0).map(i => generateMockBuilding());\n return {\n id: `zone_org-${ORG_COUNT++}`,\n name: `Organisation ${ORG_COUNT}`,\n buildings,\n settings: {\n discovery_info: {\n buildings\n },\n test: {\n nested: {\n org: true\n }\n }\n }\n };\n}\n\n\nexport const generateMockBuildingSetByCity = () => {\n const buildings: Building[] = Array(10).fill(0)\n .map(() => new Building(generateMockBuilding()));\n buildings.push(...Array(2).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'Auckland'\n },\n city: 'Auckland'\n }))));\n buildings.push(...Array(5).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'NYC'\n },\n city: 'NYC'\n }))));\n return buildings;\n};\n\nexport function generateMockModalData(data: HashMap = null) : HashMap {\n if (data) {\n return data;\n }\n return {\n pendingDate: new Date(1603087100 + (1000 * 60 * 15)),\n pendingDuration: 60,\n date: 1603087100,\n duration: 30,\n }\n}\n\nexport const mockDateToBuildingTz = (date?: number) =>{\n return new DateTZ({date, building_tz: 'America/Chicago', is_local_tz: false})\n}","export * from './user.class'\nexport * from './user.utilities'\nexport * from './users.service'\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { MapLocation } from '../location';\nimport { ServiceManager } from '../service-manager.class';\n\nexport class User extends BaseDataClass {\n \n /** Currently logged in user */\n public static get active_user(): User {\n const service = ServiceManager.serviceFor(User);\n return service ? service.current : null;\n }\n\n /** First name of the user */\n public readonly first_name: string;\n /** Last name of the user */\n public readonly last_name: string;\n /** Windows user ID */\n public readonly windows_id: string;\n /** FMNO */\n public readonly fmno: string;\n /** Type of user */\n public readonly type: 'partner' | 'external' | 'internal';\n /** Contact phone number of the user */\n public readonly phone: string;\n /** Organisational department the user is part of */\n public readonly business_unit: string;\n /** Whether user is external from the application's organisation */\n public readonly external: boolean;\n /** Whether user is a visitor */\n public readonly visitor: boolean;\n /** Organisational Identifier for the user */\n public readonly staff_code: string;\n /** Basic location descriptor for the user */\n public readonly location: string;\n /** List of users that this user can act on behalf */\n public readonly delegates: readonly {email: string, opt_out: boolean}[];\n /** URL of the user's avatar image */\n public readonly image: string;\n /** List of user groups associated with this user */\n public readonly groups: readonly string[];\n /** Organisation the user is associated with */\n private _organisation: Identity;\n\n /** Map location of the user */\n private _location: MapLocation;\n /** List of desk bookings */\n // private _desk_bookings: HashMap = {}; // R--- can't explain why this is here.\n /** Host/Organisawe email notification opt out/in setting */\n public opt_out: boolean;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this.first_name = raw_data.first_name || '';\n this.last_name = raw_data.last_name || '';\n this.windows_id = raw_data.email || '';\n this.fmno = raw_data.fmno;\n this.external = raw_data.external || false;\n this.visitor = raw_data.visitor || false;\n\n\n this.type = this.visitor ? 'external' : 'internal';\n this.phone = raw_data.phone || raw_data.mobile || '';\n this.business_unit = raw_data.business_unit || raw_data.department || '';\n this._organisation = raw_data.organisation || {\n id: raw_data.organisation_id,\n name: raw_data.organisation_name\n };\n\n this._location = null;\n this.image = raw_data.image || '';\n this.staff_code = raw_data.staff_code || raw_data.fmno || '';\n this.delegates = raw_data.delegates || [];\n this._location = new MapLocation(\n raw_data.location && raw_data.location instanceof Object\n ? raw_data.location\n : { name: raw_data.location }\n );\n this.groups = raw_data.groups || [];\n this.location = raw_data.location || raw_data.officeLocation || '';\n this.opt_out = raw_data.opt_out;\n }\n\n /** Organisation the user is associated with */\n public get organisation() {\n return this._organisation;\n }\n\n /** Map location of the user */\n public get last_location(): MapLocation {\n return new MapLocation(this._location || {});\n }\n\n /**\n * Ask the server for the users current location\n */\n public locate(): Promise {\n const service: any = ServiceManager.serviceFor(MapLocation);\n return new Promise((resolve, reject) => {\n if (service) {\n service.show(this.id, { desk: this.email }).then(\n l => {\n this._location = l;\n resolve(l);\n },\n e => reject(e)\n );\n } else {\n resolve(null);\n }\n });\n }\n\n /**\n * Whether user is available during the given period\n * @param start Start time as a unix timestamp with milliseconds\n * @param end End time as a unix timestamp with milliseconds\n */\n public available(start?: number, end?: number): Promise {\n return new Promise(resolve => {\n this._service.query({ email: this.email, start, end }).then(\n l => resolve(l && l.length > 0),\n _ => resolve(false)\n );\n });\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): User {\n return new User(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): User {\n return new User({ ...this, id: null, email: null });\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: User): HashMap {\n const data = super.toJSON();\n delete data.location;\n return data;\n }\n}\n\n// R--- Might need an toApiJSON due to visitor field.","import {\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { HashMap } from '@mckinsey-converge/base';\nimport { User } from './user.class';\n\n/**\n * Generate form fields for the given user\n * @param user User to generate form for\n */\nexport function generateUserForm(user: User): FormGroup {\n if (!user) {\n throw Error('No user passed');\n }\n const fields: HashMap = {\n id: new FormControl(user.id || ''),\n name: new FormControl(user.name || ''),\n first_name: new FormControl(user.first_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n last_name: new FormControl(user.last_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n email: new FormControl(user.email || '', [Validators.email])\n };\n // Generate form group for booking item\n return new FormGroup(fields);\n}\n","import { Injectable } from '@angular/core';\nimport { Location } from '@angular/common';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { Md5 } from 'ts-md5/dist/md5';\n\nimport { BaseAPIService } from '../base.service';\nimport { User } from './user.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ILoginOptions {\n /** URL to post login request to */\n url?: string;\n /** Whether form data is passed in the body of the request */\n form?: boolean;\n /** Custom headers to pass into the post request */\n headers?: HashMap;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n protected uhttp: HttpClient,\n protected location: Location,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(User, this);\n this._name = 'Users';\n this._api_route = 'users';\n this._compare = (a, b) => !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this.set('list', []);\n this.set('current_user', new User({ id: 'local_user', name: 'Local User' }));\n this.set('delegates', null);\n this._composer.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /** Currently logged in user */\n public get current(): User {\n return this.get('current_user');\n }\n\n /** Whether the user has properly logged in */\n public get is_logged_in(): boolean {\n return this.current && this.current.id !== 'local_user';\n }\n\n /* istanbul ignore next */\n /**\n * Sets the access token and expiry for the user\n * @param token OAuth bearer token\n * @param expiry Expiry epoch timestamp in ms\n * @param reload Whether to reload the page after setting tokens\n */\n public setToken(token: string, expiry?: number, reload: boolean = true) {\n if (!expiry) {\n const now = DateNow(new Date())\n expiry = now.addValue({ days: 7 }).endOfValue('day').ms;\n }\n const path = `${location.origin}${\n this._service.setting('composer.route') || ''\n }/oauth-resp.html`;\n const client_id = Md5.hashStr(path);\n if (sessionStorage) {\n sessionStorage.setItem(`${client_id}_access_token`, token);\n sessionStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (localStorage) {\n localStorage.setItem(`${client_id}_access_token`, token);\n localStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (reload) {\n this.location.go(this.location.path());\n }\n return path;\n }\n\n /**\n * Post login request to the API\n * @param query_params Key value pairs to pass into\n * @param options Options for the login request\n */\n public async login(query_params: HashMap, options: ILoginOptions = {}): Promise {\n if (this.settingsService.concierge) {\n if (!this._promises['login']) {\n this._promises['login'] = new Promise((resolve, reject) => {\n this.set('status', 'loading');\n let headers = new HttpHeaders();\n if (!options || options.form !== false) {\n headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');\n }\n const url = (options ? options.url : '') || '/auth/signin';\n this.uhttp.post(url, query_params, { headers }).subscribe(\n (_) => null,\n (e) => reject(e),\n () => {\n this._composer.auth.authorise();\n resolve();\n }\n );\n });\n }\n return this._promises['login'];\n }\n }\n\n\n /**\n * Logout of user and redirect to logout URL\n */\n public logout() {\n this._composer.auth.logout();\n }\n\n /**\n * Loads current user from API. This diverges from {@link load} in order to simply return\n * the user object instead of setting it on the service.\n */\n public async loadCurrentUser(): Promise {\n return this.show('current')\n }\n\n /**\n * Load initial data for the service\n */\n protected load(tries: number = 0): Promise {\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.user = { message: 'Loading user credentials', state: 'loading' };\n this._service.set('loading', loading);\n this.set('status', 'loading');\n return new Promise((resolve) => {\n // this is due to unclear nature of the merge between concierge and staff\n // concierge has the retries enabled, while staff continuously retries.\n if (this.settingsService.concierge && tries > 4) {\n this.set('status', 'invalid');\n loading.user = { message: 'Loading user credentials', state: 'failed' };\n this._service.set('loading', loading);\n return resolve();\n }\n this.show('current').then(\n async (current_user) => {\n this.set('status', 'available');\n this.set('current_user', current_user);\n this._initialised.next(true);\n if (this._service && this._service.setting('app.user.grab_api_details')) {\n this.show(current_user.email).then(\n async (user) => {\n this.set('current_user', user);\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = {\n message: 'Loading user credentials',\n state: 'complete'\n };\n this._service.set('loading', loading);\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n } else {\n \n // is after process\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => current_user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = { message: 'Loading user credentials', state: 'complete' };\n this._service.set('loading', loading);\n }\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n });\n }\n\n private async loadDelegates() {\n const delegates = this.current.delegates;\n if (!delegates || !delegates.length) {\n return [];\n }\n const promises: Promise[] = [];\n for (const del of delegates) {\n promises.push(this.show(del.email));\n }\n const list = await Promise.all(promises);\n this.set('delegates', list);\n this.set('list', unique((this.get('list') || []).concat(list)));\n return list;\n }\n\n /**\n * Convert raw API data into a valid User Object\n * @param raw_item Raw API data\n */\n protected process(raw_data: any): User {\n return new User(raw_data);\n }\n}","import { AbstractControl } from '@angular/forms';\n\nimport { User } from './users';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\nconst HAS_ERROR = true;\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n */\nexport function buildValidateDate(date?: number) {\n const from = new DateTZ({ date });\n return (c) => validateDate(c, date);\n}\n\n/**\n * Check that control value is a date that is the same or after from date\n * @param control Angular form control\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateDate(control: AbstractControl, is_from?: number) {\n const from = new DateTZ({date: is_from})\n const date = new DateTZ({date: control.value})\n return date.isBeforeDate(from) ? { date: HAS_ERROR, message: 'Booking needs to be made in the future' } : null;\n}\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function buildValidateStartTime(date: number, is_from?: number) {\n const from = new DateTZ({date: is_from})\n return (c) => validateStartTime(c, date, from.ms);\n}\n\n/**\n * Check that control value time is after the comparison date time\n * @param control Angular form control\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateStartTime(control: AbstractControl, date: number, is_from?: number) {\n const now = new DateTZ({date: is_from});\n const parts = control.value.split(':');\n const date_obj = new DateTZ({date});\n return date_obj.setValue({ hour: +parts[0], minute: +parts[1] }).isBeforeDate(now) ? {\n start: HAS_ERROR,\n message: 'Booking time needs to be made in the future'\n } : null;\n}\n\nexport function buildValidateDuration(min: number = 30, max: number = 240) {\n return (c) => validateDuration(c, min, max);\n}\n\nexport function validateDuration(control: AbstractControl, min: number = 30, max: number = 240) {\n if (control.value < (min || 30)) {\n return { duration: HAS_ERROR, message: `Minimum booking duration is ${min} minute${min === 1 ? 's' : ''}` };\n } else if (control.value > (max || 480)) {\n return { length: HAS_ERROR, message: `Maximum booking duration is ${max} minute${max === 1 ? 's' : ''}` };\n }\n return null;\n}\n\nexport function buildValidateAttendees(host: User, min: number = 0) {\n return (c) => validateAttendees(c, host, min);\n}\n\nexport function validateAttendees(control: AbstractControl, host: User, min: number = 0) {\n if (!control || !(control.value instanceof Array)) {\n return min > 0\n ? { invalid: true, message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you` }\n : null;\n }\n const list: User[] = control.value;\n if (host) {\n const result = list.find(a => a.email === host.email);\n if (result) {\n list.splice(list.indexOf(result), 1);\n }\n }\n return list.length >= min ? null : {\n count: true,\n message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you`\n };\n}\n\nexport function validateEndTime(dateControlTz: AbstractControl) {\n return (control: AbstractControl) => {\n // const date = new DateTZ({date: date_control ? date_control.value : undefined})\n const now = DateNow(new Date())\n return dateControlTz.value.addValue({ minutes: control.value || 60 }).isBeforeDate(now)? { end_time: true } : null;\n };\n}\n\nexport function noWhitespaceValidator(control: AbstractControl) {\n const value = control?.value;\n if ( value === '') {\n return null; // Return null if control value is undefined or null\n }\n const isWhitespace = value.trim().length === 0;\n // const isValid = !isWhitespace;\n return !isWhitespace ? null : { whitespace: true };\n}\n\n","export * from './lib/date-tz.class'","import { DateObjectUnits, DateTime, DateTimeUnit, DurationLike, DurationUnits } from 'luxon';\nimport { getTimezoneOffset } from 'date-fns-tz';\n\nfunction padZero(value: number, length: number): string {\n let str = `${value}`;\n while (str.length < length) str = `0${str}`;\n return str;\n}\n\ninterface DateTZParams {\n date?: number | DateTime\n building_tz?: string\n is_local_tz?: boolean\n all_day?: boolean\n}\n\nconst now = new Date()\n\nexport class DateTZ {\n date: DateTime\n date_org: DateTime\n building_tz: string\n is_local_tz: boolean = true\n all_day: boolean\n local_tz: string\n valid: boolean\n\n constructor(data?: DateTZParams) { \n this.date_org = typeof data?.date === 'number' ? DateTime.fromMillis(data?.date) : data?.date ? data?.date : DateTime.fromMillis(now.valueOf())\n this.is_local_tz = data?.is_local_tz === false ? data?.is_local_tz : true\n this.all_day = data?.all_day || false\n this.local_tz = DateTime.now().zoneName\n this.building_tz = data?.building_tz || this.local_tz\n this.date = !this.is_local_tz ? this.date_org.setZone(this.building_tz) : this.date_org\n this.valid = this.date.isValid\n }\n\n //get epoch milliseconds\n public get ms(): number {\n return this.date.valueOf()\n }\n\n //get epoch seconds\n public get seconds(): number {\n return Math.trunc(this.date.toSeconds())\n }\n\n //get the second of the minute\n public get second(): number {\n return this.date.second\n }\n\n //get the minutes of the hour\n public get minutes(): number {\n return this.date.minute\n }\n\n //get the minutes of the hour\n public get hours(): number {\n return this.date.hour\n }\n\n public get utc(): number {\n const newDate = new DateTZ({...this, date: this.date.toUTC()})\n return newDate.seconds\n }\n\n public get dateDay(): number {\n return this.date.day\n }\n\n public get dateHour(): number {\n return this.date.hour\n }\n\n public get dateYear(): number {\n return this.date.year\n }\n\n public get dateWeekday(): number {\n try {\n return this.date.weekday;\n } catch (e) {\n return this.date.toJSDate().getDay();\n }\n }\n\n public get dateMonth(): number {\n return this.date.month\n }\n\n public dateDiff (compare_to: DateTZ, unit: DurationUnits, ans_unit = 'minutes'): number {\n return this.date.diff(compare_to.date, unit)[ans_unit]\n }\n\n //set the date to the begining of the given unit\n public startOfValue (unit: DateTimeUnit) {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 7) {\n // Don't change, we want sunday as the start of the week even though luxon thinks it is Monday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 1) {\n // If this.date is monday, just subtract one more day to make it Sunday\n const monday = new DateTZ({ ...this, date: this.date })\n newDate = monday.subtractValue({ days: 1 });\n } else {\n // If later than monday, startOfWeek back to monday and then subtact another day to get to Sunday.\n const monday = new DateTZ({...this, date: this.date.startOf(unit)})\n newDate = monday.subtractValue({ days: 1 })\n }\n }\n\n return newDate\n }\n\n //set the date to the end of the given unit\n public endOfValue (unit: DateTimeUnit) : DateTZ {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 6) {\n // Don't change, we want saturday as the end of the week even though luxon thinks it is Sunday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 7) {\n // If this.date is Sunday, this alone is the luxon end of week so add a day\n // to get to monday, then endOfWeek to Sunday, and subtract 1 day to Saturday\n const sunday = new DateTZ({ ...this, date: this.date }).addValue({ days: 1 })\n newDate = sunday.endOfValue(unit).subtractValue({ days: 1 }); // return next saturday\n } else {\n // If not saturday or sunday\n // endOfWeek to Sunday and then subtact a day to get to Saturday.\n const later = new DateTZ({...this, date: this.date.endOf(unit)})\n newDate = later.subtractValue({ days: 1 })\n }\n } else {\n newDate = new DateTZ({...this, date: this.date.endOf(unit)})\n }\n\n return newDate\n }\n \n public startEpoch (): number {\n const org = new DateTZ({date: this.date_org})\n return this.all_day\n ? this.startOfValue('day').ms - this.dateDiff(org, 'minutes')\n : this.ms\n }\n\n //clone the given value and unit to the date\n public clone (): DateTZ {\n // return new DateTZ({...this})\n return this.addValue({ seconds: 0 })\n }\n\n //adds the given value and unit to the date\n public addValue (duration: DurationLike, isLastDayOfMonth?: boolean): DateTZ {\n return new DateTZ({...this, date: isLastDayOfMonth ? this.date.plus(duration).endOf('month') : this.date.plus(duration)});\n }\n\n //subtracts the given value and unit to the date\n public subtractValue (duration: DurationLike): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.minus(duration)})\n return newDate\n }\n\n public setValue (obj: DateObjectUnits): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.set(obj)})\n return newDate\n }\n\n public formatDate (format: string): string {\n // Return new immuatable via \"plus\" to prevent \n // TypeError: Cannot assign to read only property 'weekData' of object\n // https://github.com/moment/luxon/issues/601\n return this.date.plus({ seconds: 0 }).toFormat(format)\n }\n\n public formatLocalDate (format: string): string {\n // setZone already returns new immutable so it doesn't have the formatDate issue.\n return this.date.plus({ seconds: 0 }).setZone(this.local_tz).toFormat(format)\n }\n\n public isSameDate(compare_to: DateTZ, value: DateTimeUnit): boolean {\n return this.date.hasSame(compare_to.date, value)\n }\n\n public isAfterDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear > compare_to.dateYear\n case 'month':\n if(this.isAfterDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth > compare_to.dateMonth\n }\n case 'day':\n if(this.isAfterDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay > compare_to.dateDay\n }\n case 'hour':\n if(this.isAfterDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour > compare_to.dateHour\n }\n case 'minute':\n if(this.isAfterDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes > compare_to.minutes\n }\n default:\n return this.ms > compare_to.ms;\n }\n }\n\n public isBeforeDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear < compare_to.dateYear\n case 'month':\n if(this.isBeforeDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth < compare_to.dateMonth\n }\n case 'day':\n if(this.isBeforeDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay < compare_to.dateDay\n }\n case 'hour':\n if(this.isBeforeDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour < compare_to.dateHour\n }\n case 'minute':\n if(this.isBeforeDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes < compare_to.minutes\n }\n default:\n return this.ms < compare_to.ms;\n }\n }\n\n public toZone(tz: string): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: this.date.setZone(tz), \n building_tz: tz, \n is_local_tz: false\n })\n return newDate\n }\n\n public setTimestamp(timestamp: number): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: timestamp,\n })\n return newDate\n }\n\n public get JSDate(): Date {\n return this.date.toJSDate()\n }\n\n // helper to log out the dateTZ values\n public logDateTz (label: string = ''): void {\n console.log(`${label} local tz/date/time`, this.addValue({ seconds: 0 }).formatLocalDate(\"cccc d MMMM,yyyy h:mma\"), this.local_tz)\n console.log(`${label} building tz/date/time`, this.addValue({ seconds: 0 }).formatDate(\"cccc d MMMM,yyyy h:mma\"), this.building_tz)\n }\n}\n\nexport const DateNow = (date: Date = new Date()) => {\n return new DateTZ({date: date.valueOf()})\n} \n\n// input the local time and the building timezone\nexport const convertLocalTimestampToTimezonedDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const date = new Date(timestamp);\n return new DateTZ({ date: timestamp, building_tz: buildingTimezone, is_local_tz: false }).setValue({\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes()\n });\n}\n\n// input the building time and the building timezone\nexport const convertTimezonedTimestampToLocalDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const local_tz = DateTime.now().zoneName;\n const localOffset = getTimezoneOffset(local_tz, new Date(timestamp));\n const desiredOffset = getTimezoneOffset(buildingTimezone, new Date(timestamp));\n if (localOffset > desiredOffset) {\n const eleA = timestamp + (localOffset - desiredOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n } else {\n const eleA = timestamp + (desiredOffset - localOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n }\n}\n\nexport const localTimezone = () => {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n}\n\nexport const getTimezoneOffsetString = (tz: string) => {\n const offset_minutes = Math.floor(getTimezoneOffset(tz) / 1000 / 60);\n const hours = Math.floor(offset_minutes/60);\n const minutes = offset_minutes % 60;\n return `${offset_minutes > 0 ? '+' : '-'}${padZero(Math.abs(hours), 2)}${padZero(minutes, 2)}`;\n}\n\nexport function toMiddayUTC(value: DateTZ = DateNow()) {\n // exclude Auckland from rouding up timezone as it has 12+ hours UTC timezone difference\n return value.building_tz.includes('Auckland') ? value : new DateTZ({\n date: value.setValue({ hour: 12, minute: 0 }).ms,\n is_local_tz: false,\n building_tz: 'UTC',\n }).setValue({ hour: 12, minute: 0 });\n}\n\n/**returns the offset between two timezones in minutes and hours */\nexport function timezoneOffset(tz: string){\n const nowTz = DateNow(new Date())\n const offset = nowTz.date.offset - nowTz.toZone(tz).date.offset\n return {minutes: offset, hours: offset/60}\n}\n\nexport function isToday (date, timezone) {\n\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: timezone\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: timezone,\n }),\n 'day'\n );\n}\n","export * from './lib/environment.module';\nexport * from './lib/version';\nexport * from './lib/environment.service'\nexport * from './lib/types'\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n providers: []\n})\nexport class EnvironmentModule {\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { EnvironmentData } from './types';\n\nexport const ENVIRONMENT_TOKEN = 'environments_service_data';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EnvironmentService {\n\n public get production(): boolean {\n return this.environment.production;\n }\n\n public get heap_io_id(): number {\n return this.environment.heap_io_id;\n }\n\n constructor(@Inject(ENVIRONMENT_TOKEN) private environment: EnvironmentData) {\n }\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"dirty\": false,\n \"raw\": \"dacd45ad9\",\n \"hash\": \"dacd45ad9\",\n \"distance\": null,\n \"tag\": null,\n \"semver\": null,\n \"suffix\": \"dacd45ad9\",\n \"semverString\": null,\n \"version\": \"0.0.0\",\n \"time\": 1733434456096\n};\n/* tslint:enable */\n","export * from './lib/legacy-overlays.module';\nexport * from './lib/space-select-modal/space-select-modal.component';\nexport * from './lib/new-user-modal/new-user-modal.component';\nexport * from './lib/confirm-modal/confirm-modal.component';\nexport * from './lib/catering-confirm-modal/catering-confirm-modal.component';\nexport * from './lib/catering-details-modal/catering-details-modal.component';\nexport * from './lib/requirement-details-modal/requirement-details-modal.component';\nexport * from './lib/booking-confirm/booking-confirm.component';\nexport * from './lib/user-form/user-form.component'\nexport * from './lib/booking-form/booking-form.component'\nexport * from './lib/no-catering-modal/no-catering-modal.component'\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport { Router } from '@angular/router';\n\nimport {\n ApplicationService,\n Booking,\n BookingsService,\n BookingStateService,\n CateringOrder,\n getFirstDateFromList,\n OrganisationService,\n rulesForSpace,\n recurrenceDetails,\n SeriesAction,\n SettingsService,\n Space,\n SpacesService,\n User,\n UsersService,\n formatWhen,\n BOOKING_STATUS,\n CloseDialogService,\n DialogIds\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent,\n HashMap,\n humaniseDuration\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ConflictsModalComponent, ConflictsModalComponentData } from '@mckinsey-converge/ui';\n\n\nexport interface BookingConfirmModalData {\n old_booking: Booking;\n booking: Booking;\n action?: SeriesAction\n}\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n\n@Component({\n selector: 'a-booking-confirm-modal',\n templateUrl: './booking-confirm.component.html',\n styleUrls: ['./booking-confirm.component.scss']\n})\nexport class BookingConfirmComponent extends BaseDirective implements OnInit{\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for changes are being processed */\n public loading: string;\n /** Whether space availability is being checked */\n public checking_available: boolean;\n /** Whether to show all attendees */\n public show_attendees: boolean = false;\n /** Whether to show all locations */\n public show_locations: boolean;\n /** Whether to show all catering orders */\n public show_orders: boolean;\n /** Whether booking has succeeded */\n public success: boolean;\n /** Whether booking needs to be accepted */\n public readonly is_request: boolean;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n lastMomentConflict: boolean = false;\n \n @ViewChild('attendeesListRef') attendeesListRef: ElementRef;\n @ViewChild('locationsListRef') locationsListRef: ElementRef;\n @ViewChild('cateringListRef') cateringListRef: ElementRef;\n\n /** Booking to confirm changes to */\n public get old_booking(): Booking {\n return this._data.old_booking;\n }\n\n /** Booking to confirm changes to */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Active user */\n public get user(): User {\n return this._users.current;\n }\n\n /** Title of the displayed event */\n public get title(): string {\n return this.booking.title;\n }\n\n /** Comapny names */\n public get company(): string[] {\n return this.booking.company;\n }\n \n\n /** Display string of when the event will occur */\n public get when(): string {\n const duration_value = this.booking.duration;\n const all_day = this.booking.all_day && duration_value < 25 * 60;\n if(this.booking.is_recurrent && this.booking.recurrence_starts && this.booking.recurrence_starts.length){\n return formatWhen({all_day, ...this.recurrenceDates })\n }\n return formatWhen({\n all_day,\n startTZ: this.booking.startDateTz,\n endTZ: this.booking.endDateTz,\n displayEndTZ: this.booking.displayEndDateTz})\n }\n\n public get recurrenceDates(){\n const startTZ = getFirstDateFromList(this.booking.recurrence_starts)\n const endTZ = startTZ.addValue({minutes: this.booking.duration})\n return {startTZ, endTZ, displayEndTZ: endTZ}\n }\n\n /** Display string for the recurrence value of the booking */\n public get recurrence(): string {\n return recurrenceDetails({\n period: this.booking.recurrence_period,\n end: this.booking.recurrence_endTz,\n list: this.booking.recurrence_starts,\n interval: this.booking.recurrence_interval\n });\n }\n\n /** Display string for the event's duration */\n public get duration(): string {\n const duration_value = this.booking.duration;\n return this.booking.all_day ? 'All Day' : humaniseDuration(duration_value);\n }\n\n /** List of spaces associated with the event */\n public get spaces(): Space[] {\n return this.booking.multi_rooms;\n }\n\n /** List of attendees associated with the event not including the host */\n public get attendees(): User[] {\n const attendees = this.booking.attendees;\n return attendees.filter((i) => i.email !== this.organiser.email);\n }\n\n /** Host of the event */\n public get organiser(): User {\n return this.booking.organiser || this._users.current;\n }\n\n /** Host of the event */\n public get equipment_codes(): HashMap {\n return this.booking.equipment_codes || {};\n }\n\n /** Host of the event */\n public get catering_codes(): HashMap {\n const catering = this.catering;\n const codes = {};\n for (const order of this.catering) {\n codes[order.location_id] = order.charge_code;\n }\n return codes;\n }\n\n /** Host of the event */\n public get equipment_notes(): HashMap {\n return this.booking.notes\n .filter((note) => note.type === 'equipment')\n .reduce((map, notes) => {\n map[notes.space] = notes.message;\n return map;\n }, {});\n }\n\n /** Details about the event */\n public get notes(): string {\n return this.booking.body;\n }\n\n /** List of catering orders in the booking */\n public get catering(): CateringOrder[] {\n return (this.booking.catering || []).map((order) => {\n const space: any = this.spaces.find(\n (a_space) => a_space.email === order.location_id\n ) || {\n level: {}\n };\n const building: any =\n this._org.buildings.find((bld) => bld.id === space.level.building_id) || {};\n return new CateringOrder({\n ...order,\n location: space.local_name,\n symbol: building.currency,\n booking_date: this.booking.startDateTz.ms,\n booking_timezone: this.booking.timezone,\n });\n });\n }\n\n /** Map of changes to the booking */\n public get changes(): HashMap {\n return {};\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _org: OrganisationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private _router: Router,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingConfirmModalData,\n public settings: SettingsService,\n private closeDialogService: CloseDialogService, \n private renderer: Renderer2,\n ) {\n super();\n this.booking.time_changed =\n this.old_booking &&\n (this.old_booking.startDateTz.ms !== this.booking.startDateTz.ms ||\n this.old_booking.duration !== this.booking.duration);\n // in concierge, all bookings are acceptable without explicit approval.\n\n const rules = rulesForSpace({ user: this.user, space: this.booking.room, duration: 60 });\n this.is_request = this.settings.concierge ? false : rules.auto_approve;\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined; \n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && (booker_concierge !== null && booker_concierge !==undefined ) && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && (booker_concierge['email'] && organiser.email !==booker_concierge['email']) ) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n /**\n * Save booking changes\n */\n public saveChanges() {\n this.loading = 'Checking availability of selected spaces';\n this._dialog_ref.disableClose = true;\n this.checkSpaceAvailability().then(\n () => {\n this.loading = 'Processing booking request...';\n // Change the unchanged settings to the selected room\n const newEmail = this.booking.space.email;\n const replaceObjects = ['setup', 'breakdown', 'approval_status']\n replaceObjects.forEach(key => {\n const obj = this.booking[key];\n if (obj && obj.constructor === Object) {\n const keys = Object.keys(obj);\n if (keys.length > 0) {\n const replacement = {};\n keys.forEach(nk => {\n replacement[newEmail] = obj[nk];\n })\n this.booking[key] = replacement;\n }\n }\n });\n\n const buffer = {};\n this.booking.multi_rooms.map(room => room.email).forEach(elem => buffer[elem] = 900);\n\n // // if no setup or breakdown time already added and notes or catering exist? add 15 min buffer setup and breakdown to booking\n // if(this.booking.setup === null || this.booking.breakdown === null){\n // const has_note_buffer = (this.booking.notes && this.booking.notes?.length) || (this.booking.catering && this.booking.catering?.length) ? \n // buffer : null; // 900 seconds = 15 min\n // if (has_note_buffer) {\n // this.booking.setup = has_note_buffer;\n // this.booking.breakdown = has_note_buffer; \n // this.booking.room_setup = has_note_buffer; \n // this.booking.room_breakdown = has_note_buffer; \n // }\n // }\n\n // if no setup time already added and notes or catering exist? add 15 min buffer setup time to booking\n if (this.booking.setup === null || this.booking.setup === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.setup = has_note_buffer;\n this.booking.room_setup = has_note_buffer;\n }\n }\n\n // if no breakdown time already added and notes or catering exist? add 15 min buffer breakdown time to booking\n if (this.booking.breakdown === null || this.booking.breakdown === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.breakdown = has_note_buffer;\n this.booking.room_breakdown = has_note_buffer;\n }\n }\n\n\n this._bookings.save(this.booking, this._data.action === SeriesAction.EDIT).then(\n async (bkn) => {\n this.loading = null;\n this.success = true;\n this._dialog_ref.disableClose = false;\n const updated = new Booking({ ...this.booking, ...bkn.toApiJSON() });\n this._booking_state_service.replace(updated);\n \n /**\n * update the master booking in case of recurring to have latest updated in the system\n */\n if(updated.recurrence_master_id !== null)\n { \n const master_booking = await this._bookings.show(updated.recurrence_master_id);\n this._booking_state_service.replace(master_booking);\n }\n\n if (bkn.is_recurrent && bkn.recurrence_type === 'master') {\n this._booking_state_service.pollOnce();\n this.closeDialogService.closeDialog(DialogIds.MeetingDetails);\n }\n\n localStorage.removeItem('ACA_STAFF.booking_form_data');\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess(\n `Successfully ${this.booking.id ? 'updated' : 'created'} booking`\n );\n },\n (err) => {\n\n this._dialog_ref.disableClose = false;\n let erroMessage: string = '';\n switch(err.status){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 400:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.lastMomentConflict = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n },\n (err) => {\n\n this.lastMomentConflict = true;\n this._dialog_ref.disableClose = false;\n const erroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n }\n\n /**\n * Staff only\n */\n public newBooking() {\n this._router.navigate(['/book', 'spaces']);\n this._dialog_ref.close();\n }\n\n /**\n * Staff only\n */\n public toSchedule() {\n this._router.navigate(['/schedule'], {\n queryParams: { email: this.booking.organiser.email }\n });\n this._dialog_ref.close();\n }\n\n /**\n * Check whether the selected spaces are available for the selected time period\n */\n public checkSpaceAvailability(): Promise {\n const spaces: Space[] = this.spaces;\n if (\n (this.booking.id &&\n (this.booking.startDateTz.ms === this.old_booking.startDateTz.ms &&\n this.booking.duration === this.old_booking.duration)) ||\n (spaces && spaces.length <= 0)\n ) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n // Use of this.booking.timezone is unreliable, use booking space instead.\n const all_day = this.booking.all_day;\n // R--- should be nothing to do with date as a timestamp getter\n this._spaces\n .available({\n room_ids: spaces.map((space) => space.id).join(','),\n dateTz: this.booking.startDateTz,\n duration: all_day ? 24 * 60 : this.booking.duration,\n ignore: this.booking.icaluid,\n recurrence_count: this.booking.recurrence_count,\n recurrence_period: this.booking.recurrence_period,\n recurrence_endTz: this.booking.recurrence_endTz,\n recurrence_interval: this.booking.recurrence_interval,\n recurrence_starts: this.booking.recurrence_starts,\n is_recurrent: this.booking.is_recurrent,\n recurrence_days: this.booking.recurrence_days\n })\n .then(\n (space_list) => {\n for (const space of space_list) {\n if (!space.bookable) {\n this.lastMomentConflict = true;\n return reject(\n `${space.name} is not available at the select time period.`\n );\n }\n }\n if (space_list.length < spaces.length) {\n this.lastMomentConflict = true;\n return reject(\n `${spaces[0].name} is not available at the select time period.`\n );\n }\n resolve();\n },\n (err) => reject(err)\n );\n });\n }\n\n public openConflictsModal(){\n const ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.booking.local_room_name,\n conflicts: this.booking.recurrence_exceptions,\n copy_conflicts: true,\n timezone: this.booking.timezone\n }\n });\n\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(event.reason === 'close'){\n ref.close();\n }else if(event.reason === 'action'){\n navigator.clipboard.writeText(this.conflictsText)\n }\n \n })\n );\n ref.afterClosed().subscribe(() => this.unsub('modal_events'));\n }\n\n public get conflictsText(){\n let text = ''\n this.booking.recurrence_exceptions.map((date)=>{\n const dateTZ = new DateTZ({date: date*1000});\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n text = `${text}\\n${display}${dateTZ.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n })\n return text\n }\n\n public toggleList(listType: 'attendees' | 'locations' | 'catering') {\n if (listType === 'attendees') {\n this.show_attendees ? this.collapseList(this.attendeesListRef) : this.expandList(this.attendeesListRef);\n this.show_attendees = !this.show_attendees;\n } else if (listType === 'locations') {\n this.show_locations ? this.collapseList(this.locationsListRef) : this.expandList(this.locationsListRef);\n this.show_locations = !this.show_locations;\n } else if (listType === 'catering') {\n this.show_orders ? this.collapseList(this.cateringListRef) : this.expandList(this.cateringListRef);\n this.show_orders = !this.show_orders;\n }\n }\n\n public expandList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n const listItems = listElement.getElementsByClassName('list-item');\n let totalHeight = 0;\n\n for (let i = 0; i < listItems.length; i++) {\n totalHeight += listItems[i].offsetHeight;\n }\n\n this.renderer.setStyle(listElement, 'max-height', `${totalHeight}px`);\n this.renderer.addClass(listElement, 'shown');\n }\n\n public collapseList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n this.renderer.setStyle(listElement, 'max-height', '4.5em');\n this.renderer.removeClass(listElement, 'shown');\n }\n}\n","\n
\n \n
\n \n
\n Booking Details\n Confirmed!\n Requested!\n
\n
Please await confirmation of room
\n
\n
\n \n
{{ title || 'No title' }}
\n
\n
\n \n
{{ when }}
\n
\n
\n \n
{{ recurrence }}
\n 0\"\n (click)=\"openConflictsModal()\"\n >\n Conflicts\n
\n \n
\n \n
{{ duration }}
\n
\n
\n Locations({{ spaces.length || '0' }})*:\n
\n
\n
\n
{{ item?.local_name }}
\n \n Notes\n
\n \n Code\n
\n
\n
No Locations
\n
\n 1\"\n (click)=\"toggleList('locations')\"\n >\n {{ show_locations ? 'Hide' : 'Show more' }} Locations\n \n \n \n
\n \n
{{ organiser?.name || organiser?.email }}
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n
\n\n
\n \n \n \n \n
\n
\n\n
\n
\n
\n \n
\n
\n {{ loading }}\n
\n
\n
\n
\n\n \n \n \n
My Day\n \n\n","import {\n Component,\n Input,\n OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Output, EventEmitter \n} from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { distinctUntilChanged, first, skip } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n arrayWithValues,\n BookingAction,\n CateringOrder,\n SeriesAction,\n SettingsService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\n\nimport { NewUserModalComponent } from '../new-user-modal/new-user-modal.component';\nimport {\n SpaceSelectModalComponent,\n SpaceSelectModalData\n} from '../space-select-modal/space-select-modal.component';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\nimport { MatChipsModule} from '@angular/material/chips';\n\n\n@Component({\n selector: 'a-booking-form',\n templateUrl: './booking-form.component.html',\n styleUrls: ['./booking-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BookingFormComponent extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** List of available users to host bookings */\n public user_list: User[] = [];\n public nowTz: DateTZ = DateNow(new Date());\n /** From date input for date field */\n public fromDateTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n /** Last bookable date, concierge only */\n public readonly untilDateTz = DateNow(new Date()).addValue({ days: 365 }).endOfValue('day');\n public isConcierge: boolean;\n public localTimezone = DateNow(new Date()).building_tz;\n public localStart = \"\";\n public localEnd = \"\";\n // Define an array to store selected company options\n public chipOptions: any[] = [];\n public showTimeCateringWarning: boolean = false;\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _dialog: MatDialog,\n private settingsService: SettingsService,\n private cdRef: ChangeDetectorRef\n ) {\n super();\n this.isConcierge = this.settingsService.concierge;\n }\n\n public ngOnInit(): void {\n // Trim title \n // this.form.get('title').setValue(this.form.get('title').value.trim());\n\n this.chipOptions = [...this.form.controls.company.value];\n\n this.localTimezone = DateNow(new Date()).building_tz;\n const building_tz = (\n this.form.controls.action &&\n (\n this.form.controls.action.value === 'booking_clone' ||\n this.form.controls.action.value === 'clone' ||\n this.form.controls.action.value === 'edit' ||\n this.form.controls.action.value === 'booking_edit'\n ) &&\n this.form.controls.dateTz &&\n this.form.controls.dateTz.value\n ) ? this.form.controls.dateTz.value.building_tz : this.localTimezone;\n\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz });\n this.fromDateTz = closestToTimeSlotTz(this.nowTz, 15);\n\n this._users.initialised.pipe(first((_) => _)).subscribe(() => {\n const user: User = this._users.current;\n const delegates = user.delegates.map(\n (del) => this._users.find(del.email) || new User({ email: del.email, name: del.email.split('@')[0] })\n );\n this.user_list = [user].concat(delegates);\n });\n\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n this.subscription('formChanges', this.form.valueChanges\n .pipe(\n skip(1), // initial form changes\n distinctUntilChanged())\n .subscribe(() => {\n this.timeout('update_coachmark', () => {\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n }, 500);\n })\n );\n\n this.subscription('isRecurrentChanges', this.form.controls.is_recurrent.valueChanges\n .subscribe(() => {\n const recurrenceStarts = this.form.controls.recurrence_starts\n if(!this.form.controls.is_recurrent.value){\n recurrenceStarts.clearValidators() \n }else{\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n recurrenceStarts.setValidators(arrayValidators);\n }\n recurrenceStarts.updateValueAndValidity()\n })\n ); \n\n /**Disable Inputs */\n this.disableInputs();\n\n /**turn is_recurrent to false if editing or cloning a stand-alone/occurrence */\n if(this.form.controls.id?.value && !this.form.controls.action?.value){\n this.form.controls.is_recurrent.setValue(false)\n }\n\n // Subscribe to changes in dateTz, duration, and has_catering\n this.subscription('dateTz_changes', this.form.controls.dateTz.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n this.subscription('duration_changes', this.form.controls.duration.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // No need to subscribe to catering_changes since we're now handling has_catering\n this.subscription('has_catering_changes', this.form.controls.has_catering.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // Initial check\n this.checkTimeCateringWarning();\n}\n\n /**\n * \n * @param key : formcontrol name \n * Function trim value being submitted with only spaces/beginning/end \n */\n public trim(key: string): void {\n this.form.get(key).setValue(this.form.get(key).value.trim());\n }\n\n /** Whether notes and description should use the HTML editor */\n public get use_html(): boolean {\n return this._service.setting('app.booking.html_body') || false;\n }\n\n /** List of available types for bookings */\n public get booking_types(): Identity[] {\n return this._service.setting('app.booking.booking_types') || [];\n }\n\n /** Display string for the list of active spaces */\n public get spaces(): string {\n const spaces = this.form.controls.space_list.value;\n return spaces.length === 1\n ? spaces[0].local_name\n : spaces.length > 1\n ? `${spaces.length} spaces selected`\n : 'No Spaces selected';\n }\n\n public disableInputs() {\n const { id, action, needs_space, is_recurrent } = this.form.value;\n const has_id = !!id;\n const is_edit = action === BookingAction.EDIT;\n if (has_id) {\n this.form.get('is_recurrent')?.disable();\n }\n\n if(is_edit){\n this.form.get('is_multiroom')?.disable();\n }\n\n if (!this.isConcierge && !needs_space) {\n this.form.get('has_catering')?.disable();\n }\n if(has_id && is_edit && is_recurrent){\n this.form.get('dateTz')?.disable()\n this.form.patchValue({ action: null });\n }\n }\n\n /**\n * Open modal to change the space details for the booking\n */\n public openSpacesModal(): void {\n const ref = this._dialog.open(\n SpaceSelectModalComponent,\n {\n width: 'auto',\n height: 'auto',\n maxWidth: '95vw',\n data: {\n spaces: this.form.controls.space_list.value,\n dateTz: this.form.controls.dateTz.value,\n duration: this.form.controls.duration.value,\n host: this.form.controls.organiser.value,\n multiple: true,\n needsCatering: !!this.form.controls.catering?.value?.length,\n }\n }\n );\n this.subscription(\n 'new_spaces',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n let space_list = this.form.controls.space_list.value;\n space_list = event.metadata;\n this.form.controls.space_list.setValue(unique(space_list, 'id'));\n if (event.noCatering) {\n // Set has_catering to false and clear the catering list\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n } else {\n const catering = this.form.controls?.catering?.value.map((order: CateringOrder) => {\n order.location = space_list[0].name;\n order.location_id = space_list[0].email;\n return order;\n });\n this.form.controls.catering?.setValue(catering || []);\n }\n ref.close();\n this.unsub('new_spaces');\n }\n if (event.reason === 'close') {\n ref.close();\n this.unsub('new_spaces');\n }\n })\n );\n }\n\n /**\n * Open modal to change the recurrence details for the booking\n */\n public openNewUserModal() {\n const ref = this._dialog.open(NewUserModalComponent, {\n width: 'auto',\n height: 'auto'\n });\n this.subscription(\n 'new_user',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const attendees = this.form.controls.attendees?.value;\n attendees.push(event.metadata);\n this.form.controls.attendees.setValue(unique(attendees, 'email'));\n ref.close();\n this.unsub('new_user');\n this.cdRef.detectChanges();\n }\n })\n );\n }\n\n // Add & Remove chip and set the value of the form control accordingly\n addCompany(event, company): void {\n if (company) {\n this.chipOptions.push(company);\n this.form.controls.company.setValue(this.chipOptions);\n }\n event.preventDefault();\n }\n\n removeOption(option: any): void {\n const index = this.chipOptions.indexOf(option);\n if (index >= 0) {\n this.chipOptions.splice(index, 1);\n }\n this.form.controls.company.setValue(this.chipOptions);\n }\n\n private updateCoachmarkTimes(timezone: string) {\n if (!timezone) timezone = this.localTimezone;\n // Resolve the problem that locally I might have the same TZ offset but the names don't match.\n const localTzOffset = DateTime.now().setZone(this.localTimezone).offset;\n const buildingTzOffset = DateTime.now().setZone(timezone).offset;\n const dateTz = this.form.controls.dateTz.value;\n if (dateTz && localTzOffset !== buildingTzOffset) {\n const startDate = dateTz.clone();\n this.localStart = startDate.formatLocalDate(\"h:mma\");\n this.localEnd = startDate.addValue({ minutes: this.form.value.duration }).formatLocalDate(\"h:mma\");\n } else {\n // No location is selected so coachmark is hidden\n this.localStart = \"\";\n this.localEnd = \"\";\n }\n this.cdRef.detectChanges();\n }\n\n public get isSeriesAction(){\n return this.form.value.action === SeriesAction.CLONE || this.form.value.action === SeriesAction.EDIT\n }\n\n onToggleChange(toggledControlName: string, is_multiroom: boolean): void {\n if (toggledControlName === 'is_recurrent') {\n // If the is_recurrent toggle is being activated, deactivate is_multiroom\n if (this.form.controls.is_recurrent?.value) {\n this.form.controls.is_multiroom?.setValue(false);\n this.form.controls.merged?.setValue(false);\n this.form.get('merged')?.disable();\n\n }\n } else if (toggledControlName === 'is_multiroom') {\n // If the is_multiroom toggle is being activated, deactivate is_recurrent\n if (this.form.controls.is_multiroom?.value) {\n this.form.controls.is_recurrent?.setValue(false);\n }\n if(is_multiroom) { \n this.form.get('merged').setValue(false);\n this.form.get('merged')?.enable() \n } else {\n this.form.get('merged').setValue(false); \n this.form.get('merged')?.disable(); }\n }\n }\n \n private checkTimeCateringWarning() {\n const dateTz = this.form.controls.dateTz.value;\n const duration = this.form.controls.duration.value;\n const hasCatering = this.form.controls.has_catering?.value;\n const cateringOrders = this.form.controls.catering?.value;\n \n if (dateTz && duration && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n\n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n\n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n // Booking is outside of catering hours and has catering selected\n this.showTimeCateringWarning = true;\n } else {\n this.showTimeCateringWarning = false;\n }\n } else {\n this.showTimeCateringWarning = false;\n }\n\n // Inform Angular that the component needs to be checked\n this.cdRef.markForCheck();\n }\n\n}\n","
\n \n \n \n
\n
\n \n Title*:\n \n \n \n\n \n {{ ( form?.get('title').errors && form?.get('title').hasError('pattern')) \n ? 'Some special characters (^=`~!@#$%*{};:\\'_\\\",.\\<>) are not allowed' : 'Title is required'}} \n \n \n
\n\n
\n \n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n \n \n
\n \n
\n Duration is invalid. End time must be in the future\n
\n
\n
\n
\n Please be aware that this booking starts at {{localStart}} and ends at {{localEnd}} in your local timezone.\n
\n
\n Warning: Changing the booking time outside of catering hours will drop your catering order.\n
\n
\n
\n
\n
\n Recurring booking\n
\n \n
\n Multiroom\n
\n
\n \n
\n
Merged
\n
\n \n
\n
\n \n \n
\n \n \n \n \n \n {{ user.name || user.email }}\n \n \n \n
\n
\n \n \n \n {{ form?.get('attendees').errors?.customError }}\n \n
\n
\n \n
\n \n
\n \n
\n \n \n {{ ( form?.get('company').errors && form?.get('company').hasError('pattern'))\n ? 'Some special characters (^=`~@#$%*{};:_\\\",.\\<>) are not allowed' : ''}}\n \n
\n \n
\n \n \n {{ selected }}\n
\n
\n
\n
\n\n
1\">\n \n \n \n \n {{ type.name }}\n \n \n \n
\n
\n Need a meeting space?\n \n
\n
\n \n \n Need catering?\n \n
\n
\n \n \n \n \n \n \n \n
\n\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport {\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringItem,\n OrganisationService,\n Space,\n SpacesService\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringConfirmModalData {\n all_day: boolean;\n form: FormGroup;\n dateTz: DateTZ;\n}\n\n@Component({\n selector: 'a-catering-confirm-modal',\n templateUrl: './catering-confirm-modal.component.html',\n styleUrls: ['./catering-confirm-modal.component.scss']\n})\nexport class BookingCateringConfirmModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** List of selected items for the order */\n public item_list: CateringItem[] = [];\n\n /** Space selected for delivery */\n public get space(): Space {\n return this._spaces.find(this._data.form?.controls?.location_id?.value);\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n let date = this._data.dateTz;\n if (this._data.form && this._data.form.controls.delivery_time) {\n date = date.addValue({ minutes: this._data.form.controls.delivery_time.value });\n }\n return date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Form field for order items */\n public get item_field(): FormControl {\n return this._data.form.controls.items as any;\n }\n\n /** Total cost of the order */\n public get order_cost(): number {\n return this.item_list.reduce((amount, item) => {\n const price = item.price\n return amount + item.amount * price\n }, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n /* istanbul ignore else */\n if (!this.space || !this.space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find(\n (bld) => bld.id === this.space.level.building_id\n ) || { currency: 'USD' };\n return building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringConfirmModalData\n ) {\n super();\n if (!this._data.form) {\n this._service.notifyError('No form data for order');\n this._dialog_ref.close();\n }\n }\n\n public ngOnInit(): void {\n /* istanbul ignore else */\n if (this._data.form.controls.items) {\n this.subscription(\n 'item_list',\n this._data.form.controls.items.valueChanges.subscribe((items) => {\n /* istanbul ignore else */\n if (!items || items.length <= 0) {\n this._dialog_ref.close();\n }\n })\n );\n }\n this.item_list = this._data.form.controls.items.value.map((item) => new CateringItem(item.toJSON()));\n }\n}\n","
\n
Confirm Catering Order
\n \n
\n\n
\n
\n Delivering to {{ space?.local_name || space?.simple_name || space?.settings?.room_name }} at {{ delivery_time }}\n
\n
\n \n
\n
\n \n
{{ order_cost / 100 | currency:symbol }}
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n OrganisationService,\n BookingNote,\n CateringOrder,\n Space,\n UsersService,\n CateringNotesService,\n Booking\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n catering: AbstractControl;\n booking: Booking\n}\n\n@Component({\n selector: 'a-catering-details-modal',\n templateUrl: './catering-details-modal.component.html',\n styleUrls: ['./catering-details-modal.component.scss']\n})\nexport class CateringDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: HashMap = {};\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return (this._data.spaces || []).filter((space) =>\n this._data.catering.value.find((order) => order.location_id === space.email)\n );\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.pattern || this.active_form.controls.code.errors?.minlength;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n return this.space_list.reduce(\n (valid, space) => valid && this.form[space.email].valid,\n true\n );\n }\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _cateringNotesService: CateringNotesService,\n @Inject(MAT_DIALOG_DATA) private _data: CateringDetailsModalData\n ) {\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type === 'catering'\n );\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = this._data.catering.value.reduce((map, order: CateringOrder) => {\n map[order.location_id] = order.charge_code;\n return map;\n }, {});\n this.generateFormFields();\n }\n\n public submit(): void {\n this.space_list.forEach((space) => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes\n const notes = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type !== 'catering'\n );\n const new_notes = this.space_list.map(\n (space) =>\n ({\n author: this._data.booking.booked_by ? this._data.booking.booked_by['name'] : this._users.current.name,\n type: 'catering',\n message: this.form[space.email].controls.notes.value,\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote)\n );\n this._cateringNotesService.setNotes(new_notes);\n this._data.notes_field.setValue(notes.concat(new_notes).filter((note) => note.message));\n // Save the notes\n const orders = this._data.catering.value.map(\n (order) =>\n new CateringOrder({\n ...order,\n charge_code: this.form[order.location_id]\n ? this.form[order.location_id].controls.code.value\n : ''\n })\n );\n\n this._data.catering.setValue(orders);\n // This should go to the next\n this.event.emit({ reason: 'done' });\n } else {\n this._scrollToBottom();\n }\n }\n\n /** Generate form fields for each space */\n private generateFormFields(): void {\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space.level.building_id\n );\n \n this.needs_charge_code[space.email] = space?.filters?.charge_code || space?.settings?.charge_code || false;\n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(this.codes[space.email] || '',\n this.needs_charge_code[space.email] ?\n [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4), Validators.required ] : [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4)])\n });\n }\n }\n\n /** Scroll the content container to the bottom */\n private _scrollToBottom(): void {\n this._content_el?.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n}\n","
\n
\n \n \n \n
\n \n
\n\n
\n
\n \n
Please specify any allergies or gluten intolerances
\n
\n
\n
\n \n \n \n \n
\n
\n \n Charge Code\n *\n \n \n \n \n Note: Your booking will be confirmed before you are charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\n\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\nexport interface ConfirmModalData {\n /** Title of the modal */\n title: string;\n /** Contents of the modal */\n content: string;\n /** Text displaed on the confirmation button */\n action?: string;\n /** Icon to display on the modal */\n icon: ApplicationIcon;\n}\n\nexport const CONFIRM_METADATA = {\n height: 'auto',\n width: '24em',\n maxHeight: 'calc(100vh - 2em)',\n maxWidth: 'calc(100vw - 2em)'\n};\n\n@Component({\n selector: 'confirm-modal',\n templateUrl: './confirm-modal.component.html',\n styleUrls: ['./confirm-modal.component.scss']\n})\nexport class ConfirmModalComponent extends BaseDirective {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: string;\n\n /** Title of the confirm modal */\n public get title(): string {\n return (this._data ? this._data.title : null) || 'Confirm';\n }\n\n /** Body of the confirm modal */\n public get content(): string {\n return (this._data ? this._data.content : null) || 'Are you sure?';\n }\n\n /** Display text on the confirm button */\n public get action(): string {\n return (this._data ? this._data.action : null) || 'Ok';\n }\n\n /** Display icon properties */\n public get icon(): ApplicationIcon {\n return (this._data ? this._data.icon : null) || null;\n }\n\n constructor(\n private _dialog: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: ConfirmModalData\n ) {\n super();\n }\n\n /**\n * User confirmation of the content of the modal\n */\n public accept() {\n this.event.emit({ reason: 'done' });\n }\n}\n","
\n

{{ title || 'Confirm' }}

\n
\n\n
\n \n
\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { SpaceSelectModalComponent } from './space-select-modal/space-select-modal.component';\nimport { NewUserModalComponent } from './new-user-modal/new-user-modal.component';\nimport { ConfirmModalComponent } from './confirm-modal/confirm-modal.component';\nimport { NoCateringModalComponent } from './no-catering-modal/no-catering-modal.component';\nimport { BookingCateringConfirmModalComponent } from './catering-confirm-modal/catering-confirm-modal.component';\nimport { CateringDetailsModalComponent } from './catering-details-modal/catering-details-modal.component';\nimport { RequirementDetailsModalComponent } from './requirement-details-modal/requirement-details-modal.component';\nimport { BookingConfirmComponent } from './booking-confirm/booking-confirm.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UserFormComponent } from './user-form/user-form.component';\nimport { BookingFormComponent } from './booking-form/booking-form.component';\nimport { EditorModule } from '@tinymce/tinymce-angular';\n\nconst DECLARATIONS = [\n SpaceSelectModalComponent,\n NewUserModalComponent,\n ConfirmModalComponent,\n NoCateringModalComponent,\n BookingCateringConfirmModalComponent,\n CateringDetailsModalComponent,\n RequirementDetailsModalComponent,\n BookingConfirmComponent,\n UserFormComponent,\n BookingFormComponent,\n];\n\n@NgModule({\n imports: [\n LegacyUiModule,\n FormsModule,\n ReactiveFormsModule,\n CommonModule,\n UiModule,\n BaseModule,\n EditorModule,\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ...DECLARATIONS,\n BaseModule\n ]\n})\nexport class LegacyOverlaysModule {\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { BaseDirective, DialogEvent } from '@mckinsey-converge/base';\nimport { generateUserForm, User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'new-user-modal',\n templateUrl: './new-user-modal.component.html',\n styleUrls: ['./new-user-modal.component.scss'],\n})\nexport class NewUserModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for the new user */\n public form: FormGroup;\n /** New user data store */\n public user: User;\n /** Whether user details are being saved */\n public loading: boolean;\n\n public ngOnInit(): void {\n this.user = new User();\n this.form = generateUserForm(this.user);\n }\n\n public saveChanges() {\n this.form.markAllAsTouched();\n if (this.form.valid) {\n if (!this.form.controls.email.value) {\n this.form.controls.email.setValue(\n `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`\n );\n }\n const firstName = this.form.value.first_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n const lastName = this.form.value.last_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n \n const new_user = new User({\n ...this.form.value,\n name: `${firstName} ${lastName}`,\n type: 'external',\n external: true,\n visitor: true,\n });\n this.event.emit({ reason: 'done', metadata: new_user });\n }\n }\n}\n","
\n

Add External Attendee

\n \n
\n
\n \n
\n
\n \n \n
\n\n
\n
\n
\n \n
\n
\n Saving attendee...\n
\n
\n
\n
\n\n","import {\n Component,\n Output,\n EventEmitter\n} from '@angular/core';\nimport {\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'no-catering-modal',\n templateUrl: './no-catering-modal.component.html',\n styleUrls: ['./no-catering-modal.component.scss']\n})\nexport class NoCateringModalComponent extends BaseDirective {\n constructor(\n private _dialog_ref: MatDialogRef,\n ) {\n super();\n }\n\n // /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n\n // Submit the Survey in it's current state.\n public confirm() {\n this.event.emit({ reason: 'done', noCatering: true });\n this._dialog_ref.close();\n }\n\n // Close the modal\n public cancel() {\n this.event.emit({ reason: 'close' });\n this._dialog_ref.close();\n }\n}\n","
\n \n
\n
\n
\n \n

Catering is not available for your new room selection. \n
Are you sure you want to drop order and change rooms?

\n
\n
\n \n \n \n
\n
\n
","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n BookingNote,\n OrganisationService,\n SettingsService,\n Space,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface RequirementDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n codes_field: AbstractControl;\n head_counts_field: AbstractControl;\n standalone?: boolean;\n}\n\n@Component({\n selector: 'a-requirement-details-modal',\n templateUrl: './requirement-details-modal.component.html',\n styleUrls: ['./requirement-details-modal.component.scss']\n})\nexport class RequirementDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: boolean;\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return this._data.spaces;\n }\n\n public get has_recurrence(): boolean {\n return false\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.minlength || this.active_form.controls.code.errors?.pattern;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n // return this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n return this.space_list.length > 0 && this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n }\n\n public isConcierge: boolean;\n public frontend: string;\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n @Inject(MAT_DIALOG_DATA) private _data: RequirementDetailsModalData,\n private _settings: SettingsService,\n ) {\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value\n .filter((note: BookingNote) => note.type === 'equipment');\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = { ...this._data.codes_field.value };\n this.head_counts = { ...this._data.head_counts_field.value };\n this.generateFormFields();\n }\n\n public submit(): void {\n // Get the email of the first space\n const firstSpaceEmail = this.space_list[0].email;\n\n // Copy values from the first space's form controls to all other spaces\n this.space_list.forEach(space => {\n if (space.email !== firstSpaceEmail) {\n this.form[space.email].controls.notes.setValue(this.form[firstSpaceEmail].controls.notes.value);\n this.form[space.email].controls.code.setValue(this.form[firstSpaceEmail].controls.code.value);\n this.form[space.email].controls.head_count.setValue(this.form[firstSpaceEmail].controls.head_count.value);\n }\n });\n\n this.space_list.forEach(space => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes \n const notes = this._data.notes_field.value\n .filter((note: BookingNote) => note.type !== 'equipment');\n const new_notes = this.space_list.map(space => ({\n author: this._users.current.name,\n type: 'equipment',\n message: this.form[space.email].controls.notes.value.trim(),\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote));\n this._data.notes_field.setValue(notes.concat(new_notes).filter(note => note.message));\n this._data.codes_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.code.value;\n return map;\n }, {}));\n this._data.head_counts_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.head_count.value;\n return map;\n }, {}));\n this.event.emit({ reason: 'done' });\n } else {\n this._content_el.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n }\n\n /** Generate form fields for each space */\n // private generateFormFields(): void {\n // for (const space of this.space_list) {\n // const building = this._org.buildings.find(\n // bld => bld.id === space[0]?.level.building_id\n // );\n // // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n // const { filters, settings } = space;\n // const roomBasedEqCode = filters?.equipment_code || settings?.equipment_code;\n // const officeBasedEqCode = building?.required?.equipment_code;\n // this.needs_charge_code[space.email] = roomBasedEqCode !== undefined ? roomBasedEqCode : officeBasedEqCode !== undefined ? officeBasedEqCode: false;\n\n // this.form[space.email] = new FormGroup({\n // notes: new FormControl(this.notes[space.email] || ''),\n // code: new FormControl(\n // this.codes[space.email] || '',\n // this.needs_charge_code[space.email] ?\n // [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] : [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n // ),\n // head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n // });\n // }\n // }\n \n private generateFormFields(): void {\n // Initialize a variable to determine if any space needs a charge code\n let anySpaceNeedsChargeCode = false;\n \n // First pass to determine if any space needs a charge code\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space?.level.building_id\n );\n const { filters, settings } = space;\n const roomBasedEqCode = filters?.equipment_code;\n const officeBasedEqCode = building?.required?.equipment_code;\n \n // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n if (roomBasedEqCode || officeBasedEqCode) {\n anySpaceNeedsChargeCode = true;\n this.needs_charge_code = true;\n break;\n } else{\n this.needs_charge_code = false;\n }\n }\n \n // Second pass to create form groups with the determined charge code requirement.\n // We show only the first space, but if one of the selected spaces needs a mandatory charge code,\n // then all spaces need a mandatory charge code\n for (const space of this.space_list) { \n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(\n this.codes[space.email] || '',\n anySpaceNeedsChargeCode ?\n [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] :\n [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n ),\n head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n });\n }\n }\n}\n","
\n
\n \n \n \n \n {{\n this.space_list.length > 1 ? this.space_list.length + ' spaces selected' :\n this.space_list[0]?.local_name || 'No spaces selected'\n }}\n \n \n \n \n
\n \n
\n\n
\n
\n \n
\n {{\n has_recurrence && !isConcierge\n ? 'To update headcount information, add equipment or catering, please edit individual meeting occurences in My Day'\n : \"Would you like to add equipment to your booking's spaces?\"\n }}\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n Charge Code*\n \n \n \n \n Note: Your booking will be confirmed before you are\n charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n \n Headcount Estimate*\n \n \n \n \n Note: This estimate is used to calculate catering and/or\n assign rooms. Please keep updated of any changes.\n \n \n Headcount Estimate is required\n \n \n
\n \n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {\n BehaviorSubject,\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n first,\n map,\n switchMap,\n take,\n withLatestFrom\n} from 'rxjs/operators';\nimport {\n Building,\n mapBuildingToSelectOption,\n mapCityToAllSelectOption,\n OrganisationService,\n SettingsService,\n Space,\n SpaceBookingRuleOptions,\n SpacesService,\n toggleSelectedByGroup,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n DialogEvent,\n HashMap,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport { NoCateringModalComponent } from '../no-catering-modal/no-catering-modal.component'\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport interface SpaceSelectModalData {\n /** List of selected spaces */\n spaces: Space[];\n /** Start time for availability of spaces */\n dateTz: DateTZ;\n /** Duration of the availability block to look for */\n duration: number;\n /** Host of the booking being made */\n host: User;\n /** Whether multiple spaces can be selected */\n multiple: boolean;\n /** Force zone ids */\n zone_ids?: string;\n /** Booking needs catering */\n needsCatering?: boolean,\n}\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'a-space-select-modal',\n templateUrl: './space-select-modal.component.html',\n styleUrls: ['./space-select-modal.component.scss']\n})\nexport class SpaceSelectModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether space list is being loaded */\n public loading: boolean;\n /** List of available spaces to select from */\n public spaces: Space[] = [];\n /** Active building to filter spaces on */\n public active_building: Building;\n /** Active building to filter spaces on */\n public active_type: Identity;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n /** List of currently selected spaces */\n public selected_spaces: Space[] = [];\n /** Mapping as to whether a space is by request */\n public request_map: HashMap = {};\n /** Whether selected list should be shown on mobile */\n public show_list: boolean;\n\n /** host to load (only in staff) **/\n public host: User;\n\n /** List of available buildings */\n public types: Identity[] = [];\n\n public isConcierge: boolean;\n public frontend: string;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n /** Whether multiple spaces can be selected */\n public get multiple(): boolean {\n return false;\n }\n\n public get has_zone(): boolean {\n return !!this._data.zone_ids;\n }\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n\n public noCateringDialogRef: MatDialogRef;\n\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public savedSelection\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _spaces: SpacesService,\n private _settings: SettingsService,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: SpaceSelectModalData\n ) {\n super();\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld) => {\n this.loading = true;\n const zone_ids: string[] = [];\n /* istanbul ignore else */\n if (this.active_building) {\n zone_ids.push(this.active_building.id);\n }\n\n if (bld?.includes('|')) {\n bld = this.savedSelection\n }\n\n const id = request_id;\n return this._spaces.available({\n zone_ids: bld?.length ? bld : this._data.spaces[0].building.id || zone_ids.join(','),\n dateTz: this._data.dateTz,\n duration: this._data.duration\n }).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _ })),\n map((resp: { id: number, list: Space[] }) => {\n this.loading = false;\n const filtered_list = resp.list.filter((space: Space) => {\n // if concierge skip rules check.\n if (this._settings.concierge) {\n return (this.active_type && this.active_type.id ? space.zones.includes(`${this.active_type.id}`) : true) &&\n !this.selected_spaces.find((s) => s.id === space.id);\n }\n\n const rules = space.rulesFor({\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this.host || this._data.host\n });\n return (\n rules.hide !== true &&\n (this.active_type && this.active_type.id\n ? space.zones.includes(`${this.active_type.id}`)\n : true) &&\n !this.selected_spaces.find((_space) => _space.id === space.id)\n );\n });\n return resp.id === request_id ? filtered_list : this.spaces;\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.spaces = list.filter((space) => {\n if (!space.available) {\n return false;\n }\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n });\n this.spaces.sort((a, b) => this.sort(a, b));\n if (!this.selectedOptions.value.length) {\n this.setDefaultBuilding()\n }\n })\n );\n this.active_building = this._data.spaces?.length\n ? this._org.buildings.find((i) => i.id === this._data.spaces[0].level.building_id)\n : this._org.building;\n this.types = [{ id: '', name: 'Any Space Type' } as any].concat(\n this._org.space_types || []\n );\n this.active_type = this.types[0];\n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: { name: city, timezone },\n value: bld_list?.filter((bld) => bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld) => mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ]\n this.options.next(buildings)\n }));\n\n }\n\n /** Add space to selected list */\n public addSpace(space: Space) {\n this.selected_spaces.push(space);\n this.selected_spaces = unique(this.selected_spaces, 'id');\n }\n\n /** Remove space from selected list */\n public removeSpace(space: Space) {\n this.selected_spaces = this.selected_spaces.filter((a_space) => a_space.id !== space.id);\n }\n\n /** Emit current state of the selected list */\n public save(list: Space[]) {\n if (!this._data.needsCatering) {\n // No catering order to warn about\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // Check if the room has catering \n if (list[0].has_catering) {\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // If not warn that the room doesn't have catering\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.event.emit({ reason: 'done', metadata: list, noCatering: event.noCatering });\n }\n if (event.reason === 'close') {\n this.event.emit({ reason: 'close' });\n }\n })\n );\n }\n\n private update() {\n const map = {};\n const options: SpaceBookingRuleOptions = {\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this._data.host\n };\n this.selected_spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.request_map = map;\n }\n\n public setDefaultBuilding() {\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id)) || { name: '', sort_order: [] };\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld) => bld.value)\n\n });\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n public selectSpace(space: Space) {\n const list = this.spaces;\n if (list.find((item) => item.id === space.id)) {\n this.spaces = list.filter((item) => item.id !== space.id);\n } else {\n this.spaces = [space];\n }\n }\n\n public clearList() {\n this.spaces = []\n this.savedSelection = []\n }\n\n public triggerSearch = () => {\n if (this.savedSelection.length) {\n this.change$.next(this.savedSelection)\n } else {\n this.spaces = []\n }\n }\n\n}\n","
\n
Select meeting space{{ multiple ? 's' : '' }}
\n \n
\n\n
\n
\n \n \n 1\">Type\n 1\">\n \n \n {{ type?.name }}\n \n \n \n \n
\n \n \n
\n
\n
{{ space.local_name }}
\n
{{ space.level.name }}
\n
\n
\n \n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n {{ (!isConcierge && request_map[space.id]) ? 'Request' : 'Select' }}\n \n
\n
\n
\n
\n
\n
\n
\n

Selected spaces

\n
\n \n
\n \n \n
\n
\n
{{ space.name }}
\n
{{ space.level.name }}
\n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n
Loading available spaces...
\n
\n
\n\n
\n
\n \n
\n
No results available, please select another office.
\n
\n
\n\n
\n
\n \n
\n
No selected spaces
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'user-form',\n templateUrl: './user-form.component.html',\n styleUrls: ['./user-form.component.scss']\n})\nexport class UserFormComponent {\n /** Group of form fields used for creating the system */\n @Input() public form: FormGroup;\n}\n","
\n
\n
\n First Name:\n \n \n First name is required\n \n \n
\n
\n Last Name:\n \n \n Last name is required\n \n
\n
\n Email:\n \n \n A valid email is required\n \n
\n
\n
\n","export * from './lib/legacy-ui.module';\nexport * from './lib/custom-fields';\nexport * from './lib/icon/icon.component';\nexport * from './lib/feedback/feedback.component';\nexport * from './lib/action-icon/action-icon.component';\nexport * from './lib/user-avatar/user-avatar.component';\nexport * from './lib/bookings/catering/item/item.component';\nexport * from './lib/cng-search-bar/cng-search-bar.component';\n","import { Component, OnInit, Input } from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'action-icon',\n templateUrl: './action-icon.component.html',\n styleUrls: ['./action-icon.component.scss']\n})\nexport class ActionIconComponent implements OnInit {\n /** Icon to display */\n @Input() public icon: ApplicationIcon;\n /** Whether action is being processed */\n @Input() public loading: boolean;\n /** State of the action */\n @Input() public state: 'success' | 'error' | '' = '';\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","
\n \n
\n \n
\n
\n \n
\n
\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringCategory,\n CateringItem,\n SettingsService\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { PackageOptionsModalComponent } from '../package-options-modal/package-options-modal.component';\n\nfunction hasSelectionRequirements(category: CateringCategory) {\n return (\n category.must_select < category.items.length ||\n (category.must_select === category.items.length &&\n category.items.find((item: any) => item.items && item.must_select < item.items.length))\n );\n}\n\nfunction getActiveList(category: CateringCategory) {\n const items = category.items || [];\n let list = items.filter((item) => item.amount > 0).map((item) => item.id);\n for (const item of items) {\n if ((item as any).items && (item as any).items.length) {\n list = list.concat(getActiveList(item as any));\n }\n }\n return list;\n}\n\n@Component({\n selector: 'a-catering-menu-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringMenuItemComponent extends BaseDirective implements OnChanges {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Field for storing items */\n @Input() public field: FormControl;\n /** Current symbol for the selected space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n public initial_state = null;\n\n /** List of contents of the package */\n public get contents(): string {\n return this.item.items\n ? this.item.items.reduce((list, item) => {\n /* istanbul ignore else */\n if (list) {\n list += '\\n\\n';\n }\n return (list += `${item.name}${\n (item as any).items\n ? (item as any).items.reduce(\n (a_list, an_item) =>\n (a_list += `\\n ${an_item.amount ? '✓' : '•'} ${an_item.name} `),\n ''\n )\n : ''\n } ${item.amount ? '✓' : ''}`);\n }, '')\n : '';\n }\n\n constructor(private _service: ApplicationService, private _dialog: MatDialog,\n public settings: SettingsService) {\n super();\n // on the item selection set the revert/close state\n this.initial_state = this.item;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.field && this.field) {\n const list = this.field.value;\n // check the category\n let item = list.find((an_cat) => an_cat.id === this.item.id);\n if (item) {\n // update the category level amount\n this.item.setAmount(item ? item.amount : 0);\n } else {\n // find a category item\n for (var cat of list) {\n item = cat?.items.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(item ? item.amount : 0);\n break;\n }\n }; \n } \n\n // On the confirm catering order modal set the revert/close state\n if (!this.initial_state && this.item.amount) {\n this.initial_state = this.item;\n }\n\n this.subscription(\n 'field_change',\n this.field.valueChanges.subscribe((list) => {\n const item = list.find((an_item) => an_item.id === this.item.id);\n this.item.setAmount(item ? item.amount : 0);\n this.updatePackageSelection();\n })\n );\n }\n }\n\n /**\n * Update the amount of the item in the order\n * @param value New amount\n */\n public updateAmount(value: number) {\n /* istanbul ignore else */\n if (this.field) {\n const list: CateringItem[] = this.field.value;\n const item = list.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(value);\n item.setAmount(value);\n // MCK-1550 fix\n const price = this.item.price;\n item.setPrice(price)\n } else {\n const amount = this.item.amount;\n this.item.setAmount(value);\n if (\n this.item.package &&\n amount < value &&\n this.item.items &&\n this.item.items.length &&\n hasSelectionRequirements(this.item)\n ) {\n this.selectPackageOptions().then(\n (confirmed_item) => {\n list.push(new CateringCategory(confirmed_item));\n this.field.setValue(list.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n } else {\n list.push(new CateringItem(this.item));\n }\n }\n this.field.setValue(list.filter((an_item) => an_item.amount));\n }\n }\n\n public updatePackageSelection() {\n const cart_item = this.field.value.find((item) => item.id === this.item.id);\n if (cart_item) {\n const active_items = getActiveList(cart_item);\n this.timeout(\n 'update_package',\n () => {\n this.item.items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n if ((item as any).items) {\n (item as any).items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n });\n }\n });\n },\n 5\n );\n }\n }\n\n /** Reselect package options */\n public updatePackageOptions(): void {\n let updatedList: CateringItem[] = [];\n this.selectPackageOptions().then(\n (confirmed_item) => {\n // Update the existing category package\n this.field.value.forEach((category: CateringCategory) => {\n if (category.id === confirmed_item.id) {\n updatedList.push(new CateringCategory(confirmed_item))\n } else {\n updatedList.push(category)\n }\n })\n this.field.setValue(updatedList.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n }\n\n /**\n * Open modal for user to select package options\n */\n private selectPackageOptions(): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(PackageOptionsModalComponent, {\n maxWidth: '95vw',\n data: {\n item: new CateringCategory(this.item)\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n let done = false;\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n done = true;\n resolve(ref.componentInstance.item);\n this.initial_state = this.item;\n ref.close();\n }\n });\n ref.afterClosed().subscribe(() => {\n /* istanbul ignore else */\n if (!done) {\n if (this.initial_state) {\n resolve(this.initial_state);\n } else {\n reject();\n }\n }\n });\n });\n }\n}\n","\n \n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n { item.availableItems.length, plural, =1 { Contains {{ item.availableItems.length }} item } other {\n Contains {{ item.availableItems.length }} items } }\n
\n 0\"\n [matTooltip]=\"contents\"\n >\n {{ item.must_select }}\n \n Selected\n \n
\n 0\"\n (click)=\"updatePackageOptions()\"\n i18n=\"Catering order item options change action\"\n >\n Customise\n \n \n \n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n CateringCategory,\n CateringItem\n} from '@mckinsey-converge/data-common';\n\nexport interface PackageOptionsModalData {\n item: CateringCategory;\n}\n\nexport function checkItemRequirements(category: CateringCategory): boolean {\n const items = category.items || [];\n return category.must_select >= items.length\n ? items.reduce((valid, item) => valid && checkItemRequirements(item as any), true)\n : items.reduce((amount, item) => amount + (item.amount ? 1 : 0), 0) ===\n category.must_select;\n}\n\nexport function getActiveItems(category: CateringCategory): HashMap {\n let map = {};\n if (category.items) {\n const item = category.items.find(item => item.amount > 0);\n if (item) {\n map[category.id] = item.id;\n }\n category.items.forEach(item => map = { ...map, ...getActiveItems(item as any) });\n }\n return map;\n}\n\n@Component({\n selector: 'a-package-options-modal',\n templateUrl: './package-options-modal.component.html',\n styleUrls: ['./package-options-modal.component.scss']\n})\nexport class PackageOptionsModalComponent {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n\n /** Item to select options for */\n public get item(): CateringCategory {\n return this._data.item;\n }\n\n /** Whether package requirements have been met */\n public get requirements_met(): boolean {\n return checkItemRequirements(this.item);\n }\n\n public get active_items(): HashMap {\n return getActiveItems(this.item);\n }\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: PackageOptionsModalData) {\n }\n\n /**\n * Update the list of selected items\n */\n public updateAmount(a_package: CateringCategory, option: CateringItem, state: boolean) {\n if (state) {\n const needed = a_package.must_select;\n const active = a_package.items.filter(an_item => an_item.amount > 0).length;\n if (active >= needed) {\n const item = a_package.items.find(an_item => an_item.amount > 0);\n item.setAmount(0);\n }\n option.setAmount(1);\n } else {\n option.setAmount(0);\n }\n }\n}\n","
\n

Package Options

\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n \n \n
\n \n 1\"\n [checked]=\"!!option.amount\"\n (change)=\"updateAmount(package, option, $event.checked)\"\n >\n {{ option.name }}\n \n \n {{ option.name }}\n \n \n = package.items.length || option.must_select\">\n {{ option.name }}\n \n \n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\n\n// Interface to define the structure of the configuration object for the search bar\nexport interface SearchBarConfig {\n placeholder?: string;\n totalFoundItem?: number;\n showSrchWarning?: boolean;\n}\n\n@Component({\n selector: 'cng-search-bar',\n templateUrl: './cng-search-bar.component.html',\n styleUrls: ['./cmg-search-bar.component.scss']\n})\nexport class CngSearchBarComponent implements OnChanges {\n // Input property to accept configuration for the search bar\n @Input() config: SearchBarConfig = {\n placeholder: 'Search ...',\n totalFoundItem: 0,\n showSrchWarning: false\n };\n\n // Output event emitter to emit search strings to parent components\n @Output() search = new EventEmitter();\n\n // Local variable to store the search string entered by the user\n searchStr: string = '';\n\n // Lifecycle hook that is called when any data-bound property of a directive changes\n ngOnChanges(changes: SimpleChanges): void {\n // Check if the config property has changed\n if (changes.config) {\n const configChanges = changes.config.currentValue;\n // Update the config with new values or fallback to defaults\n this.config = {\n placeholder: configChanges.placeholder || 'Search ...',\n totalFoundItem: configChanges.totalFoundItem || 0,\n showSrchWarning: configChanges.showSrchWarning || false\n };\n }\n }\n\n // Method to handle the search action\n onSearch(value: string): void {\n // Emit the search string if it's not empty\n if (value) {\n this.search.emit(value);\n } else {\n this.clearSearch();\n }\n }\n\n // Method to clear the search input and reset related configurations\n clearSearch(box: HTMLInputElement | null = null): void {\n this.searchStr = '';\n if (box) {\n box.value = '';\n }\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n this.search.emit('');\n }\n\n // Method to reset the search-related warnings and item count\n resetSearch(): void {\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n }\n}\n","
\n \n \n
{{ config.totalFoundItem }}
\n \n \n \n
\n \n No search found!\n
\n
\n ","import { Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n@Directive({\n selector: '[hover-class]'\n})\nexport class HoverClassDirective {\n @Input('hover-class') hoverClass: string;\n\n constructor(private elementRef: ElementRef) {}\n\n @HostListener('mouseenter') onMouseEnter() {\n this.update('add');\n }\n\n @HostListener('mouseleave') onMouseLeave() {\n this.update('remove');\n }\n\n @HostListener('blur') onBlur() {\n this.update('remove');\n }\n\n private update(action: string): void {\n this.hoverClass.split(' ').forEach(item => this.elementRef.nativeElement.classList[action](item));\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'an-action-field',\n templateUrl: './action-field.component.html',\n styleUrls: ['./action-field.component.scss']\n})\nexport class ActionFieldComponent extends BaseDirective {\n /** Name of the field */\n @Input() public name: string;\n /** Value to display on the field */\n @Input() public placeholder: string;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Emitter for user interaction events */\n @Output('onAction') public on_action = new EventEmitter();\n /** Whether to show tooltip */\n public show_tooltip = false;\n\n /**\n * Emit that the user has performed an action on the field\n */\n public performAction() {\n this.show_tooltip = !this.show_tooltip;\n this.on_action.emit();\n }\n}\n","\n
{{ placeholder }}
\n
\n \n
\n\n","import { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'a-counter',\n templateUrl: './counter.component.html',\n styleUrls: ['./counter.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n /* istanbul ignore next */\n useExisting: forwardRef(() => CounterComponent),\n multi: true,\n },\n ],\n})\nexport class CounterComponent implements ControlValueAccessor {\n /** Maximum amount for the counter */\n @Input() public max: number = 10;\n /** Minimum amount for the counter */\n @Input() public min: number = 0;\n\n @Input() public useInput = false;\n\n /** Current value of the counter */\n public value: number;\n public previous_value: number = 0;\n /** Whether shift key is being held by the user */\n public shift_key: boolean;\n /** Whether control key is being held by the user */\n public ctrl_key: boolean;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /**\n * Add the `step` to the current value\n */\n public add() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value += step;\n if (this.value > this.max) {\n this.value = this.max || 10;\n }\n this.setValue(this.value);\n }\n\n /** Remove the `step` from the current value */\n public remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }\n\n public handleTimeout = null;\n\n public onInputChange(new_value: string) {\n if (this.handleTimeout) {\n clearTimeout(this.handleTimeout);\n this.handleTimeout = null;\n }\n this.handleTimeout = setTimeout(() => this.changeInput(new_value), 500);\n }\n\n public changeInput(new_value: string) {\n let value = Number(new_value);\n if (isNaN(value)) {\n value = this.previous_value;\n }\n if (value < this.min) {\n value = this.min || 0;\n }\n if (value > this.max) {\n value = this.max || 10;\n }\n this.setValue(value);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.previous_value = new_value;\n this.value = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.value = value;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","\n \n \n
\n {{value || '0'}}\n
\n \n\n","import { Component, OnInit, forwardRef, Input, ViewChild, Output, EventEmitter } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-date-field',\n templateUrl: './date-field.component.html',\n styleUrls: ['./date-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateFieldComponent),\n multi: true\n }\n ]\n})\nexport class DateFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n /** Optional event emitter for changes */\n @Output() public onChange = new EventEmitter();\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Currently selected date */\n public date: number;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n /** Display value for the current date */\n public get date_string(): string {\n // R--- Needs TZ aware inputs\n const date = new DateTZ({date: this.date})\n return date.formatDate('dd MMM yyyy');\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public ngOnInit() {\n this.date = DateNow(new Date()).ms;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = new DateTZ({date: this.date });\n const new_d = new DateTZ({date: new_value})\n let new_date = new_d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n this.date = new_date;\n if (this._onChange) {\n this._onChange(new_date);\n this.onChange.emit(new_date);\n }\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","\n
{{ date_string }}
\n
\n \n
\n\n\n
\n \n
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport {\n humaniseDuration,\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-duration-field',\n templateUrl: './duration-field.component.html',\n styleUrls: ['./duration-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ]\n})\nexport class DurationFieldComponent extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor {\n /** Maximum duration option available */\n @Input() public max: number = 240;\n /** Minimum duration option available */\n @Input() public min: number = 15;\n /** Step value between options */\n @Input() public step: number = 15;\n /** Reference time for displaying next to durations */\n @Input() public time: number;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Special case prepopulation i.e. out of step options */\n @Input() public specialPreprops: Array = [];\n /** Whether form all_day is enabled. */\n @Input() public all_day: boolean = false;\n\n public duration: number = 60;\n /** List of available duration options */\n public duration_options: Identity[];\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n public ngOnInit(): void {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.max || changes.min || changes.step || changes.time || changes.all_day) {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.duration = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(+new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.duration = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n private generateDurationOptions(max: number, min: number, step: number, all_day: boolean = false): Identity[] {\n const blocks: Identity[] = [];\n let time = min;\n // R--- Change input to dateTz\n let date = this.time ? new DateTZ({date: this.time}) : null;\n\n // Add special case for 10min duration/prepropulation\n for (const option of this.specialPreprops) {\n blocks.push({\n id: option,\n name: date\n ? `${date.addValue({ minutes: option }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(option)})`\n : `${humaniseDuration(option)}`\n });\n }\n\n\n while (time <= max) {\n blocks.push({\n id: time,\n name: date\n ? `${date.addValue({ minutes: time }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(time)})`\n : `${humaniseDuration(time)}`\n });\n time += step;\n }\n if (all_day) {\n blocks.push({ id: 24 * 60, name: 'All Day' }); \n }\n blocks.push({ id: 7 * 24 * 60, name: '1 week' });\n return blocks;\n }\n}\n","
\n \n \n \n {{ option.name }}\n \n \n \n
\n","export * from './action-field/action-field.component'\nexport * from './counter/counter.component'\nexport * from './date-field/date-field.component'\nexport * from './duration-field/duration-field.component'\nexport * from './time-field/time-field.component'\nexport * from './user-search-field/user-search-field.component'\nexport * from './user-list-field/user-list-field.component'\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-time-field',\n templateUrl: './time-field.component.html',\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ]\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n /** Time step between each allowed time option */\n @Input() public step: number = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public no_past_times: boolean = true;\n /** String representing the currently set time */\n public date: number = DateNow(new Date()).ms;\n /** String representing the currently set time */\n public time: string = DateNow(new Date()).formatDate('HH:mm');\n /** Available time blocks for the selected date */\n public _time_options: Identity[];\n /** Whether select field should be shown */\n public show_select: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n // R--- This is the form input that needs to be TZ active.\n public ngOnInit(): void {\n this.show_select = true;\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n this.timeout('hide', () => this.show_select = false);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step) {\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n }\n\n public get date_(){\n return new DateTZ({date: this.date})\n }\n\n /** Available time blocks for the selected date */\n public get time_options() {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] });\n if (date.minutes % 15 !== 0 && !this._time_options.find(time => time.id === date.formatDate('HH:mm'))) {\n this._time_options.push({\n name: `${date.formatDate(timeFormatString())}`,\n id: date.formatDate('HH:mm')\n });\n this._time_options.sort((a, b) => `${a.id}`.localeCompare(`${b.id}`));\n }\n return this._time_options;\n }\n\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.time = new_value;\n if (this._onChange) {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] }).startOfValue('minute');\n this._onChange(date.ms);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n if (!value) {\n return;\n }\n this.date = value;\n let date = this.date_.startOfValue('minute');\n date = date.setValue({ minute: Math.ceil(date.minutes / 5) * 5 });\n this.time = date.formatDate('HH:mm');\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Show select field for time options\n */\n public showSelect() {\n this.show_select = true;\n this.timeout('on_shown', () => {\n if (this.select_field) {\n this.select_field.focus();\n this.select_field.open();\n this.subscription('listen_close', this.select_field.openedChange.subscribe((state) => {\n if (!state) {\n this.show_select = false;\n }\n }));\n }\n });\n }\n\n /**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n private generateAvailableTimes(datestamp: number, show_past: boolean, step: number = 15): Identity[] {\n let date = new DateTZ({date: datestamp});\n const blocks = [];\n if (show_past || date.isAfterDate(DateNow(new Date()))) {\n date = date.startOfValue('day');\n } else if (date.isAfterDate(DateNow(new Date()))) {\n date = DateNow(new Date());\n }\n date = date.setValue({ minute: Math.ceil(date.minutes / step) * step });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n name: `${date.formatDate(timeFormatString()).toLocaleLowerCase()}`,\n id: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n }\n}\n","\n
\n \n
\n
\n \n
\n\n\n \n \n {{ option.name }}\n \n \n\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n tap,\n map,\n switchMap,\n finalize\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n csvToJson,\n downloadFile,\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-list-field',\n templateUrl: './user-list-field.component.html',\n styleUrls: ['./user-list-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserListFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserListFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Number of characters needed before a search will start */\n @Input() public limit: number = 3;\n /** Emitter for action to make a new user */\n @Output('newUser') public new_user = new EventEmitter();\n\n /** User list to display */\n public user_list: User[];\n /** List of active selected users on the list */\n public active_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** String */\n public search_str: string;\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User[]) => void;\n /** Form control on touch handler */\n private _onTouch: (_: User[]) => void;\n\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n\n constructor(private _service: ApplicationService, private _users: UsersService, private cdRef: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(100),\n distinctUntilChanged(),\n switchMap((query) => {\n this.loading = true;\n return query.length >= this.limit\n ? this._users.query({\n q: query.slice(0, Math.max(this.limit, 3)),\n cache: 60 * 1000\n })\n : Promise.resolve([]);\n }),\n catchError((_) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.user_list = list;\n this.user_list.forEach((i: any) => {\n i.match_name = matchToHighlight(i.match_name);\n i.match_email = matchToHighlight(i.match_email);\n return i;\n });\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n })\n );\n }\n\n /**\n * Add user to the user list\n * @param user\n */\n public addUser(user: User) {\n /* istanbul ignore else */\n if (!this.active_list) {\n this.active_list = [];\n }\n const index = this.active_list.findIndex((a_user) => a_user.id === user.id);\n /* istanbul ignore else */\n if (index < 0) {\n this.active_list = [...this.active_list, user];\n }\n this.setValue(this.active_list);\n this.search_str = '';\n }\n\n /**\n * Remove user from the user list\n * @param user\n */\n public removeUser(user: User) {\n this.active_list = this.active_list.filter((a_user) => a_user.id !== user.id);\n this.setValue(this.active_list);\n }\n\n /**\n * Load CSV file and populate the user list with the contents\n * @param event File input field event\n */\n public addUsersFromFile(event) {\n /* istanbul ignore else */\n if (event.target) {\n const file = event.target.files[0];\n /* istanbul ignore else */\n if (file) {\n const reader = new FileReader();\n reader.readAsText(file, 'UTF-8');\n reader.addEventListener('load', (evt) => {\n this.processCsvData((evt.srcElement as any).result);\n event.target.value = '';\n this.cdRef.detectChanges();\n });\n reader.addEventListener('error', (_) =>\n this._service.notifyError('Error reading file.')\n );\n }\n }\n }\n\n /**\n * Process raw CSV data and save user data to attendee list\n * @param data CSV data\n */\n private processCsvData(data: string) {\n const list = csvToJson(data) || [];\n const id = this._users.current.staff_code; \n list.forEach((el) => {\n const firstName = el.first_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n const lastName = el.last_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n\n el.name = el.name || `${firstName} ${lastName}`;\n const display = (el.name || `${Math.floor(Math.random() * 9999_9999)}`)\n .split(' ')\n .join('_')\n .toLowerCase();\n /* istanbul ignore else */\n if (!el.email) {\n el.email = `${display}+${id}@guest.mckinsey.com`;\n }\n el.type = 'external';\n el.external = !el.email.endsWith(\"@mckinsey.com\") && !el.email.endsWith(\"@external.mckinsey.com\");\n this.addUser(new User(el));\n });\n }\n\n /* istanbul ignore next */\n /** Download template CSV file */\n public downloadCSVTemplate() {\n const template = `Organisation Name,First Name,Last Name,Email,Phone\\nFake Org,John,Smith,john.smith@example.com,01234567898`;\n downloadFile('template.csv', template);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User[]): void {\n this.active_list = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User[]) {\n this.active_list = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User[]) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: User[]) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n \n \n \n
\n
\n \n \n {{ user.name }}\n \n \n \n
\n
\n\n
No attendees
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n switchMap\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-search-field',\n templateUrl: './user-search-field.component.html',\n styleUrls: ['./user-search-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserSearchFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserSearchFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Limit available options to these */\n @Input() public options: User[];\n /** Currently selected user */\n public active_user: User;\n /** User list to display */\n public user_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** Current display value of the search input field */\n public search_str: string = '';\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User) => void;\n /** Form control on touch handler */\n private _onTouch: () => void;\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n \n constructor(private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap(query => {\n this.loading = true;\n return this.options && this.options.length > 0\n ? Promise.resolve(this.options)\n : query.length >= 3\n ? (this._users.query({ q: query, cache: 60 * 1000 }) as Promise)\n : Promise.resolve([]);\n }),\n catchError((err) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription('search_results', this.search_results$.subscribe(list => {\n this.user_list = list;\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n }));\n }\n\n /** Handle input changes */\n public onInputChange(value: string): void {\n this.search_str = value;\n this.search$.next(value);\n }\n\n /**\n * Reset the search string back to the name of the active user\n */\n public resetSearchString(): void {\n if (this.active_user) {\n this.search_str = this.active_user.name;\n } else {\n this.search_str = '';\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User): void {\n this.active_user = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n this.resetSearchString();\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User): void {\n this.active_user = value;\n this.search_str = value ? value.name : '';\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouch = fn;\n }\n\n /** Function to display the user's name in the input field */\n public displayFn(user?: User): string {\n return user ? user.name : '';\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'feedback',\n templateUrl: './feedback.component.html',\n styleUrls: ['./feedback.component.scss'],\n})\nexport class FeedbackComponent extends BaseDirective implements OnInit {\n /** Name of the currently active page */\n public current_page: string;\n\n constructor(private _router: Router) {\n super();\n }\n\n public ngOnInit(): void {\n this.timeout('Getting Title', () => this.updateRoute(document.title), 1000);\n this._router.events.subscribe((event: NavigationEnd) => {\n /* istanbul ignore else */\n if (event instanceof NavigationEnd) {\n this.timeout('Getting Title', () => this.updateRoute(document.title));\n }\n });\n }\n\n public updateRoute(location) {\n location = location.substr(0, location.indexOf(' |'));\n this.current_page = location;\n }\n}\n","\n
\n Feedback\n \n \n \n
\n
\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent extends BaseDirective {\n @Input() public icon: ApplicationIcon;\n}\n","
\n {{ icon.content }}\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ActionFieldComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserListFieldComponent,\n UserSearchFieldComponent\n} from './custom-fields';\nimport { IconComponent } from './icon/icon.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ACA_PIPES_MODULE } from '@acaprojects/ngx-pipes';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { FeedbackComponent } from './feedback/feedback.component';\nimport { ActionIconComponent } from './action-icon/action-icon.component';\nimport { PopoutMenuComponent } from './popout-menu/popout-menu.component';\nimport { SearchbarComponent } from './searchbar/searchbar.component';\nimport { UserAvatarComponent } from './user-avatar/user-avatar.component';\nimport { CateringMenuItemComponent } from './bookings/catering/item/item.component';\nimport { PackageOptionsModalComponent } from './bookings/catering/package-options-modal/package-options-modal.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { CngSearchBarComponent } from './cng-search-bar/cng-search-bar.component';\nimport { HoverClassDirective } from './cng-search-bar/hover-class.directive';\n\nconst DECLARATIONS = [\n ActionFieldComponent,\n IconComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserSearchFieldComponent,\n UserListFieldComponent,\n FeedbackComponent,\n ActionIconComponent,\n PopoutMenuComponent,\n SearchbarComponent,\n UserAvatarComponent,\n CateringMenuItemComponent,\n PackageOptionsModalComponent,\n CngSearchBarComponent,\n HoverClassDirective\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ACA_PIPES_MODULE,\n FormsModule,\n ReactiveFormsModule,\n ...MATERIAL_MODULES,\n BaseModule,\n UiModule\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ACA_PIPES_MODULE,\n ...DECLARATIONS,\n ...MATERIAL_MODULES,\n BaseModule,\n ]\n})\nexport class LegacyUiModule {\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nexport interface PopoutAction extends ApplicationIcon {\n /** ID of the action */\n id: string;\n}\n\n@Component({\n selector: 'a-popout-menu',\n templateUrl: './popout-menu.component.html',\n styleUrls: ['./popout-menu.component.scss']\n})\nexport class PopoutMenuComponent extends BaseDirective {\n /** List of available actions */\n @Input() public actions: PopoutAction[] = [];\n /** Emitter for user actions */\n @Output() public action = new EventEmitter();\n /** Whether actions should show */\n public show: boolean;\n\n public close() {\n this.timeout('close', () => {\n this.show = false;\n });\n }\n}\n","\n \n\n\n","import { Component, OnInit, Input, EventEmitter, Output, ViewChild, ElementRef, SimpleChanges, OnChanges } from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-searchbar',\n templateUrl: './searchbar.component.html',\n styleUrls: ['./searchbar.component.scss']\n})\nexport class SearchbarComponent extends BaseDirective implements OnChanges {\n /** Current contents of the searchbar input */\n @Input('value') public value: string;\n /** Current contents of the searchbar input */\n @Input() public placeholder: string;\n /** Whether external changes are being processed */\n @Input() public loading: boolean;\n /** Whether external changes are being processed */\n @Input() public autofocus: boolean;\n /** Emitter for changes to the searchbar value */\n @Output() public valueChange = new EventEmitter();\n /** Input field reference */\n @ViewChild('input', { static: true }) private input_field: ElementRef;\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.autofocus && this.autofocus) {\n this.focusField()\n }\n }\n\n public focusField() {\n /* istanbul ignore else */\n if (this.input_field && this.input_field.nativeElement) {\n this.input_field.nativeElement.focus();\n }\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component, Input } from '@angular/core';\nimport { User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-user-avatar',\n templateUrl: './user-avatar.component.html',\n styleUrls: ['./user-avatar.component.scss']\n})\nexport class UserAvatarComponent {\n /** User to display avatar for */\n @Input() public user: User;\n\n public get initials(): string {\n if (!this.user) {\n return 'NA';\n }\n const parts = this.user.name.split(' ');\n return parts.length > 1\n ? `${parts[0][0]}${parts[parts.length - 1][0]}`\n : this.user.name.slice(0, 2);\n }\n}\n","
\n
{{ initials }}
\n
\n\n \n\n","export * from './lib/loading.actions'\nexport * from './lib/loading.model'\nexport * from './lib/loading.effects'\nexport * from './lib/loading.selectors'\nexport * from '../testing'\n","import {\n createAction,\n createSelector,\n on,\n On,\n props\n} from '@ngrx/store';\nimport {\n LoadingModel,\n wrapLoading\n} from './loading.model';\nimport {\n selectIsLoading,\n selectOptionalError,\n selectOptionalSuccess,\n selectSuccess\n} from './loading.selectors';\nimport { MemoizedSelector } from '@ngrx/store/src/selector';\nimport {\n ActionCreator,\n NotAllowedCheck,\n TypedAction\n} from '@ngrx/store/src/models';\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport interface Payload {\n payload: T\n}\n\nexport type LoadingAction = T & TypedAction\nexport type LoadingActionCreator = T extends null | undefined ?\n ActionCreator TypedAction>\n : ActionCreator) => LoadingAction>\n\ntype ClearAction = ActionCreator TypedAction>\n\ninterface Selectors {\n success: MemoizedSelector\n optionalSuccess: MemoizedSelector\n error: MemoizedSelector\n loading: MemoizedSelector\n model: (TState) => LoadingModel\n}\n\nexport interface LoadingActionObject {\n request: LoadingActionCreator\n success: LoadingActionCreator>\n error: LoadingActionCreator>\n clear: ClearAction,\n ons: On[],\n selectors: Selectors\n}\n\n/**\n * Creates a {@link LoadingActionObject} that contains a set of ActionCreators\n * for request, success, error, loading, and clear data. Also, it contains\n * the necessary On reducers and selectors in order to properly connect them in\n * a standardized way to data in the application.\n *\n * `TState` is the type of data on your reducer, not global store.\n * `TRequest` is an object type to use in request methods.\n * `TSuccess` is the object type of the T parameter on `LoadingModel`.\n *\n * This assumes you have state represented by:\n * ```typescript\n * interface SomeState {\n * stateKey: LoadingModel\n * }\n * ```\n *\n * To dispatch an action:\n * ```typescript\n *\n * // request parameters depend on the object type used as second type parameter\n * // in createLoadingAction\n * this.store.dispatch(someLoadingAction.request())\n *\n * // action created with createLoadingAction\n * this.store.dispatch(someLoadingAction.request({\n * name: 'Andrew G',\n * age: 24\n * }))\n *\n * ```\n *\n * The generated selectors only select data from its fractured state, not the global\n * store. In order to use them, make sure you {@link select} the global state\n * before using them:\n *\n * ```typescript\n *\n * this.store.pipe(\n * select(selectSomeState),\n * select(someLoadingAction.selectors.success)\n * ).subscribe(next => {\n *\n * })\n *\n * ```\n *\n * @param actionPrefix - Prefixes actions to uniquely identify them.\n * @param stateKey - The field within the reducer state to set data on.\n */\nexport const createLoadingAction = (\n actionPrefix: string,\n stateKey: keyof TState\n): LoadingActionObject => {\n const buildAction = (postfix: string) => `[${actionPrefix}] ${postfix}`;\n // @ts-ignore\n const request = createAction(buildAction('request'), props());\n const success = createAction(buildAction('success'), props>());\n const error = createAction(buildAction('error'), props>());\n const clear = createAction(buildAction('clear'));\n const ons: On[] = [\n on(request, (state: TState & HashMap>, action: LoadingAction) =>\n ({\n ...state,\n [stateKey]: wrapLoading(state[stateKey]).loading()\n })),\n on(success, (state: TState & HashMap>, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.success(action.payload)\n })),\n // some reason specifying state like in success and request does not work.\n on(error, (state: any, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.error(action.payload)\n })),\n on(clear, () => ({\n ...this.state,\n [stateKey]: LoadingModel.empty()\n }))\n ];\n const selectData = (state: TState) => {\n if (!state) {\n console.warn('[LoadingActions] State is empty for key', stateKey);\n }\n return wrapLoading(state?.[stateKey] as unknown as LoadingModel);\n };\n const selSuccess = createSelector, TSuccess>(\n selectData,\n selectSuccess\n );\n const selOptionalSuccess = createSelector(\n selectData,\n selectOptionalSuccess\n );\n const selError = createSelector(\n selectData,\n selectOptionalError\n );\n const selLoading = createSelector(\n selectData,\n selectIsLoading\n );\n return {\n request,\n success,\n error,\n clear,\n ons,\n selectors: {\n success: selSuccess,\n optionalSuccess: selOptionalSuccess,\n error: selError,\n loading: selLoading,\n model: selectData\n }\n };\n};\n","import {\n Actions,\n ofType\n} from '@ngrx/effects';\n\nimport { \n LoadingAction,\n LoadingActionObject\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n catchError,\n flatMap,\n map\n} from 'rxjs/operators';\nimport {\n Observable,\n of\n} from 'rxjs';\nimport { TypedAction } from '@ngrx/store/src/models';\n\n/**\n * This creates an effect to use in Effects classes. This coordinates a simple\n * success and error payload effect.\n * @param actions - The actions object\n * @param actionObject - The created createLoadingAction object.\n * @param caller - Define what API method or asynchronous operation is needed to\n * run this. Return TSuccess.\n */\nexport const createLoadingEffect = (\n actions: Actions, actionObject: LoadingActionObject,\n caller: (action: LoadingAction) => Promise): Observable> => actions.pipe(\n ofType(actionObject.request),\n flatMap((action) => caller(action as LoadingAction)),\n map((response: TSuccess) => actionObject.success({ payload: response })),\n catchError(err => {\n return of(actionObject.error({ payload: err }));\n })\n);\n","/* eslint-disable no-underscore-dangle,no-useless-constructor */\n/**\n * Wraps around the typical data objects we write for success, error, loading, and empty state. This convenience\n * wrapper consolidates all of that logic into a handy wrapper.\n */\nexport class LoadingModel {\n static empty = () => new LoadingModel(false, false, false, undefined);\n\n static success = (success?: T): LoadingModel =>\n new LoadingModel(false, false, true, success);\n\n static error = (error?: Error, optionalSuccess?: T): LoadingModel =>\n new LoadingModel(false, true, false, optionalSuccess, error);\n\n /**\n * Mutates the model with a success state, preserving other state fields.\n * @param success - override success state.\n */\n mutate = (\n success: T2 | null) => new LoadingModel(\n this.isLoading,\n this.hasError,\n !!success,\n !success ? undefined : success\n );\n\n loading = (success: T | null = this.success) =>\n new LoadingModel(\n true,\n false,\n !!success && this.hasSuccess,\n !success ? undefined : success\n );\n\n public get success(): T {\n return this._success as T;\n }\n\n public get optionalSuccess(): T | undefined {\n return this._success;\n }\n\n constructor(\n public isLoading: boolean,\n private hasError: boolean,\n private hasSuccess: boolean,\n private _success?: T,\n public error?: Error\n ) {\n }\n\n isEmpty = () => !this.isSuccess() && !this.isError();\n\n hasLoaded = () => !this.isEmpty() && !this.isLoading;\n\n isSuccess = () => this.hasSuccess;\n\n isError = () => this.hasError;\n\n shouldLoad = () => !this.isSuccess() && !this.isLoading;\n\n public toString = () =>\n `Loading: ${this.isLoading}, Success: ${this.hasSuccess}:**${this._success}**, ` +\n `Error: ${this.hasError}:${this.error}`;\n}\n\n/**\n * Wraps an object that conforms to LoadingModel to restore object loss from\n * hydrating state during development.\n */\nexport const wrapLoading = (loading: any): LoadingModel => {\n if (loading instanceof LoadingModel) {\n return loading;\n } else {\n if (!loading) {\n return LoadingModel.empty();\n } else {\n return new LoadingModel(\n loading.isLoading || false,\n loading.hasError || false,\n loading.hasSuccess || false,\n loading._success,\n loading.error\n );\n }\n }\n};\n","import { LoadingModel, wrapLoading } from './loading.model';\n\nexport const selectSuccess = (state: LoadingModel) =>\n wrapLoading(state).success;\nexport const selectOptionalSuccess = (state: LoadingModel) =>\n wrapLoading(state).optionalSuccess;\nexport const selectIsLoading = (state: LoadingModel) =>\n wrapLoading(state).isLoading;\nexport const selectIsSuccess = (state: LoadingModel) =>\n wrapLoading(state).isSuccess();\nexport const selectOptionalError = (state: LoadingModel) =>\n wrapLoading(state).error;\nexport const selectIsError = (state: LoadingModel) =>\n wrapLoading(state).isError();\nexport const selectHasLoaded = (state: LoadingModel) =>\n wrapLoading(state).hasLoaded();\nexport const selectIsEmpty = (state: LoadingModel) =>\n wrapLoading(state).isEmpty();\n\n","import {\n Observable,\n Subject\n} from 'rxjs';\nimport { Action } from '@ngrx/store';\nimport { Actions } from '@ngrx/effects';\nimport { TypedAction } from '@ngrx/store/src/models';\nimport { take } from 'rxjs/operators';\nimport {\n LoadingActionObject\n} from '../src/lib/loading.actions';\n\nexport const generateMockActions = () => {\n const dispatcher = new Subject();\n return {\n dispatcher,\n actions: new Actions(dispatcher)\n };\n};\n\n/**\n * Simple verifier that checks if the request action results in a success returned.\n */\nexport const verifyActionSuccess = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n data: TSuccess,\n payload?: TRequest,\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.success({ payload: options.data }));\n};\n\n/**\n * Simple verifier that checks if the request action results in a failure returned.\n */\nexport const verifyActionError = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n error: Error,\n payload?: TRequest\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.error({ payload: options.error }));\n};\n","export * from './effects.testing'\n","import { createLoadingAction } from '../../../loading/src/lib/loading.actions';\nimport { Space } from '../../../data-common/src/lib/spaces/space.class';\nimport {\n RoomQueryOptions,\n RoomState,\n RoomStoreState\n} from './rooms.types';\nimport {\n createAction,\n createSelector,\n props\n} from '@ngrx/store';\n\nexport const roomStateSelector = (state: RoomStoreState) => state.rooms;\n\nexport const loadRoomsWithQuery = createAction('[Rooms] Load Rooms with query', props());\n\nexport const loadRoomsForResults = createLoadingAction('Rooms', 'query');\n\nexport const loadRoomsForResultsMap = createLoadingAction('Rooms for map', 'query');\n\n\nexport const loadLaterThatDayResults = createLoadingAction('Later Rooms', 'later');\n\nexport const loadNextDayResults = createLoadingAction('Next Day Rooms', 'next');\n\nexport const loadByIdResults = createLoadingAction('By Id Rooms', 'byid');\n\nexport const selectRoomResultsSuccess = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.optionalSuccess);\n\nexport const loadDiffSizeResults = createLoadingAction('Different Size Rooms', 'size');\n","export * from './lib/storage.module';\nexport * from './lib/localstorage.wrapper'\n","export class LocalStorageWrapper {\n\n constructor(private prefix: string) {\n }\n\n protected setValue(key: string, value: string) {\n localStorage.setItem(`${this.prefix}.${key}`, value);\n }\n\n protected getValue(key: string): string | null {\n return localStorage.getItem(`${this.prefix}.${key}`) as string | null;\n }\n\n protected removeValue(key: string) {\n localStorage.removeItem(`${this.prefix}.${key}`);\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class StorageModule {\n}\n","export * from './lib/ui.module';\nexport * from './lib/types';\nexport * from './lib/base-template.component';\nexport * from './lib/recurrence-pattern-form/recurrence-pattern-form.component';\nexport * from './lib/recurrence-booking-form/recurrence-booking-form.component';\nexport * from './lib/conflicts-modal/conflicts-modal.component'\nexport * from './lib/override-changes-modal/override-changes-modal.component'\nexport * from './lib/date-tz-calendar-widget/date-tz-calendar-widget.component';\nexport * from './lib/date-tz-date-picker/date-tz-date-picker.component';\nexport * from './lib/date-tz-duration-field/date-tz-duration-field.component';\nexport * from './lib/date-tz-time-field/date-tz-time-field.component';\nexport * from './lib/aca-date-picker/aca-date-picker.component';\nexport * from './lib/conflict-alert-modal/conflict-alert-modal.component';\nexport * from './lib/tooltip/tooltip.enums';\nexport * from './lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nexport * from './lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n","import { Component, OnInit, Input, Output, OnChanges, SimpleChanges, forwardRef, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDatePickerOptions {\n /** Unix timestamp with millisecond. First selectable date */\n from?: number;\n /** Unix timestamp with millisecond. Last selectable date */\n to?: number;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: number;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'aca-date-picker',\n templateUrl: './aca-date-picker.component.html',\n styleUrls: ['./aca-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AcaDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class AcaDatePickerComponent implements OnInit, OnChanges, ControlValueAccessor {\n /** CSS class to add to the root element of the component */\n @Input() public klass = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDatePickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n /** Display the last selected day as active */\n @Input() public show_last_selection?: boolean = true\n\n public date: number = DateNow(new Date()).ms;\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private from: DateTZ;\n /** Last selectable date */\n private to: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n /** ID of the timer used for changing the month */\n private _change_timer: number;\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.date = item.value;\n if (this._onChange) {\n this._onChange(this.date);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date\n */\n public updateDate(): void {\n \n if (!this.date) {\n return;\n }\n const now = DateNow(new Date()).startOfValue('month');\n const date_ = new DateTZ({date: this.date})\n const date = date_.startOfValue('month');\n if (date.valid) {\n const difference = date.dateDiff(now, 'months', 'months');\n if (this.offset !== difference) {\n this.offset = difference;\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.from) {\n const date_ = new DateTZ({date: this.options.from})\n this.from = date_.startOfValue('day');;\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.from.startOfValue('month');\n this.min_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.from) {\n this.from = null;\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.to) {\n const date_ = new DateTZ({date: this.options.to})\n this.to = date_.startOfValue('day');\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.to.startOfValue('month');\n this.max_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.to) {\n this.to = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n if (!this.date) {\n return;\n }\n const date = DateNow(new Date()).addValue({ months : this.offset });\n const active = new DateTZ({date: this.date});\n let start = date.setValue({ day: 1 }).setValue({ weekday: 7 }).subtractValue({ weeks: 1 });\n const end_ = new DateTZ({date: start.ms})\n const end = end_.addValue({ weeks: 1 }).endOfValue('month').addValue({ days: 2 }).endOfValue('week');\n this.date_list = [];\n while (start.isBeforeDate(end) || start.isSameDate(end, 'day')) {\n this.date_list.push({\n value: start.ms,\n display: start.formatDate('d'),\n active: this.show_last_selection && active.isSameDate(start, 'day'),\n non_month: !date.isSameDate(start, 'month'),\n count: this.counters ? this.counters[start.formatDate('yyyy-MM-dd')] || 0 : 0,\n disabled: (this.from ? start.isBeforeDate(this.from, 'day') : false) || (this.to ? start.isAfterDate(this.to, 'day') : false),\n today: DateNow(new Date()).isSameDate(start, 'day')\n });\n start = start.addValue({ days : 1 });\n }\n this.month_name = date.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = DateNow(new Date()).startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days : 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n if (this._change_timer) {\n clearTimeout(this._change_timer);\n }\n this._change_timer = setTimeout(() => {\n const new_offset = this.offset + value;\n const now = DateNow(new Date())\n const date = now.addValue({ months : new_offset, days: now.dateMonth === 2 ? 2 : 0 }); //add 2 days if month is february to avoid calc errors\n if (this.from && date.isBeforeDate(this.from, 'month')) { return; }\n if (this.to && date.isAfterDate(this.to, 'month')) { return; }\n this.offset = new_offset;\n this.month.emit(this.offset);\n this.generateMonth();\n this._change_timer = null;\n }, 100);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const date = new DateTZ({date: this.date});\n const offset = this.offset;\n this.offset = DateNow(new Date()).dateDiff(date, 'months', 'months');\n if (offset !== this.offset) {\n this.generateMonth();\n }\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.updateDate();\n this.generateMonth();\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n
\n
\n
\n
\n
{{month_name}}
\n
= max_offset\" (click)=\"changeMonth(1)\" (touchend)=\"changeMonth(1)\">\n
\n
\n
\n
\n
{{item}}
\n
\n
\n
\n
\n {{item.display}}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n
\n
\n
\n
","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges\n} from '@angular/core';\n\nexport enum AlertMode {\n Warning = 'warning',\n Coachmark = 'coachmark',\n BlueCoachmark = 'blue-coachmark',\n Error = 'error'\n}\n\nexport enum AlertBannerDisplay {\n /**\n * New UI\n */\n V2 = 'v2',\n\n /**\n * Default, legacy ui.\n */\n V1 = 'v1',\n}\n\n@Component({\n selector: 'mck-alert-banner',\n template: `\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n \n
\n `,\n styleUrls: ['./alert-banner.component.scss']\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n\n @Input()\n public mode: AlertMode = AlertMode.Warning;\n\n @Output()\n public close = new EventEmitter();\n\n @Output()\n public action = new EventEmitter();\n\n @Input()\n public message: string;\n\n @Input()\n public buttonText: string;\n\n @Input()\n public showClose = true;\n\n @Input()\n public display: AlertBannerDisplay = AlertBannerDisplay.V1;\n\n public iconPath: string = 'assets/icon/warning-yellow.svg';\n public materialColor: string = 'black';\n public closeIcon: string = 'close_outline.svg';\n\n public ngOnInit(): void {\n this._onModeChange();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.mode) {\n this._onModeChange();\n }\n }\n\n private _onModeChange() {\n this.iconPath = 'assets/icon/warning-yellow.svg';\n this.closeIcon = 'close_outline.svg';\n switch (this.mode) {\n case AlertMode.Warning:\n this.materialColor = 'black';\n break;\n case AlertMode.Coachmark:\n this.materialColor = 'coachmark';\n this.closeIcon = 'close_outline_coachmark.svg';\n break;\n case AlertMode.BlueCoachmark:\n this.iconPath = 'assets/icon/info-bg-dark.svg'\n this.materialColor = 'blue-coachmark'\n break;\n case AlertMode.Error:\n this.iconPath = 'assets/img/error-icon.svg'\n this.materialColor = 'white'\n break;\n default:\n this.materialColor = 'black';\n }\n }\n\n}\n","import {\n Component,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NgControl\n} from '@angular/forms';\nimport { SelectOption } from '../types';\nimport {\n BehaviorSubject,\n combineLatest,\n from,\n Subject\n} from 'rxjs';\nimport {\n COMMA,\n ENTER\n} from '@angular/cdk/keycodes';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport {\n distinctUntilChanged,\n map,\n take\n} from 'rxjs/operators';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'mck-autocomplete-chip-select-item',\n template: `\n
\n \n {{label}}\n \n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n \n \n \n {{selected.shortDisplay}}\n close\n \n \n \n \n
\n \n \n {{option.dropdownOverride || option.display}}\n \n \n
\n
\n \n Clear\n \n \n Confirm\n \n
\n \n \n {{errorMessage}}\n
\n `,\n styleUrls: ['./auto-complete-chip-select-item.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AutoCompleteChipSelectItemComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor, OnDestroy {\n\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n @ViewChild('componentInput')\n componentInput: HTMLInputElement;\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n feedbackInput?: boolean;\n\n @Input()\n loading?: boolean;\n\n @Input()\n placeHolder: string;\n\n @Input()\n options: Subject[]>;\n\n @Input()\n selectedOptions: Subject[]>;\n\n @Input()\n useCTAs?: boolean;\n\n @Output()\n optionSelected = new EventEmitter>();\n\n @Output()\n feedbackOutput = new EventEmitter();\n\n @Output()\n chipsCleared: EventEmitter = new EventEmitter();\n\n @Output()\n onClickConfirm: EventEmitter = new EventEmitter();\n\n /**\n * If true, only allow 1 group at a time to get selected. Show others as disabled.\n */\n @Input()\n selectOnlyOneGroup = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input() public localFilter: boolean = true;\n\n /**\n * If error exists, a message.\n */\n @Input()\n errorMessage?: string;\n\n @Input()\n hideDropdownCarret?: boolean;\n\n @Input()\n displayCTA?: boolean;\n\n private selectOnlyOneGroupChange = new BehaviorSubject(false);\n\n separatorKeysCodes = [ENTER, COMMA];\n\n public filterFormControl: FormControl = new FormControl();\n\n public focused = false;\n public mobileFullScreen = false;\n\n public autocompleteOptions = new BehaviorSubject[]>([]);\n public filteredAutocompleteOptions = new BehaviorSubject[]>([]);\n\n /** List shown to user, filters children if a group header is added **/\n public chipOptions = new BehaviorSubject[]>([]);\n\n /** Form control on change handler */\n private _onChange?: (_: SelectOption[]) => void;\n /** Form control on touch handler */\n private _onTouch?: (_: string) => void;\n\n private value = new BehaviorSubject[]>([]);\n\n public enableCTAs: boolean = false\n\n public hasChips: boolean = false;\n\n constructor(@Self() @Optional() private control: NgControl) {\n super();\n if (this.control) {\n this.control.valueAccessor = this;\n }\n }\n\n public get invalid(): boolean {\n return this.control ? this.control.invalid : false;\n }\n\n public get showError(): boolean {\n if (!this.control) {\n return false;\n }\n\n const { dirty, touched } = this.control;\n\n return this.invalid ? (dirty && touched) : false;\n }\n\n public iconFillClass(color?: string): string {\n return color === 'external' ? 'mck-icon-fill-gray' : 'mck-icon-fill-white'\n }\n\n ngOnInit() {\n this.subscription('autoCompleteOptions', combineLatest([\n this.options,\n this.selectedOptions,\n this.selectOnlyOneGroupChange\n ])\n .pipe(\n map(([options, selectedOptions, selectOnlyOneGroup]) => {\n this.hasChips = !!selectedOptions.length;\n return options.map(option => {\n const selected = !!selectedOptions.find(s => s.value === option.value);\n let enabled = true;\n if (selectOnlyOneGroup) {\n // find first group item in selection\n const selectedGroupHeader = selectedOptions.find(s => s.groupHeader || s.groupId === option.groupId);\n\n // if no options chosen, enable it, otherwise only allow selections from other options.\n enabled =\n selectedOptions.length === 0 ||\n (selectedGroupHeader ? selectedGroupHeader.groupId === option.groupId : false);\n this.enableCTAs = selectedOptions.length !== 0\n }\n\n return {\n ...option,\n enabled,\n selected\n } as SelectOption;\n });\n })\n ).subscribe(next => {\n const options = next.sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n this.autocompleteOptions.next(options);\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(this.filterFormControl.value?.trim()));\n }));\n this.subscription('filterFormControlChanges',\n this.filterFormControl.valueChanges.subscribe(value => {\n if (this.localFilter && value.length) {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(value));\n } else {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions());\n }\n }));\n this.subscription('chipOptions', this.selectedOptions\n .pipe(map(selectedOptions => {\n // find group headers and check if children are part of that group.\n // if part of group, filter them out as redundant.\n const groupHeaders = selectedOptions.filter(s => s.groupHeader) || [];\n return selectedOptions.filter(s => s.groupHeader || s.groupChild && !(groupHeaders.find(g => g.groupId === s.groupId)));\n }))\n .subscribe(next => {\n this.chipOptions.next(next);\n }));\n\n this.subscription('formData', this.selectedOptions\n .pipe(map(selected => {\n // group headers always contain children, so only pick out children for data\n return selected;\n }))\n .subscribe(next => {\n this.value.next(next);\n }));\n\n // tie value changes to change.\n this.subscription('valueChanges', this.value\n .pipe(distinctUntilChanged())\n .subscribe(next => {\n if (this._onChange) {\n // rewrote this to avoid read only error\n const values = [];\n next.forEach((v, i) => {\n const value = { ...v };\n if (v.meta?.user) {\n value.display = v.meta.user.name;\n }\n values.push(value);\n });\n this._onChange(values);\n }\n }));\n\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n getFilteredAutocompleteOptions(searchString: string = '') {\n // Exact matches of the groupId or display value\n const exactMatches = this.autocompleteOptions.value.filter(o => {\n if (searchString && searchString.length) {\n return o.groupId.toLowerCase().indexOf(searchString.toLowerCase()) === 0 || o.display.toLowerCase().indexOf(searchString.toLowerCase()) === 0;\n }\n return o.groupId && o.display;\n });\n // Fuzzier search of the dropdownOverride field\n const moreOptions = this.autocompleteOptions.value.filter(o => {\n if (o?.dropdownOverride?.length && searchString) {\n const match = o.dropdownOverride?.toLowerCase().indexOf(searchString.toLowerCase()) > -1;\n // only return found locations that don't exist in exactMatches.\n return match && !exactMatches.find(e => {\n return e.value === o.value\n });\n }\n return false;\n });\n\n // Merge the two result sets\n let joinedOptions = exactMatches.concat(moreOptions).sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n\n // Create a 1D array of the groupId\n const groupIds = joinedOptions.map(o => o.groupId);\n // Get a deduped list of the group parents\n const parents = this.autocompleteOptions.value.filter(o => {\n return o?.groupHeader && groupIds.indexOf(o.groupId) !== -1;\n });\n\n // Remove the parents from the joinedOptions and merge with the reduced parents set, and then sort by groupId.\n // Resulting array sets the parents first in order so the widget renders properly.\n const filteredAutocompleteOptions = parents.concat(joinedOptions.filter(jo => !!jo.dropdownOverride)).sort((a, b) => {\n return b.groupId > a.groupId ? -1 : 1;\n });\n return filteredAutocompleteOptions;\n }\n\n loseFocus(): void {\n this.mobileFullScreen = false;\n this.focused = false;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectOnlyOneGroup) {\n this.selectOnlyOneGroupChange.next(this.selectOnlyOneGroup);\n }\n }\n\n keyedInput(matInput: string) {\n if (this.feedbackInput) {\n this.feedbackOutput.emit(matInput);\n }\n }\n\n selectOption(value: string) {\n this.options.pipe(\n take(1),\n map((options: SelectOption[]) => options.find(o => o.value === value))\n ).subscribe(next => {\n if (next) {\n this.optionSelected.emit(next);\n }\n });\n }\n\n removeOption(value: SelectOption) {\n this.optionSelected.emit(value);\n if (this.useCTAs) {\n this.onClickConfirm.emit();\n }\n\n }\n\n clearSelections() {\n this.selectedOptions.next([]);\n this.chipsCleared.emit();\n }\n\n onClickArrow() {\n // only close events we allow arrow to close panel.\n if (this.focused) {\n this.onFocus(false);\n }\n }\n\n onPanelFocusChange(focusIn: boolean) {\n this.onFocus(focusIn, true);\n }\n\n onFocus(focusIn: boolean, fromPanel?: boolean) {\n if (!focusIn && this.useCTAs) {\n this.onClickConfirm.emit();\n }\n // Only for location input???\n if (this.localFilter && fromPanel && focusIn) {\n // open on focus, mobile needs a refocus\n this.mobileFullScreen = true;\n this.timeout('showDefaults', () => {\n // All results do not show as expected unless I focus again.\n // Something about the mobile styles.\n this.onFocus(true);\n }, 100)\n }\n\n if (this.feedbackInput && !fromPanel) {\n // clear input when input creates options\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n this.feedbackOutput.emit('');\n }\n\n if (this.focused !== focusIn) {\n this.focused = focusIn;\n // clear on close\n if (!focusIn) {\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n }\n if (!fromPanel) {\n if (focusIn) {\n this.trigger.openPanel();\n } else {\n this.trigger.closePanel();\n // close the mobile full screen\n this.loseFocus();\n }\n }\n }\n }\n\n onChanged(value: SelectOption, event: MatCheckboxChange) {\n this.optionSelected.emit(value);\n }\n\n add(event: MatChipInputEvent) {\n // reset\n if (event.input) {\n event.input.value = '';\n }\n this.filterFormControl.setValue('');\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n // TODO: disabled not implemented yet.\n this.disabled = isDisabled;\n }\n\n writeValue(obj: SelectOption[] | undefined): void {\n // update selected options when this value is written\n this.options?.pipe(\n take(1),\n map((options: SelectOption[]) => {\n return options.filter(o => obj ? !!obj.find(spl => o.value === spl.value) : false );\n })\n ).subscribe(next => {\n this.selectedOptions.next(next);\n });\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null && !event.srcElement.classList.contains('mat-form-field-autofill-control')) {\n this.onFocus(false);\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\nimport { SelectOption } from '../types';\n\n/**\n * Patch orphaned SelectOption children into acting as their own group headers.\n *\n * This intends to help in the common scenario where filters have (for whatever\n * reason) prevented the child's usual group header from appearing.\n */\n@Pipe({\n name: 'groupHeaderPatch',\n})\nexport class GroupHeaderPipe implements PipeTransform {\n transform(items: SelectOption[]): SelectOption[] {\n if (!items) {\n return [];\n }\n\n return items.map(v => {\n const hasHeader = !!items.find(i => i.groupHeader && i.groupId === v.groupId);\n return {\n ...v,\n displayAsHeader: !hasHeader,\n }\n })\n }\n\n}\n","import { Component, Input, Output, forwardRef, SimpleChanges, OnChanges, OnInit, EventEmitter, ViewChild, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\nimport {\n BehaviorSubject\n} from 'rxjs';\n\n/**\n * @title Autocomplete filtering select of a single option via text search.\n */\n@Component({\n selector: 'mck-autocomplete-select-option',\n templateUrl: 'auto-complete-select-option.component.html',\n styleUrls: ['auto-complete-select-option.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutoCompleteSelectOptionComponent),\n multi: true\n }\n ],\n})\nexport class AutoCompleteSelectOptionComponent implements OnInit, OnChanges, ControlValueAccessor, OnDestroy{\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n @Input()\n public resetInput: number | undefined;\n\n @Input()\n public placeholder: string;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Output()\n public filteredOptionsChange = new EventEmitter[]>();\n\n @Output()\n public inputTextChange = new EventEmitter();\n\n @Output() emptyBoxEvent = new EventEmitter();\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n filterFormControl = new FormControl();\n filteredOptions: Observable[]>;\n\n /** The selected value */\n public value = new BehaviorSubject('');\n\n /** Available options to search / select from */\n public _options = new BehaviorSubject[]>(this.options);\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n ngOnInit() {\n this.updateFilteredOptions();\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n // Watch and apply changes from the parent component.\n if (changes.options || changes.selectedValue) {\n if (changes.options && !changes.selectedValue) {\n this.filterFormControl.setValue('')\n }\n this.updateFilteredOptions();\n }\n if (changes.resetInput) {\n this.filterFormControl.setValue('');\n this.updateFilteredOptions();\n }\n \n }\n\n private updateFilteredOptions() {\n this.filteredOptions = this.filterFormControl.valueChanges\n .pipe(\n startWith(''),\n map(value => typeof value === 'string' ? value : value && value?.display ? value.display : ''),\n map(name => name ? this._filter(name) : this.options.slice())\n );\n }\n\n displayFn(data: SelectOption): string {\n return data && data?.display ? data.display : '';\n }\n\n private _filter(display: string): SelectOption[] {\n const filterValue = display.toLowerCase();\n // return all the matches found\n const filtered = this.options.filter(option => {\n // split this input and index both, if both\n // match return true.\n if (filterValue.includes(' ')) {\n const filterValues =filterValue.split(' ');\n let matchesAll = true;\n for (let x = 0; x < filterValues.length; x++) {\n if (option.display.toLowerCase().indexOf(filterValues[x]) === -1) {\n matchesAll = false;\n }\n }\n if (matchesAll) {\n return true;\n }\n }\n // match the whole string\n return option.display.toLowerCase().indexOf(filterValue) > -1;\n });\n this.inputTextChange.emit(filterValue);\n this.filteredOptionsChange.emit(filtered);\n return filtered;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: SelectOption): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value.value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n public onChangeInput() {\n if (this.filterFormControl.value === '') {\n this.emptyBoxEvent.emit(true);\n }\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null ) {\n this.trigger.closePanel();\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n\n}","
\n {{label}}\n \n \n \n \n {{option.shortDisplay || option.display}}\n \n \n \n
","import {\n AfterViewInit,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n/**\n * A helper class for rendering embedded views (ng-template) as standalone components.\n *\n * If the view is lazy and does not render upon initialization,\n * it attempts embedding view again later.\n *\n * When testing a component directly that extends this class, its best to wrap the component\n * in a wrapper component for testing so that it can render itself.\n */\nexport class BaseTemplateComponent extends BaseDirective implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild(TemplateRef, { static: true })\n public template: TemplateRef;\n\n private isRendered = false;\n\n constructor(private vcRef: ViewContainerRef) {\n super();\n }\n\n public ngOnInit(): void {\n // try early rendering\n this.attemptViewEmbed();\n }\n\n public attemptViewEmbed() {\n if (this.template && !this.isRendered) {\n this.isRendered = true;\n this.vcRef.createEmbeddedView(this.template);\n return true;\n }\n return false;\n }\n\n public ngAfterViewInit(): void {\n if (!this.isRendered) {\n console.log('View not rendered yet, attempting to post initialization');\n setTimeout(() => {\n console.log('Timeout ended, trying again', this.template);\n if (!this.attemptViewEmbed()) {\n console.log('Attempting render in after view initialization');\n setTimeout(() => {\n if (!this.attemptViewEmbed()) {\n console.error('FAILED TO LOAD TEMPLATE');\n }\n }, 1000);\n }\n });\n }\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n this.isRendered = false;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'catering-drop-modal',\n templateUrl: './catering-drop-modal.component.html',\n styleUrls: ['./catering-drop-modal.component.scss']\n})\nexport class CateringDropComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onConfirm(): void {\n this.dialogRef.close(true);\n}\n\nonCancel(): void {\n this.dialogRef.close(false);\n}\n}\n","
\n

Catering conflict

\n
\n\n
\n
\n

Proceed without catering?

\n
\n
\n
\n\n
\n \n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input\n } from \"@angular/core\";\n import { DropdownPanel } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select-options\",\n templateUrl: \"./cng-select-options.component.html\",\n styleUrls: [\"./cng-select-options.component.scss\"]\n })\n export class CngSelectOptionsComponent implements DropdownPanel {\n @ViewChild(TemplateRef) templateRef: TemplateRef;\n @Output() closed = new EventEmitter();\n @Input() ddWidth: string;\n \n constructor() {}\n }\n ","\n
\n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input,\n OnInit\n } from \"@angular/core\";\n import { DropdownPanel, DropdownOpion } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select\",\n templateUrl: \"./cng-select.component.html\",\n styleUrls: [\"./cng-select.component.scss\"]\n })\n export class CngSelectComponent implements OnInit {\n @Input() data: any;\n public isClosed: boolean = false;\n public selected: DropdownOpion;\n constructor() {\n\n }\n ngOnInit(): void {\n this.selected = this.data.defaultSelected;\n }\n\n public optionSelected(item: DropdownOpion) {\n // this.selected = item;\n this.data.defaultSelected = item;\n this.data?.onChangeCallback && this.data?.onChangeCallback(item);\n }\n }\n ","\n\n
\n {{data?.defaultSelected?.display}}\n
\n \n
\n
\n\n
{{item?.display}}
\n
","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n ViewContainerRef\n } from '@angular/core';\n import { DropdownPanel } from './dropdown-panel';\n import { Overlay, OverlayRef } from '@angular/cdk/overlay';\n import { TemplatePortal } from '@angular/cdk/portal';\n import { merge, Observable, Subscription } from 'rxjs';\n \n @Directive({\n selector: '[dropdownTriggerFor]',\n host: {\n '(click)': 'toggleDropdown()'\n }\n })\n export class DropdownTriggerForDirective implements OnDestroy, AfterViewInit, OnInit {\n private isDropdownOpen = false;\n private overlayRef: OverlayRef;\n private dropdownClosingActionsSub = Subscription.EMPTY;\n \n @Input('dropdownTriggerFor') public dropdownPanel: DropdownPanel;\n @Output() isPanelOpened = new EventEmitter();\n constructor(\n private overlay: Overlay,\n private elementRef: ElementRef,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {\n \n }\n ngOnInit(): void {\n // const cngSelectEl = this.elementRef.nativeElement.nextElementSibling; \n // const parentWidth = this.elementRef.nativeElement.offsetWidth; \n // this.renderer.setStyle(cngSelectEl, 'width', `${parentWidth}px`);\n }\n ngAfterViewInit(): void {\n \n }\n\n \n toggleDropdown(): void {\n this.isDropdownOpen ? this.destroyDropdown() : this.openDropdown();\n \n }\n \n openDropdown(): void {\n let {ddWidth} = this.dropdownPanel;\n this.dropdownPanel.ddWidth = ddWidth !=='' ? ddWidth : `${this.elementRef.nativeElement.offsetWidth}px`;\n this.isDropdownOpen = true;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8\n }\n ])\n });\n \n const templatePortal = new TemplatePortal(\n this.dropdownPanel.templateRef,\n this.viewContainerRef\n );\n this.overlayRef.attach(templatePortal);\n \n this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(\n () => this.destroyDropdown()\n );\n }\n \n private dropdownClosingActions(): Observable {\n const backdropClick$ = this.overlayRef.backdropClick();\n const detachment$ = this.overlayRef.detachments();\n const dropdownClosed = this.dropdownPanel.closed;\n \n return merge(backdropClick$, detachment$, dropdownClosed);\n }\n \n private destroyDropdown(): void {\n if (!this.overlayRef || !this.isDropdownOpen) {\n return;\n }\n \n this.dropdownClosingActionsSub.unsubscribe();\n this.isDropdownOpen = false;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef.detach();\n }\n \n ngOnDestroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n }\n }\n ","import {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ViewChild,\n AfterViewInit,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { CollapseService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'mck-collapse-header',\n template: `\n \n \n {{title}} \n
\n
\n \n
\n \n
\n
\n {{description}}\n \n \n \n \n `,\n styleUrls: ['./collapse-header.component.scss'],\n})\nexport class CollapseHeaderComponent implements OnInit, OnDestroy {\n\n @Input() title: string;\n @Input() description: string;\n @Input() isLoading = false;\n @Input() expandedIds: string[] = [];\n @Output() updateSectionIdOnOpen = new EventEmitter<{ status: string, id: string }>(); // Emit the id of the opened result section\n\n @ViewChild('expansionPanel') expansionPanel: MatExpansionPanel;\n\n public isExpanded = new BehaviorSubject(false);\n private collapseSubscription: Subscription;\n\n constructor(private collapseService: CollapseService) {}\n\n ngOnInit(): void {\n this.collapseSubscription = this.collapseService.collapse$.subscribe(() => {\n if (this.expansionPanel) {\n this.expansionPanel.close(); // Close the panel\n }\n });\n }\n\n // Update opened section id and emit the id of the opened result section to the parent component \n public updateOpenedSectionId(isOpen: string) {\n this.updateSectionIdOnOpen.emit({ status: isOpen, id: this.expandedTitleId });\n }\n\n\n \n /**\n * Gets the expanded title as an id by removing parentheses and replacing spaces with underscores.\n * @returns The expanded title.\n */\n public get expandedTitleId(): string {\n return this.title?.split('(')[0]?.split(' ')?.join('_') ;\n }\n\n ngOnDestroy(): void {\n this.collapseSubscription.unsubscribe();\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nexport interface RoomAvaibilityModalData {\n\theaderText: string,\n\tmessage: string,\n\tbuttonLabel: string,\n\tcallback: Function,\n shouldClose: boolean\n}\n\n@Component({\n selector: 'conflict-alert-modal',\n templateUrl: 'conflict-alert-modal.component.html',\n styleUrls: ['./conflict-alert-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConflictAlertModalComponent implements OnInit {\n constructor(public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public dialogData: RoomAvaibilityModalData) {\n }\n ngOnInit(): void {}\n\n public done() {\n this.dialogData?.callback(); this.dialogRef.close()\n }\n}\n","
\n \n
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{{dialogData?.headerText}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{dialogData?.message}}
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t\t \n\t\t\t\n
","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {DialogEvent} from '@mckinsey-converge/base';\nimport {DateTZ, isToday} from '@mckinsey-converge/date-tz';\n\nexport interface ConflictsModalComponentData {\n room_name: string;\n conflicts: number[];\n copy_conflicts?: boolean;\n timezone: string;\n status?: string;\n}\n\n@Component({\n selector: 'app-conflicts-modal',\n templateUrl: './conflicts-modal.component.html',\n styleUrls: ['./conflicts-modal.component.scss']\n})\nexport class ConflictsModalComponent implements OnInit{\n public room_name: string;\n public conflicts: number[];\n public copy_conflicts: boolean;\n public timezone;\n public status: string;\n\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: ConflictsModalComponentData){\n\n }\n\n public ngOnInit(){\n this.timezone = this._data.timezone;\n this.room_name = this._data.room_name\n this.conflicts = this._data.conflicts\n this.copy_conflicts = this._data.copy_conflicts\n this.status = this._data.status\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone});\n const dateIsToday = isToday(dateTZ, this.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n\n public copy(): void {\n this.event.emit({ reason: 'action' });\n }\n\n\n}\n","
\n \n
\n\n
\n

Conflicts ({{conflicts.length}})

\n
\n The {{room_name}} room is not available on the following dates.\n Do you want to proceed without booking these days?\n
\n
\n The {{room_name}} room is not available on the following dates.\n You need to make individual bookings to cover these days, please.\n
\n
\n
\n
\n Date\n
\n
\n
\n {{formatDate(conflict)}}\n
\n
\n
\n
\n\n \n {{copy_conflicts ? 'Copy to clipboard' : 'Close'}}\n \n \n {{copy_conflicts ? 'Close' : 'Continue'}}\n \n\n","import { Component, OnInit, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'custom-snackbar',\n templateUrl: './custom-snackbar-component.component.html',\n styleUrls: ['./custom-snackbar-component.component.scss'],\n})\nexport class CustomSnackbarComponent implements OnInit {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) {\n }\n\n ngOnInit() {}\n\n get getIcon() {\n switch (this.data.snackType) {\n case 'success':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-success.svg',\n };\n case 'error':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-failure.svg',\n };\n case 'warn':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-warning.svg',\n };\n case 'info':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-info.svg',\n };\n default:\n return { type: 'info', iconPath: 'assets/icon/toast-info.svg' };\n }\n }\n\n closeSnackbar() {\n this.data.snackBar.dismiss();\n }\n}\n","
\n
\n
\n \"{{getIcon.type}}\n
\n
\n {{data.message}}\n
\n
\n
\n
close
\n
\n
","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CustomSnackbarComponent } from './custom-snackbar-component.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackBarService {\n messageText: string[];\n constructor(public snackBar: MatSnackBar) {}\n\n public openSnackBar(\n message,\n type,\n duration?,\n verticalPosition?,\n horizontalPosition?\n ) {\n const _snackType = type !== undefined ? type : 'success';\n this.snackBar.openFromComponent(CustomSnackbarComponent, {\n duration: duration || 4000,\n horizontalPosition: horizontalPosition || 'end',\n verticalPosition: verticalPosition || 'top',\n data: {\n message: message,\n snackType: _snackType,\n snackBar: this.snackBar,\n },\n });\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n OnChanges,\n SimpleChanges,\n forwardRef,\n EventEmitter,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDateTzPickerOptions {\n /** DateTZ object. First selectable date */\n fromDateTz?: DateTZ;\n /** DateTZ object. Last selectable date */\n untilDateTz?: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: DateTZ;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'date-tz-calendar-widget',\n templateUrl: './date-tz-calendar-widget.component.html',\n styleUrls: ['./date-tz-calendar-widget.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzCalendarWidgetComponent),\n multi: true,\n },\n ],\n})\nexport class DateTzCalendarWidgetComponent\n extends BaseClass\n implements OnInit, OnChanges, ControlValueAccessor\n{\n /** CSS class to add to the root element of the component */\n @Input() public className = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDateTzPickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n\n public readonly weeks = new Array(6).fill(0);\n public selectedDateTz: DateTZ = DateNow();\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private fromTz: DateTZ;\n /** Last selectable date */\n private toTz: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n private _today = DateNow();\n\n public get timezone() {\n return this.selectedDateTz?.building_tz || '';\n }\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.selectedDateTz = item.value;\n if (this._onChange) {\n this._onChange(this.selectedDateTz);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date 2\n */\n public updateDate(): void {\n if (!this.selectedDateTz) {\n return;\n }\n const now = this._today.startOfValue('month');\n const startOfMonthDateTz = this.selectedDateTz.startOfValue('month');\n if (startOfMonthDateTz.valid) {\n const difference = startOfMonthDateTz.dateDiff(\n now,\n 'months',\n 'months'\n );\n if (this.offset !== difference) {\n this.offset = Math.round(difference);\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.fromDateTz) {\n const today = this._today.startOfValue('month');\n this.fromTz = this.options.fromDateTz.startOfValue('day');\n this.min_offset = Math.round(\n this.fromTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months')\n );\n } else if (this.fromTz) {\n this.fromTz = null; // R-- check if ok\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.untilDateTz) {\n const today = this._today.startOfValue('month');\n this.toTz = this.options.untilDateTz.startOfValue('day');\n this.max_offset = this.toTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months');\n } else if (this.toTz) {\n this.toTz = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n this._today = new DateTZ({ date: Date.now(), is_local_tz: !this.timezone, building_tz: this.timezone });\n const startOfMonthDateTz = this._today.addValue({ months: this.offset });\n const active = this.selectedDateTz || DateNow();\n let startDate = startOfMonthDateTz\n .setValue({ day: 1 })\n .setValue({ weekday: 7 })\n .subtractValue({ weeks: 1 });\n this.date_list = [];\n for (let i = 0; i < 42; i++) {\n this.date_list.push({\n value: startDate,\n display: startDate.formatDate('d'),\n active: active.isSameDate(startDate, 'day'),\n non_month: !startOfMonthDateTz.isSameDate(startDate, 'month'),\n count: this.counters\n ? this.counters[startDate.formatDate('yyyy-MM-dd')] || 0\n : 0,\n disabled:\n (this.fromTz ? startDate.ms < this.fromTz.ms : false) ||\n (this.toTz ? startDate.ms > this.toTz.ms : false),\n today: this._today.isSameDate(startDate, 'day'),\n });\n startDate = startDate.addValue({ days: 1 });\n }\n this.month_name = startOfMonthDateTz.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = this._today.startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days: 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n const new_offset = Math.min(\n this.max_offset,\n Math.max(this.min_offset, this.offset + value)\n );\n this.offset = Math.round(new_offset);\n this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const offset = this.offset;\n this.offset = Math.round(\n this._today.dateDiff(this.selectedDateTz, 'months', 'months')\n );\n if (offset !== this.offset) this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: DateTZ) {\n if (value) {\n this.selectedDateTz = value;\n this.updateDate();\n this.generateMonth();\n }\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n}\n","
\n
\n \n
\n \n
{{ month_name }}
\n = max_offset\"\n (click)=\"changeMonth(1)\"\n >\n
\n \n
\n \n \n \n \n \n \n \n \n \n
{{ item }}
\n \n {{ item.display }}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTzCalendarWidgetComponent } from '../date-tz-calendar-widget/date-tz-calendar-widget.component';\n\n@Component({\n selector: 'date-tz-date-picker',\n template: `\n \n {{label}}\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./date-tz-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class DateTzDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n @Input() public label?: string;\n /** Earliest date available the user is allowed to pick */\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n /** Latest date available the user is allowed to pick */\n @Input() public untilDateTz: DateTZ = DateNow(new Date()).endOfValue('day').addValue({ years: 1 });\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n // R-- possible TODO, address all_day that disables this input and displays \"Add Day for the value like the time picker\"\n @Input() public all_day: boolean = false;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public counters: any;\n\n @Input() public initialDateSelectionTz?: DateTZ;\n\n @Output() public onSelect = new EventEmitter();\n\n @Input() public invalid?: boolean;\n\n @Input() public timezone?: string;\n\n @Input() public can_pick_today: boolean = true;\n\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n\n public ngOnInit(): void {\n if (this.initialDateSelectionTz) {\n this.writeValue(this.initialDateSelectionTz)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(DateTzCalendarWidgetComponent, {static: true }) private _acaDatePicker: DateTzCalendarWidgetComponent;\n /** Currently selected date */\n public selectedDateTzValue = new BehaviorSubject(DateNow(new Date()));\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(new DateTZ({ is_local_tz: false, building_tz: d.building_tz }), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n // date\n public get dateTzObservable(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n return d \n }));\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(newValueTz: DateTZ) {\n // Keep hours and minutes of the old date\n const old_date = this.selectedDateTzValue.value;\n let newDateTz = newValueTz.setValue({ hour: old_date.dateHour, minute: old_date.minutes, second: old_date.second });\n\n // Check that new date is before from\n if (newDateTz.ms < this.fromDateTz.ms) {\n newDateTz = this.fromDateTz;\n }\n\n this.selectedDateTzValue.next(newDateTz);\n if (this._onChange) {\n this._onChange(newDateTz);\n }\n\n this.onSelect.emit(newDateTz);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n const building_tz = this.timezone || this.fromDateTz.building_tz\n const is_local_tz = DateNow(new Date()).building_tz === building_tz\n this.setValue(new DateTZ({ is_local_tz, building_tz }));\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(selectedDateTz: DateTZ) {\n this.selectedDateTzValue.next(selectedDateTz);\n this.show_tooltip = false;\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n DurationGroup,\n nearestDurationToInput,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators'; \nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { convertLocalTimestampToTimezonedDateTz, convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'date-tz-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DateTzDurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input() public label?: string;\n @Input() public required: boolean;\n @Input() max_length?: number;\n\n // /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDateTz: DateTZ;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Whether form all_day is enabled. */\n // R-- need to address all_day that disables this input and displays \"Add Day for the value\"\n @Input() public all_day: boolean = false;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** Component will return a number of minutes */\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDateTz = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDateTz]).pipe(\n \n map(([value, currentStartDate]) => { \n /**\n * convert current start date/time to building time zone first\n * \n */\n const ms = convertTimezonedTimestampToLocalDateTz(currentStartDate.ms, currentStartDate.building_tz).ms;\n return nearestDurationToInput(this.durationGroups, ms, value); \n }\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDateTz.pipe(\n map(d => generateDurationOptionsFromGroups(d, this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDateTz.value, this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDateTz) {\n this.currentStartDateTz.next(changes.startDateTz.currentValue);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n nearestStepToInput,\n timeWithGmtOffsetFormatString,\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n generateAvailableTimes,\n generateAvailableTimesTz,\n} from '../utils/time.utils';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\nimport { filter, map, withLatestFrom } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'date-tz-time-field',\n template: `\n
\n {{\n label\n }}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzTimeFieldComponent),\n multi: true,\n },\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DateTzTimeFieldComponent\n extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Input() public label?: string;\n @Input() public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the DateTZ object datetime to start time options from **/\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n // Disables this input and displays R--- \"All Day\" for the value\n @Input() public all_day: boolean = false;\n @Input() public show_current: boolean = false;\n @Input() public startFromDateTz: boolean = false;\n\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n /** DateTZ object representing the currently set datetime */\n public selectedDateTz = new BehaviorSubject(\n closestToTimeSlotTz(DateNow(new Date()), this.step)\n );\n\n /** string representing the currently set datetime display value, needed for the input to display the slected value */\n public selectedTimeString = new BehaviorSubject(\n timeWithGmtOffsetFormatString(this.selectedDateTz.value)\n );\n\n public filterFormControl: FormControl = new FormControl();\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(\n generateAvailableTimesTz(\n DateNow(),\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(DateNow())]\n : [],\n this.startFromDateTz\n )\n );\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // Subscribe to selected option changes\n this.subscription(\n 'dateTimeChanges',\n combineLatest([this.selectedDateTz])\n .pipe(\n map(([selectedDateTz]) => {\n /**\n * The selectedDateTz should already be pegged to the closest time slot, but\n * if the selected time rolls into the past this can correct it. // R--- verify this statement\n */\n return closestToTimeSlotTz(selectedDateTz, this.step);\n }),\n withLatestFrom(this.options),\n filter(\n ([date, timeOptions]: [\n DateTZ,\n SelectOption[]\n ]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(\n (t) => t.value === date.formatDate('HH:mm')\n );\n }\n ),\n map(([dateTz, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz,\n });\n\n // Sort the time options\n timeOptions.sort((a, b) =>\n `${a.value}`.localeCompare(`${b.value}`)\n );\n return timeOptions;\n })\n )\n .subscribe((next) => {\n return this.options.next(next);\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n changes.no_past_times ||\n changes.step ||\n changes.fromDateTz ||\n changes.all_day\n ) {\n // If there's a new date value then update the time options\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // If today and all day goes from on to off the selected value isn't going to be available.\n if (\n changes.all_day &&\n !changes.all_day.currentValue &&\n changes.all_day.previousValue\n ) {\n this.setValue(this.options.value[0].display);\n }\n }\n }\n\n /**\n * Getter if the time picker options are visiable or not\n */\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n /**\n * Getter to return the current form timestamp from the from date object\n */\n public get timezone(): string {\n return this.fromDateTz.building_tz;\n }\n\n /**\n * A filter for finding a matching value when using the input text search\n */\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.selectedDateTz,\n ]).pipe(\n map(([value, selectedDateTz]) => {\n return nearestStepToInput(\n this.step,\n value,\n DateTime.now().valueOf()\n );\n })\n );\n\n /**\n * Default text displayed in the search field when the component initializes\n */\n public placeHolderOption = this.options.pipe(\n map((os) => os.length > 0 && os[0])\n );\n\n /**\n * Returns the selected option object by matching the selectedDateTz formated string with the option.display string\n */\n public selectedOption = combineLatest([\n this.options,\n this.selectedDateTz,\n ]).pipe(\n map(([options, selectedDateTz]) =>\n options.find(\n (o) =>\n o.display === timeWithGmtOffsetFormatString(selectedDateTz)\n )\n )\n );\n\n /**\n * Determines the visually selected value when the options list is visible.\n *\n * @param option DateTZ\n * @returns boolean\n */\n public isSelected(option: SelectOption) {\n return this.selectedTimeString.value === option.display;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: DateTZ) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: DateTZ) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Method just used in unit tests to test disabling the input\n * @param disabled\n */\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Update the selected values\n * @param dateTz the DateTz object for the new time\n */\n public setSelectedValues(dateTz: DateTZ) {\n // Update the selected DateTz and string representations\n this.selectedTimeString.next(timeWithGmtOffsetFormatString(dateTz));\n this.selectedDateTz.next(dateTz);\n if (this._onChange) {\n this._onChange(dateTz);\n }\n }\n\n /**\n * Update the form field value\n * @param displayString The \"display\" value of this.options set by the time picker\n */\n public setValue(displayString: string): void {\n // Convert the display time string to the actual option object via an array find.\n const newTimeTz = this.options.value.find(\n (opt) => opt.display === displayString\n ).value;\n // Update the selected DateTz and string representations\n this.setSelectedValues(newTimeTz);\n // Send the\n if (newTimeTz) {\n if (this._onChange) {\n this._onChange(newTimeTz);\n }\n }\n }\n\n /**\n * Fires when the form control value is changed\n * @param dateTz The new value for the component\n */\n public writeValue(dateTz: DateTZ | null) {\n // Init is null ?\n if (dateTz != null) {\n // Update the selected DateTz and string representations\n this.setSelectedValues(dateTz);\n // Update the available options\n this.options.next(\n generateAvailableTimesTz(\n dateTz,\n !this.noPastTimes,\n this.step,\n dateTz.building_tz,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(dateTz)]\n : [],\n this.startFromDateTz\n )\n );\n }\n }\n}\n\nfunction generateOptionForDateTz(dateTz: DateTZ): SelectOption {\n return {\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n nearestDurationToInput,\n DurationGroup,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n map\n} from 'rxjs/operators';\nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'mck-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n @Input() max_length?: number;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDate: number;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDate = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDate]).pipe(\n map(([value, currentStartDate]) => nearestDurationToInput(this.durationGroups, currentStartDate.ms, value)\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDate.pipe(\n map(d => generateDurationOptionsFromGroups(d.toZone(this.timezone), this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDate.value.toZone(this.timezone), this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDate) {\n // R--- refactor input param\n const date = new DateTZ({date: this.startDate})\n this.currentStartDate.next(date);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mck-error-message',\n template: `\n
\n
\n
\n \n \n \n
\n
\n `,\n styleUrls: ['./error-message.component.scss']\n})\nexport class ErrorMessageComponent {\n\n constructor() {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-calendar-icon',\n template: `\n \n \n \n \n \n `,\n})\nexport class CalendarIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-chevron-icon',\n template: `\n \n \n
\n \n \n \n
\n
\n \n
\n `\n})\nexport class ChevronIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n @Input()\n up?: boolean;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit\n} from '@angular/core';\n\n@Component({\n selector: 'mck-close-icon',\n template: `\n \n \n \n \n `\n})\nexport class CloseIconComponent implements OnInit {\n\n @Input()\n fillClass?: string;\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component(\n {\n selector: 'mck-informational-image',\n template: `\n \n
\n
\n
\n \n
\n
\n
\n
\n `,\n styleUrls: ['./informational-image.component.scss'],\n encapsulation: ViewEncapsulation.None\n }\n)\nexport class InformationalImageComponent extends BaseTemplateComponent {\n\n @Input()\n public src: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-label',\n template: `\n \n \n \n *\n \n \n `,\n styleUrls: ['./label.component.scss']\n})\nexport class LabelComponent extends BaseTemplateComponent implements OnInit {\n\n @Input()\n required = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { MatSelect } from '@angular/material/select';\nimport { SelectOption } from '../options/select-option';\n\n@Component({\n selector: 'mck-legend-dropdown',\n template: `\n
\n \n \n \n \n
\n \n \n \n {{ buildPlaceholder() }}\n \n
\n \n
\n \n
\n `,\n styleUrls: ['./legend-dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LegendDropdownComponent {\n\n @Input()\n public placeholder: string;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public placeholderOpen?: string\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public buildPlaceholder(){\n return this.isOpen && this.placeholderOpen ? this.placeholderOpen : this.placeholder\n }\n}\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AcaDatePickerComponent } from '../aca-date-picker/aca-date-picker.component';\n\n@Component({\n selector: 'mck-date-picker',\n template: `\n \n Date\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./mck-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MckDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class MckDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public initialDateSelection?: number;\n\n @Input() public invalid?: boolean;\n\n @Output() public onSelect = new EventEmitter();\n\n // R--- or is this the date picker to refactor. too tired.\n public ngOnInit(): void {\n if (this.initialDateSelection) {\n this.writeValue(this.initialDateSelection)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(AcaDatePickerComponent, {static: true }) private _acaDatePicker: AcaDatePickerComponent;\n\n /** Currently selected date */\n public dateValue = new BehaviorSubject(DateNow(new Date()));\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.dateValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public get date(): Observable {\n return this.dateValue;\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = this.dateValue.value;\n const d = new DateTZ({date: new_value})\n let new_date = d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n const new_d = new DateTZ({ date: new_date })\n this.dateValue.next(new_d);\n if (this._onChange) {\n this._onChange(new_date);\n }\n this.onSelect.emit(new_date);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n this.setValue(DateNow(new Date()).ms);\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n const date = new DateTZ({date: value})\n this.dateValue.next(date);\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-modal-button-row',\n template: `\n \n \n \n \n
\n \n {{secondaryLabel}}\n \n \n {{primaryLabel}}\n\n \n
\n \n
\n `,\n styleUrls: ['./modal-button-row.component.scss']\n})\nexport class ModalButtonRowComponent extends BaseTemplateComponent {\n\n @Input()\n primaryLabel?: string;\n\n /**\n * Specify if you want to disable the primary button\n */\n @Input()\n primaryDisabled?: boolean = false;\n\n /**\n * Used only if primaryLabel is specified.\n */\n @Output()\n public primarySubmit = new EventEmitter();\n\n /**\n * Specify if you want to show a secondary label button\n */\n @Input()\n secondaryLabel?: string;\n\n @Input()\n disableFixed: boolean = false;\n\n /**\n * Specify if you want to disable the secondary button\n */\n @Input()\n secondaryDisabled?: boolean = false;\n\n /**\n * Used only if secondaryLabel is specified.\n */\n @Output()\n public secondarySubmit = new EventEmitter();\n\n @Input()\n smallButtons?: boolean = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-modal',\n template: `\n \n
\n
\n \n
\n
\n

{{header}}

\n
\n
\n \n
\n `,\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n @Input()\n header?: string;\n @Input() shouldClose?: boolean = true;\n\n constructor(private dialogRef: MatDialogRef) {\n }\n\n public close() {\n this.dialogRef.close();\n }\n}\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { DateTZ, isToday } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'override-changes-modal',\n templateUrl: './override-changes-modal.component.html',\n styleUrls: ['./override-changes-modal.component.scss']\n})\nexport class OverrideChangesModalComponent implements OnInit{\n\n public edits;\n public timezone;\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: OverrideChangesModalComponent){\n\n }\n\n public ngOnInit(){\n // this.edits = this._data.edits.sort((a, b) => a - b);\n\n // Function to convert epoch to 'YYYY-MM-DD' format\n const getDateString = (epoch) => {\n return new Date(epoch * 1000).toISOString().split('T')[0];\n };\n\n // Set to store unique date strings\n const uniqueDates = new Set();\n\n // Filter the edits array\n const filteredEdits = this._data.edits.filter(epoch => {\n const dateString = getDateString(epoch);\n if (!uniqueDates.has(dateString)) {\n uniqueDates.add(dateString);\n return true;\n }\n return false;\n });\n\n this.edits = filteredEdits;\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone });\n const dateIsToday = isToday(dateTZ, this._data.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n}","
\n \n \n
\n\n \n \n \n\n

Overriding Changes

\n

Editing the series here will override all previous changes made to individual occurrences. Are you sure you want to proceed?

\n\n \n \n \n \n \n \n \n \n \n \n \n
Dates
{{formatDate(edit)}}
\n
\n\n\n \n \n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\n\n/**\n * Transforms input by returning a subset of items based on if the\n * any items include the search text based on passed objectKey.\n *\n * objectKey can be pipe separated keys. e.g: 'name|age'. Then it will check against all.\n */\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(items: any[], searchText: string, objectKey?: string): any[] {\n if (!items) return [];\n if (!searchText) return items;\n searchText = searchText.toLowerCase();\n const splitKeys = objectKey?.split('|') ?? [];\n return items.filter(it => {\n let included = false;\n splitKeys.forEach((key) => {\n if (it[key]?.toLowerCase().includes(searchText)) {\n included = true;\n }\n });\n if (splitKeys.length === 0) {\n return it.toLowerCase().includes(searchText);\n }\n return included;\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n DomSanitizer,\n SafeHtml,\n SafeResourceUrl,\n SafeScript,\n SafeStyle,\n} from '@angular/platform-browser';\n\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n@Pipe({\n name: 'sanitize',\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n type: 'resource' | 'url' | 'script' | 'style' | 'html' = 'html'\n ): SafeHtml | SafeResourceUrl | SafeScript | SafeStyle {\n switch (type) {\n case 'resource':\n return (\n this.sanitizer.sanitize(\n SecurityContext.RESOURCE_URL,\n value\n ) || ''\n );\n case 'url':\n return (\n this.sanitizer.sanitize(SecurityContext.URL, value) || ''\n );\n case 'script':\n return (\n this.sanitizer.sanitize(SecurityContext.SCRIPT, value) || ''\n );\n case 'style':\n return (\n this.sanitizer.sanitize(SecurityContext.STYLE, value) || ''\n );\n }\n return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { SelectOption } from '../types';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'mck-radio-select',\n template: `\n \n
\n {{label}}\n \n {{option.display}}\n \n
\n
\n `,\n styleUrls: ['./radio-select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioSelectComponent),\n multi: true\n }\n ]\n})\nexport class RadioSelectComponent extends BaseTemplateComponent implements OnInit, ControlValueAccessor {\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n options: SelectOption[];\n\n public value = new BehaviorSubject | undefined>(undefined);\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n public setValue(value: string) {\n const obj = this.options.find(o => o.value === value);\n this.writeValue(obj);\n if (this._onChange) {\n this._onChange(obj)\n }\n }\n\n writeValue(obj: SelectOption): void {\n this.value.next(obj);\n }\n}\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { OrganisationService, RecurrencePeriod, RecurrenceType, removeExpiredOcurrences, RepeatsOn } from \"@mckinsey-converge/data-common\";\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { first } from \"rxjs/operators\";\nimport { RecurrencePatternForm } from \"../recurrence-pattern-form/recurrence-pattern-form.component\";\n\n@Component({\n selector: 'recurrence-booking-form',\n templateUrl: './recurrence-booking-form.component.html',\n styleUrls: ['./recurrence-booking-form.component.scss']\n})\n\nexport class RecurringBookingForm implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n\n public current_type: RecurrenceType; \n public recurrence_types: Array = [\n {type: RepeatsOn.PATTERN, label: 'Repeats on'},\n {type: RepeatsOn.DATE, label: 'Repeats on specific date'}\n ]\n\n public building_tz = \"\";\n\n @ViewChild(RecurrencePatternForm) pattern_form: RecurrencePatternForm;\n\n constructor(\n private _org: OrganisationService,\n ) {}\n\n public get recurrencePeriod(){\n return this.form.get('recurrence_period')\n }\n\n public ngOnInit(): void {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.building_tz = this._org?.building?.timezone || 'America/Chicago';\n })\n if(this.recurrencePeriod.value === RecurrencePeriod.LIST){\n this.current_type = this.recurrence_types[1];\n removeExpiredOcurrences(this.form)\n }else{\n this.current_type = this.recurrence_types[0];\n }\n }\n\n public onChangeType(value: string) {\n this.current_type = this.recurrence_types.filter((type) => type.type === value)[0]\n if(this.current_type.type === RepeatsOn.PATTERN){\n this.recurrencePeriod.setValue(this.pattern_form.recurrencePatternFormControl.value)\n }else{\n this.recurrencePeriod.setValue(RecurrencePeriod.LIST)\n }\n }\n\n public dateToBuildingTz(date?: number){\n return new DateTZ({date, building_tz: this.building_tz, is_local_tz: false})\n }\n\n public get error(){\n const recurrence_starts = this.form.controls.recurrence_starts\n const recurrence_days = this.form.controls.recurrence_days\n return recurrence_starts.invalid || recurrence_days.invalid\n }\n\n}\n","
\n \n
\n \n \n {{recurrence_types[0].label}}\n \n \n \n
\n
\n \n \n {{recurrence_types[1].label}}\n \n \n \n
\n
\n
\nThe recurrence pattern is not valid.","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { MatMenuTrigger } from \"@angular/material/menu\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { OrganisationService } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ,toMiddayUTC } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-date-form',\n templateUrl: './recurrence-date-form.component.html',\n styleUrls: ['./recurrence-date-form.component.scss']\n})\n\nexport class RecurrenceDateForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n public selected_dates: Array = []\n public timezone: string = '';\n public nowTz: DateTZ = DateNow(new Date());\n public fromDateTz: DateTZ = this.nowTz.clone();\n public untilDateTz: DateTZ = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n public dateTz: DateTZ = DateNow(new Date());\n\n public get recurrenceStarts(){\n return this.form.get('recurrence_starts');\n }\n\n public get formDateTz(){\n return this.form.get('dateTz');\n }\n\n constructor (private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The fromDateTz is curious, would it make sense to be based on the form dateTz?\n this.fromDateTz = this.nowTz.clone()\n this.untilDateTz = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n\n if(this.recurrenceStarts.value){\n const tempForSort = [...this.recurrenceStarts.value]; // due to cannot assign to read only property '0' of object '[object Array]'\n this.selected_dates = tempForSort.sort((d1: DateTZ, d2: DateTZ) => d1.ms - d2.ms);\n }\n this.subscription('ocurrenceChanges', this.recurrenceStarts.valueChanges\n .subscribe(() => {\n this.selected_dates = [...this.recurrenceStarts.value]\n })\n ); \n }\n\n /**\n * Add value to the list of selected dates\n * @param newDateTz\n */\n public addDate(newDateTz: DateTZ) {\n const d = newDateTz.clone();\n const start_date = this.formDateTz.value;\n let new_date = d.setValue({hour: start_date.dateHour, minute: start_date.minutes})\n \n /** Prevent user from selecting past dates */\n if (new_date.isBeforeDate(this.fromDateTz)) {\n new_date = this.fromDateTz;\n }\n\n /** Prevent user from selecting the same date more than once */\n const is_selected = this.selected_dates.filter((date: DateTZ)=> new_date.isSameDate(date, 'day'))\n if(is_selected.length){\n return\n }\n \n this.selected_dates.push(new_date);\n this.recurrenceStarts.setValue(this.selected_dates.sort((d1, d2) => d1.ms - d2.ms));\n this.setDateTzForm();\n }\n\n /**\n * \n * @param dateMsValue: number\n * @returns \n */\n public setPickerToGivenDate(dateTsValue: DateTZ) {\n this.fromDateTz = dateTsValue.clone();\n }\n\n /**\n * Function calls on close of date picker without date selection\n */\n public onDatePickerClose = () => {\n this.setPickerToGivenDate(this.nowTz)\n };\n\n public goToToday() {\n this.addDate(this.nowTz);\n this.setPickerToGivenDate(this.nowTz);\n }\n\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n public openDatePicker() {\n this._trigger.openMenu();\n }\n\n public deleteDate(date: DateTZ) {\n const index = this.selected_dates.map((d: DateTZ) => d.ms).indexOf(date.ms)\n this.selected_dates.splice(index, 1)\n this.recurrenceStarts.setValue(this.selected_dates)\n this.setDateTzForm()\n }\n\n public isToday(date) {\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: this.timezone,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone,\n }),\n 'day'\n );\n }\n\n public formatDate(date: DateTZ){\n const isToday = this.isToday(date);\n const display = date.formatDate('ccc dd MMM yyyy');\n\n return `${display}${isToday ? ' (Today)' : ''}`;\n }\n\n private setDateTzForm(): void {\n if (this.selected_dates.length === 0)\n return;\n\n const tz = this._org.building.timezone;\n const date_now = DateNow(new Date()).toZone(tz);\n let dateTz = this.selected_dates[0].clone();\n\n dateTz = dateTz.setValue({\n hour: (this.formDateTz.value as DateTZ).hours,\n minute: (this.formDateTz.value as DateTZ).minutes\n });\n\n if (this.selected_dates[0].isSameDate(this.nowTz, \"day\") && dateTz.hours < date_now.hours) {\n const { minutes: minute, hours: hour } = closestToTimeSlotTz(this.nowTz, 15);\n dateTz = dateTz.setValue({ minute, hour, second: 0 });\n }\n\n this.formDateTz.setValue(dateTz);\n }\n}\n","
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
DateAction
{{formatDate(date)}}Delete
\n
[+] Add another date
\n \n
\n \n Today\n \n
\n
\n
\n
","import { Component, Input, OnInit } from \"@angular/core\";\nimport { FormGroup, Validators } from \"@angular/forms\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { arrayWithValues, generateWeekDays, RecurrencePeriod, recurrencePeriodToDurationType, RepeatPeriod, validDateTZ, WeekDays } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-pattern-form',\n templateUrl: './recurrence-pattern-form.component.html',\n styleUrls: ['./recurrence-pattern-form.component.scss']\n})\n\nexport class RecurrencePatternForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n\n /** Range of dates for the Start Date Picker*/\n public nowTz: DateTZ = DateNow(new Date());\n public fromStartTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n public untilTz: DateTZ = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n public timezone: string = '';\n \n\n /** Range of dates for the End Date Picker*/\n public fromEndTz: DateTZ;\n\n public repeat_period_options: Array = [\n {label: 'Day', id: RecurrencePeriod.DAILY},\n {label: 'Week',id: RecurrencePeriod.WEEKLY},\n {label: 'Month', id: RecurrencePeriod.ABSOLUTE_MONTHLY}\n ]\n public week_days: Array = []\n\n public repeat_every_options\n\n\n public get recurrenceDateStartTzFormControl() {\n return this.form.get('dateTz')\n }\n\n public get recurrenceEndFormControl(){\n return this.form.get('recurrence_endTz')\n }\n\n public get recurrencePeriodFormControl(){\n return this.form.get('recurrence_period')\n }\n\n public get recurrenceIntervalFormControl(){\n return this.form.get('recurrence_interval')\n }\n\n public get recurrencePatternFormControl(){\n return this.form.get('recurrence_pattern')\n }\n\n public get recurrenceDaysFormControl(){\n return this.form.get('recurrence_days')\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The from date is curious, why isn't it based on the form dateTz?\n this.repeat_every_options = new Array(1)\n this.fromStartTz = closestToTimeSlotTz(this.nowTz, 15)\n this.untilTz = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n this.fromEndTz = this.fromStartTz.addValue({days: 1})\n\n this.setEndDateFromStartDate(this.recurrenceDateStartTzFormControl.value) //make sure end date is after start date\n\n if(!this.recurrencePeriodFormControl.value){\n this.recurrencePeriodFormControl.setValue(RecurrencePeriod.WEEKLY)\n }\n\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.recurrencePatternFormControl.setValue(this.recurrencePeriodFormControl.value)\n }\n\n this.week_days = generateWeekDays(this.recurrenceDateStartTzFormControl.value.ms, { building_tz: this.fromStartTz.building_tz })\n this.generateMaxIntervals()\n\n if(this.recurrenceDaysFormControl.value.length > 0){\n this.week_days = this.week_days.map((day) => \n ({...day, active: this.recurrenceDaysFormControl.value.includes(day.full_name)})\n )\n }\n\n if(!this.recurrenceDaysFormControl.value.length && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n const current_days = this.week_days.filter((day) => day.active).map((day)=>day.full_name)\n this.recurrenceDaysFormControl.setValue(current_days)\n }\n\n this.generateOcurrenceList()\n\n this.subscription('startTimeChanges', this.recurrenceDateStartTzFormControl.valueChanges\n .subscribe((next) => {\n this.setEndDateFromStartDate(next) \n })\n );\n\n this.subscription('endTimeChanges', this.recurrenceEndFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n );\n \n this.subscription('recurrencePeriodFormControlChanges', this.recurrencePeriodFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n ); \n }\n\n public setEndDateFromStartDate(startDateTz: DateTZ){\n let end_date = this.recurrenceEndFormControl.value.setValue({hour: startDateTz.dateHour, minute: startDateTz.minutes})\n\n /**Update the End date picker range */\n this.fromEndTz = startDateTz.isSameDate(this.untilTz,'day') ? startDateTz : startDateTz.addValue({days: 1})\n\n if(end_date.isBeforeDate(this.fromEndTz)){\n end_date = this.fromEndTz\n }\n\n this.recurrenceEndFormControl.setValue(end_date)\n\n this.generateMaxIntervals()\n this.updateActiveWeekday() \n }\n\n public setRepeatPeriod(value: RecurrencePeriod){\n this.updateValidators(value)\n this.recurrencePeriodFormControl.setValue(value);\n this.recurrencePatternFormControl.setValue(value);\n this.recurrenceIntervalFormControl.setValue(1)\n this.generateOcurrenceList();\n }\n\n public setRepeatEvery(value: number){\n this.recurrenceIntervalFormControl.setValue(value)\n this.generateOcurrenceList()\n }\n\n public repeatTimeString(value: string){\n return this.recurrenceIntervalFormControl.value !== 1 ? `${value}(s)` : value\n }\n\n public get displayWeekdays(){\n return this.recurrencePatternFormControl.value === RecurrencePeriod.WEEKLY\n }\n\n /* Check if selected interval is valid and reset to 1 if not*/\n private validateRecurrenceInterval = () => {\n if(this.repeat_every_options.length < this.recurrenceIntervalFormControl.value){\n this.recurrenceIntervalFormControl.setValue(1)\n } \n };\n\n /**\n * Generate max value for dorpdown interval\n */\n public generateMaxIntervals(){\n const start = this.recurrenceDateStartTzFormControl.value;\n const date_diff = this.recurrenceEndFormControl.value.dateDiff(start, this.periodToDurationType, this.periodToDurationType)\n //If no diff default to 1\n this.repeat_every_options = new Array(Math.round(date_diff) || 1)\n this.validateRecurrenceInterval();\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.generateOcurrenceList()\n }\n }\n\n /**\n * Generate ocurrence list base on the selected interval\n */\n public generateOcurrenceList() {\n\n /**If selected period is list then we don't want \n * to generate a list based on the repeats on selections*/\n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.LIST){\n return\n }\n\n const occurrence = []\n const first_date = this.recurrenceDateStartTzFormControl.value;\n let start = first_date\n const end = this.recurrenceEndFormControl.value;\n const interval = this.recurrenceIntervalFormControl.value\n const recurr_days = this.week_days.filter(day => day.active)\n /**\n * isLastDayOfMonth : Boolean\n * flag - to generate last day of every month in case of day or month reccuring booking if start date is last day of month\n */\n // const isLastDayOfMonth = first_date.date.day === first_date.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY;\n const isLastDayOfMonth = first_date.dateDay === 31 && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY ;\n \n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n start = start.startOfValue('week')\n }\n\n while (end.dateDiff(start.startOfValue('day'), this.periodToDurationType, this.periodToDurationType) >= 0) {\n \n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n occurrence.push(start) \n start = start.addValue({[this.periodToDurationType]: interval}, isLastDayOfMonth);\n /**\n * IF - should only consider resetting start under mentioned condition of ticket - https://acaprojects.atlassian.net/browse/MCK-2085\n * In summery - If user select any date except 31st, other months in the series (no matter 30 or 31 day month) should have same date select as start date.\n * If user select 31st as an start date, other month in the seleries should have select last day of the month (30th/31st/28th/29th).\n * Exception for February - February should select 28th or 29th If in above both selection includes date between 28th - 31st.\n * \n */\n if(start.dateDay !== first_date.dateDay && start.dateDay !== start.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY) {\n start = start.setValue({day: first_date.dateDay});\n } \n }else {\n recurr_days.forEach((day)=>{\n const date = start.addValue({days: day.day_index})\n if((date.isAfterDate(first_date) || date.isSameDate(first_date, 'day')) && \n (date.isBeforeDate(end) || date.isSameDate(end, 'day'))){\n occurrence.push(date)\n }\n })\n start = start.addValue({[this.periodToDurationType]: interval})\n }\n }\n\n this.form.controls.recurrence_count.setValue(occurrence.length)\n this.form.controls.recurrence_starts.setValue(occurrence.sort((d1, d2) => d1.ms - d2.ms))\n \n }\n\n public get periodToDurationType(){\n const period = this.recurrencePeriodFormControl.value\n return recurrencePeriodToDurationType(period)\n }\n\n /**\n * Update active weekday in the weekdays array\n */\n private updateActiveWeekday() {\n const _week_days = this.week_days.map((day)=>{\n if(this.recurrenceDaysFormControl.value.includes(day.full_name)){\n return {...day, active: true}\n }else{\n return {...day, active: false}\n }\n })\n this.week_days = [..._week_days] \n }\n\n public setWeekDays(new_day: WeekDays){\n const days = this.recurrenceDaysFormControl.value\n if(this.disabled){\n return\n }\n\n if(!new_day.active){\n days.push(new_day.full_name)\n }else{\n const current_index = days.indexOf(new_day.full_name)\n days.splice(current_index,1)\n }\n this.recurrenceDaysFormControl.setValue([...days])\n this.updateActiveWeekday()\n this.generateOcurrenceList()\n }\n\n /**Update the recurrence days validator if period changes */\n public updateValidators(value: RecurrencePeriod){\n if(value === RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n this.recurrenceDaysFormControl.setValidators(arrayValidators);\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }else if(value !== RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n this.recurrenceDaysFormControl.clearValidators();\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }\n }\n}\n","
\n
\n \n \n \n Date and time must be in the future\n
\n
\n \n \n \n Date and time must be in the future\n
\n
\n
\n \n
\n \n \n \n {{ i + 1}}\n \n \n \n \n \n \n {{ repeatTimeString(option.label) }}\n \n \n \n
\n
\n
\n \n
\n
\n {{day.id}}\n
\n
\n
\n
\n
","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { SelectOption } from '../types';\n\n@Component({\n selector: 'mck-select-option',\n template: `\n \n \n \n \n {{ option.display }}\n \n \n `,\n styleUrls: ['./select-option.component.css']\n})\nexport class SelectOptionComponent extends BaseTemplateComponent {\n\n @Input()\n option: SelectOption;\n\n @Input()\n selected: boolean;\n\n /**\n * If true, we still display as if it wasn't disabled.\n */\n @Input()\n ignoreDisabled = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators';\nimport { MatSelect } from '@angular/material/select';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\n@Component({\n selector: 'mck-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class SelectComponent implements OnInit, OnChanges, ControlValueAccessor {\n\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n /**\n * When true, can filter by searching on the input.\n */\n @Input()\n public searchEnabled = false;\n\n @Input()\n public splitDisplay = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Input()\n public showDivider: boolean = false\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n public filterFormControl: FormControl = new FormControl();\n\n public value = new BehaviorSubject(this.selectedValue || this.options[0]?.value);\n\n /** Available time blocks for the selected date */\n public _options = new BehaviorSubject[]>(this.options);\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public selectedOption = combineLatest([this._options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this._options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n\n constructor() {\n }\n\n public ngOnInit(): void {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this._options.next(this.options);\n this.value.next(this.selectedValue || this.options?.[0]?.value);\n }\n if (changes.selectedValue) {\n this.value.next(this.selectedValue?.value);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n}\n","
\n {{label}}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mck-selected-chip-count',\n template: `\n \n {{count}}\n \n \n `,\n styleUrls: ['./selected-chip-count.component.scss']\n})\nexport class SelectedChipCountComponent {\n\n @Input()\n count: number;\n\n @Output()\n close = new EventEmitter();\n\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\nexport enum SpacerMode {\n /**\n * If vertical, it expands in the vertical direction. Size is width.\n */\n Vertical = 'vertical',\n /**\n * If horizontal, it expands in the horizontal direction. Size is height.\n */\n Horizontal = 'horizontal',\n}\n\n@Component({\n selector: 'mck-spacer',\n template: `\n \n
\n
\n
\n
\n
\n `,\n styleUrls: ['./spacer.component.css'],\n})\nexport class SpacerComponent extends BaseTemplateComponent implements OnInit {\n SpacerMode = SpacerMode;\n\n @Input()\n size: string;\n\n @Input()\n mode: SpacerMode = SpacerMode.Horizontal;\n\n @Input()\n autoSize?: boolean;\n\n @Input()\n spacerClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-switch-group',\n template: `\n
\n {{title}}\n {{option.display}}\n
\n `,\n styleUrls: ['./switch-group.component.scss']\n})\nexport class SwitchGroupComponent implements OnInit {\n\n @Input()\n title: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selectedOptions: SelectOption[] = [];\n\n @Output()\n optionChecked = new EventEmitter>();\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n public onCheckedChange(option: SelectOption) {\n this.optionChecked.emit(option);\n }\n\n public isSelected(option: SelectOption) {\n return !!this.selectedOptions.find(s => s.value === option.value);\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlot,\n nearestStepToInput,\n timeWithGmtOffsetFormatString\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { generateAvailableTimes } from '../utils/time.utils';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport {\n filter,\n map,\n withLatestFrom\n} from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'mck-time-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n `,\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the date from start **/\n @Input() public from: number;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n // R-- Which time field is going to be used, there's too many\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** String representing the currently set date */\n public date = new BehaviorSubject(DateNow(new Date()).ms);\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.date]).pipe(\n map(([value, date]) => nearestStepToInput(this.step, value, DateTime.now().valueOf()))\n );\n\n /** String representing the currently set time */\n public value = new BehaviorSubject(closestToTimeSlot(DateTime.now(), this.step).toFormat('HH:mm'));\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(generateAvailableTimes(DateNow(new Date()).ms, !this.noPastTimes, this.step, this.timezone));\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this.options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n\n // Subscribe to selected option changes\n this.subscription('dateTimeChanges',\n combineLatest([\n this.date\n ]).pipe(\n map(([date]) => {\n // R--- The time input needing to be TZ aware.\n const closestTimeSlot = closestToTimeSlot(DateTime.fromMillis(date.valueOf()), this.step);\n // Need to return the date with building timezone or the HH:mm representation will no match the option values\n return new DateTZ({date: closestTimeSlot.valueOf(), is_local_tz:false, building_tz: this.timezone});\n }),\n withLatestFrom(this.options),\n filter(([date, timeOptions]: [DateTZ, SelectOption[]]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(t => t.value === date.formatDate('HH:mm'));\n }),\n map(([date, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(date),\n value: date.formatDate('HH:mm')\n });\n // Sort the time options\n timeOptions.sort((a, b) => `${a.value}`.localeCompare(`${b.value}`));\n return timeOptions;\n })\n ).subscribe(next => this.options.next(next)));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step || changes.timezone) {\n // If there's a new date value then update the time options\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n const buildingDate = new DateTZ({date: this.from, is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.value.next(buildingDate.formatDate('HH:mm'));\n }\n if (changes.from) {\n // When the from input param changes update the date value\n this.date.next(this.from);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n // value comes in as a HH:mm string\n const newTime = (new_value.indexOf(':') > 0 ? new_value : '00:00').split(':');\n // need the date with the building timezone so the hour set is relative to there and not local.\n const d = new DateTZ({ date: this.date.value, is_local_tz: false, building_tz: this.timezone });\n const date = d.setValue({ hour: parseInt(newTime[0]), minute: parseInt(newTime[1]) });\n if (date) {\n if (this._onChange) {\n this._onChange(date.ms);\n }\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number | null) {\n if (value != null) {\n // Time input value in building time milliseconds\n this.date.next(value);\n // Get the closest time to slot in case the browser was idle and elapse the valid times\n const date = closestToTimeSlot(DateTime.fromMillis(value).startOf('minute'), this.step);\n // Need the building time so HH:mm is correct\n const buildingDate = new DateTZ({date: date.valueOf(), is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.options.next(generateAvailableTimes(buildingDate.ms, !this.noPastTimes, this.step, this.timezone));\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-toggle',\n template: `\n
\n \n
\n `,\n styleUrls: ['./toggle.component.scss']\n})\nexport class ToggleComponent {\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selected: SelectOption;\n\n @Output()\n selectedChange = new EventEmitter>();\n\n public onTapOption(option: SelectOption) {\n this.selectedChange.emit(option);\n }\n\n isSelected(option: SelectOption) {\n return this.selected === option;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Component({\n selector: 'app-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss']\n})\nexport class TooltipComponent {\n isVisible: boolean = false; // To control the visibility of the tooltip\n position: TooltipPosition = TooltipPosition.DEFAULT;\n theme: TooltipTheme = TooltipTheme.DEFAULT;\n tooltip = '';\n left = 0;\n top = 0;\n visible = false;\n}","
\n
\n
\n {{string}}\n
\n
\n
","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n HostListener,\n Injector,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport {TooltipComponent} from \"./tooltip.component\";\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Directive({\n selector: '[tooltip]'\n})\nexport class TooltipDirective {\n\n @Input() tooltip = '';\n @Input() position: TooltipPosition = TooltipPosition.DEFAULT;\n @Input() theme: TooltipTheme = TooltipTheme.DEFAULT;\n @Input() trigger: ('hover' | 'click' | 'touch')[] = ['hover']; // Now an array of trigger types\n @Input() showDelay = 0;\n @Input() hideDelay = 0;\n @Input() show: boolean = true;\n\n private componentRef: ComponentRef | null = null;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n constructor(\n private elementRef: ElementRef, \n private appRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver, \n private injector: Injector) {\n }\n\n // Helper function to check if the tirgger type is present \n private hasTrigger(triggerType: 'hover' | 'click' | 'touch'): boolean {\n return this.trigger.includes(triggerType);\n }\n\n //Mouse and hover events\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.hasTrigger('hover') ) {\n this.initializeTooltip();\n }\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.hasTrigger('hover') ) {\n this.setHideTooltipTimeout();\n }\n }\n\n // Click event\n @HostListener('click')\n onClick(): void {\n if (this.hasTrigger('click') ) {\n if (this.componentRef === null) {\n this.initializeTooltip();\n } else {\n this.destroy(); // Hide tooltip if it is already shown\n }\n }\n }\n\n // Touch event\n\n\n @HostListener('touchstart', ['$event'])\n onTouchStart($event: TouchEvent): void {\n // Prevent default to avoid click event fire immedieatly \n // $event.preventDefault();\n if(this.hasTrigger('touch')) {\n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 150); // show the tooltip after short delay\n }\n \n }\n\n @HostListener('touchend')\n onTouchEnd(): void {\n // Hide the tooltip when touch end \n if(this.hasTrigger('touch') ){\n window.clearTimeout(this.touchTimeout);\n // this.setHideTooltipTimeout();\n setTimeout(() => {\n this.setHideTooltipTimeout();\n }, 500); \n }\n \n }\n\n // Initialization of the tooltip\n private initializeTooltip() {\n if (this.componentRef === null) {\n window.clearInterval(this.hideDelay);\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);\n this.componentRef = componentFactory.create(this.injector);\n\n this.appRef.attachView(this.componentRef.hostView);\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef).rootNodes;\n\n this.setTooltipComponentProperties();\n\n document.body.appendChild(tooltipDOMElement);\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\n }\n }\n\n private setTooltipComponentProperties() {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.position = this.position;\n this.componentRef.instance.theme = this.theme;\n\n const {left, right, top, bottom} = this.elementRef.nativeElement.getBoundingClientRect();\n\n switch (this.position) {\n case TooltipPosition.BELOW: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(bottom);\n break;\n }\n case TooltipPosition.ABOVE: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(top);\n break;\n }\n case TooltipPosition.RIGHT: {\n this.componentRef.instance.left = Math.round(right);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n case TooltipPosition.LEFT: {\n this.componentRef.instance.left = Math.round(left);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n\n private showTooltip() {\n if (this.componentRef !== null) {\n this.componentRef.instance.visible = this.show ? true : false;\n }\n }\n\n private setHideTooltipTimeout() {\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n destroy(): void {\n if (this.componentRef !== null) {\n window.clearInterval(this.showTimeout);\n window.clearInterval(this.hideDelay);\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","export enum TooltipPosition {\n ABOVE = 'above',\n BELOW = 'below',\n LEFT = 'left',\n RIGHT = 'right',\n DYNAMIC = 'dynamic',\n DEFAULT = 'below'\n}\n\nexport enum TooltipTheme {\n DARK = 'dark',\n LIGHT = 'light',\n DEFAULT = 'dark'\n}\n","export { AlertMode, AlertBannerDisplay } from './alert-banner/alert-banner.component';\nexport { SelectOption } from './options/select-option';\nexport * from './cng-select/dropdown-panel';","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSelectModule } from '@angular/material/select';\nimport { AutoCompleteChipSelectItemComponent } from './auto-complete-chip-select-item/auto-complete-chip-select-item.component';\nimport { AutoCompleteSelectOptionComponent } from './auto-complete-select-option/auto-complete-select-option.component';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { RadioSelectComponent } from './radio-select/radio-select.component';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FilterPipe } from './pipes/filter.pipe';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TimeFieldComponent } from './time-field/time-field.component';\nimport { DateTzTimeFieldComponent } from './date-tz-time-field/date-tz-time-field.component';\nimport { SpacerComponent } from './spacer/spacer.component';\nimport { DurationFieldComponent } from './duration-field/duration-field.component';\nimport { DateTzDurationFieldComponent } from './date-tz-duration-field/date-tz-duration-field.component';\nimport { AcaDatePickerComponent } from './aca-date-picker/aca-date-picker.component'; // the old widget\nimport { MckDatePickerComponent } from './mck-date-picker/mck-date-picker.component'; // the old form field \nimport { DateTzCalendarWidgetComponent } from './date-tz-calendar-widget/date-tz-calendar-widget.component'; // the new widget\nimport { DateTzDatePickerComponent } from './date-tz-date-picker/date-tz-date-picker.component'; // the new form field \nimport { CalendarIconComponent } from './icons/calendar/calendar-icon.component';\nimport { ChevronIconComponent } from './icons/calendar/chevron-icon.component';\nimport { SelectOptionComponent } from './select-option/select-option.component';\nimport { CloseIconComponent } from './icons/close/close-icon.component';\nimport { SelectedChipCountComponent } from './selected-chip-count/selected-chip-count.component';\nimport { AlertBannerComponent } from './alert-banner/alert-banner.component';\nimport { ErrorMessageComponent } from './error-message/error-message.component';\nimport { ToggleComponent } from './toggle/toggle.component';\nimport { LabelComponent } from './label/label.component';\nimport { ModalComponent } from './modal/modal.component';\nimport { CollapseHeaderComponent } from './collapse-header/collapse-header.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { SwitchGroupComponent } from './switch-group/switch-group.component';\nimport { ModalButtonRowComponent } from './modal-button-row/modal-button-row.component';\nimport { InformationalImageComponent } from './informational-image/informational-image.component';\nimport { GroupHeaderPipe } from './auto-complete-chip-select-item/groupHeader.pipe';\nimport { SelectComponent } from './select/select.component';\nimport { LegendDropdownComponent } from './legend-dropdown/legend-dropdown.component';\nimport { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';\nimport { RecurrencePatternForm } from './recurrence-pattern-form/recurrence-pattern-form.component'; \nimport { RecurrenceDateForm } from './recurrence-date-form/recurrence-date-form.component';\nimport { ConflictsModalComponent } from './conflicts-modal/conflicts-modal.component';\nimport { RecurringBookingForm } from './recurrence-booking-form/recurrence-booking-form.component';\nimport { OverrideChangesModalComponent } from './override-changes-modal/override-changes-modal.component';\nimport { SanitizePipe } from './pipes/sanitise.pipe';\nimport { ConflictAlertModalComponent } from './conflict-alert-modal/conflict-alert-modal.component';\nimport { CngSelectComponent } from './cng-select/cng-select.component';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { DropdownTriggerForDirective } from './cng-select/dropdown-trigger-for.directive';\nimport { CngSelectOptionsComponent } from './cng-select/cng-select-options.component';\nimport { TooltipComponent } from './tooltip/tooltip.component';\nimport { TooltipDirective } from './tooltip/tooltip.directive';\nimport { ZoomWarningComponent } from './zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nimport { CustomSnackbarComponent } from './custom-snackbar-component/custom-snackbar-component.component';\nimport { SnackBarService } from './custom-snackbar-component/custom-snackbar-component.service';\nimport { CateringDropComponent } from './catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n\nexport const MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule,\n MatExpansionModule,\n OverlayModule\n];\n\n@NgModule({\n imports: [CommonModule,\n ...MATERIAL_MODULES,\n ReactiveFormsModule,\n FormsModule,\n NgxMatSelectSearchModule, \n NgxSkeletonLoaderModule,\n MatSnackBarModule],\n declarations: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n GroupHeaderPipe,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n SelectOptionComponent,\n CloseIconComponent,\n SelectedChipCountComponent,\n AlertBannerComponent,\n ErrorMessageComponent,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n CustomSnackbarComponent,\n CateringDropComponent\n ],\n exports: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n AlertBannerComponent,\n ReactiveFormsModule,\n FormsModule,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n ],\n entryComponents: [\n CustomSnackbarComponent,\n CateringDropComponent\n ]\n \n})\nexport class UiModule {\n}\n","/**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n\nimport {\n closestToTimeSlot,\n closestToTimeSlotTz,\n DurationGroup,\n durationHumanized,\n timeFormatString,\n timeWithGmtOffsetFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../types';\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { DateTime } from 'luxon';\n\n// 24 hours\nexport const ALL_DAY_BOOKING_VALUE = 60 * 24;\n\nexport const DEFAULT_DURATION = 30;\n\n// R--- depreciate.\nexport const generateAvailableTimes = (\n datestamp: number,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz\n): SelectOption[] => {\n // R--- refactor to only used dateTz input and drop timezone param.\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let date = new DateTZ({ date: datestamp, is_local_tz: false, building_tz: timezone });\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || date.isAfterDate(now, 'day')) {\n // later than today\n date = date.startOfValue('day');\n } else {\n // today\n date = now;\n }\n // Get the closest timeslot to the start time\n const inputDate = DateTime.fromMillis(date.ms);\n const closestDate = closestToTimeSlot(inputDate, step);\n // Date changed to the closest time\n date = new DateTZ({ date: closestDate.valueOf(), is_local_tz: false, building_tz: timezone });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(date),\n shortDisplay: date.formatDate('hh:mma'),\n value: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n};\n\n\nexport const generateAvailableTimesTz = (\n fromDateTz: DateTZ,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz,\n all_day: boolean = false,\n extras: SelectOption[] = [],\n startFromDateTz: boolean = false\n): SelectOption[] => {\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let dateTz = fromDateTz.clone();\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || dateTz.isAfterDate(now, 'day')) {\n // later than today\n dateTz = dateTz.startOfValue('day');\n } else {\n // today/fromDateTz using the flag\n dateTz = startFromDateTz ? dateTz : now;\n }\n // Get the closest timeslot to the start time\n dateTz = closestToTimeSlotTz(dateTz, step);\n // Date changed to the closest time\n const end = dateTz.endOfValue('day');\n // Add the all day option for today\n if (all_day && dateTz.isSameDate(now, 'day')) {\n const startOfDay = dateTz.startOfValue('day');\n blocks.push({\n display: timeWithGmtOffsetFormatString(startOfDay),\n shortDisplay: startOfDay.formatDate('hh:mma'),\n value: startOfDay\n })\n }\n // Add options for the rest of the day\n while (dateTz.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n });\n \n dateTz = dateTz.addValue({ minutes: step });\n }\n\n return unique(extras.concat(blocks), 'shortDisplay');\n};\n\n/**\n * Generates list of duration options for new booking flow.\n * @param date - The start dateTime\n * @param max - The max number of minutes to go to from the date param.\n * @param min - The min number of minutes to display first time from.\n * @param step - The number of minutes to step up by for timeslots.\n */\nexport const generateDurationOptions = (\n date: DateTZ,\n max: number,\n min: number,\n step: number,\n extended: boolean): SelectOption[] => {\n const blocks: SelectOption[] = [];\n let value = min;\n while (value <= max) {\n let duration: string;\n if (extended) {\n const d = durationHumanized(value - min, true);\n duration = d ? `+${d}` : 'Current';\n } else {\n duration = durationHumanized(value, true);\n }\n\n blocks.push({\n value,\n display: `${date.addValue({ minutes: value }).formatDate(timeFormatString()).toLocaleLowerCase()} (${duration})`,\n });\n value += step;\n }\n return blocks;\n};\n\nexport const allDayOption: SelectOption = ({\n value: ALL_DAY_BOOKING_VALUE,\n display: 'All Day'\n});\n\nexport const oneWeekOption: SelectOption = ({\n value: 60 * 24 * 7, // 1 week\n display: 'One Week'\n});\n\nexport const defaultDurationGroups: DurationGroup[] = [\n {\n start: 15,\n step: 15,\n max: 60 * 24\n }\n // , {\n // start: 60,\n // step: 30,\n // max: (60 * 8) - 1 // 8 hours\n // }, {\n // start: 60 * 8,\n // step: 60,\n // max: 60 * 24 // 24 hours\n // }\n];\n\n/**\n * Maps the {@link DurationGroup} to {@link SelectOption} and appends the default all day and week options.\n */\nexport const generateDurationOptionsFromGroups = (date: DateTZ, durationGroups: DurationGroup[], extended: boolean): SelectOption[] => [\n ...(durationGroups.map(duration => generateDurationOptions(date, duration.max, duration.start, duration.step, extended)).reduce(((previousValue, currentValue) => {\n previousValue.push(...currentValue);\n return previousValue;\n }), [])),\n // allDayOption,\n // oneWeekOption\n ];\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-zoom-warning',\n templateUrl: './zoom-warning.component.html',\n styleUrls: ['./zoom-warning.component.scss']\n})\nexport class ZoomWarningComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onCloseClick(): void {\n this.dialogRef.close();\n }\n}\n","
\n

Excessive zoom warning

\n
\n\n
\n
\n

\n
\n
\n
\n\n
\n \n
\n
","export * from './lib/user.module';\nexport * from './lib/user.actions'\nexport * from './lib/user.types'\nexport * from './lib/user.reducer'\n","import { \n createLoadingAction\n } from '../../../loading/src/lib/loading.actions';\nimport {\n UserState,\n UserStoreState\n} from './user.types';\nimport { User } from '../../../data-common/src/lib/users/user.class';\nimport { createSelector } from '@ngrx/store';\n\nexport const loadUser = createLoadingAction('CurrentUser', 'current');\n\nexport const selectUserState = ({ user }: UserStoreState) => user;\n\nexport const selectHasUserData = createSelector(createSelector(selectUserState, loadUser.selectors.model), (state) => !!state.optionalSuccess);\n\nexport const selectCurrentUser = createSelector(selectUserState, loadUser.selectors.optionalSuccess);\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect\n} from '@ngrx/effects';\nimport { createLoadingEffect } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\nimport { UsersService } from '../../../data-common/src/lib/users/users.service';\n\n\n@Injectable()\nexport class UserEffects {\n\n constructor(private actions: Actions,\n private userService: UsersService) {\n }\n\n @Effect()\n loadUser = createLoadingEffect(this.actions, loadUser, () => this.userService.loadCurrentUser());\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StoreModule } from '@ngrx/store';\nimport { userReducer } from './user.reducer';\nimport { EffectsModule } from '@ngrx/effects';\nimport { UserEffects } from './user.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n StoreModule.forFeature('user', userReducer),\n EffectsModule.forFeature([UserEffects])\n ]\n})\nexport class UserModule {\n}\n","import { createReducer } from '@ngrx/store';\nimport { UserState } from './user.types';\nimport { LoadingModel } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\n\n\nexport const initialUserState: UserState = {\n current: LoadingModel.empty()\n};\n\nexport const userReducer = createReducer(initialUserState,\n ...loadUser.ons);\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./$$_lazy_route_resource lazy recursive\";","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { ShellWrapperComponent } from './shell/shell.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ShellWrapperComponent,\n children: [\n {\n path: 'day-view',\n loadChildren: () =>\n import('./calendar/day-view/day-view.module').then(m => m.DayViewModule)\n },\n {\n path: 'week-view',\n loadChildren: () =>\n import('./calendar/week-view/week-view.module').then(m => m.WeekViewModule)\n },\n {\n path: 'catering',\n loadChildren: () =>\n import('./catering/catering.module').then(m => m.CateringModule)\n },\n {\n path: 'visitors',\n loadChildren: () =>\n import('./visitors/visitors.module').then(m => m.VisitorsModule)\n },\n {\n path: 'reports',\n loadChildren: () =>\n import('./reports/reports.module').then(m => m.ReportsModule)\n },\n {\n path: 'room-admin',\n loadChildren: () =>\n import('./room-admin/room-admin.module').then(m => m.RoomAdminModule)\n },\n { path: '**', redirectTo: 'day-view' }\n ]\n },\n { path: '**', redirectTo: 'day-view' }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { useHash: true })],\n exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n","import { Component, HostListener, ViewEncapsulation } from '@angular/core';\nimport { UploadManager, Amazon, Md5Workers } from '@acaprojects/ngx-uploads';\nimport { ComposerService } from '@placeos/composer';\n\nimport { detectIE } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ZoomWarningComponent } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: [\n './styles/app.component.scss',\n './styles/custom-element.styles.scss',\n './styles/native-element.styles.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent extends BaseDirective {\n constructor(\n private _composer: ComposerService,\n private _uploads: UploadManager,\n private _md5_workers: Md5Workers,\n private _service: ApplicationService,\n private _dialog: MatDialog\n ) {\n super();\n /* istanbul ignore if */\n if (detectIE() && detectIE() < 12) {\n location.href = `${location.origin}${location.pathname}assets/not-supported.html`;\n return;\n }\n // CONCIERGE.date: If invalid, reset the localstorage date and timezone when reloading pages.\n const timezoneString = localStorage.getItem('CONCIERGE.timezone') || null;\n localStorage.removeItem('CONCIERGE.date');\n if (!timezoneString) {\n localStorage.removeItem('CONCIERGE.timezone'); \n }\n\n this._md5_workers.setup('assets/md5_worker.js');\n this.initUploads();\n }\n\n ngOnInit() {\n this.adjustZoom();\n }\n\n private adjustZoom() {\n const clientWidth = document.body.clientWidth;\n if (this.isMobileOrTablet()) { // Do not show the warning if it's a mobile or tablet device\n return;\n }\n if (clientWidth < 1300) {\n this._dialog.open(ZoomWarningComponent);\n }\n }\n private isMobileOrTablet(): boolean {\n const userAgent = navigator.userAgent || navigator.vendor;\n const maxTouchPoints = navigator.maxTouchPoints || 0; // Check for touch points \n if (maxTouchPoints > 0 && window.innerWidth <= 1024) {\n return true;\n } // Check for common mobile/tablet user agent strings \n const mobileAgents = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'IEMobile', 'Opera Mini'];\n for (const agent of mobileAgents) {\n if (userAgent.indexOf(agent) > -1) {\n return true;\n }\n }\n return false;\n }\n\n private initUploads() {\n this.subscription(\n 'composer',\n this._service.initialised.subscribe((state) => {\n /* istanbul ignore else */\n if (state) {\n this.timeout('init_uploads', () => {\n const token = this._composer.auth.token;\n if (!token) {\n return setTimeout(() => this.initUploads(), 300);\n }\n this._uploads.token = token;\n this._uploads.autoStart = true;\n this._uploads.endpoint = '/api/staff/uploads';\n UploadManager.addProvider(Amazon);\n });\n this.unsub('composer');\n }\n })\n );\n }\n}\n","
\n \n
\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { FormsModule } from '@angular/forms';\nimport { MAT_LABEL_GLOBAL_OPTIONS } from '@angular/material/core';\n\nimport { ComposerModule } from '@placeos/composer';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { environment } from '../environments/environment';\nimport { SharedContentModule } from './shared/shared.module';\nimport {\n ActionReducer,\n MetaReducer,\n StoreModule\n} from '@ngrx/store';\nimport { localStorageSync } from 'ngrx-store-localstorage';\nimport { ShellWrapperComponent } from './shell/shell.component';\nimport { provideMockSettingsObject } from '@mckinsey-converge/data-common';\nimport { DEFAULT_SETTINGS } from 'src/environments/settings';\nimport { ENVIRONMENT_TOKEN } from '@mckinsey-converge/environment';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BookingsModule } from 'src/app/bookings/bookings.module';\nimport { BookingsModule as BookingModuleStaff } from '@mckinsey-converge/bookings';\nimport { CalendarModule } from 'src/app/calendar/calendar.module';\nimport { EffectsModule } from '@ngrx/effects';\n\ndeclare global {\n interface Window {\n app_loaded: boolean;\n }\n}\n\n/**\n * Cache some state in local storage. Not for use in production.\n */\n export function localStorageSyncReducer(reducer: ActionReducer): ActionReducer {\n // Keys needed to fix prod reloading. MCK-1229\n let keys = [\n 'buildings',\n 'bookingForm',\n 'rooms',\n ];\n\n if (!environment.production) {\n keys = [\n 'bookings',\n 'buildings',\n 'organisation',\n 'bookingForm',\n 'rooms',\n 'user'\n ];\n }\n\n return localStorageSync({\n keys,\n rehydrate: true,\n })(reducer);\n}\n\nconst metaReducers: Array> = [localStorageSyncReducer];\n\n@NgModule({\n declarations: [\n AppComponent,\n ShellWrapperComponent\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n AppRoutingModule,\n HttpClientModule,\n FormsModule,\n ComposerModule,\n BookingsModule,\n CalendarModule,\n LegacyOverlaysModule,\n SharedContentModule,\n StoreModule.forRoot({}, { metaReducers }),\n BookingModuleStaff,\n EffectsModule.forRoot(),\n ],\n providers: [\n { provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'nevet' } },\n provideMockSettingsObject(DEFAULT_SETTINGS),\n { provide: ENVIRONMENT_TOKEN, useValue: environment }\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule {\n constructor() {\n window.app_loaded = true;\n }\n}\n","import {Component, OnInit, Inject, Output, EventEmitter} from '@angular/core';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {first} from 'rxjs/operators';\nimport {BaseDirective, closestToTimeSlotTz} from '@mckinsey-converge/base';\nimport {\n Booking,\n BookingAction,\n generateBookingForm, OrganisationService, RecurrencePeriod, removeExpiredOcurrences, SeriesAction, validDateTZ\n} from '@mckinsey-converge/data-common';\nimport {AvailableBookingFields} from '@mckinsey-converge/data-common';\nimport {ApplicationService} from '@mckinsey-converge/data-common';\nimport {HashMap, DialogEvent} from '@mckinsey-converge/base';\nimport {CateringDetailsModalComponent, CateringDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {BookingConfirmComponent} from '@mckinsey-converge/legacy-overlays';\nimport {RequirementDetailsModalComponent, RequirementDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {SpacesService} from '@mckinsey-converge/data-common';\nimport { ConflictsModalComponent, ConflictsModalComponentData, OverrideChangesModalComponent } from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { I } from '@angular/cdk/keycodes';\n\n\nexport interface BookingFlowEvent {\n /** Type of flow event */\n type: 'previous' | 'next' | 'reset' | 'close' | 'error';\n /** Step which the event was emitted from */\n step: string;\n /** Additional metadata for the event */\n metadata?: HashMap;\n}\n\nexport interface BookingModalData {\n /** Booking to create/edit */\n booking: Booking;\n /** Whether to edit only catering */\n only_catering?: boolean;\n /** Pass in timezone for new bookings */\n timezone?: string;\n /**Type of action on a series */\n action?: SeriesAction | BookingAction;\n //** If Booking request from day view grid click */\n isFromGrid?: boolean;\n}\n\n@Component({\n selector: 'a-booking-modal',\n templateUrl: './booking-modal.component.html',\n styleUrls: ['./booking-modal.component.scss'],\n})\nexport class BookingModalComponent extends BaseDirective implements OnInit {\n\n /** Range of dates for the Start Date Picker*/\n public from_start: DateTZ;\n public to: DateTZ;\n\n /** Range of dates for the Start Date Picker*/\n public from_end: DateTZ;\n\n /** Form fields */\n public form: FormGroup;\n /** Form data store */\n public booking: Booking;\n /** Step of the booking flow that is currently active */\n public flow_step: string;\n public modalTitle: string;\n\n public iscloning: SeriesAction | BookingAction | null = null;\n\n public edit_recurrence: boolean\n\n /** Whether to edit only catering */\n public get only_catering(): boolean {\n return !!this._data.only_catering;\n }\n\n @Output() public event = new EventEmitter();\n\n /** List of available booking fields for the form */\n public get available_fields(): AvailableBookingFields[] {\n return this._service.setting('app.booking.show_fields') || [];\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.getModalTitle();\n this._dialog_ref.disableClose = true;\n this._spaces.initialised.pipe(first(_ => _)).subscribe(() => {\n this.flow_step = this._data.only_catering ? 'catering' : 'form';\n this.loadFormData();\n });\n }\n\n public getModalTitle() {\n switch (this._data.action) {\n case BookingAction.EDIT:\n this.modalTitle = 'Edit Booking';\n break;\n case SeriesAction.CLONE:\n this.modalTitle = 'Clone Recurring Series';\n break;\n case BookingAction.CLONE:\n this.modalTitle = 'Clone Booking';\n break;\n case SeriesAction.EDIT:\n this.modalTitle = 'Edit Series';\n break;\n default:\n this.modalTitle = 'New Booking';\n break;\n }\n }\n\n /**\n * Handle events from child components\n * @param event Booking flow event\n */\n public handleFlowEvent(event: BookingFlowEvent) {\n /* istanbul ignore else */\n if (event.type === 'next') {\n this.toNextFlowStep(event);\n } else if (event.type === 'previous') {\n this.toPreviousFlowStep(event);\n } else if (event.type === 'reset') {\n this.resetForm();\n }\n }\n\n public close() {\n this._dialog_ref.close();\n }\n\n\n private toNextFlowStep(event: BookingFlowEvent) {\n const space_list = this.form.controls.space_list.value;\n switch (event.step) {\n case 'recurrence':\n this.openRecurrenceConflictsModal();\n break\n case 'search':\n if (\n space_list &&\n space_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'equipment')\n ) {\n this.openEquipmentDetailsModal();\n } else {\n if (this.form.controls.has_catering && this.form.controls.has_catering.value) {\n this.navigate('catering');\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n }\n break;\n case 'catering':\n const order_list = this.form.controls.catering.value;\n if (\n order_list.find(order => this.form.controls.space_list.value.find(space => space.email === order.location_id)) &&\n order_list &&\n order_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'details')\n ) {\n this.openCateringDetailsModal();\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n break;\n case 'changes':\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n break;\n default:\n this.form.markAsDirty();\n //const is_recurr_series_edit = this.booking.id && this.form.controls.is_recurrent.value && this._data.action\n const is_recurr_series_edit = this.booking.id && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT || this._data.action === BookingAction.CLONE\n )\n if (!space_list || !space_list.length || !this.booking.id || is_recurr_series_edit || this.booking.is_multiroom) {\n this.navigate('search');\n } else if (this.booking.id && space_list && space_list.length) {\n this.openEquipmentDetailsModal();\n } else {\n this.confirmBooking();\n }\n break;\n }\n }\n\n private toPreviousFlowStep(event: BookingFlowEvent) {\n switch (event.step) {\n case 'search':\n this.navigate('form');\n break;\n case 'catering':\n /* istanbul ignore else */\n if (!this._data.only_catering) {\n this.navigate('search');\n }\n else {\n this.close();\n }\n break;\n }\n }\n\n private navigate(route: string) {\n this.flow_step = route;\n }\n\n /** Clear user changes to the form data */\n private resetForm() {\n delete this.form;\n // Pass in the desired location timezone\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone,\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n }\n\n /**\n * Load existing form data or generate a new booking form\n *\n * It fires when the modal first opens.\n * this._data.booking is an empty {} when creating a booking but set when editing\n */\n private loadFormData(): void {\n const form_data: HashMap = this._data.booking ? this._data.booking.toJSON() : {};\n form_data.duration = form_data.duration || form_data?.startDateTz?.dateDiff(form_data?.endDateTz, 'minutes') || 0\n //\n /**\n * Set the desired timezone in the booking creation.\n * this._data?.timezone is when creating a new booking\n * this._data.booking?.timezone is when editing a booking\n *\n * R-- refactor to make consistent atm _data.timezone is defined everywhere\n * but generateBookingForm could use form_data.timezone\n */\n form_data.timezone = this._data.booking?.timezone || this._data?.timezone;\n // start a new booking out with a start end time.\n\n const is_cloning_or_edit = this._data.action === SeriesAction.CLONE ||\n this._data.action === BookingAction.CLONE ||\n this._data.action === BookingAction.EDIT ||\n this._data.action === SeriesAction.EDIT;\n\n if (\n ( !this._data?.isFromGrid && ( !form_data.startDateTz || form_data.startDateTz.isBeforeDate(DateNow()) ) )\n && !this._data.only_catering && !is_cloning_or_edit\n ) {\n form_data.startDateTz = closestToTimeSlotTz(new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: form_data.timezone }), 15);\n form_data.start_epoch = form_data.startDateTz.seconds;\n form_data.endDateTz = form_data.startDateTz.addValue({ minutes: form_data.duration });\n form_data.end_epoch = form_data.endDateTz.seconds;\n }\n this.booking = new Booking(form_data);\n\n if(this.booking.is_recurrent && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT\n )){ //if it's series get the recurrence_end from the occurences\n this.booking.recurrence_endTz = this.booking.recurrenEndFromOcurrences(this.booking.occurrence_details)\n }\n\n\n // An empty booking here is when creating a new booking, edit booking will populate all the values\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone, // MUST be defined in dialog.open(BookingModalComponent or booking will revert to a local timezone\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n\n // localize the booking form start time\n /* istanbul ignore else */\n if (form_data && form_data.room_ids && this.form.controls.space_list) {\n this.form.controls.space_list.setValue(\n form_data.room_ids.map(id => this._spaces.find(id) || {id, name: id})\n );\n }\n\n this.edit_recurrence = this.booking?.id\n && (this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === SeriesAction.CLONE);\n\n if (this._data.action === SeriesAction.CLONE || this._data.action === BookingAction.CLONE) {\n\n this.iscloning = this._data.action === SeriesAction.CLONE ? SeriesAction.CLONE : BookingAction.CLONE;\n\n this._data.action === BookingAction.CLONE\n ? this.form.get('title').setValue(`Clone ${this.booking.title}`)\n : this.form.get('title').setValue(`Series Clone ${this.booking.title}`);\n\n this.form.get('id').setValue('');\n this.form.get('organiser').enable();\n\n if (this._data.action === BookingAction.CLONE) {\n this.form.get('is_recurrent').setValue(false);\n this.form.get('is_recurrent').disable();\n }\n const tz = this._org.building.timezone;\n this.form.patchValue({ timezone: tz });\n\n // Check if the booking is a list, if so then updates the value for start and end date fields.\n if (form_data.recurrence_period === RecurrencePeriod.LIST) {\n removeExpiredOcurrences(this.form)\n }\n\n // cloning individual occurrence set tup\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n // case 1: past booking\n if (start_time.isBeforeDate(date_now, \"day\")) {\n if (form_data.recurrence_period !== RecurrencePeriod.LIST) {\n this.form.controls.dateTz.setValidators([\n Validators.required,\n validDateTZ\n ]);\n this.form.controls.dateTz.updateValueAndValidity();\n this.form.controls.dateTz.markAsTouched();\n this.form.controls.is_before_date.setValue(true);\n\n if(this._data.action === BookingAction.CLONE && this.form.controls.all_day.value === true) {\n this.form.get('dateTz').enable();\n }\n }\n }\n\n // case 2: booking is in the same day but but the start time has already passed\n if (\n start_time.isSameDate(date_now, \"day\") && start_time.startEpoch() < date_now.startEpoch()\n ) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n\n // case 3: future booking nothing to do\n //Nothing to do\n }\n\n if (\n this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === BookingAction.EDIT\n ) {\n const tz = this._org.building.timezone;\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n if (\n start_time.isSameDate(date_now, \"day\") && (\n start_time.startEpoch() <= date_now.startEpoch() &&\n start_time.addValue({ minutes: this.booking.duration}).startEpoch() >= date_now.startEpoch())\n ) {\n this.form.controls.is_before_date.setValue(true);\n }\n\n if (start_time.isSameDate(date_now, \"day\") && start_time.addValue({ minutes: this.booking.duration}).startEpoch() < date_now.startEpoch()) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n }\n\n if (!this.booking.catering.length) {\n const notes = this.booking.notes.filter(note => note.type !== 'catering');\n\n this.form.get('notes').setValue(notes);\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openEquipmentDetailsModal() {\n const equipment_ref = this._dialog.open(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n codes_field: this.form.controls.equipment_codes,\n head_counts_field: this.form.controls.expected_attendees\n }\n });\n this.subscription(\n 'equipments_modal_events',\n equipment_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n metadata: {ref: 'equipment'}\n });\n equipment_ref.close();\n }\n })\n );\n equipment_ref.afterClosed().subscribe(() => this.unsub('equipments_modal_events'));\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openCateringDetailsModal() {\n const catering_ref = this._dialog.open(\n CateringDetailsModalComponent,\n {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n catering: this.form.controls.catering,\n booking: this.booking\n }\n }\n );\n this.subscription(\n 'catering_modal_events',\n catering_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'catering',\n metadata: { ref: 'details' }\n });\n catering_ref.close();\n }\n })\n );\n catering_ref.afterClosed().subscribe(() => this.unsub('catering_modal_events'));\n }\n\n /*\n Open overriding changes modal - disabled for CNG-541\n */\n private overrideChanges() {\n const ref = this._dialog.open(OverrideChangesModalComponent, {\n width: '576px',\n data: {\n edits: this.booking.occurrence_edits,\n timezone: this.booking.timezone\n }\n });\n ref.componentInstance.event.subscribe(event => {\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n ref.close();\n } else if (event.reason === 'close') {\n ref.close();\n }\n });\n }\n\n /**\n * Open modal to confirm the booking details\n */\n private confirmBooking() {\n /* Clear recurrence validator if only catering is being edited */\n if(this.only_catering){\n this.clearRecurrenceValidators()\n }\n\n /* istanbul ignore else */\n if (this.form.valid || this.only_catering) {\n const formValues = this.form.value;\n // this.booking is the booking being edited, not much to it on a new booking\n // having an empty booking is used in determining changes I assume.\n const startDateTz = this.form.controls.dateTz.value\n const endDateTz = startDateTz.addValue({ minutes: formValues.duration })\n const booking = {\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(this.booking) : this.booking.toJSON()),\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(formValues) : formValues),\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: formValues.space_list[0],\n multi_rooms: formValues.space_list.map(room => room),\n };\n\n const dialog_ref = this._dialog.open(BookingConfirmComponent, {\n width: '32em',\n maxWidth: '95vw',\n maxHeight: '95vh',\n data: {\n old_booking: this.booking,\n booking: new Booking(booking),\n action: this._data.action\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n dialog_ref.componentInstance.event.subscribe(event => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.close();\n this.event.emit({ reason: 'done', metadata: this.form});\n } else if (event.reason === 'action') {\n this.resetForm();\n }\n else if(event.reason === 'last-moment-conflict') {\n this.form.patchValue({space_list: []}, {emitEvent: true});\n // this.handleFlowEvent({ type: 'reset', step: 'search' })\n dialog_ref.close();\n }\n });\n }\n }\n\n private sanitizeBookingFromCloning(booking: Booking | Object): Object {\n const obj = booking instanceof Booking ? booking.toJSON() : booking;\n return {...Object.keys(obj).reduce((acc, key) => {\n if(\n key.search(/^recurrence_/) === -1\n && key.search(/^occurrence_/) === -1\n ) {\n acc[key] = obj[key]\n };\n\n return acc;\n }, {}),\n is_recurrent: false\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openRecurrenceConflictsModal() {\n const recurr_ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.form.controls.space_list.value[0].name,\n conflicts: this.form.controls.recurrence_exceptions.value,\n timezone: this.booking.timezone\n }\n });\n this.subscription(\n 'conflicts_modal_events',\n recurr_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(this.booking.occurrence_edits && this.booking.occurrence_edits.length && event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'changes',\n });\n } else {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n }\n }\n recurr_ref.close();\n })\n );\n recurr_ref.afterClosed().subscribe(() => this.unsub('conflicts_modal_events'));\n }\n\n public get title(){\n const type = this.booking?.id ? 'Edit' : 'New'\n return `${type} ${this.edit_recurrence ? 'recurring' : ''} booking`\n }\n\n private clearRecurrenceValidators() {\n const recurrenceStarts = this.form.controls.recurrence_starts\n recurrenceStarts.clearValidators()\n recurrenceStarts.updateValueAndValidity()\n }\n}\n","
\n
\n \n {{ modalTitle }}\n
\n \n
\n\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'booking-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class BookingCateringComponent {\n /** Form fields for the booking */\n @Input() public form: FormGroup; // R-- maybe add booking timezone has hidden form field since the date timestamp is from here\n /** Whether catering is the only action in the flow */\n @Input() public only: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Active order to display details for */\n public active_order: CateringOrder;\n\n /** Field for storing catering details */\n public get catering_field() {\n return this.form && this.form.controls.catering ? this.form.controls.catering : null;\n }\n\n /** List of spaces selected for the booking */\n public get space_list(): Space[] {\n return this.form && this.form.controls.space_list\n ? this.form.controls.space_list.value\n : [];\n }\n\n /** Date of the booking */\n public get dateTz(): DateTZ {\n const now = DateNow(new Date())\n return this.form && this.form.controls.dateTz\n ? this.form.controls.dateTz.value\n : now.startOfValue('minute');\n }\n\n /** Duration of the booking */\n public get duration(): number {\n return this.form && this.form.controls.duration ? this.form.controls.duration.value : 60;\n }\n\n /** Whether booking is all day */\n public get all_day(): boolean {\n return this.form && this.form.controls.all_day && this.form.controls.all_day.value;\n }\n\n /** Create a new catering order */\n public newOrder(): void {\n const order = new CateringOrder({\n booking_timezone: this.dateTz.building_tz,\n });\n this.active_order = order;\n }\n\n /** Handle changes to catering order */\n public handleOrderEvent(order: CateringOrder) {\n // active_order = null\n if (!order) {\n this.active_order = null;\n }\n /* istanbul ignore else */\n if (order) {\n let orders = this.form.controls.catering.value;\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n // Tack on or replace the order\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n // Sort by delivery_time\n orders = orders.sort((a,b) => {\n if ( a.delivery_time < b.delivery_time) {\n return -1;\n }\n if ( a.delivery_time < b.delivery_time) {\n return 1;\n }\n return 0\n });\n this.form.controls.catering.setValue(orders);\n this.form.markAsDirty();\n }\n this.active_order = null;\n }\n}\n","
\n \n \n \n
\n\n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-category-display',\n templateUrl: './category.component.html',\n styleUrls: ['./category.component.scss']\n})\nexport class CateringMenuCategoryComponent {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Form control for the list of order items */\n @Input() public items: FormControl;\n /** Currency symbol for the active space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for close events */\n @Output() public close = new EventEmitter();\n}\n","
\n
\n \n
{{ category?.name }}
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n \n
\n
\n Category contains no available items\n
\n
\n
\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport {\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData,\n} from '@mckinsey-converge/legacy-overlays';\n\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\nimport { BehaviorSubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ninterface StartEndResponse {\n timezone: string, \n start: DateTZ;\n end: DateTZ\n}\n\n@Component({\n selector: 'a-catering-order-details',\n templateUrl: './order-details.component.html',\n styleUrls: ['./order-details.component.scss'],\n})\nexport class BookingCateringOrderDetailsComponent extends BaseDirective implements OnInit {\n /** Catering order to edit details of */\n @Input() public order: CateringOrder;\n /** Booking date */\n @Input() public dateTz: DateTZ;\n /** Booking duration */\n @Input() public duration: number;\n /** Booking duration */\n @Input() public space_list: Space[];\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** Whether top header details should be shown */\n @Input() public hide_details: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for changes to the catering order */\n @Output() public event = new EventEmitter();\n /** Form controls for order */\n public form: FormGroup;\n /** List of available catering item categories */\n public category_list: CateringCategory[] = [];\n /** Active category to display details for */\n public active_category: CateringCategory;\n /** List of available times for delivering catering */\n public available_times: Identity[] = [];\n /** Whether the menu is loading */\n public loading: boolean;\n /** Whether the search input should be shown */\n public show_search: boolean;\n /** Current search string for filtering */\n public readonly search$ = new BehaviorSubject('');\n /** List of menu items that match the search string */\n public matched_items: CateringItem[] = [];\n\n @ViewChild('input') private _input_el: ElementRef;\n\n /** Whether user is able to order from the currently selected space */\n public get can_order(): boolean {\n return (\n (this.active_building.has_catering || this.category_list.length) &&\n (this.has_available_items) &&\n !this.out_of_hours\n );\n }\n\n /** Whether booking is with the restricted ordering period */\n // R--- different in staff, but should it be?\n public get within_restricted_time(): boolean {\n return false;\n }\n\n /** Building associated with the selected space */\n public get active_building(): Building {\n const form = this.form || { controls: { location_id: { value: '' } } };\n const form_controls = (form).controls;\n const space: Space =\n this.space_list.find((space) => space.email == form_controls.location_id.value) ||\n ({ level: {} } as any);\n return (\n this._org.buildings.find((bld) => space.level.building_id === bld.id) ||\n ({ catering_restricted_from: 0 } as any)\n );\n }\n\n /** Currency code for the active building */\n public get symbol(): string {\n return this.active_building.currency || 'USD';\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n return this.form\n ? this.form?.controls?.items?.value.reduce((total, item) => total + item.amount, 0)\n : 0;\n }\n\n /* istanbul ignore next */\n /** Whether booking time is outside of catering hours */\n public get out_of_hours(): boolean {\n return this.form?.controls?.delivery_time.value < 0;\n }\n\n /** Whether items are available for order at anytime */\n public get has_available_items(): boolean {\n return this.category_list.reduce(\n (available, category) => available || category.can_order_anytime,\n true\n );\n }\n\n constructor(\n private _menu: CateringMenuService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.generateAvailableTimes();\n this.subscription(\n 'search',\n this.search$\n .pipe(\n map((str) => {\n const search = str.toLowerCase();\n const items = [];\n for (const category of this.category_list) {\n if (category.items) {\n for (const group of category.items) {\n if ((group as any).items.length) {\n if (\n (group as any).package &&\n (group.name.toLowerCase().includes(search) ||\n (group as any).items.find((item) =>\n item.name.toLowerCase().includes(search)\n ))\n ) {\n items.push(group);\n } else {\n for (const item of (group as any).items) {\n if (item.name.toLowerCase().includes(search)) {\n items.push(item);\n }\n }\n }\n } else {\n if (group.name.toLowerCase().includes(search)) {\n items.push(group);\n }\n }\n }\n }\n }\n return items;\n })\n )\n .subscribe((items) => (this.matched_items = items))\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.dateTz || changes.duration) {\n this.generateAvailableTimes();\n /* istanbul ignore else */\n if (\n this.form &&\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n /* istanbul ignore else */\n if (changes.space_list) {\n /* istanbul ignore else */\n if (this.form && this.space_list && !this.form.controls.location_id.value) {\n this.form.controls.location_id.setValue(this.space_list[0].email);\n }\n }\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.initForm();\n }\n }\n\n public focusSearch() {\n if (this._input_el && this.show_search) {\n this._input_el.nativeElement.focus();\n }\n }\n\n public flattenArray(arr: T[]): T[] {\n return arr.reduce((acc, val) => acc.concat(val), []);\n }\n\n public initForm() {\n if(Array.isArray(this.space_list[0])){\n // this.space_list = [...this.space_list[0]];\n this.space_list = this.flattenArray(this.space_list);\n }\n this.form = new FormGroup({\n id: new FormControl(this.order.id),\n booking_date: new FormControl(this.dateTz.ms), // R-- different in staff\n location_id: new FormControl(this.order.location_id || this.space_list[0].email),\n delivery_time: new FormControl(this.order.delivery_time || this.available_times[0]?.id),\n items: new FormControl(this.order.items.map((item) => new CateringItem(item))),\n });\n this.subscription(\n 'space_change',\n this.form.controls.location_id.valueChanges.subscribe((space) => {\n this.generateAvailableTimes();\n if (\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n this.form.controls.items.setValue([]);\n this.loadMenu();\n })\n );\n this.loadMenu();\n this.generateAvailableTimes();\n if (\n this.form &&\n !this.available_times.find((time) => time.id === this.form.controls.delivery_time.value)\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n\n public confirmOrder() {\n const ref = this._dialog.open<\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData\n >(BookingCateringConfirmModalComponent, {\n maxWidth: '95vw',\n data: {\n all_day: this.all_day,\n dateTz: this.dateTz,\n form: this.form,\n },\n });\n this.subscription(\n 'confirm_event',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n // R--- add booking_date and timezone\n // this.order bookingDateTz is missing correct timezone.\n const order = new CateringOrder({ ...this.order, ...this.form.value });\n this.event.emit(order);\n ref.close();\n }\n })\n );\n ref.afterClosed().subscribe(() => this.unsub('confirm_event'));\n }\n\n private loadMenu() {\n const space = this.space_list.find(\n (space) => space.email === this.form.controls.location_id.value\n );\n this.loading = true;\n this._menu\n .query({ zone_id: this._org.buildings.find((bld) => space.zones.includes(bld.id))?.id })\n .then(\n (list) => {\n this.loading = false;\n this.category_list = list\n .map((i) => new CateringCategory(i))\n .filter(c => !c.out_of_stock);\n },\n () => (this.loading = false)\n );\n }\n\n /** Generate a list of available delivery times for the given booking time */\n private generateAvailableTimes() {\n let { timezone, start, end } = this.generateStartAndEndTimes();\n start = start.setValue({ minute: Math.ceil(start.minutes / 5) * 5 });\n // will be different from staff in these commonly named methods.\n // R--- Form Controls TBD\n // R--- The timezone here doesn't seem legit, back to putting into a form hidden field\n let start_date = this.dateTz; // new DateTZ({ date: this.date, building_tz: timezone, is_local_tz: false});\n start_date.logDateTz('start date')\n this.available_times = [];\n while (start.isBeforeDate(end)) {\n this.available_times.push({\n id: Math.abs(start_date.dateDiff(start, 'minutes')),\n name: start.formatDate('h:mma').toLocaleLowerCase(),\n });\n start = start.addValue({ minutes : 5});\n }\n /* istanbul ignore else */\n if (this.available_times.length === 0) {\n this.available_times.push({ id: -1, name: 'Out of hours' });\n }\n }\n\n private generateStartAndEndTimes(): StartEndResponse {\n const now = DateNow(new Date())\n let timezone = now.local_tz;\n const space_email = this.space_list[0]?.email;\n let catering_hours = { start: 7, end: 20 };\n // R--- change date input to dateTz input.\n // R--- Same issue as the above generateAvailableTimes\n const date_ = this.dateTz; // new DateTZ({date: this.date, building_tz: timezone, is_local_tz: false})\n let building_time = date_.startOfValue('day');\n let cat_start_time = building_time.addValue({ hours: catering_hours.start });\n let cat_end_time = building_time.addValue({ hours: catering_hours.end });\n\n if (space_email) {\n // Fetch the Space and Building\n const space = this.space_list.find((space) => space.email === space_email);\n const building = this._org.buildings.find((bld) => space?.zones.includes(bld.id));\n if (building?.timezone) {\n // Update to the building timezone if defined.\n timezone = building.timezone;\n building_time = date_.toZone(timezone).startOfValue('day');\n }\n if (building?.catering_hours) {\n // Update to the building catering hours if defined.\n catering_hours = building?.catering_hours;\n }\n // Update the hours with the currently defined timezone.\n cat_start_time = building_time.addValue({ hours: catering_hours.start });\n cat_end_time = building_time.addValue({ hours: catering_hours.end });\n }\n\n // Start Time of the Booking\n let start = date_.toZone(timezone);\n let end = date_.toZone(timezone).addValue({ minutes: this.duration });\n\n // Do the booking start and end time coincide with the catering hours?\n if (start.isBeforeDate(cat_start_time)) {\n // booking start before catering opens'\n if (cat_end_time.isAfterDate(start)) {\n // catering closes after booking starts'\n start = cat_start_time.addValue({});\n } else {\n // were just closed, catering closes before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking starts after catering is open'\n if (cat_end_time.isBeforeDate(start)) {\n // were just closed, catering closed before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n }\n\n if (end.isBeforeDate(cat_end_time)) {\n // booking ends before catering closes'\n \n if (cat_start_time.isAfterDate(end)) {\n // were just closed, catering opens is after booking ends'\n start = cat_start_time.addValue({});\n end = cat_start_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking ends after catering closes'\n // set the booking end to the catering close time.'\n end = cat_end_time.addValue({});\n }\n\n return { timezone, start, end };\n }\n}\n","
\n
\n
\n
\n \n \n \n \n {{ space.local_name }}\n \n \n \n
\n
\n \n \n \n \n {{ time.name }}\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n \n
\n
{{ item.name }}
\n \n
\n
\n
\n
\n
\n \n Back\n \n \n Confirm Order({{ item_count || '0' }})\n \n
\n
\n\n
\n
\n \"No\n
\n

\n Catering is not available for this booking.
\n Catering must be ordered within business hours at {{ active_building?.name }}.\n

\n
\n
\n\n
\n
\n
\n \n
\n
\n Loading menu for {{ active_building?.name }}...\n
\n
\n
\n
\n\n \n\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'catering-order-list-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class CateringOrderListItemComponent implements OnInit {\n /** Catering order to display */\n @Input() order: CateringOrder;\n /** */\n @Input() public space_list: Space[];\n /** Selected datetime */\n @Input() date: number;\n /** Emitter for edit events */\n @Output() public edit = new EventEmitter();\n /** Emitter for delete events */\n @Output() public delete = new EventEmitter();\n\n public room: Space;\n\n public ngOnInit(): void {\n this.room = (this.space_list || []).find(space => space.email === this.order.location_id);\n }\n\n public get space_in_booking(): boolean {\n return !!this.room;\n }\n\n /** Space selected for delivery */\n public get local_space_name(): string {\n return this.room?.local_name || '';\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n /* istanbul ignore else */\n if (!this.order) {\n return '';\n }\n return this.order.bookingDateTz.addValue({ minutes: this.order.delivery_time || 0}).formatDate('h:mma').toLocaleLowerCase();\n }\n\n\n /** Total cost of the order */\n public get order_cost(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount * item.unit_price, 0);\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n const space = this._spaces.find((this.order || {}).location_id);\n /* istanbul ignore else */\n if (!space || !space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n constructor(private _spaces: SpacesService, private _org: OrganisationService) {}\n}\n","
\n Deliver to {{ local_space_name }} at {{ delivery_time }}\n
\n
\n
\n {{ item_count }}\n { item_count, plural, =1 { item } other { items } }\n
\n
{{ order_cost / 100 | currency: symbol }}
\n
\n
\n \n \n\n \n
\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { BookingFlowEvent } from '../../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-list',\n templateUrl: './order-list.component.html',\n styleUrls: ['./order-list.component.scss']\n})\nexport class BookingCateringOrderListComponent implements OnInit{\n /** Form field for storing catering orders */\n @Input() public catering: FormControl;\n /** Selected datetime for the booking */\n @Input() public date: number;\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** */\n @Input() public space_list: Space[];\n /** Whether catering is the only action in the flow */\n @Input() public only_catering: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Emiiter for order events */\n @Output() public order = new EventEmitter();\n\n public ngOnInit(): void {\n if(this.space_list && this.space_list.length) {\n this.catering.value.forEach(catering => {\n catering.location = this.space_list[0].name; \n catering.location_id = this.space_list[0].email;\n catering.bookingDateTz = this.date;\n });\n }\n }\n\n /** List of orders in the booking */\n public get orders(): CateringOrder[] {\n /* istanbul ignore else */\n if (!this.catering) {\n return [];\n }\n return this.catering.value;\n }\n\n /** Emit event for a new catering order */\n public newOrder() {\n this.order.emit();\n }\n\n /** Emit event for editing existing order */\n public editOrder(order: CateringOrder) {\n this.order.emit(order);\n }\n\n /** Remove order from the list */\n public deleteOrder(order: CateringOrder) {\n const orders = this.orders;\n const index = orders.findIndex(an_order => order.id === an_order.id);\n /* istanbul ignore else */\n if (index >= 0) {\n orders.splice(index, 1);\n this.catering.setValue(orders);\n }\n }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n this.event.emit({ type: 'next', step: 'catering' });\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'catering' });\n }\n}\n","
\n
\n

Catering Orders

\n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n Back\n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders
\n \n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { unique } from '@mckinsey-converge/base';\n\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'booking-space-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class BookingSpaceFiltersComponent extends BaseDirective implements OnInit {\n /** Date selected for the booking */\n @Input() public date: FormControl;\n /** List of location IDs being filtered on */\n @Input() public locations: string[] = [];\n /** Preselected buildings */\n @Input() public initBuildings: string[] = [];\n /** Emitter for changes to location filter */\n @Output() public locationsChange = new EventEmitter();\n /** List of available buildings */\n public building_list: Building[] = [];\n /** Whether to show the location list */\n public show_locations: boolean;\n\n public get date_() {\n // R--- another instance, can the form control date be TZ aware\n return new DateTZ({date: this.date.value}) \n }\n\n /** Whether active date is current day */\n public get is_today(): boolean {\n const now = DateNow(new Date())\n return now.isSameDate(this.date_, 'day');\n }\n\n /** Display string for the selected date */\n public get date_display(): string {\n // R--- needs to be TZ aware because of day is relative\n return this.is_today ? 'Today' : this.date_.formatDate('dd MMM yyyy');\n }\n\n /** List of filtered location */\n public get location_list(): Building[] {\n return this.locations.map(id => this.building_list.find(bld => bld.id === id));\n }\n\n public get building_selected(): HashMap {\n const map = {};\n for (const id of this.locations) {\n map[id] = true;\n }\n return map;\n }\n\n constructor(private _org: OrganisationService) {\n super();\n }\n\n public changeDate(amount: number) {\n let date = this.date_.addValue({ 'days': amount });\n const now_ = DateNow(new Date())\n const now = now_.startOfValue('minute');\n if (date.isBeforeDate(now)) {\n date = now;\n }\n this.date.setValue(date.ms);\n }\n\n public ngOnInit(): void {\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n this.building_list = bld_list;\n if (Array.isArray(this.initBuildings)) {\n this.locations = unique(this.initBuildings);\n } \n }));\n }\n\n /**\n * Update location filter to include the given building\n * @param building Building to add\n */\n public addLocationFilter(building: Building): void {\n this.locations.push(building.id);\n this.locations = unique(this.locations);\n this.locationsChange.emit(this.locations);\n }\n\n /**\n * Remove location from the active filters\n * @param building Building to remove\n */\n public removeLocationFilter(building: Building) {\n this.locations.splice(\n this.locations.findIndex(id => building.id === id),\n 1\n );\n this.locationsChange.emit([...this.locations]);\n }\n}\n","
\n
\n
\n \n
{{ date_display }}
\n \n
\n
\n
\n \n
\n Select locations(s)\n
\n \n
\n
\n
\n
\n \n \n {{ building.name }}\n \n \n \n
\n
\n\n \n\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n EventEmitter,\n Output,\n OnChanges\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport {\n debounceTime,\n distinctUntilChanged,\n switchMap,\n catchError,\n map,\n first,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\nimport { BehaviorSubject, Observable, of, Subject } from 'rxjs';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Booking, BookingAction, BookingStateService, ISpaceAvailabilityOptions, mapBuildingToSelectOption, mapCityToAllSelectOption, SeriesAction, toggleSelectedByGroup } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { randomInt } from '@mckinsey-converge/base';;\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatChipsModule} from '@angular/material/chips';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { NoCateringModalComponent } from '@mckinsey-converge/legacy-overlays';\n@Component({\n selector: 'booking-find-space',\n templateUrl: './find-space.component.html',\n styleUrls: ['./find-space.component.scss'],\n})\nexport class BookingFindSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** Form control for setting the active space */\n @Input() public spaces: FormControl;\n /** Form group for booking */\n @Input() public form: FormGroup;\n\n @Input() public isCloning: SeriesAction | BookingAction | null;\n\n @Input() public booking: Booking;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n /** List of spaces available during the required period */\n public space_list: Space[] = [];\n /** List of users from an API search */\n public search_results$: Observable;\n /** Whether space list is loading */\n public loading: boolean;\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n\n public searchQuery: string = '';\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n public savedSelection = [];\n\n public selectedSpace: Array = [];\n\n public oldSpace = [];\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether multiple spaces are allowed to be selected */\n public get multiple(): boolean {\n return this._service.setting('app.booking.multiple_spaces');\n }\n\n public get has_valid_space() {\n if(!Array.isArray(this.spaces.value)){\n this.spaces.setValue([this.spaces.value]); \n }\n return this.spaces?.value?.some(_ => _.id && _.bookable);\n }\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public OriginalSpaceList: any;\n\n public disableCondition: boolean = false;\n\n public noCateringDialogRef: MatDialogRef;\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld = []) => {\n this.loading = true;\n request_id = randomInt(9999_9999);\n const dateTz = this.form.controls.dateTz.value;\n\n const ignore = this.form.controls.action?.value === SeriesAction.EDIT ? this.form.controls.id.value : null\n\n // R--- need to pass on the all day param and let libs/data-common/src/lib/spaces/spaces.service.ts \n // availability do the math.\n let query: ISpaceAvailabilityOptions = {\n dateTz: this.form.controls.all_day.value\n ? dateTz.startOfValue('day').startOfValue('minute').startOfValue('second')\n : dateTz.startOfValue('minute').startOfValue('second'),\n duration: this.form.controls.all_day.value\n ? 24 * 60\n : this.form.controls.duration.value,\n zone_ids: bld.length ? bld : this._org.building.id,\n bookable: true,\n recurrence_count: this.form.controls.recurrence_count.value,\n recurrence_period: this.form.controls.recurrence_period.value,\n recurrence_endTz: this.form.controls.recurrence_endTz.value,\n recurrence_interval: this.form.controls.recurrence_interval.value,\n recurrence_starts: this.form.controls.recurrence_starts.value,\n is_recurrent: this.form.controls.is_recurrent.value,\n recurrence_days: this.form.controls.recurrence_days.value,\n ignore\n };\n\n /* istanbul ignore else */\n if (this.zone_ids && this.zone_ids.length) {\n query.zone_ids = this.zone_ids.join(',');\n }\n const id = request_id;\n return this._spaces.available(query).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _})),\n map((resp: { id: number, list: Space[]}) => {\n this.loading = false;\n return resp.id === request_id ? resp.list : this.space_list;\n })\n );\n\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.space_list = list.filter((space) => {\n if (!space.available && !this.form.controls.action?.value) {\n return false;\n }\n\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n }).filter(space => space.available);\n\n this.space_list.sort((a, b) => this.sort(a, b));\n if(!this.selectedOptions.value.length){\n this.setDefaultBuilding()\n }\n // this.space_list.map((space)=>{\n // if(space.id === this.spaces.value?.id){\n // this.spaces.setValue([space])\n // const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n // this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n // }\n // })\n \n if(!this.form.controls.is_multiroom.value && this.spaces.value.length>=1){\n this.spaces.setValue([this.spaces.value[0]]);\n }\n\n this.space_list.forEach((space) => {\n this.spaces.value.forEach((savedSpace) => {\n if (space.id === savedSpace.id) {\n const updatedSpaces = this.spaces.value.map(sp => sp.id === space.id ? space : sp);\n this.spaces.setValue(updatedSpaces);\n \n const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr) => recurr.date));\n }\n });\n });\n \n this.OriginalSpaceList = this.space_list;\n\n // when updating a booking, the selected spaces are not available, so add them \n if (this.form.controls.is_multiroom.value) {\n //[Deprecated]if a space is already selected, filter the available spaces by it's level id\n if (this.spaces.value[0]?.level.id.trim() !== '') {\n // const levelId = this.spaces.value[0].level.id;\n // this.space_list = this.space_list.filter((s) => s.level.id === levelId);\n this.space_list = [\n ...this.spaces.value,\n ...this.space_list.filter(\n (sv) => !this.spaces.value.some((sh) => sh.id === sv.id)\n ),\n ];\n }\n }\n \n if (\n this.isCloning === BookingAction.CLONE\n || this.isCloning === SeriesAction.CLONE\n ) {\n\n const space = this.space_list.find(space => space.id === this.booking.room.id);\n const bookable = space !== undefined;\n this.space_list = bookable && this.space_list.filter(space => space.id !== this.booking.room.id) || this.space_list;\n\n const original_space = new Space({\n ...this.booking.room,\n ...(space || {\n settings: {\n ...this.booking.room.settings,\n recurrence_availability: []\n }\n } as any),\n bookable\n });\n\n this.oldSpace = [original_space];\n this.spaces.value.some(space => space.id === original_space.id) && this.spaces.setValue([original_space]);\n this.selectedSpace = this.updateSelectedSpace(original_space, [...this.selectedSpace]); //.push(original_space);\n }\n\n if(this.form.controls.is_recurrent.value){\n this.sortByRecurrenceAvailability();\n }\n\n\n const booking_space_list = this.form.controls.space_list.value;\n\n const idsFromUpadatedSpaceList = this.space_list.map(item => item.id);\n // Check if previous selection exists in the updated list\n const isExists = booking_space_list.filter(item => idsFromUpadatedSpaceList.includes(item?.id));\n // const isExists = idsFromUpadatedSpaceList.includes(booking_space_list.id);\n\n if(booking_space_list.length !== 0 && isExists.length){\n this.spaces.setValue(booking_space_list);\n }else {\n this.spaces.setValue([]);\n }\n })\n );\n \n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: {name: city, timezone},\n value: bld_list?.filter((bld)=> bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld)=>mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ] \n this.options.next(buildings)\n }));\n\n }\n\n public updateSelectedSpace(originalSpace, selectedSpace) {\n // Check if originalSpace already exists in selectedSpace\n const index = selectedSpace.findIndex(space => space.id === originalSpace.id);\n\n if (index === -1) {\n // If originalSpace doesn't exist, push it into selectedSpace\n selectedSpace.push(originalSpace);\n } else {\n // If originalSpace already exists, remove it before pushing\n selectedSpace.splice(index, 1);\n selectedSpace.push(originalSpace);\n }\n\n return selectedSpace;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.form) {\n const onChange = (_) => this.change$.next(_);\n /* istanbul ignore else */\n if (this.form.controls.dateTz) {\n this.subscription(\n 'date_field',\n this.form.controls.dateTz.valueChanges.subscribe(onChange)\n );\n }\n /* istanbul ignore else */\n if (this.form.controls.duration) {\n this.subscription(\n 'duration_field',\n this.form.controls.duration.valueChanges.subscribe(onChange)\n );\n }\n }\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n\n // public selectSpace(space: Space) {\n // const list = this.spaces.value;\n // if (list.find((item) => item.id === space.id)) {\n // this.spaces.setValue(list.filter((item) => item.id !== space.id));\n // } else {\n // this.spaces.setValue([space]);\n // }\n // }\n\n public selectSpace(space: Space) {\n let list = this.spaces.value;\n\n if (this.form.controls.is_multiroom?.value) {\n // If multiroom is selected\n const index = list.findIndex((item) => item.id === space.id);\n if (index > -1) {\n // Remove the space if it's already selected\n list.splice(index, 1);\n // If no spaces selected now, insert original space_list\n if (list.length === 0) {\n this.space_list = this.OriginalSpaceList;\n }\n } else {\n // Add the space to the selection\n list.length < 10 ? list.push(space) : null;\n //[Deprecated]If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n }\n } else if (list.find((item) => item.id === space.id)) {\n this.spaces.setValue(list.filter((item) => item.id !== space.id));\n } else {\n this.spaces.setValue([space]);\n }\n }\n\n // public selectSpace(space: Space) {\n // let list = this.spaces?.value;\n \n // if (this.form.controls.is_multiroom?.value) {\n // // If multiroom is selected\n // const index = list.findIndex((item) => item.id === space.id);\n // if (index > -1) {\n // // Remove the space if it's already selected\n // list.splice(index, 1);\n // // If no spaces selected now, insert original space_list\n // if (list.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n // } else {\n // // Add the space to the selection\n // list.length < 10 ? list.push(space) : null;\n // // If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n // }\n // } else {\n // // Handle single space selection (as before)\n // list = list.some((item) => item.id === space.id) ? [] : [space];\n // }\n // this.spaces.setValue(list);\n // }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n if (this.form.controls.is_recurrent.value && \n this.form.controls.recurrence_exceptions.value.length) {\n const id = this.form.controls.id.value;\n if (id && this.form.controls.action?.value === 'edit') { \n this.handleEditConflicts(id);\n } else {\n this.event.emit({ type: 'next', step: 'recurrence' });\n } \n } else {\n const space_list = this.form.value.space_list;\n const catering_order = this.form.controls.catering.value;\n const has_catering_order = catering_order && catering_order.length > 0;\n \n if (space_list && space_list.length === 1 && has_catering_order) {\n const selected_space = space_list[0];\n if (!selected_space.has_catering) {\n this.openNoCateringModal();\n return;\n }\n }\n \n this.emitNextEvent();\n }\n }\n \n private openNoCateringModal() {\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n this.emitNextEvent();\n }\n if (event.reason === 'close') {\n }\n })\n );\n \n this.noCateringDialogRef.afterClosed().subscribe(() => this.unsub('no-catering-modal'));\n }\n \n private emitNextEvent() {\n if (this.booking && this.booking.occurrence_edits && this.booking.occurrence_edits.length) {\n this.event.emit({ type: 'next', step: 'changes' });\n } else {\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'search' });\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id));\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public sortByRecurrenceAvailability() {\n this.space_list.sort((a, b)=>{\n const a_availability = (a.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/a.recurrence_availability.length\n const b_availability = (b.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/b.recurrence_availability.length\n return b_availability - a_availability\n })\n }\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld)=>bld.value) \n \n });\n }\n\n public setDefaultBuilding(){\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n public clearList(){\n this.space_list = [];\n this.savedSelection = [];\n this.spaces.setValue([]);\n }\n\n public triggerSearch = () =>{\n if(this.savedSelection.length){\n this.change$.next(this.savedSelection)\n }else{\n // disabled for CNG-645\n // this.space_list = []\n }\n }\n\n public handleEditConflicts = (id: string) =>{\n /** When editing, compare exceptions with the original ocurrence list */\n const recurrence_exceptions = this.form.controls.recurrence_exceptions;\n let occurrences_org: Array\n let booking_org: Booking;\n\n this._booking_state.bookings.subscribe(bookings => {\n booking_org = bookings.filter((booking) => booking.id === id)[0]\n occurrences_org = booking_org.occurrence_details.map((ocurr)=>\n ocurr.start_epoch\n )\n })\n\n const { hours, minutes } = new DateTZ({ date: booking_org.start_epoch * 1000, is_local_tz: false, building_tz: booking_org.timezone});\n const { hours: to_hours, minutes: to_minutes } = this.form.controls.dateTz.value;\n const new_conflicts = hours === to_hours && minutes === to_minutes\n ? recurrence_exceptions.value.filter((date: number)=> occurrences_org.includes(date))\n : recurrence_exceptions.value.filter((date: number)=> !occurrences_org.includes(date));\n\n if(new_conflicts.length){\n recurrence_exceptions.setValue([...new_conflicts])\n this.event.emit({ type: 'next', step: 'recurrence' });\n }else{\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n // Property to filter spaces based on the search query\n get filteredSpaces() {\n if (!this.space_list) {\n return [];\n }\n\n // Filter spaces based on the searchQuery\n return this.space_list.filter((space) => {\n let spaceName = space.simple_name || space.settings?.room_name || space.local_name;\n return spaceName.toLowerCase().includes(this.searchQuery.toLowerCase());\n });\n }\n\n removeSpace(spaceToRemove: Space): void {\n // Filter out the space to remove from the current list of selected spaces\n const updatedSpaces = this.spaces.value.filter(space => space.id !== spaceToRemove.id);\n this.spaces.setValue(updatedSpaces);\n //[Deprecated]If this is the last space being unselected, include spaces from all levels in space_list(available spaces)\n // if (this.spaces.value.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n }\n \n}\n","
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n {{ space?.simple_name || space[0]?.simple_name }}\n \n \n \n \n \n
\n
\n \n
\n \n \n
\n

Original Selection

\n \n
\n \n
\n
\n\n\n

All Available Rooms

\n \n \n \n \n
\n
\n
\n \n Back\n \n \n Next\n \n
\n
\n
\n\n
\n
\n
\n \n
\n
\n Checking space availability...\n
\n
\n
\n
\n\n
\n
\n
\n \n
\n
\n No results available, please select another office\n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { BookingAction, SeriesAction, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-booking-space-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class BookingSpaceItemComponent extends BaseDirective {\n /** Space to display */\n @Input() public space: Space;\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** Whether multiple spaces are able to be selected */\n @Input() public multi: boolean;\n\n @Input() isCloning: boolean;\n /** Emitter for select actions on the */\n @Output() public select = new EventEmitter();\n\n /** Whether space image should be displayed */\n public get show_image() {\n return this._service.setting('app.space_display.show_images');\n }\n\n /** Whether this space is selected */\n public get selected(): boolean {\n /* istanbul ignore else */\n if (!this.form && this.space) {\n return false;\n }\n\n return (this.form.controls.space_list && !!(this.form.controls.space_list.value || []).find((space) => space.id === this.space.id));\n // return (this.form.controls.space_list && !!(this.form.controls.space_list.value.id === this.space.id));\n }\n\n public get is_hidden(): boolean {\n return false;\n }\n\n /** Whether space is booked by request */\n public get is_request(): boolean {\n return false;\n }\n\n public get availableOccurrences(): number {\n if(this.space && this.space.recurrence_availability) {\n return this.space.recurrence_availability.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this.space.recurrence_availability.length;\n }\n\n /** Display location of the space */\n public get location(): string {\n /* istanbul ignore else */\n if (!this.space) {\n return 'Unable to determine location';\n }\n const level = this.space.level;\n const bld = this._org.buildings.find((building) => building.id === level.building_id);\n return `${bld ? bld.name + ', ' : ''}${level.name}`;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n public selectSpace() {\n if(this.form.controls.is_recurrent.value){\n const spaceConflicts = this.space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n }\n this.select.emit();\n }\n\n public disableSelect(): boolean {\n if (\n this.form.controls.action.value === SeriesAction.CLONE\n && this.availableOccurrences === 0\n ) {\n return true;\n }\n\n if (\n this.form.controls.action.value === BookingAction.CLONE\n && (this.space as any).bookable === false\n ) {\n return true;\n }\n\n return false;\n }\n}\n","
\n
\n
\n
\n
{{ space.local_name }}
\n
\n
{{ location }}
\n
\n \n {{ space.capacity || '0' }}\n
\n
\n \n Available for {{ availableOccurrences }} out of {{ totalOccurrences }} occurrences\n
\n \n
\n \n {{ multi ? (selected ? 'Remove' : 'Select') : is_request ? 'Request' : 'Book' }}\n \n
\n\n","import { Component, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { setRecurrenceStartsTime } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DateTime } from 'luxon';\nimport { CateringDropComponent } from '@mckinsey-converge/ui';\nimport { ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'booking-spaces-form',\n templateUrl: './form.component.html',\n styleUrls: ['./form.component.scss']\n})\nexport class BookingSpaceFlowFormComponent {\n /** Booking form fields */\n @Input() public form: FormGroup;\n /** Whether form is not the first page in the flow */\n @Input() public can_return: boolean = false;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n @ViewChild('container', { static: true }) private container: ElementRef;\n\n constructor(private _dialog: MatDialog, private cdRef: ChangeDetectorRef) {}\n\n /** Move flow to next step */\n public next(): void {\n if (this.form.controls?.is_recurrent?.value) {\n setRecurrenceStartsTime(this.form);\n }\n \n this.form.markAllAsTouched();\n this.form.updateValueAndValidity();\n \n if (this.form.controls?.attendees?.value?.some(item => item.name.length > 50)) {\n const attendeesControl = this.form.get('attendees');\n attendeesControl.setErrors({\n customError: 'Attendee name cannot be more than 50 characters',\n });\n }\n \n // Check if booking is outside catering hours and 'Need catering?' is selected\n const isOutsideCateringHours = this.checkIfOutsideCateringHours();\n const hasCatering = this.form.controls?.has_catering?.value;\n const cateringOrders = this.form.controls?.catering?.value;\n \n if (isOutsideCateringHours && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Open the dialog\n const dialogRef = this._dialog.open(CateringDropComponent, {\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n // User confirmed to remove catering\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n // Update validity\n this.form.updateValueAndValidity();\n // Proceed to next step if form is valid\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n }\n } else {\n // User chose to go back, do not proceed\n // Optionally, scroll to the relevant field\n if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n });\n } else {\n // Proceed as usual\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n } else if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n }\n \n\n private checkIfOutsideCateringHours(): boolean {\n const dateTz = this.form.controls?.dateTz?.value;\n const duration = this.form.controls?.duration?.value;\n \n if (dateTz && duration) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n \n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } else {\n // If date or duration is not set, assume not outside catering hours\n return false;\n }\n }\n \n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'form' });\n }\n\n /** Reset form to initial state */\n public resetForm(): void {\n this.event.emit({ type: 'reset', step: 'form' });\n }\n}\n","
\n
\n
\n \n
\n
\n \n Back\n \n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { BookingSpaceFlowFormComponent } from './booking-modal/form/form.component';\nimport { BookingCateringComponent } from './booking-modal/catering/catering.component';\nimport { BookingFindSpaceComponent } from './booking-modal/find-space/find-space.component';\nimport { BookingSpaceFiltersComponent } from './booking-modal/find-space/filters/filters.component';\nimport { BookingSpaceItemComponent } from './booking-modal/find-space/item/item.component';\nimport { BookingCateringOrderListComponent } from './booking-modal/catering/order-list/order-list.component';\nimport { BookingModalComponent } from './booking-modal/booking-modal.component';\nimport { BookingCateringOrderDetailsComponent } from './booking-modal/catering/order-details/order-details.component';\nimport { CateringOrderListItemComponent } from './booking-modal/catering/order-list/item/item.component';\nimport { CateringMenuCategoryComponent } from './booking-modal/catering/order-details/category/category.component';\nimport { DeleteConfirmModalComponent } from './delete-confirm-modal/delete-confirm-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { UiModule } from '@mckinsey-converge/ui';\n\n\n@NgModule({\n declarations: [\n BookingSpaceFlowFormComponent,\n BookingCateringComponent,\n BookingFindSpaceComponent,\n BookingSpaceFiltersComponent,\n BookingSpaceItemComponent,\n BookingCateringComponent,\n BookingCateringOrderListComponent,\n BookingModalComponent,\n BookingCateringOrderDetailsComponent,\n CateringOrderListItemComponent,\n CateringMenuCategoryComponent,\n DeleteConfirmModalComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n UiModule\n ],\n exports: [\n BookingCateringOrderDetailsComponent\n ]\n})\nexport class BookingsModule {\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-delete-confirm-modal',\n templateUrl: './delete-confirm-modal.component.html',\n styleUrls: ['./delete-confirm-modal.component.scss']\n})\nexport class DeleteConfirmModalComponent {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: boolean;\n /** Whether delete action succeeded */\n public success: boolean;\n}\n","\n
\n
\n \n
\n
\n

Are you sure you want to delete this meeting?

\n

\n This will permanently delete the booking and all details from the host and attendees\n calendars.\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
Deleting meeting...
\n
\n
\n
\n\n
\n

Booking Permanently deleted

\n
\n
\n","import { NgModule } from '@angular/core';\nimport { MeetingDetailsModalComponent } from './meeting-details-modal/meeting-details-modal.component';\nimport { PrivateDetailsModalComponent } from './meeting-details-modal/private-details-modal/private-details-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsDisplayComponent } from './meeting-details-modal/details/details.component';\nimport { MeetingRecurringDetailsDisplayComponent } from './meeting-details-modal/recurring-details/recurring-details.component';\nimport { MeetingDetailsRequirementsComponent } from './meeting-details-modal/requirements/requirements.component';\nimport { MeetingCateringDetailsComponent } from './meeting-details-modal/catering/catering.component';\nimport { MeetingPrivateDetailsComponent } from './meeting-details-modal/private-details/private-details.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n declarations: [\n MeetingDetailsModalComponent,\n PrivateDetailsModalComponent,\n MeetingDetailsDisplayComponent,\n MeetingRecurringDetailsDisplayComponent,\n MeetingDetailsRequirementsComponent,\n MeetingCateringDetailsComponent,\n MeetingPrivateDetailsComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n ScrollingModule\n ],\n exports: []\n})\nexport class CalendarModule {\n}\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, NgZone, ChangeDetectorRef } from '@angular/core';\nimport { first, map, take, takeWhile } from 'rxjs/operators';\n\nimport { Booking, BookingStateService, BookingsPaginatedService, BookingsService, OrganisationService, User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { UserStoreState, selectCurrentUser } from '@mckinsey-converge/user';\nimport { Store } from '@ngrx/store';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { getListOfDateFormat, formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n@Component({\n\tselector: 'day-view-approvals-view',\n\ttemplateUrl: './approvals-view.component.html',\n\tstyleUrls: ['./approvals-view.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewApprovalsComponent extends BaseDirective implements OnInit, OnDestroy {\n\t/** List of spaces to check for pending approvals */\n\t// public space_list: string[] = [];\n\t/** Whether the pending bookings are being loaded */\n\tpublic loading: boolean = true;\n\t/** Whether an event action is in progress */\n\t// public waiting_on_event: boolean;\n\t/** Observable for tentative events */\n\n\tpublic inputText: string = '';\n\n\tpublic incommingRequests: Booking[] = [];\n\tpublic sortOrderByOptions: { display: string; value: string; meta: {}; }[];\n\tpublic selectedSort: { display: string; value: string; meta: {}; } = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\n\tpublic isClosed: boolean = false;\n\tpublic updatedRequest: Booking[] = [];\n\n\t/** Display value for the active date */\n\t// public get date_display(): string {\n\t// \treturn 'Today';\n\t// }\n\n\tpublic currentUser: User;\n\n\tconstructor(\n\t\tprivate _org: OrganisationService,\n\t\tprivate _bookings_service: BookingsPaginatedService,\n\t\tprivate store: Store,\n\t\tprivate _bookings: BookingsService,\n\t\tprivate _booking_state_service: BookingStateService,\n\t\tprivate _zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef) {\n\t\tsuper();\n\t}\n\n\tpublic ngOnInit(): void {\n\t\tthis.subscription('currentUser', this.store.select(selectCurrentUser)\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe((user: User) => {\n\t\t\t\t// Once we know we have the user loaded\n\t\t\t\tthis.currentUser = new User(user);\n\t\t\t\tthis.getHoldingBay();\n\t\t\t})\n\t\t);\n\n\t\tthis.subscription(\n\t\t\t'building',\n\t\t\tthis._org.listen('active_building').subscribe((_) => this.currentUser && this.getHoldingBay() )\n\t\t);\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis.interval('holdingBay', () => {\n\t\t\t\t// update every 30 seconds.\n\t\t\t\tthis.getHoldingBay();\n\t\t\t}, 30 * 1000);\n\t\t});\n\n\t\tthis.sortOrderByOptions = [\n\t\t\t{ display: 'Soonest booking', value: 'soonest', meta: {} },\n\t\t\t{ display: 'Latest booking', value: 'latest', meta: {} },\n\t\t\t{ display: 'Newest request creation date', value: 'newest_date', meta: {} },\n\t\t\t{ display: 'Oldest request creation date', value: 'oldest_date', meta: {} }\n\t\t];\n\n\t\tthis.selectedSort = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\t}\n\n\tpublic getHoldingBay() {\n\t\tif (!this._org.building || !this.currentUser) {\n\t\t\treturn;\n\t\t}\n\n\n\n\t\tthis.subscription('holdingBay', this._bookings_service.getHoldingBay(\n\t\t\t{\n\t\t\t\t'email': this.currentUser.email,\n\t\t\t\t'building_zone': this._org.building.id,\n\t\t\t}\n\t\t\t).subscribe((res) => {\n\t\t\t\t// Check if room object is missing 'room.building' for CNG-513\n\t\t\t\tconst isMissingRoom = res?.results?.some(bkng => !bkng.room?.building?.name) || false;\n\t\t\t\t\n\t\t\t\tconst hasInvalidEndDateInMasterBookings = res?.results\n\t\t\t\t?.filter(bkng => bkng.recurrence_type === 'master') \n\t\t\t\t.some(bkng => {\n\t\t\t\t// Check for invalid endDateString for CNG-503\n\t\t\t\t const date = new Date(bkng.endDateString);\n\t\t\t\t return isNaN(date.getTime());\n\t\t\t\t}) || false;\n\n\t\t\t\t// Run updateRoomList() to get room info\n\t\t\t\tif (isMissingRoom || hasInvalidEndDateInMasterBookings) {\n\t\t\t\t\t// this._booking_state_service.updateRoomList();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst masterIds = [];\n\t\t\t\tconst filterMasterBookings = res.results?.filter(bkng => {\n\n\t\t\t\t\tif(bkng.recurrence_type === 'master' ) {\n\t\t\t\t\t\tmasterIds.push(bkng.recurrence_master_id);\n\t\t\t\t\t}\n\t\t\t\t\treturn bkng.recurrence_type === null || bkng.recurrence_type === 'master';\n\t\t\t\t}) || [];\n\n\t\t\t\tconst filterStandardBookings = res.results?.filter(bkng => bkng.recurrence_type === 'occurrence' \n\t\t\t\t \t&& bkng.status === 'tentative' \n\t\t\t\t\t&& !masterIds.includes(bkng.recurrence_master_id) // edited from staff , need approval\n\t\t\t\t) || [];\n\n\t\t\t\tconst filterStandardAndMasterBookings = [...filterMasterBookings, ...filterStandardBookings ];\n\t\t\t\tlet expiredBkngs = [];\n\t\t\t\tconst pendingBkngs = filterStandardAndMasterBookings?.filter(bkng => (bkng.timeBasedStatusLabel !== 'expired_yesterday') ? true : !expiredBkngs.push(bkng) ) || [];\n\t\t\t\texpiredBkngs.length && this.declineExpiredBookings(expiredBkngs);\n\n\t\t\t\tthis.updatedRequest = cloneDeep(pendingBkngs);\n\t\t\t\t// const request = cloneDeep(this.updatedRequest);\n\t\t\t\tthis.searchRequest();\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.incommingRequests = [];\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t/* istanbul ignore next */\n\t/**\n\t * Track by function for ngFor optimisation\n\t * @param index Index of the item\n\t * @param item Data associated with the item at the given index\n\t */\n\tpublic trackByFn(index: number, item: Booking) {\n\t\treturn item.id || index;\n\t}\n\n\t/**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic selectOrderBy(sortingValue: { display: string; value: string; meta: {}; }) {\n\t\tthis.selectedSort = sortingValue;\n\t\tthis.searchRequest();\n\t}\n\n\t/**\n\t * Function apply order by sorting method to incomming requests for approval\n\t * @param requests\n\t */\n\tpublic applyOrderBy(requests: Booking[]): void {\n\t\tconst items = cloneDeep(requests);\n\t\tswitch (this.selectedSort.value) {\n\t\t\tcase 'soonest':\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t\tcase 'latest':\n\t\t\t\titems.sort((a, b) => b.start_epoch - a.start_epoch );\n\t\t\t\tbreak\n\t\t\tcase 'newest_date':\n\t\t\t\titems.sort((a, b) => b.created_epoch - a.created_epoch )\n\t\t\t\tbreak;\n\t\t\tcase 'oldest_date':\n\t\t\t\titems.sort((a, b) => a.created_epoch - b.created_epoch )\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.incommingRequests = items;\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\tpublic totalCateringItems(booking: Booking) {\n\t\tlet num = 0;\n\t\tbooking.catering.forEach(el => el?.items.forEach(item => num += item.amount ) );\n\t\treturn num;\n\t}\n\n\tpublic searchRequest(value?: string) {\n\t\tconst searchText = this.inputText.toLowerCase();\n\n\t\t\tconst filtered = this.updatedRequest.filter( (el) => {\n\t\t\tconst { room, organiser, booked_by, booker, booking_type, attendees, date_string, startDateTz, start_time, end_time, creationDateTz } = el;\n\n\t\t\treturn room?.name?.toLowerCase().includes(searchText) || /// input text inlcudes room name\n\t\t\t\troom?.local_name?.toLowerCase().includes(searchText) || /// input text inlcudes room local name\n\t\t\t\troom?.street_and_city?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.building?.address?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.level.name?.toLowerCase().includes(searchText) || /// input text inlcudes room level\n\n\t\t\t\torganiser?.name?.toLowerCase().includes(searchText) || ///input text inlcudes host name\n\t\t\t\t(booked_by && booked_by['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booked by name\n\t\t\t\t(booker && booker['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booker name\n\t\t\t\tbooking_type?.toLowerCase().includes(searchText)\t||\n\t\t\t\tattendees?.some(att => att?.name?.toLowerCase().includes(searchText)) || ///input text inlcudes attendees name\n\n\t\t\t\tdate_string?.toLowerCase().includes(searchText) || /// date_string == '06 Mar 2023'\n\t\t\t\tformatDateWithSuffix(date_string).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\tformatDateWithSuffix(creationDateTz.formatDate('dd MMM yyyy')).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\t//searchText.includes(startDateTz?.date?.day?.toString()) || /// day 06/6\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthLong) || /// monthLong == 'March'\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthShort) || /// monthShort == 'Mar'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayLong.toLowerCase()) || /// weekdayLong == 'Monday'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayShort.toLowerCase()) || /// weekdayShort == 'Mon'\n\n\n\t\t\t\tgetListOfDateFormat().some(format => startDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\t\t\t\tgetListOfDateFormat().some(format => creationDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\n\t\t\t\tstart_time?.toLowerCase().includes(searchText) ||\n\t\t\t\tend_time?.toLowerCase().includes(searchText)\n\n\n\t\t\t});\n\n\t\t\tthis.applyOrderBy(filtered);\n\t}\n\n\tpublic declineExpiredBookings(expiredBkngs: Booking[] ) {\n\t\t// console.log(expiredBkngs);\n\t\tthis._bookings.declineMultiple(expiredBkngs).subscribe(resArray => this.cdRef.detectChanges(),\n\t\t(error) => {\n\t\t\tconsole.log(error);\n\t\t\tthis.cdRef.detectChanges();\n\t\t});\n\n\t}\n\n}\n","
\n
\n \n\n
\n Order by: {{selectedSort.display}}\n
\n \n
\n
\n\n \n
{{sorting.display}}
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n close\n
\n
No meetings pending approval
\n
\n
\n","import { Component, Input, Output, EventEmitter, NgZone, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, ViewEncapsulation, SimpleChanges, HostListener } from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective, shorterBuildingDateFormatString } from '@mckinsey-converge/base';\nimport { Booking, CateringCategory, CateringItem, SpacesService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DatePipe } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TooltipPosition } from \"@mckinsey-converge/ui\";\n\nconst STATES: { [id: string]: string } = {};\n\n@Component({\n selector: 'approvals-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n // encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(200, style({ opacity: 1, height: '*' })),\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(200, style({ opacity: 0, height: 0 })),\n ]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DatePipe],\n})\nexport class DayViewApprovalsEventComponent extends BaseDirective implements OnInit {\n /** Event to display */\n @Input() event: Booking;\n @Input() totalCateringItems: number;\n /** Event emitter for event actions */\n @Output() acting = new EventEmitter();\n\n /** Whether approval action is being processed */\n public loading: boolean;\n /** Whether event details are shown */\n public shown: boolean;\n /* Booking type : Internal, External, Interview... */\n public bookingType: string;\n /* Booking date */\n public date: string;\n /* Booking creation date */\n public creationDate: string;\n /* Office address */\n public officeAddress: string;\n\n public showCateringNote: boolean = false;\n\n public showEquipmentNote: boolean = false;\n\n /** Whether the meeting has catering attached */\n public has_catering: boolean;\n public cateringNote: string = '';\n public equipmentNote: string = '';\n public cateringOrderItems: number = 0;\n\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /* Reccurance period */\n public recurrence_period: string;\n\n /** Requested booking start time */\n public requestedDateTz: DateTZ;\n /** Requested booking end time */\n public requestedEndDateTz: DateTZ;\n public specific_occurances;\n public recurrenceExceptions: any[] = [];\n\n /** Type of event */\n public get start(): string {\n return this.event.startDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** Type of event */\n public get end(): string {\n return this.event.endDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** View booking details */\n public view() {\n const room_id = Object.keys(this.event.approval_status)[0] || '';\n const space = this._spaces.find(room_id) || this.event.room;\n this.timeout(\n 'view',\n () => {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space,\n booking: new Booking({ ...this.event.toApiJSON(), room_id, room: space }),\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this._service.set('CONCIERGE.day_view.viewing', this.event);\n },\n 50\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_sevice: BookingStateService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _zone: NgZone,\n private cdRef: ChangeDetectorRef,\n private datePipe: DatePipe\n ) {\n super();\n }\n ngOnInit(): void {\n this.cateringOrderItems = 0;\n this.updateData();\n }\n\n public updateData() {\n const type = this.event.booking_type;\n this.bookingType = `${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n const catering: readonly CateringOrder[] = this.event.catering;\n this.has_catering = !!catering.find(\n (order) => this.event.space.email === order.location_id\n );\n this.cateringNote =\n this.event.notes.filter((el) => el.type === 'catering')[0]?.message || '';\n this.equipmentNote =\n this.event.notes.filter((el) => el.type === 'equipment')[0]?.message || '';\n\n const createdDate = this.event.creationDateTz.formatDate('dd MMM yyyy');\n const createdTime = this.event.creationDateTz.formatDate('h:mm a').toLocaleLowerCase();\n this.creationDate = `${formatDateWithSuffix(createdDate)}, ${createdTime}`;\n this.date = formatDateWithSuffix(this.event.date_string);\n this.officeAddress = `${this.event.room.building?.name} ${this.event.room.level.name}, ${this.event.space.building?.city}`;\n // `${this.event.room.building?.name} ${this.event.room.level.name} ${this.event.space.building?.city}`;\n this.isRecurrentBooking = this.event.is_recurrent && this.event.recurrence_type !== 'occurrence';\n this.recurrence_period = this.event.recurrence_period;\n this.specific_occurances = this.event.occurrence_details?.filter(ocurrence => ocurrence.id !== this.event.id).map((item)=>{\n let date = item.start_epoch * 1000;\n let specificDates = new DateTZ({date, is_local_tz: false, building_tz: this.event.timezone});\n return shorterBuildingDateFormatString(specificDates).slice(3);\n })\n this.recurrenceExceptions = this?.event?.recurrence_exceptions?.map((item)=>{\n let date = new Date(item * 1000);\n return this.datePipe.transform(date, 'dd MMM yyyy');\n }) || [];\n this.cdRef.detectChanges();\n }\n\n public get eventTitle() {\n return `${this.event.title}_${this.event.created_epoch}_${this.event.start_time}`\n }\n\n /**\n * Approve the meeting for the set room\n */\n public accept(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Approve Meeting',\n content: `Approve ${this.event.organiser.name}'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${this.event.length_string} on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const event = this.event.toJSON();\n const bookingOptions = {\n concierge: true,\n host: this.event.organiser.email,\n room_email: this.event.space?.email,\n icaluid: this.event.icaluid,\n start: event.start,\n end: event.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n } \n this._bookings\n .accept(this.event.id, bookingOptions)\n .then(\n (acceptedBooking) => {\n this._service.notifySuccess('Meeting approved.');\n this.event.status = BOOKING_STATUS.approved;\n STATES[this.event.id] = BOOKING_STATUS.approved;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error approving meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n /**\n * Decline meeting for the set room\n */\n public decline(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Decline Meeting',\n content: `Decline ${\n this.event.organiser.name || this.event.organiser\n }'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${\n this.event.length_string\n } on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_busy' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const booking = this.event.toJSON();\n this.loading = true;\n const bookingOptions = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: this.event.space?.email,\n icaluid: booking.icaluid,\n start: booking.start,\n end: booking.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n }\n this._bookings\n .decline(booking.id, bookingOptions)\n .then(\n () => {\n this._service.notifySuccess('Meeting declined.');\n this.event.status = BOOKING_STATUS.declined;\n STATES[this.event.id] = BOOKING_STATUS.declined;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error declining meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // console.log('CHANGES: ',changes);\n this.updateData();\n this.cdRef.detectChanges();\n }\n\n public isConflictWithOccurences() {\n const conflicts = this.event?.room?.totalOccurrences - this.event?.room?.availableOccurrences;\n return { is_conflict: !!conflicts, total_Conflicts: conflicts };\n }\n\n public get dateString(): string {\n if (!this.event.dateString) return '';\n return this.event.dateBuildingString.slice(3);\n }\n\n /**\n */\n public get endDateString(): string {\n if (!this.event.endDateString) {\n return '';\n }\n else if(this.event.recurrence_period === 'list' && this.event.recurrence_type === 'master'){\n const occurrence_details = this.event.occurrence_details && this.event.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.event.id);\n const endDate = this.event.recurrenEndFromOcurrences(occurrence_details);\n return shorterBuildingDateFormatString(endDate).slice(3);\n } else\n return this.event.endDateString.slice(3);\n }\n\n public get timeString(): string {\n if(!this.event.start_time) return '';\n return `${this.event.start_time} - ${this.event.end_time} `;\n }\n\n getTooltipText() {\n return this.specific_occurances;\n }\n}\n","
\t\n\t
\n\t\t\n\t\t
{{ event.recurrence_type === 'occurrence' ? 'Occurrence from a recurring series ' : 'Recurring Series' }}
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
{{ event.space?.global_name ? event.space.local_name : '' }}
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{equipmentNote}}
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{totalCateringItems}} items in catering order\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
{{ bookingType }}
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t {{ date }} \n\t\t\t\t {{ event.all_day ? 'All Day' : start + ' - ' + end }} \n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
Specific Dates
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{{ this.recurrence_period | titlecase }}\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
Conflict Dates
\n\t\t\t\t\t\t\t\t\t\t
{{date}}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{{dateString}} - {{endDateString}}\n\t\t\t\t\t
\n\t
{{timeString}}
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{ officeAddress }}\n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t {{ event.organiser?.name }}\n\t\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t\t\t\t\n\t\t\t{{ event.attendees.length }} \n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
{{ item.name }}
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n\t\t
\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t {{ event.creator?.name }}\n\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t Requested on {{ creationDate }}\n\t\t
\n\t
\n\t\n
\n\n","import {\n Component,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first, take } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport {\n ApplicationService,\n BookingStateService,\n BookingStoreState,\n BuildingLevel,\n OrganisationService,\n selectBookingByIdResultsFromState,\n User,\n Booking,\n SpacesService,\n Space,\n isIncludes,\n searchRoomsAndBookings\n} from '@mckinsey-converge/data-common';\n\nimport {\n AlertMode, DropdownOpion,\n} from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { select, Store } from '@ngrx/store';\nimport { BuildingStoreState } from 'libs/buildings/src';\nimport { clearBookingByIdResults, loadBookingsWithQuery, MyBookingsStoreState } from '@mckinsey-converge/bookings';\nimport { Subscription } from 'rxjs';\n\nexport type RoomBookingStoreState = BookingStoreState & BuildingStoreState & MyBookingsStoreState & UserStoreState;\n\n@Component({\n selector: 'a-day-view',\n templateUrl: './day-view.component.html',\n styleUrls: ['./day-view.component.scss']\n})\nexport class DayViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected type */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n /** Whether to show only items with a setup and/or breakdown time */\n public only_overflow: boolean;\n /** List of legend keys to show */\n public legend: HashMap = {};\n /** List of legend keys to show */\n public legend_list: string[] = [];\n /** List of available legend keys */\n public legend_keys: Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true }\n ];\n\n public banner_mode = AlertMode.Warning\n public showBanner = true;\n public undo_banner_mode = AlertMode.Error;\n public has_access: boolean;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n\t\tprivate spaceTypesSubscription: Subscription;\n\n event_list: Booking[] = [];\n\tsearchStr: any;\n\tfoundSearchLength: number = 0;\n\tsearchedCounter: any = 1;\n\tshowSrchWarning: boolean;\n\ttotalFoundItem: number = 0;\n spaces: Space[] = [];\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private store: Store,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Day View';\n\n if( this._service.get('active_legends') !== null && this._service.get('active_legends').hasOwnProperty('length')) {\n this.legend_keys = this._service.get('active_legends');\n }\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n \n\n\t\t\t\tthis._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n\t\t\t\t\t\t\t\t\t\tthis.dateTz = new DateTZ({\n\t\t\t\t\t\t\t\t\t\t\tdate: this.dateTz.ms,\n\t\t\t\t\t\t\t\t\t\t\tis_local_tz: false,\n\t\t\t\t\t\t\t\t\t\t\tbuilding_tz: this.timezone,\n\t\t\t\t\t\t\t\t\t\t});\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.initSpace();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n\t\t\t\t\t\t\t\t\t\tthis.levels.sort((a, b) =>\n\t\t\t\t\t\t\t\t\t\tb.name.localeCompare(a.name, undefined, {\n\t\t\t\t\t\t\t\t\t\t\t\tnumeric: true,\n\t\t\t\t\t\t\t\t\t\t\t\tignorePunctuation: true,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t);\n\n \n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n \n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'day_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return;\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n\n this.configureIfLinksFromEmail();\n\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...this.filterEvents(list)];\n\n })\n );\n\n \n }\n\n public initSpace() {\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.active_level ? this._org.building.id : this.active_level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0 && _.bookable);\n\n })\n );\n }\n\n private filterEvents(list): Booking[] {\n const bookings = list;\n const filterd_booking = bookings.filter((event) => {\n const ignore = event.is_recurrent && event.recurrence_type === 'master';\n return ( !ignore );\n });\n\n return filterd_booking || [];\n }\n\n\n\n searchBooking(value) {\n\n // Resetting warning flag\n this.showSrchWarning = false;\n\n // Converting search value to lower case for case-insensitive comparison\n const searchValue = value.toLowerCase().trim();\n \n // Combining event list and space arrays into one arrya for searchig \n // const allItems = [...this.event_list, ...this.spaces];\n\n // Filter spaces based on active_type\n const filteredSpaces = this.spaces.filter(space => {\n if (!this.active_type) {\n return true; // Include all spaces if no active type is set\n }\n if (this.active_type.startsWith('zone')) {\n return space.zones.includes(this.active_type); // Check zones if active type starts with 'zone'\n }\n return space.room_type === this.active_type; // Otherwise, check room_type\n });\n \n // Combine filtered spaces and events into one array for searching\n const allItems = [...this.event_list, ...filteredSpaces];\n\n // Filtering the combine array to find matching room or booking \n const filteredItems = searchRoomsAndBookings(allItems, searchValue, true);\n \n // Updating the total number of found items in serach\n this.totalFoundItem = filteredItems.length;\n\n // Setting showSrchWarning flag if no result were found \n this.showSrchWarning = !this.totalFoundItem;\n\n // Updating lenght of found items for later use\n this.foundSearchLength = this.totalFoundItem - 1;\n\n\n if(this.searchStr !== value) {\n // Setting the first found as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[0]);\n // Resetting the search counter\n this.searchedCounter = 0;\n }\n else {\n // Handling case where seached string is the same as previou one \n // Incrementing search counter, loopoing back to 0 if it exceed the length of found items\n this.searchedCounter = ( this.searchedCounter < this.foundSearchLength ) ? this.searchedCounter + 1 : 0\n // Setting the next found items as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[this.searchedCounter]);\n }\n // Storing the current search string for future camparison\n this.searchStr = value;\n\n }\n\n\n public configureIfLinksFromEmail() {\n /**\n * https://acaprojects.atlassian.net/browse/MCK-2055\n * Load booking with id received from email link to concierge and setup configuration to open booking detail dialog on day view\n * Will work with both formatted URL's\n * http://localhost:4200/#/day-view?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n * http://localhost:4200/#/day-view/zone-1FUT0pxu12s?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n */\n const bookingId = this._route.snapshot.queryParams['view'];\n if(bookingId) {\n this.subscription('currentUser', this.store.select(selectCurrentUser).pipe(take(1))\n .subscribe((user: User | undefined) => {\n // Once we know we have the user loaded.\n this.store.dispatch(loadBookingsWithQuery({ 'id': bookingId, 'target': 'bookingById', 'offset': 0 }));\n }));\n\n this.store.dispatch(clearBookingByIdResults())\n\n this.subscription('bookingResults', this.store.pipe( select(selectBookingByIdResultsFromState) ).pipe(first(_ => !!_ && !!_.success))\n .subscribe(next => {\n const booking = next.success ? next.success?.[0] : null;\n if (booking && booking.room) {\n const levelId = this._route.snapshot.params.hasOwnProperty('level');\n\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(booking.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n\n this.updateDateTz(booking.startDateTz)\n this._booking_state_service.setDate(booking.startDateTz);\n this._booking_state_service.setZone(booking.level_zone);\n if(!levelId ) {\n this._router.navigate(['/day-view', booking.level_zone], { queryParams: { view: bookingId }, replaceUrl: true });\n }\n }\n }));\n }\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n\t\t\t\tif (this.spaceTypesSubscription) {\n\t\t\t\t\tthis.spaceTypesSubscription.unsubscribe();\n\t\t\t\t}\n this._service.set('CONCIERGE.day_view.viewing', []);\n }\n\n\n // Fires for the big blue new booking button\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.initSpace();\n this._router?.url?.includes('/day-view') && this._router.navigate(['/day-view', this.active_level]);\n }\n\n public updateLegend(mobile: boolean = false) {\n if (mobile) {\n this.legend_list = this.legend_keys.reduce((list, key) => {\n if (key.active) list.push(key.id);\n return list;\n }, []);\n\t\t\tthis._service.set('active_legends', this.legend_keys);\n }\n this.legend = this.legend_keys.reduce((map, key) => {\n map[key.id] = this.legend_list.includes(`${key.id}`);\n return map;\n }, {});\n\n this._booking_state_service.setFilters({\n ...this._booking_state_service.filters,\n hide_type: Object.keys(this.legend).filter((i) => this.legend[i] === false) as any\n });\n }\n\n updateSpaceSelection(){ \n this._service.set('active_type', this.active_type);\n }\n\n public onOnlySetupBreakdownChanged(toggle: MatSlideToggleChange): void {\n this._service.set('APP.breakdown', toggle.checked)\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._service.get('undo').next(null);\n this._booking_state_service.attentToDelete(booking, action, true);\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public hideBanner() {\n this.showBanner = false;\n }\n\n public hideUndo() {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n
\n \n
\n \n 1\"\n appearance=\"outline\"\n >\n \n \n {{ level?.name }}\n \n \n \n \n \n \n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
{{ totalFoundItem }}
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tNo search found!\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\n\n
\n \n
\n \n
\n
\n
\n\n \n \n \n
\n \n Only Setup/Breakdown\n \n
\n
\n\n \n {{ level?.name }}\n \n\n\n \n {{ type?.name }}\n \n\n\n
\n \n
\n
{{ key?.name }}
\n
\n
\n
\n
\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { DayViewComponent } from './day-view.component';\nimport { DayViewTimelineComponent } from './timeline/timeline.component';\nimport { DayViewApprovalsComponent } from './approvals-view/approvals-view.component';\nimport { DayViewApprovalsEventComponent } from './approvals-view/event/event.component';\nimport { DayViewSpaceComponent } from './space/space.component';\nimport { DayViewSpaceEventComponent } from './space/event/event.component';\n\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { FormsModule } from '@angular/forms';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: DayViewComponent },\n { path: ':level', component: DayViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n DayViewComponent,\n DayViewTimelineComponent,\n DayViewApprovalsComponent,\n DayViewApprovalsEventComponent,\n DayViewSpaceComponent,\n DayViewSpaceEventComponent\n ],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class DayViewModule {}\n","import {\n Component,\n OnInit,\n Input,\n OnChanges,\n SimpleChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space, BOOKING_STATUS, CloseDialogService, DialogIds } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/** Details about the associated event overlapping with other events */\nexport interface IEventOverlap {\n /** Index of this item with the overlapping items */\n index: number;\n /** Total number of items overlapping with this one */\n total: number;\n}\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'day-view-space-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewSpaceEventComponent extends BaseDirective implements OnInit, OnChanges {\n /** Event to display */\n @Input() public booking: Booking;\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Space associated with the booking */\n @Input() public space: Space;\n /** Whether the item is a fixed size */\n @Input() public fixed: boolean;\n /** Overlap details for the booking */\n @Input() public overlap: IEventOverlap;\n /** Whether an action is being processed for this booking */\n @Input() public loading: boolean;\n /** Emitter for the current position of the booking within the timeline */\n @Output() public position = new EventEmitter<{ top: number; height: number }>();\n\n /** Position of the booking start time in the day */\n public top: number;\n /** Position of the booking relative to overlapping bookings */\n public left: number;\n /** Height based of the duration of the booking */\n public height: number;\n /** Size of the booking when overlapping with other bookings */\n public width: number;\n /** Offset from the booking's top that the setup time starts */\n public overflow_top: number;\n /** Offset from the booking's bottom that the breakdown time ends */\n public overflow_bottom: number;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _router: Router,\n private cdRef: ChangeDetectorRef,\n private closeDialogService: CloseDialogService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public get local_id(): string {\n return this.booking.icaluid.substr(0, 6);\n }\n\n /** Type of booking */\n public get type(): string {\n return this.booking.getType();\n }\n\n /** Period that the booking will occur during the day */\n public get period(): string {\n // the booking time is being pass in as the local timezone version.\n return this.booking.time_period;\n }\n\n /** Number attendees expected to turn up to the booking */\n public get expected(): number {\n const expected = this.booking.expected_attendees;\n return this.space ? expected[this.space.email] || 0 : 0;\n }\n\n /** Whether the meeting has catering attached */\n public get has_catering(): boolean {\n return !!this.order;\n }\n\n public get order(): CateringOrder {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp.length && orders.push(_temp[0]);\n });\n return orders[0];\n // this.booking.catering.find((order) => order.location_id === this.space.email);\n }\n\n /** View booking details */\n public view(event: Event) {\n \n this.cdRef.detach(); // Detach change detection before the dialog opens. \n\n const dialogRef = this._dialog.open(MeetingDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.closeDialogService.registerDialog(DialogIds.MeetingDetails, dialogRef);\n dialogRef?.afterClosed().subscribe(_ => {\n this.cdRef.reattach(); // Reattach change detection after the dialog closes.\n\n this.calculatePosition();\n this.cdRef.detectChanges();\n });\n }\n\n /** Whether booking is active */\n public get active(): boolean {\n const booking = this._service.get('CONCIERGE.day_view.viewing');\n return !booking || booking.id === this.booking.id;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.booking || changes.overlap || changes.dateTz) {\n this.calculatePosition();\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking_details = this.booking.toApiJSON();\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking_details));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n\n /**\n * View catering order for the booking\n */\n public viewOrder(order: CateringOrder) {\n /* istanbul ignore else */\n if (this.booking && this.booking.catering) {\n /* istanbul ignore else */\n if (localStorage) {\n this.storeOrder(order);\n }\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: this.booking.id, view: order.id },\n });\n }\n }\n\n /** Calculate the position */\n private calculatePosition() {\n /* istanbul ignore else */\n if (this.booking) {\n const overlap = this.overlap || { index: 0, total: 1 };\n const shown_date = this.dateTz.startOfValue('day');\n const date = this.booking.startDateTz.startOfValue('minute');\n const end = this.booking.endDateTz.startOfValue('minute');\n const from_previous_day = !date.isSameDate(shown_date, 'day');\n if (end.isBeforeDate(shown_date, 'day')) { // Hide booking if not on shown date\n this.top = -100;\n this.height = 1;\n return;\n }\n\n //R-- Stragest thing, but one time this was logging bookings form different timezones?\n // this.dateTz.logDateTz('calculatePosition this.dateTz')\n // this.booking.startDateTz.logDateTz('calculatePosition this.booking.startDateTz')\n\n const start = from_previous_day ? 0 : Math.abs(+date.dateDiff(shown_date, 'hours', 'hours').toFixed(3));\n const duration = Math.min(\n this.booking.duration,\n Math.abs(shown_date.dateDiff(date.addValue({ minutes: this.booking.duration }), 'minutes'))\n );\n this.top = Math.max(0, (start / 24) * 100);\n this.height = Math.min(\n 100 - this.top,\n this.fixed ? duration / 60 : (duration / 60 / 24) * 100\n );\n this.position.emit({ top: this.top, height: (duration / 60 / 24) * 100 });\n this.width = Math.min(100, 100 / overlap.total + 5);\n this.left = Math.min(100 - this.width, this.width * overlap.index - 5 * overlap.index);\n this.overflow_top =\n ( (this.booking.room_setup || this.booking.setup[this.space.email])\n ? ( ( this.booking.room_setup || this.booking.setup[this.space.email]) / 60) / duration\n : -0.1) * 100;\n this.overflow_bottom =\n ( ( this.booking?.room_breakdown || this.booking.breakdown[this.space.email])\n ? ( (this.booking?.room_breakdown || this.booking.breakdown[this.space.email]) / 60) / duration\n : -0.1) * 100;\n if (this.booking.all_day) {\n this.top = 0;\n this.height = 100;\n }\n }\n }\n}\n","\n \n \n \n 50 ? ' low' : '')\"\n [style.z-index]=\"(overlap?.index || 0) + 2\"\n (click)=\"view($event)\"\n >\n
\n
{{ booking.all_day ? 'All Day' : period }}
\n
\n \n\n \n \n
\n
\n
\n
\n \n {{booking?.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
\n
Host: 
\n
\n {{ booking.organiser?.name || booking.organiser }}\n
\n
\n \n
Booked by: 
\n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n \n
{{ booking.title }}
\n
\n
\n
\n {{ booking.attendees ? booking.attendees.length || 'No' : 'No' }} Attendee{{\n booking.attendees?.length === 1 ? '' : 's'\n }}{{ expected ? '(' + expected + ' Expected)' : '' }}\n
\n
\n
0\">\n
\n Company: {{ booking.company.length }}\n
\n
\n \n
Welcomed by: {{ booking.organiser?.name || booking.organiser }}
\n \n
\n
Catered
\n
\n \n \n \n \n \n\n","import {\n Component,\n OnChanges,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n OnInit,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { CdkDragMove, CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nimport { IEventOverlap } from './event/event.component';\nimport { BaseDirective, closestToTimeSlotTz, Identity } from '@mckinsey-converge/base';\nimport { OrganisationService, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { DayViewSettings } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\n\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'day-view-space',\n templateUrl: './space.component.html',\n styleUrls: ['./space.component.scss'],\n})\nexport class DayViewSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** List of space dropzones connected to */\n @Input() public space_list: string[];\n /** Date to display events for */\n @Input() public dateTz: DateTZ;\n /** Space to display events for */\n @Input() public space: Space;\n /** Scroll value of the day view */\n @Input() public scroll: number;\n /** Only show events with setup and/or breakdown times */\n @Input() public overflow_only: boolean;\n /** Mapping of whether to show events with a given legend id */\n @Input() public legend: HashMap = {};\n /** Scroll value to add to drop placeholders */\n @Input('scrollTop') public scroll_top: number;\n /** Last update time of the displayed bookings */\n @Input('lastUpdate') public last_update: number;\n\n @Input() public eventMovingLoader : HashMap = {};\n /** Emitter for whether the space column is in view */\n @Output() public inView = new EventEmitter();\n /** Emitter for whether an event is being dragged */\n @Output() public dragging = new EventEmitter();\n /** Emitter for whether an event is being dropped and moving in progress */\n @Output() public moving = new EventEmitter<{}>();\n /** List of bookings for the current date and space */\n public event_list: Booking[] = [];\n /** Mapping of event IDs to overlap details */\n public overlap_details: HashMap = {};\n /** Mapping of positions of event in the day */\n public position_list: HashMap<{ top: number; height: number }> = {};\n /** Override for mapped position */\n public top: number;\n /** Client Rectangle for the container element box */\n public box: ClientRect;\n /** Whether the space list is in view */\n public in_view: boolean;\n /** ID of the booking with an action processing */\n public override_state: string;\n /** Map of bookings to whether they are loading */\n public loading: HashMap = {};\n /** Settings for day view */\n public settings: DayViewSettings = {} as any;\n\n /** Container element for the component contents */\n @ViewChild('view', { static: true }) private view: ElementRef;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _bookings: BookingsService,\n private _dialog: MatDialog,\n private cdr: ChangeDetectorRef,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n /** Events to display for the active date */\n public events: Booking[] = []\n\n public ngOnInit(): void {\n this.events = this.filterEvents();\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.settings = this._service.setting('app.day_view') || {};\n this.subscription(\n 'breakdown',\n this._service\n .listen('APP.breakdown')\n .subscribe((state) => {\n this.overflow_only = state;\n this.events = [...this.filterEvents()];\n })\n );\n this.subscription(\n 'legend',\n this._service\n .listen('CONCIERGE.legend')\n .subscribe((state) => (this.legend = state || {}))\n );\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...list];\n this.events = [...this.filterEvents()];\n this.cdr.detectChanges();\n })\n );\n this.checkInView();\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.scroll) {\n this.checkInView();\n }\n if (changes.space) {\n this.event_list = [...this.event_list];\n this.timeout('in_view', () => this.checkInView(), 100);\n }\n /* istanbul ignore else */\n if (changes.last_update) {\n this.timeout('update_overlaps', () => this.calculateOverlaps(), 1000);\n }\n }\n\n // private filterEvents(): Booking[] {\n // if (this.space) {\n // const bookings = this.event_list;\n // const list = bookings.filter((event) => {\n // if (this.override_state && this.override_state === event.icaluid) {\n // this.loading[event.id] = true;\n // }\n\n // const ignore = event.is_recurrent && event.recurrence_type === 'master';\n // const roomemail = event.room.filter(rm => rm.email === this.space.email)[0];\n\n // return (\n // !ignore &&\n // event.room.some(room => room.email.includes(this.space.email)) &&\n // (!this.overflow_only ||\n // event.setup[event.room.map(room => room.email)] ||\n // event.breakdown[event.room.map(room => room.email)])\n // );\n // }).map(e => new Booking({...e.toJSON()}) );\n\n // return list;\n // }\n // return [];\n // }\n\n private filterEvents(): Booking[] {\n if (!this.space) {\n return [];\n }\n \n return this.event_list.filter((event) => {\n // Mark as loading if override state matches.\n if (this.override_state && this.override_state === event.icaluid) {\n this.loading[event.id] = true;\n }\n \n const isRecurrentMaster = event.is_recurrent && event.recurrence_type === 'master';\n const isRoomEmailMatch = event.multi_rooms.some(room => room.email === this.space.email);\n \n // Determine if the event should be included based on setup or breakdown conditions.\n const isIncludedInSetupOrBreakdown = event.multi_rooms.some(room => {\n return event.room_setup || event.room_breakdown || event.setup[room.email] || event.breakdown[room.email];\n });\n \n return !isRecurrentMaster && isRoomEmailMatch && (!this.overflow_only || isIncludedInSetupOrBreakdown);\n }).map(event => new Booking({...event.toJSON()}));\n }\n\n /* istanbul ignore next */\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n\n /**\n * Calculate to overlap details for the booking events on the space\n */\n private calculateOverlaps() {\n const events = this.events.sort(\n (a, b) =>\n a.startDateTz.ms - b.startDateTz.ms ||\n a.duration - b.duration ||\n (a.title || '').localeCompare(b.title || '')\n );\n events.forEach((i) => (this.overlap_details[i.id] = { index: 0, total: 1 }));\n for (const bkn of events) {\n const bkn_start = bkn.startDateTz.startOfValue('minute');\n const bkn_end = bkn.endDateTz.startOfValue('minute');\n let count = 1;\n let index = 0;\n const collisions: Booking[] = [];\n for (const cmp of events) {\n /* istanbul ignore else */\n if (bkn.id !== cmp.id) {\n const cmp_start = cmp.startDateTz.startOfValue('minute');\n const cmp_end = cmp.endDateTz.startOfValue('minute');\n /* istanbul ignore else */\n if (\n bkn_start.isSameDate(cmp_start, 'minute') ||\n (bkn_start.isAfterDate(cmp_start) && bkn_start.isBeforeDate(cmp_end)) ||\n bkn_end.isSameDate(cmp_end, 'minute') ||\n (bkn_end.isAfterDate(cmp_start) && bkn_end.isBeforeDate(cmp_end))\n ) {\n count++;\n collisions.push(bkn);\n /* istanbul ignore else */\n if (\n events.findIndex((i) => i.id === bkn.id) >\n events.findIndex((i) => i.id === cmp.id)\n ) {\n index++;\n }\n }\n }\n }\n this.overlap_details[bkn.id] = { index: Math.max(0, index), total: count };\n }\n }\n\n /**\n * Check whether the space column is with the view of the\n */\n private checkInView() {\n /* istanbul ignore else */\n if (this.view && this.view.nativeElement) {\n const el = this.view.nativeElement;\n this.in_view =\n el.offsetLeft + this.scroll >= -240 &&\n el.offsetLeft + this.scroll <= window.innerWidth;\n this.inView.emit(this.in_view);\n }\n }\n\n /**\n * Initialise drag events\n */\n public initDrag() {\n this.box = this.view.nativeElement.getBoundingClientRect();\n this.dragging.emit(true);\n }\n\n /**\n * Cleanup after drag\n */\n public endDrag() {\n this.timeout('end_drag', () => (this.top = 0), 10);\n this.dragging.emit(false);\n }\n\n /**\n * Update top position of the dragged event placeholder\n * @param booking Booking being dragged\n * @param event Drag event\n */\n public updateDragTop(event: CdkDragMove) {\n /* istanbul ignore else */\n if (event.delta.y) {\n const y = event.pointerPosition.y;\n const top = (y - this.box.top - this.scroll_top) / this.box.height;\n const top_minutes = (Math.round((top * 24 * 60) / 15) * 15) / 60;\n this.top = (top_minutes / 24) * 100;\n\n }\n }\n\n /**\n * Handle drop event\n * @param event\n */\n public drop(event: CdkDragDrop<{ top: number; list: Booking[] }>): void {\n const id = event.item.element.nativeElement.id;\n const booking = event.previousContainer.data.list.find((i) => i.id === id);\n /* istanbul ignore else */\n if (!booking) {\n return;\n }\n const top = event.previousContainer.data.top;\n const new_start = Math.round(((top || 0) / 100) * 24 * 60);\n const old_date = booking.startDateTz;\n const new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n const start_epoch = new_date.seconds;\n const end_epoch = new_date.addValue({ minutes: booking.duration }).seconds;\n const now = DateNow(new Date());\n /* istanbul ignore else */\n // Prevent moving event into past\n if (now.startOfValue('minute').ms > new_date.ms) {\n this.handleDropError(booking.id, 'Meetings cannot be moved into the past');\n return;\n }\n if (now.startOfValue('minute').ms > booking.endDateTz.ms) {\n this.handleDropError(booking.id, 'Only future meetings can be moved');\n return;\n }\n if(booking.is_multiroom){\n this.handleDropError(booking.id, 'Multiroom meetings cannot be moved using drag and drop');\n return;\n }\n // Check for collisions\n this.loading[booking.id] = true;\n this.override_state = booking.icaluid;\n this.moving.emit({ isMoving:true, movingId:booking.id} );\n let room = booking.space;\n let message = `Update ${booking.organiser.name}'s meeting in \"${ booking.space.local_name }\" from ${ old_date.formatDate('h:mma') } to ${new_date.formatDate('h:mma')}`;\n let success = `Successfully updated meeting time from ${old_date.formatDate( 'h:mma' )} to ${new_date.formatDate('h:mma')}`;\n /* istanbul ignore else */\n if (event.container !== event.previousContainer) {\n // Same room\n room = this._spaces.find(event.container.id.replace('space-col-', '')) || room;\n message = `Move ${booking.organiser.name}'s meeting in \"${booking.space.local_name}\" to \"${ room.local_name }\" at ${new_date.formatDate('h:mma')}`;\n success = `Successfully moved booking to \"${room.local_name}\" at ${new_date.formatDate('h:mma')}`;\n }\n /* istanbul ignore else */\n // Check if booking has a change\n // if (room === booking.space && new_date.isSameDate(old_date, 'month')) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const room_list = [room];\n // Check if booking is already in the room\n const room_count = room_list.reduce((a, v) => a.add(v.id), new Set()).size;\n /* istanbul ignore else */\n // if (room_count < room_list.length) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const new_booking = new Booking({\n ...booking.toJSON(),\n start_epoch,\n end_epoch,\n room: room_list[0],\n multi_rooms: room_list\n });\n \n // Check if catering needs be dropped to comply with catering hours\n let cateringWillBeDropped = false;\n if (booking.has_catering && booking.catering && booking.catering.length > 0) {\n const isOutsideCatering = this.isOutsideCateringHours(new_date, new_booking.duration);\n const roomDoesNotHaveCatering = !new_booking.space.has_catering;\n if (isOutsideCatering || roomDoesNotHaveCatering) {\n cateringWillBeDropped = true;\n message += `
Note: Moving this booking will remove the catering order because `;\n \n if (isOutsideCatering && roomDoesNotHaveCatering) {\n message += `the new time falls outside of catering hours and the new room does not support catering.`;\n } else if (isOutsideCatering) {\n message += `the new time falls outside of catering hours.`;\n } else if (roomDoesNotHaveCatering) {\n message += `the new room does not support catering.`;\n }\n message += ``;\n }\n }\n \n this.checkCollisions(\n room_list,\n new_date,\n new_booking.duration,\n new_booking.icaluid\n ).then(\n () => {\n this.moveBooking(message, new_booking, cateringWillBeDropped).then(\n (_) => {\n this.override_state = null;\n this.moving.emit({ isMoving:false, movingId:booking.id} );\n this._service.notifySuccess(success);\n },\n (err) => this.handleDropError(new_booking.id, `Error: ${err}`)\n );\n },\n () => this.handleDropError(new_booking.id, 'Updated meeting time clashes with another')\n );\n }\n\n public isOutsideCateringHours(startDateTime: DateTZ, duration: number): boolean {\n const startDateTimeLuxon = DateTime.fromMillis(startDateTime.ms, { zone: startDateTime.building_tz });\n const endDateTimeLuxon = startDateTimeLuxon.plus({ minutes: duration });\n \n const bookingDate = startDateTimeLuxon.startOf('day');\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTimeLuxon <= dayStartAt7am || startDateTimeLuxon >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } \n\n /**\n * Check if there are any booking collisions with the new booking time\n * @param spaces\n * @param dateTz\n * @param duration\n */\n private checkCollisions(\n spaces: Space[],\n dateTz: DateTZ,\n duration: number,\n ignore?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n this._spaces\n .available({\n room_ids: spaces.map((i) => i.id).join(','),\n dateTz,\n duration,\n ignore,\n hide_bookings: true,\n })\n .then(\n (list) => {\n list.length === spaces.length ? resolve() : reject();\n },\n () => reject()\n );\n });\n }\n\n /**\n * Handle errors from drop move logic\n * @param id Booking ID\n * @param message Error description\n */\n private handleDropError(id: string, message: string) {\n this.loading[id] = false;\n this.override_state = null;\n\t\t\t\tthis.moving.emit({ isMoving:false, movingId:id} );\n this._service.notifyError(message);\n }\n\n /**\n * Update booking\n * @param confirm_msg\n * @param new_booking\n */\n private moveBooking(confirm_msg: string, new_booking: Booking, cateringWillBeDropped: boolean = false): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Update meeting',\n content: confirm_msg,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n if (cateringWillBeDropped) {\n // Remove catering orders\n new_booking.catering = [];\n }\n this._bookings.save(new_booking).then(\n (bkn: Booking) => {\n this._booking_state_service.replace(bkn);\n resolve(bkn);\n },\n (err) => {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n this.override_state = null;\n reject(err)\n }\n );\n } else {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n }\n ref.close(event.reason);\n })\n );\n ref.afterClosed().subscribe((reason?:string) => { \n reason !== 'done' ? this.moving.emit({ isMoving:false, movingId:new_booking.id} ) : null;\n this.unsub('confirm');\n });\n });\n }\n\n public checkAvailabilityOnGivenTime(selectedBlockStart, selectedBlockEnd) {\n const runningBookings =\n this.events?.filter((bks) => {\n const startEpoch = new DateTZ({\n date: bks.start_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const endEpoch = new DateTZ({\n date: bks.end_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const hasValidBreakdown: boolean =\n bks.breakdown &&\n Object.values(bks.breakdown).some((value) => value !== null);\n if (selectedBlockStart.ms === endEpoch && hasValidBreakdown) {\n return true;\n } else\n return (\n (selectedBlockStart.ms >= startEpoch && selectedBlockStart.ms < endEpoch) ||\n (selectedBlockEnd.ms > startEpoch && selectedBlockEnd.ms < endEpoch)\n );\n }) || [];\n return !!runningBookings.length;\n }\n\n\t\t/** Whether booking has been ended */\n public expired(booking): boolean {\n\t\t\treturn booking.timeBasedStatusLabel === 'done';\n\t\t}\n\n\n\t\tgridBookingOnClick(event: any, space: Space) {\n\n // if(!event.target.classList.contains('block') )\n // return;\n\n\t\t\tconst box = this.view.nativeElement.getBoundingClientRect();\n\t\t\tconst y = event.y;\n\n\t\t\tconst top = (y - box.top - 22) / box.height;\n\t\t\tconst top_minutes = Math.round((top * 24 ) * 100) / 100; //Math.round(top * 24 );\n\t\t\tconst topMinutes = (top_minutes / 24) * 100;\n\t\t\tconst new_start = Math.round(((topMinutes || 0) / 100) * 24 * 60) ;\n\t\t\tconst old_date = this._booking_state_service.booking_date;\n\n\t\t\tconst new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n\t\t\tconst timezone = this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone')\n\t\t\tconst closestDateTz = closestToTimeSlotTz(new DateTZ({ date: new_date.ms, is_local_tz: true, building_tz: timezone }), +30)\n\n\t\t\tconst isConflict = this.checkAvailabilityOnGivenTime(closestDateTz, closestDateTz.addValue({ minutes: 60 }));\n\t\t\tif(isConflict) {\n\t\t\t\t// this._service.notifyError('Meetings cannot be create into the past');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst now = DateNow(new Date());\n\t\t\t// Prevent moving event into past\n\t\t\tif (now.startOfValue('minute').ms > closestDateTz.ms) {\n\t\t\t\t\tthis._service.notifyError('Meetings cannot be created into the past');\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst form_data = {\n\t\t\t\tdateTz : closestDateTz,\n\t\t\t\tstartDateTz : closestDateTz,\n\t\t\t\tstart_epoch : closestDateTz.seconds,\n\t\t\t\tendDateTz : closestDateTz.addValue({ minutes: 60 }),\n\t\t\t\tend_epoch : closestDateTz.addValue({ minutes: 60 }).seconds,\n\t\t\t\ttimezone : timezone,\n\t\t\t\troom: space\n\t\t\t}\n\t\t\tconst booking\t=\tnew Booking(form_data);\n\t\t\tthis._dialog.open(BookingModalComponent, {\n\t\t\t\tdata: {\n\t\t\t\t\ttimezone: timezone,\n\t\t\t\t\tbooking: booking,\n\t\t\t\t\tisFromGrid: true\n\t\t\t\t },\n\t\t\t\tautoFocus: false,\n\t\t\t\tbackdropClass: 'mck-modal-backdrop',\n\t\t\t});\n\t\t}\n}\n","\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n \n\t\t\t\t\t\n
\n
\n \n
\n
\n
\n \n\n\n","import {\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges,\n ViewChild, NgZone, DoCheck, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { filter, first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { HashMap, Identity } from '@mckinsey-converge/base';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { isToday } from 'date-fns';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\n\n\nconst UPDATE_INTERVAL = 10;\n\n@Component({\n selector: 'day-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewTimelineComponent\n extends BaseDirective\n implements OnInit, OnChanges, OnDestroy\n{\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** List of shown legend items */\n @Input() public legend: HashMap = {};\n /** Whether to show only items with a setup and/or breakdown time */\n @Input() public overflow_only: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n\n @Input() undo_action;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n /** Top value of the content scroll */\n public scroll_top: number = 0;\n /** Left value of the content scroll */\n public scroll_left: number = 0;\n /** Offset of the scroll value when starting a drag */\n public scroll_offset: number = 0;\n /** List of spaces to display for */\n public spaces: Space[] = [];\n /** List of spaces to display for */\n public filtered_spaces: Space[] = [];\n /** Mapping of space ids to whether they are in view */\n public in_view: { [id: string]: boolean } = {};\n /** Percent of the day that is now */\n public now: number;\n /** Currently active hour of the day */\n public active_hour: string;\n /** Mapping of spaces loading booking date */\n public loading_space: { [id: string]: boolean } = {};\n /** Booking ID to open modal for */\n public view_id: string;\n /** Last update time for the space bookings */\n public last_update: number = 0;\n /** Whether an event is being dragged */\n public is_dragging: boolean;\n /** Client rectangle for the scroll area */\n public box: ClientRect;\n /** Whether to show the holding bay */\n public show_holding_bay: boolean = true;\n\n public space_zones: string[] = [];\n\n public is_today: boolean = this.isToday();\n public modalInitialized = false;\n\n /** Scrollable area of the day view */\n @ViewChild('scroll_area', { static: true }) private scroll_area: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScroll: CdkVirtualScrollViewport;\n isEventMoving: boolean = false;\n bookingEl: any;\n timeoutID: any;\n column: any;\n\n /** Update scroll box when the window is resized */\n @HostListener('window:resize')\n public onResize() {\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n public get is_loading() {\n return this._booking_state_service.loading;\n }\n\n public isToday() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }),\n 'day'\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _renderer: Renderer2,\n private _dialog: MatDialog,\n private _zone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n super();\n }\n\n public get holding_bay(): Space {\n const bld = this._org.building;\n /* istanbul ignore else */\n if (bld && bld.holding_bay) {\n return this._spaces.find(bld.holding_bay);\n }\n return null;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n this._zone.runOutsideAngular(() => {\n this.interval('time', () => this.updateTime(), 15 * 1000);\n });\n // R--- return to see if the booking service needs updating\n this.subscription(\n 'dateTz',\n this._booking_state_service.dateTz.subscribe((dateTz) => {\n // const dateTz = new DateTZ({date});\n this.dateTz = dateTz;\n })\n );\n });\n });\n this.is_today = this.isToday();\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n })\n );\n\n }\n\n ngAfterViewInit() {\n const d2 = this._renderer.createElement('div');\n this._renderer.addClass(d2, 'adjustable-room-block-2');\n this.virtualScroll.elementRef && this._renderer.appendChild(this.virtualScroll.elementRef.nativeElement, d2);\n }\n\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.level && this._org.building) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.updateTime();\n this.initSpaces();\n }\n if (changes.space_type) {\n this.initSpaces();\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n public init() {\n this._service.title = 'Day View';\n this.subscription(\n 'viewing',\n this._service\n .listen('CONCIERGE.day_view.viewing')\n .subscribe((event) => this.scrollIntoView(event) )\n );\n // Subscribe to route query changes\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view') || localStorage.getItem('CONCIERGE.view_booking')) {\n this.view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_booking');\n const spaceJson = localStorage.getItem('CONCIERGE.view_booking_space');\n /* istanbul ignore else */\n if (details) {\n const space: Space | undefined = spaceJson\n ? new Space(JSON.parse(spaceJson))\n : undefined;\n const booking = new Booking({ ...JSON.parse(details), room: space });\n if(!this.modalInitialized) {\n this.modalInitialized = true;\n this.view(booking, space);\n localStorage.removeItem('CONCIERGE.view_booking');\n localStorage.removeItem('CONCIERGE.view_booking_space');\n }\n }\n }\n })\n );\n // this._zone.runOutsideAngular(() => {\n // this.interval(\n // 'scroll',\n // () => {\n // /* istanbul ignore else */\n // if (this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n // }\n // },\n // 1000\n // );\n // });\n /* istanbul ignore else */\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n /**\n * Update scroll parameters to match the change in the scroll position\n * @param event\n */\n public updateScroll(event) {\n this.scroll_top = event.target.scrollTop;\n this.scroll_left = event.target.scrollLeft;\n }\n\n\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n\n /** Update the now line position */\n private updateTime() {\n const now = new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n });\n this.now = (now.dateHour + now.minutes / 60) / 24;\n this.active_hour = now.startOfValue('hour').formatDate('HH:mm');\n this.is_today = this.isToday();\n this.cdr.detectChanges();\n }\n\n /**\n * View booking details\n * @param booking Booking to view the details of\n * @param space Space that's selected.\n */\n private view(booking: Booking, space?: Space) {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space: space || booking.space,\n booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.view_id = null;\n }\n\n\n /**\n * Scroll booking to the event on the day view\n * @param booking Booking to scroll into view\n */\n private scrollIntoView(searchData: Booking | Space ) {\n if (searchData && this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n this.column && this._renderer.removeClass(this.column, 'wild');\n\n /** Select space column element using space id in search data - \n * space.id if seach data is space object or data.space.id if search data is booking object\n * \n */\n const spaceId = searchData['space'] ? searchData['space'].id : searchData.id;\n const element: HTMLDivElement = this.scroll_area['elementRef']\n .nativeElement.querySelector(`#space-col-${spaceId}`);\n\n\n this.column = element;\n\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n if(searchData['space'] && searchData['space'].id) \n this.bookingEl = element?.querySelector(`#${searchData.id}`)?.querySelector('.event-container');\n\n\n /* istanbul ignore else */\n if (element) {\n this.timeoutID && clearTimeout(this.timeoutID);\n this._renderer.addClass(element, 'wild');\n this.bookingEl && this._renderer.addClass(this.bookingEl, 'wild');\n const scroll_box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n\n let date_percent;\n if(searchData['space'] && searchData['space'].id) {\n date_percent = Math.abs(\n searchData['startDateTz'].dateDiff(\n searchData['startDateTz'].startOfValue('day'),\n 'minutes'\n )\n ) / (24 * 60);\n }\n \n\n const box = element.getBoundingClientRect();\n const left = box.left - scroll_box.left + this.scroll_area['elementRef'].nativeElement.scrollLeft - 500;\n const top = (searchData['space'] && searchData['space'].id) ? \n this.scroll_area['elementRef'].nativeElement.scrollHeight * date_percent - 10 :\n 0\n\n\n this.scroll_area['elementRef'].nativeElement.scrollTo({\n left: left,\n top: top,\n behavior: 'smooth',\n });\n\n this.timeoutID = setTimeout(()=> {\n element && this._renderer.removeClass(element, 'wild');\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n }, 3000);\n }\n }\n }\n\n /**\n * Setup an auto-scroll for the display view\n * @param x\n * @param y\n */\n public scrollView(x: number, y: number) {\n /* istanbul ignore else */\n if (x || y) {\n this.scroll_area['elementRef'].nativeElement.scrollTop += y || 0;\n this.scroll_area['elementRef'].nativeElement.scrollLeft += x || 0;\n /* istanbul ignore else */\n if (\n (y &&\n this.scroll_area['elementRef'].nativeElement.scrollTop >=\n this.scroll_area['elementRef'].nativeElement.scrollHeight) ||\n (x &&\n this.scroll_area['elementRef'].nativeElement.scrollLeft >=\n this.scroll_area['elementRef'].nativeElement.scrollWidth) ||\n (y && this.scroll_area['elementRef'].nativeElement.scrollTop <= 0) ||\n (x && this.scroll_area['elementRef'].nativeElement.scrollLeft <= 0)\n ) {\n this.clearInterval('auto_scroll');\n }\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n }\n }\n\n public clearSelected() {\n this._service.set('CONCIERGE.day_view.viewing', null);\n }\n\n public cancelScroll() {\n this.clearInterval('auto_scroll');\n }\n\n public dragChange(is_dragging: boolean) {\n if (is_dragging) {\n this.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop; \n this.subscription(\n 'listen_move',\n this._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n const position = { x: event.clientX, y: event.clientY };\n const y = position.y > this.box.bottom - this.box.height * 0.05\n ? 1\n : position.y < this.box.top + this.box.height * 0.05\n ? -1\n : 0;\n const x = position.x > this.box.right - this.box.width * 0.05\n ? 1\n : position.x < this.box.left + this.box.height * 0.05\n ? -1\n : 0;\n this.scrollView(x * 5, y * 5);\n this._zone.runOutsideAngular(() => {\n this.interval('auto_scroll', () => {\n return this.scrollView(x * 40, y * 40) \n }, 15);\n });\n this.cdr.detectChanges();\n })\n );\n this.clearInterval('bookings');\n } else {\n this.cancelScroll();\n this.unsub('listen_move');\n }\n }\n\n private initSpaces() {\n const holding_bay = this.holding_bay;\n this.filtered_spaces = this.spaces.filter(\n (i) =>\n ( ( !this.space_type || i.zones.indexOf(this.space_type) >=0 ) || ( [i.room_type].indexOf(this.space_type) >= 0) ) &&\n (!holding_bay || i.id !== holding_bay.id) &&\n i.bookable\n );\n this.filtered_spaces.sort((a, b) => a.local_name.localeCompare(b.local_name));\n this.space_zones = this.spaces.map((i) => `space-col-${i.id}`);\n }\n\n\n\n\t\tpublic onEventDragging(isDragging: boolean): void {\n\t\t\t// Check if dragging is initiated\n\t\t\tif (isDragging) {\n\t\t\t\t// Store the current scroll position\n\t\t\t\tthis.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop;\n\t\t\t\t// Subscribe to mouse move events\n\t\t\t\tthis.subscribeToMouseMove();\n\t\t\t\t// Clear existing interval for bookings\n\t\t\t\tthis.clearInterval('bookings');\n\t\t\t} else {\n\t\t\t\t// Cancel scroll operation\n\t\t\t\tthis.cancelScroll();\n\t\t\t\t// Unsubscribe from mouse move events\n\t\t\t\tthis.unsubscribeFromMouseMove();\n\t\t\t}\n\t}\n\n\t// Subscribe to mouse move events and handle scroll logic\n\tprivate subscribeToMouseMove(): void {\n\t\tthis.subscription(\n\t\t\t'listen_move',\n\t\t\tthis._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n\t\t\t\t// Get mouse position\n\t\t\t\tconst position = { x: event.clientX, y: event.clientY };\n\t\t\t\t// Calculate scroll direction based on mouse position\n\t\t\t\tconst [x, y] = this.calculateScrollDirection(position);\n\t\t\t\t// Scroll the view based on calculated direction\n\t\t\t\tthis.scrollView(x * 5, y * 5);\n\t\t\t\t// Run auto-scroll logic\n\t\t\t\tthis.runAutoScroll(x, y);\n\t\t\t\t// Detect changes to update the view\n\t\t\t\tthis.cdr.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t// Calculate scroll direction based on mouse position\n\tprivate calculateScrollDirection(position: { x: number, y: number }): [number, number] {\n\t\tconst tolerance = 0.05;\n\t\tconst x = this.calculateDirection(position.x, this.box.left, this.box.right, tolerance);\n\t\tconst y = this.calculateDirection(position.y, this.box.top, this.box.bottom, tolerance);\n\t\treturn [x, y];\n\t}\n\n\t// Calculate direction based on mouse position and element boundaries\n\tprivate calculateDirection(pos: number, min: number, max: number, tolerance: number): number {\n\t\tif (pos > max - this.box.width * tolerance) {\n\t\t\t\treturn 1; // Scroll right\n\t\t} else if (pos < min + this.box.width * tolerance) {\n\t\t\t\treturn -1; // Scroll left\n\t\t} else {\n\t\t\t\treturn 0; // Do not scroll\n\t\t}\n\t}\n\n\t// Run auto-scroll logic\n\tprivate runAutoScroll(x: number, y: number): void {\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis.interval('auto_scroll', () => this.scrollView(x * 10, y * 10), 10);\n\t\t});\n\t}\n\n\t// Unsubscribe from mouse move events\n\tprivate unsubscribeFromMouseMove(): void {\n\t\tthis.unsub('listen_move');\n\t}\n\n public movingEvent(booking) {\n this.isEventMoving = booking.isMoving;\n this.loading_space[booking.movingId] = booking.isMoving;\n \n }\n\n}\n\n","
\n\t
\n\t\t\t\n\t
\n\n\t
\n\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
Time
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ timeslot.name }}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ room.local_name }}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\tCapacity - {{ room.capacity || '0' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{ room.capacity === 1 ? 'person' : 'people' }}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\n
\n
\n
Incoming Booking Requests
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\t
\n\t\t\t
Moving meeting
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\t
\n
\n","import { Component, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'meeting-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class MeetingCateringDetailsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public orders = [];\n\n /** Total cost of all the orders */\n public get total(): number {\n let total = 0;\n this.orders.forEach((order) => (total += order.total));\n return total;\n }\n\n public get total_edited(): boolean {\n return this.booking.edits.some((_) => this.orders.some((o) => o.id === _));\n }\n\n /** Charge code for orders in the active space */\n public get charge_code(): string {\n return (this.orders.length ? this.orders[0].charge_code : '') || '';\n }\n\n /** Currency symbol for orders in active space */\n public get symbol(): string {\n const space = this.space || { level: { building_id: '' } };\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n /** Notes for orders in active space */\n public get notes(): string {\n if (this.orders.length) {\n const note = this.booking.notes.find(\n (note) =>\n note.type === 'catering' &&\n // note.space === this.space.email &&\n this.booking.multi_rooms.some(room => room.email === note.space) &&\n note.author === this.booking.creator.name\n );\n return note ? note.message : '';\n } else {\n return '';\n }\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n constructor(\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router\n ) {\n super();\n }\n\n public ngOnInit() {\n this._updateOrders();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.booking) {\n this._updateOrders();\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toApiJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n }\n\n /** Open modal to edit catering details for booking */\n public editMeetingCatering() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n only_catering: true,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n\n /**\n * View catering order for the event\n */\n public viewOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n if (!booking || !order) return;\n /* istanbul ignore else */\n if (localStorage) this.storeOrder(order);\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: booking.id, view: order.id },\n });\n this._dialog.closeAll();\n }\n\n /** List of orders for this booking and space */\n private _updateOrders() {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp[0] && orders.push(..._temp);\n });\n orders = orders.map((order) => {\n let ord = order.toJSON();\n ord.booking = this.booking; // R--- check this change works\n return new CateringOrder(ord);\n });\n this.orders = orders;\n }\n}\n","
Catering
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n {{ total / 100 | currency: symbol }}\n
\n
\n
\n \n
\n {{ charge_code }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n\n
<No Catering Orders>
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingAction, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration } from '@mckinsey-converge/base';;\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'meeting-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss'],\n})\nexport class MeetingDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Mapping of edited fields */\n\n @Output() updateBooking = new EventEmitter();\n\n @Output() public event = new EventEmitter();\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n\n public edited: HashMap = {};\n\n /** Display string for the locations in the booking */\n public get location(): string {\n // Ensure both this.booking.room and this.space are treated as arrays\n let rooms: Space[] = [];\n \n if (Array.isArray(this.booking.multi_rooms) && this.booking.multi_rooms.length > 0) {\n rooms = this.booking.multi_rooms;\n } else if (Array.isArray(this.space) && this.space.length > 0) {\n rooms = this.space;\n }\n \n // Map each room to its local_name and join these names with a comma\n return rooms.map(room => room.local_name).join(', ');\n }\n\n /** Display string for the booking duration */\n public get duration() {\n return this.booking ? humaniseDuration(this.booking.duration) : '1 hour';\n }\n\n /** Display string for attendees in booking */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n\n /** Display string for attendees in booking */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('dd MMM yyyy')} ${this.booking.startDateTz.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get end_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration})\n return `${end_.formatDate('dd MMM yyyy,')} ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get attendees() {\n return this.booking.attendees.map((person) => person.name).join('\\n');\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done';\n }\n\n public bookingDetails: BookingDetailInfo;\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n Object.values(this.booking.edits || []).forEach(i => {\n this.edited[i] = true;\n });\n this.setDetails();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n /**\n * Function to set details of the booking, can take advantage to one time assignment and set tmeplate properties to avoid template conditions and function calls\n */\n setDetails() {\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public editMeeting() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n action: BookingAction.EDIT\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Booking Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name || booking.organiser.email }}\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ location }}\n
\n \n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ duration }}\n
\n
\n
\n \n
\n {{ attendees }}\n
\n
\n
0\">\n \n
\n {{ this.booking.company.join(', ') }}\n
\n
\n
\n \n
\n No\n
\n
\n
\n \n
\n
\n
\n\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\n\nimport { Booking, BookingAction } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingsService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { DeleteConfirmModalComponent } from '../../bookings/delete-confirm-modal/delete-confirm-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\nexport interface MeetingDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-meeting-details-modal',\n templateUrl: './meeting-details-modal.component.html',\n styleUrls: ['./meeting-details-modal.component.scss'],\n})\nexport class MeetingDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for the loading state */\n public loading: string;\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /** Handler for request errors */\n /** Whether the meeting is approved or not */\n public isApproved = false;\n public isMasterApproved = false;\n\n public master_booking: any;\n \n private _on_error = (message) => (err) => {\n this._service.notifyError(`${message}. Error: ${err.message || err}`);\n this.setLoading(null);\n };\n\n /** Booking to view details */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n public set booking(booking: Booking) {\n this._data.booking = booking;\n // if space selected no longer exists on booking change, pick first one.\n if (this._data.booking.room?.id && this._data.booking.room.id !== this._data.space?.id) {\n this._data.space = this._data.booking.room;\n }\n }\n\n /** Space to display booking details for */\n public get space(): Space {\n return this._data.space;\n }\n\n /** Type of meeting */\n public get type(): string {\n return this.booking.getType();\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: MeetingDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n if (!this.booking) {\n this._dialog_ref.close();\n return;\n }\n\n if (this.booking.is_recurrent) {\n if (this.booking.recurrence_type === 'master') {\n // If the booking is recurrent and of type 'master', use it directly\n this.isRecurrentBooking = this.booking.is_recurrent;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n } else if (this.booking.recurrence_type === 'occurrence') {\n // If the booking is recurrent and of type 'occurrence', find the master booking\n this.subscription(\n 'detail_bookings',\n this._booking_state_service.bookings.subscribe(async (bookings) => {\n this.master_booking = bookings.find((bkn) => {\n return (\n this.booking.recurrence_master_id === bkn.recurrence_master_id &&\n bkn.recurrence_type === 'master'\n );\n }) || await this._bookings.show(this.booking.recurrence_master_id);\n\n this.isApproved =\n this.booking.status === 'accepted' ||\n this.booking.status === 'approved';\n this.isMasterApproved =\n this.master_booking?.status === 'accepted' ||\n this.master_booking?.status === 'approved';\n\n // show Accept Series button for an occurrence only if it is not accepted yet and master booking is also not approved\n this.isRecurrentBooking =\n (this.master_booking?.is_recurrent &&\n !this.isApproved &&\n !this.isMasterApproved) ??\n false;\n if (this.isRecurrentBooking) {\n this.booking = this.master_booking;\n }\n })\n );\n }\n } else {\n // If the booking is not recurrent, use it directly\n this.isRecurrentBooking = false;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n }\n\n public setLoading(state: string) {\n this.loading = state;\n this._dialog_ref.disableClose = !!this.loading;\n }\n\n public acceptMeeting() {\n this.setLoading('Accepting meeting...');\n const event = this.booking.toJSON();\n\n let acceptOptions = {\n concierge: true,\n host: this.booking.organiser.email,\n room_email: this.space.email,\n icaluid: this.booking.icaluid,\n start: event.start,\n end: event.end,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings.accept(this.booking.id, acceptOptions).then(() => {\n this._service.notifySuccess('Meeting approved.');\n this.booking.status = BOOKING_STATUS.approved;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.approved });\n }, this._on_error('Apologies, Unable to approve! This time slot has been booked recently by another user, please try booking another one.'));\n }\n\n public declineMeeting() {\n this.setLoading('Declining meeting...');\n\n let declineOptions = {\n booking_id: this.booking.id,\n organiser: this.booking.organiser.email,\n icaluid: this.booking.icaluid,\n start: this.booking.startDateTz.seconds,\n end: this.booking.endDateTz.seconds,\n room_email: this.space.email,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings\n .decline(this.booking.id, declineOptions)\n .then(() => {\n this._service.notifySuccess('Meeting declined.');\n this.booking.status = BOOKING_STATUS.declined;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.declined });\n }, this._on_error('Unable to declining meeting, please try another one.'));\n }\n\n /** Open modal to confirm deletion of booking */\n public confirmDeleteMeeting() {\n const ref = this._dialog.open(DeleteConfirmModalComponent);\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'action') {\n ref.componentInstance.loading = true;\n const success = await this.deleteMeeting().catch(\n this._on_error('Error deleting booking')\n );\n ref.componentInstance.loading = false;\n ref.componentInstance.success = !!success;\n setTimeout(() => {\n ref.close();\n }, 3000);\n }\n })\n );\n }\n\n /** Open model to cloning a booking */\n public cloningMeeting(): void {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.booking,\n action: BookingAction.CLONE,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /** Delete booking */\n private async deleteMeeting(opts: { series?: boolean } = {}) {\n this.setLoading('Deleting meeting...');\n await this.booking.delete(opts);\n this._service.notifySuccess('Successfully deleted booking');\n this.event.emit({ reason: 'action', metadata: 'removed' });\n this._dialog_ref.afterClosed().subscribe((_) => this.setLoading(null));\n this._dialog_ref.close();\n this._service\n .get('undo')\n .next({ action: opts && opts.series ? 'series' : 'booking', booking: this.booking });\n return true;\n }\n\n /** Update booking requirements */\n public async updateRequirements(form: FormGroup) {\n this.setLoading('Updating requirements...');\n const value = form.value;\n const booking_data = this.booking.toJSON();\n const booking = new Booking({\n ...booking_data,\n ...value,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n booking.room_setup = 900;\n booking.room_breakdown = 900;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n\t\t\t\t\t\t\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\t\t\t\t\t\tthis._booking_state_service.bookings.subscribe((res) => {\n\t\t\t\t\t\t\tconst booking = res.find((book) => this.booking.id === book.id);\n\t\t\t\t\t\t\tthis.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n\t\t\t\t\t\t});\n this._service.notifySuccess('Successfully updated requirements');\n }\n this.setLoading(null);\n }\n\n public async updateBooking(form) {\n this.setLoading('Updating booking...');\n /* const value = form.value;\n const booking_data = this.booking.toJSON();\n const startDateTz = form.controls.dateTz.value;\n const endDateTz = startDateTz.addValue({ minutes: value.duration });\n const booking = new Booking({\n ...booking_data,\n ...value,\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating booking`))) as any;\n */\n // if (new_booking) {\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated booking');\n // }\n this.setLoading(null);\n }\n\n public async updateBreakdown(event) {\n this.setLoading('Updating requirements...');\n /*const booking_data = this.booking.toJSON();\n const _booking = new Booking({\n ...booking_data,\n setup: event.setup,\n breakdown: event.breakdown,\n notes: event.notes,\n });\n const new_booking: Booking = (await this._bookings\n .save(_booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n this._service.notifySuccess('Successfully updated requirements');\n }*/\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated requirements');\n this.setLoading(null);\n }\n}\n","
\n
{{ booking.time_period }}
\n
\n \n {{booking.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
{{ booking?.title }}
\n
\n \n
\n
\n\n \n\n\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { UsersService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { humaniseDuration } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, BookingNote } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface PrivateDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-private-details-modal',\n templateUrl: './private-details-modal.component.html',\n styleUrls: ['./private-details-modal.component.scss'],\n})\nexport class PrivateDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form Fields for private details */\n public form: FormGroup;\n /** Whether changes are being saved */\n public loading: boolean;\n /** List of available durations for setup and breakdown */\n public available_durations: Identity[] = new Array(5)\n .fill(0)\n .map((_, i) => ({ id: i * 15 * 60, name: humaniseDuration(i * 15) || '0 minutes' }));\n\n public get booking(): Booking {\n return this._data.booking;\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: PrivateDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const note = this.booking.notes.find(\n (note) => note.type === 'private'//&& note.space === this._data.space.email\n ) || { message: '' };\n this.form = new FormGroup({\n setup: new FormControl(this.booking.room_setup || this.booking.setup[this._data.space.email] || 0),\n breakdown: new FormControl( this.booking.room_breakdown || this.booking.breakdown[this._data.space.email] || 0),\n notes: new FormControl(note.message),\n });\n }\n\n public saveChanges() {\n const now = new DateTZ();\n if (this.form.dirty) {\n const old_notes = this.booking.notes.filter(\n (note) => !(note.type === 'private') // && note.space === this._data.space.email\n );\n const notes = [\n ...old_notes,\n {\n type: 'private',\n date: now.ms,\n message: this.form.value.notes,\n author: this._users.current.name,\n space: this._data.space.email,\n } as BookingNote,\n ];\n const value = this.form.value;\n const setup = { ...this.booking.setup };\n Object.keys(setup).forEach((k) => setup[k]= value.setup );\n setup[this._data.space.email] = value.setup;\n const breakdown = { ...this.booking.breakdown };\n Object.keys(breakdown).forEach((k) => breakdown[k]= value.breakdown );\n breakdown[this._data.space.email] = value.breakdown;\n const room_setup = value.setup;\n const room_breakdown = value.breakdown;\n\n const new_booking = new Booking({\n ...this.booking.toJSON(),\n setup,\n breakdown,\n room_setup,\n room_breakdown,\n notes,\n });\n this.loading = true;\n this._dialog_ref.disableClose = true;\n this._bookings.save(new_booking).then(\n (booking) => {\n\n const bkn = new Booking({ ...this.booking, ...booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\n this.event.emit({ reason: 'done', metadata: {setup, breakdown, notes} });\n this._dialog_ref.close();\n },\n (err) => {\n this._dialog_ref.disableClose = false;\n this.loading = false;\n }\n );\n } else {\n this._dialog_ref.close();\n }\n }\n}\n","
\n
Edit Private Details
\n \n
\n\n
\n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
Updating private details...
\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration, BaseDirective, DialogEvent } from '@mckinsey-converge/base';;\nimport { PrivateDetailsModalComponent } from '../private-details-modal/private-details-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-private-details',\n templateUrl: './private-details.component.html',\n styleUrls: ['./private-details.component.scss'],\n})\nexport class MeetingPrivateDetailsComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public get setup(): string {\n let setup = this.booking?.room_setup || this.booking.setup[this.space.email];\n return setup ? humaniseDuration(setup / 60) : '';\n }\n\n public get breakdown(): string {\n let breakdown = this.booking.room_breakdown ||this.booking.breakdown[this.space.email];\n return breakdown ? humaniseDuration(breakdown / 60) : '';\n }\n\n public get notes() {\n // return (this.booking.notes.find(note => note.type === 'private' && note.space === this.space.email) || {}).message;\n return (this.booking.notes.find(note => note.type === 'private' ) || {}).message;\n }\n\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n ngOnInit(): void {\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n public openPrivateDetailsModal() {\n const dialogRef = this._dialog.open(PrivateDetailsModalComponent, {\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Private Details\n
\n
\n
\n \n
\n {{ setup }}\n
\n
\n
\n \n
\n {{ breakdown }}\n
\n
\n
\n \n
\n {{ notes || '<No Notes>' }}\n
\n
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingStateService, SeriesAction, RecurrencePeriod, BookingsService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\n@Component({\n selector: 'meeting-recurring-details',\n templateUrl: './recurring-details.component.html',\n styleUrls: ['./recurring-details.component.scss'],\n})\nexport class MeetingRecurringDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** helper for setLoading state of the parent modal */\n @Output() public confirmDelete: EventEmitter<{ series?: boolean}> = new EventEmitter<{}>();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n private _recurrence_endTz: DateTZ;\n private _recurrence_startTz: DateTZ;\n private _recurrence_period: RecurrencePeriod;\n private _recurrence_interval: number;\n private _occurrence_details: { id: string, start_epoch: number, dateTz?: DateTZ }[];\n private _specific_dates: boolean = false;\n private _master_booking: Booking;\n public expired_ocurrences: Array = [];\n\n constructor(\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n private _bookings: BookingsService\n ) {\n super()\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'detail_bookings',\n this._booking_state.bookings.subscribe(async (bookings) => {\n\n const booking = bookings.find(bkn => { \n if(this.booking.recurrence_type === 'master')\n return bkn.recurrence_master_id === this.booking.icaluid;\n else \n return bkn.icaluid === this.booking.icaluid ;\n }) || this.booking;\n // if (!booking && this.booking.recurrence_type !== 'master') {\n // return;\n // }\n \n\n this.master_booking = ( this.booking.recurrence_type === 'occurrence' && booking\n ? bookings.filter(bkg => bkg.id === booking.recurrence_master_id)\n : this.booking.recurrence_type === 'master' ? [this.booking] \n : booking \n ? [booking]\n : []\n )?.shift();\n\n if (!this.master_booking) {\n this.master_booking = await this._bookings.show(booking.recurrence_master_id);\n this._booking_state.add(this.master_booking);\n }\n\n this.recurrence_endTz = this.master_booking.recurrenEndFromOcurrences(this.master_booking.occurrence_details);\n this.recurrence_startTz = new DateTZ({date: this.master_booking.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone});\n this.recurrence_period = this.master_booking.recurrence_period;\n this.recurrence_interval = this.master_booking.recurrence_interval;\n this.occurrence_details = this.master_booking.occurrence_details && this.master_booking.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.master_booking.id)\n .map(ocurrence => ({ ...ocurrence, start_epoch: ocurrence.start_epoch * 1000, dateTz: new DateTZ({ date: ocurrence.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone }) }));\n const occurrence_ids = this.master_booking?.occurrence_details.map(ocurr => ocurr.id) || []\n this.expired_ocurrences = bookings.filter(booking => {\n if(occurrence_ids.includes(booking.id)){\n const building_tz = this.master_booking.timezone\n const date = (booking.start_epoch * 1000) + (booking.duration * 60000)\n const start = new DateTZ({date, is_local_tz: false, building_tz})\n const now = DateNow(new Date()).toZone(building_tz)\n return now.isAfterDate(start, 'minute')\n }\n return false\n })\n })\n );\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public set recurrence_startTz(date: DateTZ) {\n this._recurrence_startTz = date\n }\n\n public get recurrence_startTz():DateTZ {\n return this._recurrence_startTz\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date\n }\n\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz\n }\n\n public set recurrence_period(period: RecurrencePeriod) {\n this._recurrence_period = period;\n }\n\n public get recurrence_period():RecurrencePeriod {\n return this._recurrence_period;\n }\n\n public set recurrence_interval(interval: number) {\n this._recurrence_interval = interval;\n }\n\n public get recurrence_interval():number {\n return this._recurrence_interval;\n }\n\n public set occurrence_details(occurrences: { id: string, start_epoch: number }[]) {\n this._occurrence_details = occurrences;\n }\n\n public get occurrence_details(): { id: string, start_epoch: number }[] {\n return this._occurrence_details;\n }\n\n public set specific_dates(val: boolean) {\n this._specific_dates = val;\n }\n\n public get specific_dates(): boolean {\n return this._specific_dates;\n }\n\n public set master_booking(bkng: Booking) {\n this._master_booking = bkng;\n }\n\n public get master_booking():Booking {\n return this._master_booking;\n }\n\n public toggleSpecificDates() {\n this.specific_dates = !this.specific_dates;\n }\n\n public async editSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(true), //we want to send the master booking since it's the one with all of the series data\n action: SeriesAction.EDIT,\n timezone: localStorage.getItem('CONCIERGE.timezone')\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n }); \n }\n\n public async cloneSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(),\n action: SeriesAction.CLONE\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public async cancelSeries() {\n this.confirmDelete.emit({ series: true });\n }\n}\n","
\n
\n
\n
\n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Days' : 'Day'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Weeks' : 'Week'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Months' : 'Month'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs on\n
\n
\n
\n
{{ occurrence.dateTz.formatDate('dd MMM yyyy') }}
\n
\n
\n
\n
\n
\n
\n \n
\n
\n\n \n \n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport {\n Booking,\n generateBookingForm\n} from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { RequirementDetailsModalComponent, RequirementDetailsModalData } from '@mckinsey-converge/legacy-overlays';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-details-requirements',\n templateUrl: './requirements.component.html',\n styleUrls: ['./requirements.component.scss'],\n})\nexport class MeetingDetailsRequirementsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Emitter for changes to the booking */\n @Output() public bookingChange = new EventEmitter();\n /** Emitter for updating booking */\n @Output() public event = new EventEmitter();\n public roomNames: string;\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Requirement notes */\n public get notes(): string {\n const note = this.booking.notes.find(\n (note) => note.type === 'equipment' && this.space.email === note.space\n );\n return (note ? note.message : '') || '';\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n public get headcount(): any{\n const temp = this.booking.multi_rooms.filter(room => room.email === this.space.email)[0]['email'];\n return this.booking.headcount || this.booking.expected_attendees[temp];\n }\n\n constructor(private _dialog: MatDialog, private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void {\n this.roomNames = this.booking.local_room_name;\n }\n\n /** Open modal for adding equipment requirements to booking */\n public openEquipmentDetailsModal() {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n const ref = this._dialog.open<\n RequirementDetailsModalComponent,\n RequirementDetailsModalData\n >(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: form.controls.space_list.value,\n notes_field: form.controls.notes,\n codes_field: form.controls.equipment_codes,\n head_counts_field: form.controls.expected_attendees,\n standalone: true\n }\n });\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.close();\n this.event.emit(form);\n }\n })\n );\n }\n}\n","
\n Room Requirements\n
\n
\n
\n
\n
\n
\n {{ roomNames || space.local_name }}\n
\n \n
\n
\n
\n \n
\n \n {{\n headcount\n }}\n
\n
\n
\n \n
\n {{\n booking.equipment_code || (booking.equipment_codes || {})[\n space.email || booking.room.email\n ] || 'No Charge Code'\n }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n","import { Component, Input, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { map } from 'rxjs/operators';\n\nimport { Booking, Space } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nimport { timePeriodsIntersect } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-day-display',\n templateUrl: './day-display.component.html',\n styleUrls: ['./day-display.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewDayDisplayComponent extends BaseDirective {\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** List of spaces to display bookings for */\n @Input() public spaces: Space[];\n /** Whether the date set is today */\n public isToday: boolean = false;\n /** List of bookings for this date */\n public readonly booking_list = this._booking_state_service.filtered_week.pipe(\n map((bookings) => {\n const date = this.dateTz.startOfValue('day');\n /**\n * Before the dateTz refactor timePeriodsIntersect would show bookings on the wrong day\n * because this.dateTz did not have the building timezone\n */\n return bookings.filter((booking) => {\n const ignore = booking.is_recurrent && booking.recurrence_type === 'master';\n return (\n !ignore &&\n // this.spaces.find((space: Space) => space.email === booking.room.email) &&\n // Check if any room in booking.multi_rooms satisfies the condition with any space in this.spaces\n booking.multi_rooms.some(room => \n this.spaces.find((space: Space) => space.email === room.email)\n ) &&\n timePeriodsIntersect(\n date.ms,\n date.endOfValue('day').ms,\n booking.startDateTz.ms,\n booking.endDateTz.ms\n )\n );\n });\n })\n );\n\n /** Display string for the set date */\n public get date_display(): string {\n return this.dateTz.formatDate('EEE, dd MMM yyyy');\n }\n\n constructor(private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.dateTz) {\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.dateTz.building_tz })\n this.isToday = this.dateTz.isSameDate(now, 'day');\n }\n if (changes.spaces) {\n this.timeout('changed', () => this._booking_state_service.setFilters(this._booking_state_service.filters), 100);\n }\n }\n\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n}\n","
\n
{{ date_display }}
\n
Today
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
No events for {{ date_display }}
\n
\n
\n","import { Component, Input, ChangeDetectionStrategy, OnInit, ChangeDetectorRef} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\n@Component({\n selector: 'week-view-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewItemComponent implements OnInit{\n @Input() public event: Booking;\n\n public type: string = '';\n\n constructor(private _dialog: MatDialog) {}\n\n public ngOnInit() {\n this.type = this.event.getType();\n }\n\n /**\n * Open modal to view bookings details\n */\n public viewMeetingDetails() {\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: this.event.space,\n booking: this.event\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n })\n }\n}\n","\n
\n
{{ event.all_day ? 'All Day' : event.time_period }}
\n
\n \n \n
\n
\n
\n
\n \n
{{ event.organiser?.name }}
\n
\n
\n \n
\n {{ event.space?.local_name || event.local_room_name }}\n
\n
\n
\n \n
{{ event.attendees?.length || '0' }}
\n
\n
0\">\n \n
{{ event.company.length }}
\n
\n
\n\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class WeekViewTimelineComponent extends BaseDirective implements OnInit {\n /** Timestamp of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** Whether weekends are displayed */\n @Input() public weekends: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n /** List of dates to display */\n public dateListTz: DateTZ[] = [];\n /** List of spaces to display bookings for */\n public space_list: Space[] = [];\n\n constructor(private _spaces: SpacesService, private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingWeek();\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n });\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz || changes.weekends || changes.level || changes.space_type) {\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n /**\n * Generate list of dates to display\n * @param dateTz Currently selected date\n * @param weekends Whether weekends should be included\n */\n private generateDatesTz(dateTz: DateTZ, weekends: boolean = false): DateTZ[] {\n const list: DateTZ[] = [];\n // start of day takes midnight to the previous day issue\n let day = dateTz.addValue({ minutes: 5 }).startOfValue('day');\n let start = day.startOfValue('week');\n let end = start.endOfValue('week').addValue({ minutes: 15 });\n while (start.isBeforeDate(end)) {\n if ((start.dateWeekday !== 6 && start.dateWeekday !== 7) || weekends) {\n list.push(start);\n }\n start = start.addValue({ days: 1 });\n }\n\n return list;\n }\n \n}\n","
\n
\n \n
\n \n
\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Identity } from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { Booking, BookingsService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService, BuildingLevel } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AlertMode } from '@mckinsey-converge/ui';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { Subscription } from 'rxjs/internal/Subscription';\n\n@Component({\n selector: 'a-week-view',\n templateUrl: './week-view.component.html',\n styleUrls: ['./week-view.component.scss'],\n})\nexport class WeekViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** Whether weekends are displayed */\n public weekend: boolean;\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected level */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n public banner_mode = AlertMode.Error;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n public get building() {\n return this._org.building;\n }\n\n public has_access: boolean;\n private spaceTypesSubscription: Subscription;\n \n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n\n this._service.title = 'Week View';\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if(!this.has_access) return\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = (building.levels[0] || { id: '' }).id;\n this.updateLevel();\n }\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n this.levels.sort((a, b) => b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n }));\n\n //\n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'week_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n if (this.spaceTypesSubscription) {\n this.spaceTypesSubscription.unsubscribe();\n }\n }\n\n updateSpaceSelection(){\n this._service.set('active_type', this.active_type);\n }\n\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this._router?.url?.includes('/week-view') && this._router.navigate(['/week-view', this.active_level]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public hideBanner() {\n this.undo_action = null;\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._booking_state_service.attentToDelete(booking, action, true);\n this._service.get('undo').next(null);\n this.undo_action = null;\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n}\n","
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n 1\" appearance=\"outline\">\n \n \n {{ level?.name }}\n \n \n \n 1\" appearance=\"outline\">\n \n \n {{ type?.name }}\n \n \n \n \n Show Weekends\n \n
\n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { WeekViewComponent } from './week-view.component';\nimport { WeekViewTimelineComponent } from './timeline/timeline.component';\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { WeekViewDayDisplayComponent } from './day-display/day-display.component';\nimport { WeekViewItemComponent } from './day-display/item/item.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: WeekViewComponent },\n { path: ':level', component: WeekViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [WeekViewComponent, WeekViewTimelineComponent, WeekViewDayDisplayComponent, WeekViewItemComponent],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class WeekViewModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Building, CateringMenuService, CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { BehaviorSubject } from 'rxjs';\nimport { CateringStorage } from 'src/app/catering/catering.storage';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss']\n})\nexport class CateringComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Name of the page to display */\n public page: string;\n /** Filter string for searching */\n public search_str: string;\n /** Toggle for new category modal */\n public category: number = 0;\n /** Toggle for new package modal */\n public package: number = 0;\n /** Number of categories being displayed */\n public length: number;\n /** Order type to filter by */\n public order_type: string = '';\n\n public orderDetailsExpanded = new BehaviorSubject(false);\n\n public has_access: boolean;\n menuWithOthers: any[]=[];\n allCategories: any[] = [\n { display: 'All orders', value: '', meta: { childItems: [] } },\n { display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n { display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n ];\n otherCategories: any[];\n public isClosed: boolean = false;\n\n public selectedSort: { display: string; value: string; meta: {}; } = { display: 'All orders', value: '', meta: { childItems: [] } };\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService,\n private cateringStorage: CateringStorage,\n private _menu: CateringMenuService,\n ) {\n super();\n this.orderDetailsExpanded.next(cateringStorage.orderDetails);\n }\n\n\n public ngOnInit(): void {\n\n\n\n this.subscription('orderDetailsExpand', this.orderDetailsExpanded.subscribe(value => {\n this.cateringStorage.orderDetails = value;\n }));\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.category = 0;\n this._service.title = 'Catering';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('page')) {\n this.page = params.get('page');\n }\n })\n );\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id }\n });\n })\n );\n });\n\n\n\n }\n\n\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n\n\n public mainCategorySelected(event, sortingValue) {\n if(!event.target.classList.contains('child')) {\n this.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n }\n\t}\n public selectSubcategory(event, sortingValue) {\n\t\tthis.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n\t}\n\n public loadAllCategory() {\n\n // this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n // this.length.emit(this.catering_menu.length);\n const filtered_menu = this.filter(this.catering_menu);\n\n this.otherCategories = filtered_menu.filter(mailEl => {\n\n var isThere = mailEl.items.filter(subEl => {\n if(subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\") {\n\n this.menuWithOthers.push({ value: subEl.name.toLowerCase(), display: subEl.name, meta: { parent: mailEl.name.toLowerCase() } })\n }\n return subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\";\n } );\n return !!isThere.length;\n });\n this.otherCategories.map(el => this.allCategories.push({ display: el.name, value: el.name.toLowerCase(), meta: { childItems: [] } }) );\n\n this.menuWithOthers.forEach(el => {\n this.allCategories.forEach(e => {\n if(e.value === el.meta.parent){\n e.meta['childItems'].push(el);\n }\n \t})\n });\n\n\n // console.log(this.allCategories);\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadAllCategory()\n );\n // this.loading = false;\n }\n );\n }\n\n\n\n\n public get timezone() {\n return this._org.building.timezone;\n }\n\n}\n","
\n\t\n\t
\n\t\t\t\n\t
\n\t
\n\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{{selectedSort.display}}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
{{mainCaterory.display}}
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tOrder Details\n\t\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

Catering Orders

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tView catering orders and their statuses upon arrival\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n Route,\n RouterModule\n} from '@angular/router';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport { CateringComponent } from './catering.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { CateringOrdersComponent } from './orders/orders.component';\nimport { CateringMenuComponent } from './menu/menu.component';\nimport { CateringMenuItemListComponent } from './menu/item-list/item-list.component';\nimport { CateringCategoryModalComponent } from './overlays/category-modal/category-modal.component';\nimport { CateringGroupModalComponent } from './overlays/group-modal/group-modal.component';\nimport { CateringItemModalComponent } from './overlays/item-modal/item-modal.component';\nimport { CateringOrdersItemComponent } from './orders/item/item.component';\nimport { OrderDetailsModalComponent } from './overlays/order-details-modal/order-details-modal.component';\nimport { OrderDetailsItemsComponent } from './overlays/order-details-modal/items/items.component';\nimport { OrderBookingDetailsComponent } from './overlays/order-details-modal/booking-details/booking-details.component';\nimport { OrderDetailsNotesComponent } from './overlays/order-details-modal/messages/messages.component';\nimport { CateringStorage } from './catering.storage';\nimport { CateringMenuOrderComponent } from './menu/item/item.component';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { BookingsModule } from '../bookings/bookings.module';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: CateringComponent },\n { path: ':page', component: CateringComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n CateringComponent,\n CateringOrdersComponent,\n CateringMenuComponent,\n CateringMenuItemListComponent,\n CateringCategoryModalComponent,\n CateringGroupModalComponent,\n CateringItemModalComponent,\n CateringOrdersItemComponent,\n OrderDetailsModalComponent,\n OrderDetailsItemsComponent,\n OrderBookingDetailsComponent,\n OrderDetailsNotesComponent,\n CateringMenuOrderComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n LegacyOverlaysModule,\n BaseModule,\n BookingsModule,\n UiModule\n ],\n providers: [CateringStorage],\n exports: [BaseModule]\n})\nexport class CateringModule {\n}\n","import { LocalStorageWrapper } from '@mckinsey-converge/storage';\n\nexport class CateringStorage extends LocalStorageWrapper {\n\n private static orderDetailsKey = 'order-details';\n\n constructor() {\n super('CATERING');\n }\n\n public set orderDetails(value: boolean) {\n this.setValue(CateringStorage.orderDetailsKey, value + '');\n }\n\n public get orderDetails(): boolean {\n const value = this.getValue(CateringStorage.orderDetailsKey);\n return value === 'true';\n }\n\n public removeOrderDetails() {\n this.removeValue(CateringStorage.orderDetailsKey);\n }\n}\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu-item-list',\n templateUrl: './item-list.component.html',\n styleUrls: ['./item-list.component.scss'],\n})\nexport class CateringMenuItemListComponent extends BaseDirective implements OnChanges {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Toggle for new groups */\n @Input() public package: number;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _dialog: MatDialog, private _org: OrganisationService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.package && this.package) {\n this.openGroupModal();\n }\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({\n parent_id: this.category.id,\n zones: [this.building.id],\n });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: this.category },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'category_modal',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.category.items.findIndex(\n (item) => event.metadata.id === item.id\n );\n if (index >= 0) {\n (this.category.items as any[]).splice(index, 1, event.metadata);\n } else {\n (this.category.items as any[]).push(event.metadata);\n }\n }\n })\n );\n }\n}\n","
\n \n
\n \n
\n
\n
\n\n
\n
\n \n
\n
No packages or sub-categories for {{ category.name }}
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { CateringComponent } from '../../catering.component';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { CateringItemModalComponent } from '../../overlays/item-modal/item-modal.component';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class CateringMenuOrderComponent extends BaseDirective {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Parent of the item being displayed */\n @Input() public parent: CateringCategory;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n public get symbol(): string {\n return this.building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _org: OrganisationService,\n private _menu_items: CateringItemsService,\n private _menu_categories: CateringCategoriesService\n ) {\n super();\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({ parent_id: this.item.id, zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: group.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(group, event.metadata);\n }\n })\n );\n }\n\n public openItemModal(item?: CateringItem) {\n /* istanbul ignore else */\n if (!item) {\n item = new CateringItem({ parent_id: this.item.id });\n }\n const ref = this._dialog.open(CateringItemModalComponent, {\n data: { item, parent: item.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(item, event.metadata);\n }\n })\n );\n }\n\n private updateItemList(old_item: CateringItem | CateringCategory, new_item: HashMap) {\n const item =\n old_item instanceof CateringCategory\n ? new CateringCategory(new_item)\n : new CateringItem(new_item);\n if (old_item.id) {\n const index = this.parent.items.findIndex((itm) => itm.id === old_item.id);\n (this.parent.items as any[]).splice(index, 1, item);\n (this.parent as any).items = [...this.parent.items];\n } else {\n (this.item.items as any[]).push(item);\n }\n }\n\n public deleteItem() {\n const type =\n this.item.is_category\n ? this.item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item';\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: `Delete catering ${type}`,\n content: `Are you sure you want to delete the catering ${type} \"${\n this.item.name\n }\"?
${\n this.item instanceof CateringCategory\n ? 'Any children items or groups will be immediately deleted'\n : ''\n }`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${type}...`;\n let e = null;\n let service =\n this.item.is_category\n ? this._menu_categories\n : this._menu_items;\n await service.delete(this.item.id).catch((err) => e = err || 'Error');\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n } else {\n this._service.notifyError(`Error deleting ${type}.`);\n }\n }\n });\n }\n}\n","
\n
\n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n\n \n \n \n \n \n
\n \n
\n Edit\n {{\n item.items.length || item.is_category\n ? subitem\n ? 'Group'\n : item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item'\n }}\n
\n
\n \n \n
\n","import { Component, OnInit, Input, SimpleChanges, EventEmitter, Output } from '@angular/core';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringCategoryModalComponent } from '../overlays/category-modal/category-modal.component';\nimport { HashMap, DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class CateringMenuComponent extends BaseDirective implements OnInit {\n /** Filter string for catering items */\n @Input() public search: string;\n /** Opens new category modal on change */\n @Input() public category: number;\n /** Opens new category modal on change */\n @Input() public package: number;\n /** Emitter for changes to the length of catering categories */\n @Output() public length = new EventEmitter();\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n /** Filtered list of top level catering categories */\n public filtered_menu: CateringCategory[] = [];\n /** Whether menu details are being loaded */\n public loading: boolean;\n /** Index of the active tab */\n public index: number = 0;\n /** Map of indexes to package open state */\n public state: HashMap = {};\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService, private _menu: CateringMenuService, private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.set('DELETED.menu', '');\n this.subscription('deleted', this._service.listen('DELETED.menu').subscribe(id => this.removeFromMenu(id)));\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe((_) => {\n this.index = 0;\n this.catering_menu = [];\n this.filtered_menu = [];\n this.loadCateringMenu();\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.search) {\n this.filtered_menu = this.filter(this.catering_menu);\n }\n if (changes.category && this.category) {\n this.openCategoryModal();\n }\n if (changes.package) {\n this.state[this.index] = this.package;\n }\n }\n\n public openCategoryModal(category?: CateringCategory) {\n /* istanbul ignore else */\n if (!category) {\n category = new CateringCategory({ zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringCategoryModalComponent, { \n data: { category }, \n autoFocus: false,\n backdropClass: 'mck-modal-backdrop', \n });\n this.subscription('category_modal', ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.catering_menu.findIndex(item => event.metadata.id === item.id);\n if (index >= 0) {\n this.catering_menu.splice(index, 1, event.metadata);\n this.index = index;\n } else {\n this.index = this.catering_menu.length;\n this.catering_menu.push(event.metadata);\n }\n }\n }));\n }\n\n /**\n * Remove item from the menu\n * @param id ID of the item to remove\n * @param list Menu items and categories\n */\n private removeFromMenu(id: string, list: CateringCategory[] = this.catering_menu, depth: number = 0) {\n if (list.length === 0 || depth > 4) { return false; }\n const found = list.findIndex(item => item.id === id);\n if (found >= 0) {\n list.splice(found, 1);\n return true;\n } else {\n for (const item of list) {\n if (this.removeFromMenu(id, item.items as any, depth + 1)) { return true; }\n }\n }\n return false;\n }\n\n private loadCateringMenu(): void {\n /* istanbul ignore else */\n if (this.building) {\n this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n this.length.emit(this.catering_menu.length);\n this.filtered_menu = this.filter(this.catering_menu);\n this.loading = false;\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadCateringMenu()\n );\n this.loading = false;\n }\n );\n }\n }\n\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n}\n","
\n \n \n \n \n
\n
{{category?.name}}
\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Loading menu for {{ building?.name }}
\n
\n
\n\n
\n
\n \n
\n
No menu categories for {{ building?.name }}
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\n\nimport {\n CateringOrder,\n CateringOrderStatus,\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Identity, HashMap } from '@mckinsey-converge/base';\nimport { MatDialog } from '@angular/material/dialog';\nimport { OrderDetailsModalComponent } from '../../overlays/order-details-modal/order-details-modal.component';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-catering-orders-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringOrdersItemComponent implements OnChanges {\n /** Catering order details to display */\n @Input() public order: CateringOrder;\n /** Search filter string */\n @Input() public search: string;\n /** Whether order items should be shown */\n @Input()\n public show_items: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** Whether status is being updated */\n public loading: boolean;\n /** Mapping of items to the option selections */\n public readonly item_details: HashMap<{ amount: number, details: string }> = {};\n\n public showIndividualItem : boolean = false;\n\n public get search_matches(): HashMap {\n const map = {};\n const filter = this.search.toLowerCase();\n this.order.items.forEach((item) => {\n map[item.id] = item.name.toLowerCase().indexOf(filter) >= 0;\n });\n return map;\n }\n\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status) || ({} as any);\n }\n\n public get space(): Space {\n return this._spaces.find(this.order.location_id);\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.active_status = this.order.status;\n this.updateItemDetails();\n }\n this.showIndividualItem = this.show_items;\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this.order.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this.order.id),\n 1,\n new CateringOrder({ ...this.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n }\n this.loading = false;\n }\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(): void {\n const dialogRef = this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: this.order,\n booking: this.order.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n private updateItemDetails() {\n for (const item of this.order.items) {\n if ((item as any).items) {\n const items = [];\n for (const sub_item of (item as any).items) {\n if (!sub_item.items.length && sub_item.amount) {\n items.push(sub_item)\n } else {\n for (const sub_sub_item of sub_item.items) {\n if (sub_sub_item.amount) {\n items.push(sub_sub_item)\n }\n }\n }\n }\n this.item_details[item.id] = {\n amount: items.length,\n details: `[${items.map(i => i.name).join(']\\n[')}]`\n };\n }\n }\n }\n\n public expandMore() {\n this.showIndividualItem = !this.showIndividualItem\n }\n}\n","
\n
\n
\n \n
\n
{{ order.deliver_at }}
\n
{{ space?.local_name || space?.simple_name || space?.settings?.room_name}}
\n
{{ order.booking?.organiser.name }}
\n
\n (K) Kitchen
\n (P) Pantry\n
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n\n
\n \n
\n \n
\n
\n
{{ item.name }}
\n \n {{ item_details[item.id]?.amount }}\n { item_details[item.id]?.amount, plural, =1 { Option } other { Options } }\n
\n
x {{ item.amount }}
\n
\n
\n \n \n\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { combineLatest, Subject } from 'rxjs';\nimport { filter, first, map } from 'rxjs/operators';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrderDetailsModalComponent } from '../overlays/order-details-modal/order-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'a-catering-orders',\n templateUrl: './orders.component.html',\n styleUrls: ['./orders.component.scss'],\n})\nexport class CateringOrdersComponent extends BaseDirective implements OnInit, OnChanges {\n /** Search filter string */\n @Input() public search: string = '';\n /** Currently selected date */\n @Input() public date: number;\n /** Type of order to show */\n @Input() public type: '' | 'Pantry' | 'Kitchen';\n\t\t@Input() public otherCategories: any[];\n @Input() public orderDetailsExpanded: boolean;\n\n\t\tpublic bookings = [];\n\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n /** List of catering orders for the selected date */\n public readonly orders = this._booking_state_service.filtered.pipe(\n map((bookings) => {\n let list: CateringOrder[] = [];\n bookings.forEach((booking, i) => {\n const catering = [...booking.catering]\n .map((order) => new CateringOrder({\n ...order,\n booking_date: booking.date,\n booking\n }));\n list = list.concat(catering);\n });\n list.sort((a, b) => a.booking_date - b.booking_date);\n return list;\n })\n );\n /** List of catering orders for the selected date */\n public filtered_orders = combineLatest([this.search$, this.orders]).pipe(\n map(([search, [...orders]]) => this.filter([...orders] || [], search || ''))\n );\n\n public display_orders: CateringOrder[] = [];\n /** Whether catering orders are loading */\n public readonly loading = this._booking_state_service.loading;\n\n /** Display string for the currenly selected date */\n public get date_display(): string {\n // R--- check if input can be changed since there is isSameDate calculations\n const date = new DateTZ({date: this.date});\n const now = DateNow(new Date())\n return now.isSameDate(date, 'day') ? 'Today' : date.formatDate('dd MMM yyyy');\n }\n\n /** Active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _dialog: MatDialog\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .pipe(filter((bld) => !!bld))\n .subscribe(() => {\n this._booking_state_service.setZone(this._org.building.id);\n })\n );\n this.subscription(\n 'orders',\n this.filtered_orders.subscribe((orders) => {\n this.display_orders = orders.sort((a ,b) => {\n const date = new DateTZ({date: a.booking.date}).formatDate('yyyy/MM/dd');\n\n return Date.parse(`${date} ${a.deliver_at_time.slice(0, -2)} ${a.deliver_at_time.slice(-2)}`) - Date.parse(`${date} ${b.deliver_at_time.slice(0, -2)} ${b.deliver_at_time.slice(-2)}`)\n }\n )})\n )\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view')) {\n const view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_order');\n const booking_details = localStorage.getItem('CONCIERGE.view_booking');\n /* istanbul ignore else */\n if (details) {\n const booking = new Booking(JSON.parse(booking_details));\n const order = new CateringOrder(JSON.parse(details));\n order.booking = booking;\n this.viewOrderDetails(order);\n localStorage.removeItem('CONCIERGE.view_order');\n localStorage.removeItem('CONCIERGE.view_booking');\n }\n }\n })\n );\n this.search$.next(this.search);\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.search || changes.type) {\n this.search$.next(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, order: CateringOrder) {\n return order ? order.id : index;\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(order: CateringOrder): void {\n this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: order,\n booking: order.booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /**\n * Filter list to find matching items\n * @param list List of orders to filter\n * @param search Filter string\n\t\t * TO DO : refactor ==>\n */\n private filter(list: CateringOrder[], search: string = '') {\n\t\t\t// Create a deep clone of the original list to avoid modifying the original data\n\t\t\tconst orders = cloneDeep(list);\n\t\t\t// Determine the filter criteria based on the search string or predefined type\n\t\t\tconst filter = search !== '' ? search.toLowerCase() : this.type ? this.type : '';\n\n\t\t\t// Check if 'otherCategories' is defined and if there are matching categories\n\t\t\tconst isOtherCategory = this.otherCategories ? this.otherCategories.filter(el => el.name.toLowerCase() === filter) : [];\n\t\t\tlet orderList = [];\n\n\t\t\t// If there are matching 'otherCategories', filter orders accordingly\n\t\t\tif(isOtherCategory.length) {\n\t\t\t\tconst result = this.filterOrdersByCategory([...orders], isOtherCategory[0]).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n\t\t\t\treturn orderList;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// No matching 'otherCategories', filter orders based on the general criteria\n\t\t\t\torderList = list;\n\t\t\t\tif(filter !== '') {\t\n\t\t\t\t\tconst result = this.filterOrdersByCategoryType([...orders], filter).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n // If no orders match the category type, attempt to search by item names, booker or room name\n if (orderList.length === 0) {\n const itemSearchResults = this.filterOrdersByItemName([...orders], filter);\n orderList = [...itemSearchResults];\n }\n\t\t\t\t}\n\t\t\t\treturn orderList;\n\t\t\t}\n }\n\n private filterOrdersByItemName(orders: CateringOrder[], search: string): CateringOrder[] {\n const filteredOrders: CateringOrder[] = [];\n \n orders.forEach(order => {\n const matchingItems = this.findItemsMatchingSearch(order.items, search);\n // Check if the order's location or organiser name matches the search\n const locationMatches = order.location?.toLowerCase().includes(search);\n const organiserMatches = order.booking?.organiser?.name?.toLowerCase().includes(search);\n \n if (matchingItems.length > 0 || locationMatches || organiserMatches) {\n const newOrder = new CateringOrder({\n ...order,\n items: matchingItems.length > 0 ? matchingItems : order.items,\n });\n filteredOrders.push(newOrder);\n }\n });\n \n return filteredOrders;\n }\n \n private findItemsMatchingSearch(items: any, search: string): any[] {\n const matchingItems = [];\n \n items.forEach(item => {\n let itemMatches = false;\n \n // Check if the item's name matches the search\n if (item.name?.toLowerCase().includes(search)) {\n itemMatches = true;\n }\n \n // Recursively check sub-items\n let subItems = [];\n if (item.items && item.items.length > 0) {\n subItems = this.findItemsMatchingSearch(item.items, search);\n if (subItems.length > 0) {\n itemMatches = true;\n }\n }\n \n if (itemMatches) {\n // If item matches, include it in the results\n const newItem = {\n ...item,\n items: subItems.length > 0 ? subItems : item.items,\n };\n matchingItems.push(newItem);\n }\n });\n return matchingItems;\n }\n\n\t\t// Function to filter orders based on specified categories\n\t\tfilterOrdersByCategory(orders, categories) {\n\t\t\tconst filteredOrders = [];\n\t\t\n\t\t\tfunction findMatchingOrders(order, categories) {\n\t\t\t\tif (order.items) {\n\t\t\t\t\tconst matchingItems = order.items.filter(item => {\n\t\t\t\t\t\tconst categoryName = findCategoryName(item.name, categories);\n\t\t\t\t\t\treturn categoryName !== null;\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif (matchingItems.length > 0) {\n\t\t\t\t\t\tfilteredOrders.push({ ...order, items: matchingItems });\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\torder.items.forEach(subOrder => findMatchingOrders(subOrder, categories));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\torders.forEach(order => findMatchingOrders(order, categories));\n\n\t\t\t// Function to find the category name for a given item name within the specified categories\n\t\t\tfunction findCategoryName(itemName, categories) {\n\t\t\t\tif(categories?.items !== undefined) {\n\t\t\t\t\tfor (const category of categories.items) {\n\t\t\t\t\t\tif (category.name === itemName) {\n\t\t\t\t\t\t\treturn category.name;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\tif (category.items) {\n\t\t\t\t\t\t\tconst subCategoryName = findCategoryName(itemName, category);\n\t\t\t\t\t\t\tif (subCategoryName) {\n\t\t\t\t\t\t\t\treturn subCategoryName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\n\t\t\treturn filteredOrders;\n\t\t}\n\n\t\t// Function to filter orders based on specified category type\n\t\tfilterOrdersByCategoryType(orders, categoryType) {\n\n\t\t\tconst filteredOrders = [];\n\n\t\t\tfunction filterMatchingItems(items) {\n return items\n .map(item => {\n if (item.catering_type === categoryType) {\n return { ...item };\n } else if (item.items) {\n const filteredSubItems = filterMatchingItems(item.items);\n if (filteredSubItems.length > 0) {\n return { ...item, items: filteredSubItems };\n } else {\n return null;\n }\n } else {\n return null;\n }\n })\n .filter(item => item !== null);\n }\n \n\t\t\torders.forEach(order => {\n\t\t\t\tconst filteredItems = filterMatchingItems([order]);\n\t\t\t\tif (filteredItems.length > 0) {\n\t\t\t\t\tfilteredOrders.push({ ...order , items: filteredItems[0].items});\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t\treturn filteredOrders;\n\t\t\t\n\t\t}\n\t\t\n}\n\nfunction flatten(arr) {\n\treturn arr.reduce(function (flat, toFlatten) {\n\t\treturn flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);\n\t}, []);\n}\n","
\n \n
\n
\n
\n
Time
\n
Location
\n
Host
\n
Package Types
\n
Status
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders for {{ date_display }}
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\nimport { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent, CONFIRM_METADATA } from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringCategoryModalData {\n /** Category to edit */\n category: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-category-modal',\n templateUrl: './category-modal.component.html',\n styleUrls: ['./category-modal.component.scss'],\n})\nexport class CateringCategoryModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n\n public get category(): CateringCategory {\n return this._data.category;\n }\n\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n public disabled: boolean = true\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringCategoryModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n admin_only: new FormControl(this.category.admin_only),\n restricted_from: new FormControl(this.category.restricted_from, Validators.pattern('[-_0-9]*')),\n });\n\n this.form.get('admin_only').setValue(this.form.get('admin_only').value ?? false);\n this.form.get('restricted_from').setValue(this.form.get('restricted_from').value ?? 0);\n\n if (!this.category.id) {\n this.disabled = false\n } else {\n this.form.valueChanges.subscribe(val => {\n for(let key of Object.keys(val)){\n if(this.category[key] !== val[key]){\n this.disabled = false\n return\n }\n this.disabled = true\n }\n });\n }\n\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Category`,\n content: `Are you sure you want to delete this Category? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting Category...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const category = new CateringCategory(this.category);\n const data = { ...category.toJSON(), ...this.form.value };\n \n /* Keep the \"stock\" status as true for main categories when adding or updating to avoid problems.\n The problem occurs when the top-level category is marked as \"out of stock\" if all items within it are out of stock. \n Then, if the items become available again, the top-level category stays marked as \"out of stock,\" even if subcategories and items are in stock.\n */\n data.out_of_stock = false; \n const request = category.id\n ? this._menu_categories.update(category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = category.items\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
{{ category.id ? 'Edit' : 'Add' }} category
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n Name*\n \n \n A valid name is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n Only numbers are allowed(0-999)\n \n
\n
\n \n Disable\n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, EventEmitter, Output } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\nimport { UploadManager } from '@acaprojects/ngx-uploads';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringGroupModalData {\n group: CateringCategory;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-group-modal',\n templateUrl: './group-modal.component.html',\n styleUrls: ['./group-modal.component.scss'],\n})\nexport class CateringGroupModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n { id: 'none', name: 'Other' },\n ];\n\n /** Category being edit/created */\n public get category(): CateringCategory {\n return this._data.group;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n /** Image URL for the category */\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n /** Whether category is a package */\n public get package(): boolean {\n return this.form.controls.package.value;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringGroupModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.category.price\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n catering_type: new FormControl(this.category.catering_type, [Validators.required]),\n package: new FormControl(this.category.package || false),\n must_select: new FormControl(this.category.must_select),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.category.minimum_quantity),\n maximum_quantity: new FormControl(this.category.maximum_quantity),\n order_anytime: new FormControl(this.category.order_anytime),\n out_of_stock: new FormControl(this.category.out_of_stock),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete ${this.category.package ? 'Package' : 'Sub-Category'}`,\n content: `Are you sure you want to delete this ${\n this.category.package ? 'Package' : 'Sub-Category'\n }? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${\n this.category.package ? 'Package' : 'Sub-Category'\n }...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = {\n ...(this.category instanceof CateringCategory\n ? this.category.toJSON()\n : this.category),\n ...this.form.value,\n parent_categories: [this.parent.id],\n };\n //if sub-category/item becomes non-package then mark it in stock \n data.out_of_stock = !data.package ? false : data.out_of_stock;\n data.price = data.unit_price;\n const request = this.category.id\n ? this._menu_categories.update(this.category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = this.category.items\n this.event.emit({ reason: 'done', metadata: new CateringCategory(item) });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
\n {{ category.id ? 'Edit' : 'Add' }} {{ package ? 'package' : 'sub-category' }}\n
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n \n
{{ parent.name }}
\n
\n
\n Package\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n \n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\nimport {\n CONFIRM_METADATA, ConfirmModalComponent,\n} from '@mckinsey-converge/legacy-overlays';\nimport { mergeCateringItemWithFormData } from '@mckinsey-converge/data-common';\n\nexport interface CateringItemModalData {\n item: CateringItem;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-item-modal',\n templateUrl: './item-modal.component.html',\n styleUrls: ['./item-modal.component.scss'],\n})\nexport class CateringItemModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n ];\n\n /** Category being edit/created */\n public get item(): CateringItem {\n return this._data.item;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_items: CateringItemsService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringItemModalData,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.item.price\n this.form = new FormGroup({\n name: new FormControl(this.item.name, [Validators.required]),\n description: new FormControl(this.item.description),\n catering_type: new FormControl(this.item.catering_type, [Validators.required]),\n supplier_cost: new FormControl(this.item.supplier_cost),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.item.minimum_quantity),\n maximum_quantity: new FormControl(this.item.maximum_quantity),\n order_anytime: new FormControl(this.item.order_anytime),\n out_of_stock: new FormControl(this.item.out_of_stock),\n allergy: new FormControl(this.item.allergy),\n parent_categories: new FormControl([this._data.parent.id]),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Item`,\n content: `Are you sure you want to delete this item?`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting item...`;\n let e = null;\n await this._menu_items.delete(this.item.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = mergeCateringItemWithFormData(this.item, this.form.value).toJSON();\n const request = this.item.id\n ? this._menu_items.update(this.item.id, data)\n : this._menu_items.add(data);\n request.then(\n (item) => {\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.item.id ? 'updating' : 'creating'} item. Error: ${\n err.message || err\n }`,\n ),\n );\n }\n }\n}\n","
\n
{{ item.id ? 'Edit' : 'Add' }} catering item
\n \n
\n\n
\n
\n
\n \n
{{ parent.name }}
\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-booking-details',\n templateUrl: './booking-details.component.html',\n styleUrls: ['./booking-details.component.scss'],\n})\nexport class OrderBookingDetailsComponent {\n /** Email of the order space */\n @Input() public space: Space;\n /** Booking details to display */\n @Input() public booking: Booking;\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Display startDateTZ and endDateTZ time only time */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mm a')}`;\n }\n\n /** Display startDateTZ time only time */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('h:mm a')}`;\n }\n\n /** Store booking details to be used in another component */\n public storeBooking() {\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(this.booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(this.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n}\n","
\n Meeting Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name }}\n
\n
\n
\n \n
\n {{ space?.name }}\n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ booking.attendees?.length || '0' }}({{ booking.expected_attendees[space?.email] || 0 }} expected)\n
\n
\n
\n\n View on Day View\n\n","import { Component, Input } from '@angular/core';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'order-details-items',\n templateUrl: './items.component.html',\n styleUrls: ['./items.component.scss'],\n})\nexport class OrderDetailsItemsComponent extends BaseDirective {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Whether order is being edited */\n public editing: boolean;\n /** Whether order is being updated */\n public loading: boolean;\n\n /** List of items in the order */\n public get items(): CateringCategory[] {\n return this.order.items as any;\n }\n\n constructor(\n private _service: ApplicationService, \n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,) {\n super();\n }\n\n public editOrder() {\n this.editing = true;\n }\n\n /** Handle changes to catering order */\n public async handleOrderEvent(order: CateringOrder) {\n /* istanbul ignore else */\n if (order) {\n const orders = [...this.booking.catering];\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n this.loading = true;\n const new_booking = new Booking({ ...this.booking.toJSON(), catering: orders });\n const booking = await this._bookings\n .save(new_booking)\n .catch((err) =>\n this._service.notifyError(\n `Error unable to update order. Error: ${err.message || err}`\n )\n );\n if (booking) {\n this._booking_state_service.replace(booking);\n this.booking = booking;\n this.order = order;\n this.editing = false;\n }\n this.loading = false;\n }\n }\n}\n","
\n {{ editing ? 'Edit Order' : 'Order Details' }}\n
\n
\n \n
\n
\n
{{ item.name }}
\n
x{{ item.amount }}
\n
\n \n \n
\n
{{ sub_item.name }}
\n \n \n
\n
{{ sub_sub_item.name }}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n
\n
\n\n\n
\n
\n \n
\n
\n No items in order\n
\n
\n
\n\n
\n
\n \n
\n
\n Updating order\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { UsersService, BookingNote } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-details-notes',\n templateUrl: './messages.component.html',\n styleUrls: ['./messages.component.scss'],\n})\nexport class OrderDetailsNotesComponent implements OnInit {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Emitter for changes to the active booking */\n @Output() public bookingChange = new EventEmitter();\n /** Contents of the new private note */\n public new_note: string;\n /** Whether a note is being added */\n public loading: boolean;\n\n /** List of notes for catering order space */\n public get notes(): BookingNote[] {\n const notes = this.booking.notes.filter((note) => {\n return (\n (note.type === 'catering' || note.type === 'catering-private') &&\n note.space === this.order.location_id &&\n (!note.order_id || note.order_id === this.order.id)\n );\n });\n notes.forEach((note) => {\n // Use the booking timezone to make the note date TZ aware since the native format is not.\n const date = new DateTZ({date: note.date, is_local_tz: false, building_tz: this.booking.timezone })\n note.time = date.formatDate('dd MMM, h:mma');\n });\n return notes;\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _users: UsersService\n ) {}\n\n ngOnInit(): void {}\n\n /**\n * Add note for catering order\n */\n public async addNote() {\n /* istanbul ignore else */\n if (this.booking && this.new_note) {\n const user = this._users.current;\n const notes = this.booking.notes;\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.booking.timezone })\n const date = now.startOfValue('minute');\n const new_notes = [\n ...notes,\n {\n type: 'catering-private',\n date: date.ms,\n author: user.name,\n order_id: this.order.id,\n space: this.order.location_id,\n message: this.new_note,\n time: date.formatDate('h:mma'),\n },\n ];\n const pending_booking = new Booking({ ...this.booking.toJSON(), notes: new_notes });\n this.loading = true;\n const new_booking: Booking = (await this._bookings\n .save(pending_booking)\n .catch((err) => {\n this._service.notifyError(\n `Failed to add note to order meeting. Error: ${err.message || err}`\n );\n this.loading = false;\n throw err;\n })) as any;\n this.booking = new_booking;\n if (new_booking) {\n this._booking_state.replace(new_booking);\n }\n this.order.booking = new_booking;\n this.bookingChange.emit(new_booking);\n this.loading = false;\n this.new_note = '';\n }\n }\n}\n","
\n Private Notes\n
\n
\n \n
\n
{{ item.message }}
\n
\n
{{ item.author }}
\n
\n
{{ item.time }}
\n
\n
\n
\n
\n
\n \n \n \n \n
\n \n
\n
\n\n
\n
\n \n
\n
\n No private notes for order\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { CateringOrder, CateringOrderStatus } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { SpacesService } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\nexport interface OrderDetailsModalData {\n /** Order to display details for */\n order: CateringOrder;\n /** Booking associated with catering order */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-order-details-modal',\n templateUrl: './order-details-modal.component.html',\n styleUrls: ['./order-details-modal.component.scss'],\n})\nexport class OrderDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether status is being updated */\n public loading: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** List of available order statuses */\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n public booking: Booking;\n\n /** Order to display */\n public get order(): CateringOrder {\n return this._data.order;\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status);\n }\n\n /** Space associated with the order */\n public get space(): Space {\n return this._spaces.find(this._data.order.location_id);\n }\n\n /** Details about the delivery time */\n public get delivery_date(): DateTZ {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time });\n }\n\n /** Details about the delivery_at time */\n public get delivery_at(): string {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time }).formatDate('h:mm a');\n }\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n @Inject(MAT_DIALOG_DATA) private _data: OrderDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.active_status = this._data.order.status;\n this.booking = new Booking(this._data.booking)\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this._data.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this._data.order.id),\n 1,\n new CateringOrder({ ...this._data.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking: any = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this._data.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n this.booking = updated_booking;\n }\n this.loading = false;\n\n }\n }\n}\n","\n\n
\n
\n
\n
{{ space?.name }} ({{ space?.local_name}})
\n
({{delivery_date?.ms | date:'mediumDate':timezone }}) To be delivered at {{ delivery_at }}
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'access-denied',\n templateUrl: './access-denied.component.html',\n styleUrls: ['./access-denied.component.scss']\n})\nexport class AccessDenied {\n\n constructor() {}\n\n}\n","
\n \n

Oooops - sorry! You don’t have access to this page.

\n

Please contact help desk or continue to Converge for room booking.

\n
\n","import { Component, OnInit } from '@angular/core';\n\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLinkInternal, ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss']\n})\nexport class SidebarComponent implements OnInit {\n\n /** Currently active building */\n public get active_building(): Building {\n return this._org.building;\n }\n public set active_building(building: Building) {\n this._org.building = building;\n }\n\n /** List of available menu items */\n public get menu_items(): ApplicationLinkInternal[] {\n return this._service.setting('app.general.menu.items') || [];\n }\n\n /** Logo for the application organisation */\n public get logo(): ApplicationIcon {\n return this._service.setting('app.logo_light');\n }\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings || [];\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService) {}\n\n ngOnInit(): void {}\n}\n","
\n {{ logo.content }}\n \n
\n
\n \n
\n
\n
\n \n
\n
{{ item.name }}
\n
\n \n
\n
1\">\n \n \n \n {{ building.name }}\n \n \n \n
\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { BookingStateService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, getTimezoneOffsetString, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-topbar-header',\n templateUrl: './topbar-header.component.html',\n styleUrls: ['./topbar-header.component.scss'],\n})\nexport class TopbarHeaderComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Currently building timezone */\n @Input() public timezone: string;\n /** Currently active zone */\n @Input() public zone: string;\n /** Whether to show new item button */\n @Input() public show_add_item = false;\n /** Whether to show the events for the active month */\n @Input() public show_events: boolean = false;\n /** Emitter for changes selected date */\n @Output() public dateChangeTz = new EventEmitter();\n /** Emitter for add item button */\n @Output() public event = new EventEmitter();\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n public event_map: { [date: string]: number };\n\n public fromDateTz = DateNow().subtractValue({ months: 6 });\n\n public get now() {\n return DateNow();\n }\n\n /** Display string for the currently selected date */\n public get tz(): string {\n return getTimezoneOffsetString(this.timezone_value);\n }\n\n public get timezone_value() {\n return localStorage.getItem('CONCIERGE.timezone') || this.timezone || this.now.building_tz;\n }\n\n public get is_today() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone_value,\n }),\n 'day'\n );\n }\n\n constructor(private _bookings: BookingStateService, private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // CONCIERGE.date: Get the localstorage date and timezone when changing pages.\n const date = +localStorage.getItem('CONCIERGE.date') || this.now.ms;\n \n /* istanbul ignore else */\n if (date && (date !== this.dateTz.ms || this.timezone_value !== this.dateTz.building_tz)) {\n // CONCIERGE.date Reapply the localstorage date and timezone when changing pages.\n this.timeout(\n 'init',\n () => {\n this.dateTz = new DateTZ({\n date,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n this.updateDate();\n },\n 10\n );\n }\n this.subscription(\n 'events',\n this._bookings._noOfMeetings.subscribe((list) => {\n this.event_map = {};\n this.event_map = list[0];\n })\n );\n }\n\n public noOfCount(event) {\n // Disabling bellow until find more reliable way to call as it is been called multiple times on hover/click\n // this._bookings.getDailyMeetingCount();\n // event.stopPropogation();\n }\n\n /**\n * Change the selected date with the arrow controls\n *\n */\n public changeDate(value: number) {\n let date = new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n date = date.addValue({ days: value });\n this.dateTz = date;\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n /**\n * Change the selected date with the calendar widget\n *\n */\n public applyDatePickerValue(dateInputTz: DateTZ) {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(dateInputTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n this.closeDatePicker();\n }\n\n public updateDate() {\n this.timeout('update_date', () => this._bookings.setDate(this.dateTz));\n }\n\n /** Reset date to the current date */\n public resetDate() {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(this.now).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n public closeDatePicker() {\n this.updateDate();\n }\n\n /** New Item button click */\n public newItem(): void {\n this.event.emit('new_item');\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n

Today

\n

{{ dateTz.ms | date: 'mediumDate':tz }}

\n
\n \n
\n
\n \n \n
\n
\n
\n","import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { first } from 'rxjs/operators';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n})\nexport class LoginComponent extends BaseDirective implements OnInit {\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n /** Whether the user credentials are being checked */\n public loading: boolean;\n /** Form fields for the login form */\n public form: FormGroup;\n\n /** Password field element */\n @ViewChild('pass_field', { static: true }) private pwd_field: ElementRef;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n this.loading = true;\n this.form = new FormGroup({\n username: new FormControl('', [Validators.required]),\n password: new FormControl('', [Validators.required]),\n });\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.loading = false;\n this.logo = this._service.setting('app.logo_light') || { type: 'icon' };\n });\n }\n\n /** Perform user login */\n public login() {\n this.loading = true;\n const form = this.form.value;\n this._users\n .login(\n {\n username: form.username,\n password: form.password,\n },\n { form: true }\n )\n .then(\n () => this.loading = false,\n () => {\n this.loading = false;\n this.form.controls.password.setErrors({ check: true });\n }\n );\n }\n}\n","
\n
\n
\n
\n
\n {{ logo.content }}\n \n
\n
\n
\n \n
\n \n Username:\n \n \n \n Username is required\n \n
\n
\n \n Password:\n \n \n \n Invalid username or password\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Converge is loading
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { first } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ReportDetails } from '../reports.component';\nimport { Report } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ReportsService } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-report-display',\n templateUrl: './report-display.component.html',\n styleUrls: ['./report-display.component.scss'],\n})\nexport class ReportDisplayComponent implements OnInit, OnChanges {\n /** Details about the report being requested */\n @Input() public report: ReportDetails;\n /** Start date for the generated report */\n public start_date: number;\n /** End date for the generated report */\n public end_date: number;\n /** List of report data entries */\n public report_data: Report;\n /** Whether report data is loading */\n public loading: boolean;\n /** List of selected locations */\n public locations: Building[] = [{} as any];\n /** Multiple Locations? */\n public multipleLocations: boolean = false;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n @Output() locationChanged = new EventEmitter();\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _reports: ReportsService,\n private _router: Router\n ) {}\n\n public ngOnInit(): void {\n // R--- TODO no prams present for timezone\n const now = DateNow();\n this.start_date = now.startOfValue('day').ms;\n this.end_date = now.endOfValue('day').ms;\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.locations = [this._org.building];\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.report) {\n this.report_data = null;\n }\n if (this.locations.length > 1) {\n this.locations = [this.locations[0]];\n }\n }\n\n /* function runs on location change from on-page dropdown(not from sidebar) */\n public onLocationChange(data: any) {\n this.locationChanged.emit(this.locations[0]);\n }\n\n /**\n * Ensure Space Time Continuum\n */\n public checkDates(new_date: number) {\n if (this.start_date > this.end_date) {\n // R--- TODO no prams present for timezone\n const date = new DateTZ({ date: new_date });\n this.start_date = date.startOfValue('day').ms;\n this.end_date = date.endOfValue('day').ms;\n }\n }\n\n /**\n * Generate report\n */\n public generateReport() {\n /* istanbul ignore else */\n if (this.report) {\n this.loading = true;\n this.report_data = null;\n const date = toMiddayUTC(new DateTZ({ date: this.start_date })).toZone(\n this.locations[0]?.timezone\n );\n const end_date = toMiddayUTC(new DateTZ({ date: this.end_date })).toZone(\n this.locations[0]?.timezone\n );\n this._reports\n .show(this.report.id, {\n date: date.formatDate('yyyy-MM-dd'),\n start_date: date.startOfValue('day').seconds,\n end_date: end_date.endOfValue('day').seconds,\n zone_ids: this.locations.map((i) => i.id).join(','),\n })\n .then(\n (report) => {\n const zone_ids = this.locations.map((i) => i.id).join(',');\n if (this.report.id === 'day' && this.locations[0]?.city !== 'Dallas') {\n this.loading = false;\n this._service.notifyError(\n `Day View is currently available for Dallas only`\n );\n } else {\n this.loading = false;\n this.report_data = new Report({ ...report, type: this.report.id });\n }\n },\n (err) => {\n this.loading = false;\n this._service.notifyError(\n `Error generating report. Error: ${err.message || err}`\n );\n }\n );\n }\n }\n\n public downloadReport() {\n /* istanbul ignore else */\n if (this.report_data) {\n const date = new DateTZ({ date: this.start_date });\n this.report_data.downloadCSV(\n `${this.report.name.split(' ').join('_').toLowerCase()}+${date.formatDate(\n 'yyyy-MM-dd'\n )}.csv`\n );\n }\n }\n}\n","
\n
\n
\n \n \n \n
\n
to
\n
\n \n \n
\n
\n
\n 1\">\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
\n {{\n report_data ? 'No entries for selected date' : 'Press generate above to view report'\n }}\n
\n
\n
\n\n
\n
\n \n
\n
Loading report...
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ReportDetails } from '../reports.component';\n\n\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'newlineToBR',\n pure: true // Set pure to true to ensure it's a stateless pipe\n})\nexport class NewlineToBRPipe implements PipeTransform {\n transform(value: string): string {\n if (typeof value !== 'string' || !value.includes('\\n')) {\n // If the value is not a string or doesn't contain newline characters, return it as is\n return value;\n }\n return value.replace(/\\n/g, '
').replace(/\\s/g, \"\\u00A0\");\n }\n}\n\n@Component({\n selector: 'a-report-table',\n templateUrl: './report-table.component.html',\n styleUrls: ['./report-table.component.scss'],\n})\nexport class ReportTableComponent implements OnChanges {\n /** List of report table data */\n @Input() public list: HashMap[] = [];\n /** Map of details for report */\n @Input() public details: ReportDetails;\n\n public fields: string[] = [];\n public sortField: string = '';\n public sortOrder: 'asc' | 'desc' = 'asc';\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.list && this.list && this.list.length) {\n this.fields = Object.keys(this.list[0]).filter(i => this.details.hide_fields.indexOf(i) < 0);\n }\n }\n\n public toggleSort(field: string) {\n if (this.isSortingDisabled(field)) {\n return; // Disable sorting for specific fields\n }\n\n if (this.sortField === field) {\n this.sortOrder = this.sortOrder === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortField = field;\n this.sortOrder = 'asc';\n }\n\n this.sortTable(field);\n }\n\n private sortTable(field: string) {\n const sortedList = [...this.list].sort((a, b) => {\n let aValue = a[field];\n let bValue = b[field];\n\n const dateWithTimeRegex = /\\d{1,2} \\w{3,4} \\d{4} -\\s+\\d{1,2}:\\d{2} (AM|PM)/;\n\n if (\n typeof aValue === 'string' &&\n dateWithTimeRegex.test(aValue) &&\n typeof bValue === 'string' &&\n dateWithTimeRegex.test(bValue)\n ) {\n aValue = this.parseDateString(aValue);\n bValue = this.parseDateString(bValue);\n }\n\n if (aValue < bValue) {\n return this.sortOrder === 'asc' ? -1 : 1;\n } else if (aValue > bValue) {\n return this.sortOrder === 'asc' ? 1 : -1;\n } else {\n return 0;\n }\n });\n\n this.list = sortedList;\n }\n\n private parseDateString(dateString: string): Date {\n const [datePart, timePart] = dateString.split(' - ');\n const formattedDate = `${datePart} ${timePart}`;\n return new Date(formattedDate);\n }\n\n public isSortingDisabled(field: string): boolean {\n // Disable sorting for specific fields\n const disabledFields = ['recurr', 'cancelled_by', 'all_day'];\n return disabledFields.includes(field);\n }\n}\n","\n \n \n \n \n \n \n\n \n \n
\n {{ key | replace }} \n \n \"Unsorted\"\n \"Ascending\"\n \"Descending\"\n \n \n {{ element[key] }}\n \n \n \n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { ApplicationIcon, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ReportDetails {\n /** ID associated with the report */\n id: string;\n /** Name of the report */\n name: string;\n /** Shortened name of the report */\n short_name: string;\n /** More details about the report */\n description: string;\n /** Fields to hide on the UI */\n hide_fields: string[];\n /** Icon to display for report */\n icon: ApplicationIcon;\n /** Multiselect Locations */\n multi_locations: boolean;\n}\n\n@Component({\n selector: 'a-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss'],\n})\nexport class ReportsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active report */\n public active_report: string;\n\n public has_access: boolean;\n\n public location: any;\n\n /** List of available reports to display */\n public reports: ReportDetails[] = [\n {\n id: 'bookings',\n name: 'Aggregate Bookings Report',\n short_name: 'Bookings',\n description: 'Generate comprehensive reports on various aspects of bookings',\n hide_fields: ['room_email'],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: false,\n },\n {\n id: 'catering',\n name: 'Aggregate Charge Back Report',\n short_name: 'Catering',\n description: 'View confirmed catering report or mark up unconfirmed catering',\n hide_fields: ['room_email'],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'audit',\n name: 'Audit',\n short_name: 'audit',\n description: '',\n hide_fields: [],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: true,\n }\n ];\n\n public get the_report(): ReportDetails {\n return this.reports.find((report) => report.id === this.active_report);\n }\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Reports';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('report')) {\n this.active_report = params.get('report');\n }\n })\n );\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.location = this._org.building;\n this.has_access = building ? true : false;\n\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n }\n })\n );\n });\n }\n\n public updateReport() {\n this._router.navigate(['/reports', this.active_report]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public onLocationChanged(location: any) {\n this.location = location;\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n this._router.navigate([`/reports/${this.active_report}`]);\n } else {\n // add day view to reports array\n this.reports = [\n ...this.reports,\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n ];\n }\n }\n}\n","
\n \n
\n \n
\n
\n
\n 1\" appearance=\"outline\">\n \n \n {{ report.name }}\n \n \n \n
\n
\n
\n \n
\n
\n \n
\n

{{ report.short_name }}

\n
\n
{{ report.description }}
\n \n
\n
\n \n
\n
\n
\n
\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Route, RouterModule } from '@angular/router';\n\nimport { ReportsComponent } from './reports.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { ReportDisplayComponent } from './report-display/report-display.component';\nimport { ReportTableComponent, NewlineToBRPipe} from './report-table/report-table.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: ReportsComponent },\n { path: ':report', component: ReportsComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [ReportsComponent, ReportDisplayComponent, ReportTableComponent, NewlineToBRPipe],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule]\n})\nexport class ReportsModule { }\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-bulk-qr-overlay',\n templateUrl: './bulk-qr-overlay.component.html',\n styleUrls: ['./bulk-qr-overlay.component.scss'],\n})\nexport class BulkQrOverlayComponent implements OnInit {\n @Input() itemsCheckboxes: any[];\n @Input() qrCodeUrls: any[];\n @Output() selectItemChange: EventEmitter = new EventEmitter();\n @Output() selectAllChange: EventEmitter = new EventEmitter();\n @Input() isOpen: boolean;\n @Input() selectAll: boolean;\n @Output() downloadQrCodeRequested: EventEmitter = new EventEmitter();\n @Output() cancelClick: EventEmitter = new EventEmitter();\n @Input() newArr: any[];\n @Input() allLevels: any;\n @Output() qrCodeUrlsChange: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public onSubmit(str: string) {\n this.qrCodeUrlsChange.emit(this.qrCodeUrls); // Emit the updated qrCodeUrls array\n this.downloadQrCodeRequested.emit();\n if (str === 'room') {\n this.qrTabClick({ index: 0 });\n } else if (str === 'level') {\n this.qrTabClick({ index: 1 });\n }\n }\n\n public onCancel(str: string) {\n // Handle cancel button logic for rooms here (reset the form)\n if (str === 'level') {\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...{ checked: false }, ...{ isLevel: false } };\n });\n }\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.selectAll = false;\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.cancelClick.emit();\n }\n\n public onSelectAllChange(str: string) {\n for (const checkbox of this.itemsCheckboxes) {\n checkbox.checked = this.selectAll;\n }\n if (str === 'room') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, roomname, level }) => ({\n url: window.location.origin + '/staff/#/home?id=' + id,\n roomname: roomname,\n level: level\n }));\n } else if (str === 'level') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, building_id, name }) => ({\n url: window.location.origin + '/staff/#/home?zone_id=' + building_id + '&floor=' + id,\n name: name,\n }));\n }\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n\n public onSelectItemChange(e: any, item: any) {\n if (e.checked && !item.isLevel) {\n //If room selected, push it to qrCodeUrls array\n let checkedRoomObj = {\n url: window.location.origin + '/staff/#/home?id=' + item.id,\n roomname: item.roomname,\n level: item.level,\n };\n this.qrCodeUrls.push(checkedRoomObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else if (e.checked && item.isLevel) {\n //If levels selected, push it to qrCodeUrls array\n let checkedLevelObj = {\n url:\n window.location.origin +\n '/staff/#/home?zone_id=' +\n item.building_id +\n '&floor=' +\n item.id,\n name: item.name,\n };\n this.qrCodeUrls.push(checkedLevelObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else {\n // If unselected, find the index of the checked Obj in qrCodeUrls array based on room/level name\n const index = item.isLevel\n ? this.qrCodeUrls.findIndex((obj) => obj.name === item.name)\n : this.qrCodeUrls.findIndex((obj) => obj.roomname === item.roomname);\n // If the object is found, remove it from the array using splice\n if (index !== -1) {\n this.qrCodeUrls.splice(index, 1);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n }\n }\n\n isAnyItemSelected(): boolean {\n return this.itemsCheckboxes.some((checkbox) => checkbox.checked);\n }\n\n public qrTabClick(e: any) {\n let checkedFlag = { checked: false };\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.itemsCheckboxes = [];\n this.selectAll = false;\n\n if (e.index === 0) {\n //rooms tab\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: false } };\n });\n } else if (e.index === 1) {\n //levels tab\n Object.assign(this.itemsCheckboxes, this.allLevels);\n this.itemsCheckboxes = this.itemsCheckboxes.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: true } };\n });\n }\n }\n}\n","\n
Print QR codes
\n\n\n \n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n Inject,\n} from '@angular/core';\nimport { BaseDirective, DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService, OrganisationService, SpacesService } from '@mckinsey-converge/data-common';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ResizeService, ReadLocalPicService } from '../services/';\nimport { RequiredFileType, RoomPhotoDiamension } from '../util/room-admin-utility';\nimport { HttpEventType, HttpHeaders, HttpClient} from '@angular/common/http';\nimport * as cloneDeep from 'lodash/cloneDeep';\n// import { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\nimport { of, Observable, forkJoin } from \"rxjs\";\nimport { catchError, tap, toArray } from 'rxjs/operators';\nimport { ComposerService } from '@placeos/composer';\nimport { IconComponent } from '@mckinsey-converge/legacy-ui';\n\n@Component({\n selector: 'app-manage-photos',\n templateUrl: './manage-photos.component.html',\n styleUrls: ['./manage-photos.component.scss'],\n\t\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManagePhotosComponent extends BaseDirective implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n\n\t\t public canvas: HTMLCanvasElement;\n\t\t public context: any;\n\t\t public imageInitial = null;\n\t\t public imageToModify = null;\n\n\t\t public photoArray: Array = []; // array hold images to display (uploaded or to be upload)\n\t\t public photoUploadArray: Array = []; // array hold image to upload\n\n\t\t public uploadProgress:number;\n\t\t public uploadError: boolean = false;\n\t\t public uploadingStatus: string = 'Uploading...';\n\t\t public room: any;\n\t\t public resizedFiles = [];\n\t\t public requiredFileType = RequiredFileType;\n\t\t public count: any = 0;\n\t\t public total: number = 0;\n\t\t public failedNo: string;\n\t\t// isImageToModify: boolean;\n\n\n constructor(\n\t\t\tprivate _composer: ComposerService,\n\t\t\t@Inject(MAT_DIALOG_DATA) private _data: any,\n\t\t\tpublic resizeService: ResizeService,\n\t\t\tprivate readLocalPicService: ReadLocalPicService,\n\t\t\tprivate _spaces: SpacesService,\n\t\t\tprivate cdRef: ChangeDetectorRef,\n\t\t\tprivate _service: ApplicationService,\n\t\t\tprivate httpClient?: HttpClient,\n\t\t\t) {\n\t\t\tsuper();\n }\n \n\n public ngOnInit() {\n \tthis.photoArray = cloneDeep(this._data?.photos);\n\t\tthis.room = this._data?.room\n }\n\n\t\t\n\n\t\tpublic\tonFileSelected (event , indexToReplace?) {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.context = this.canvas.getContext('2d');\n\t\t\tconst ext = RequiredFileType.split(',');\n\t\t\tconst files = event instanceof Array ? event : [...new Set(event.target.files)].filter((f:File) => ext.includes(f.type));\n\t\t\tconst unusedIdx = indexToReplace!==undefined ? 1 : (3 - this.photoArray.length);\n\t\t\tfiles.splice(0,unusedIdx).forEach( file => {\n\n\t\t\t\tthis.readLocalPicService.readFileInput(file).then((base64Img) => {\n\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\tasync function (that) {\n\n\t\t\t\t\t\t\tawait that.resizeService.resizeImage(base64Img, {width: RoomPhotoDiamension.width, height: RoomPhotoDiamension.height, outputFormat: 'image/png', })\n\t\t\t\t\t\t\t\t\t\t.then(function (imgResized) {\n\n\t\t\t\t\t\t\t\t\t\t\tthat.resizeService.createImage(imgResized).then(function (image) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.clearRect(0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.width = image.width;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.height = image.height;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.drawImage( image, 0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement = that.canvas.toDataURL('image/png');\n\t\t\t\t\t\t\t\t\t\t\t\tif(indexToReplace!==undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst index = that.photoArray.length+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tthat.cdRef.detectChanges();\n\n\t\t\t\t\t\t\t\t\t\t\t\t// indexToReplace!==undefined ? that.photoArray.splice(indexToReplace, 1, { path : dataURL} ) : that.photoArray.push({ path: dataURL });\n\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while creating image : ', error);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while resizing image : ', error);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}, 0, this );\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.log('ERROR while Read local pic :', error);\n\t\t\t\t});\n\n\t\t\t})\n\n\t\t}\n\n\n\t\tupload() {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.uploadProgress = 1;\n\t\t\tlet obs: Observable[] = [];\n\t\t\tthis.count = 0;\n\t\t\tthis.total = this.photoUploadArray.length;\n\t\t\t\n\t\t\t// for (var i = 0; i < this.photoUploadArray.length; i++)\n\t\t\tthis.photoUploadArray.forEach(( img, i) =>{ \n\t\t\t\tconst formData = new FormData();\n\t\t\t\tconst file = this.readLocalPicService.b64toFile(img.path);\n\n\t\t\t\tformData.append( \"file\", file, `${this.room.email.split('@')[0]}-part-${img.index}.png`);\n\t\t\t\t\n\t\t\t\tobs.push(this.uploadSpacePhotos('photos', formData).pipe( catchError(err => of(err.status))) ) ;\n\n\t\t\t}) \n\n\t\t\t\n\n\t\t\tthis.subscription(`uploadPhotosSub$`, forkJoin(obs.map(o => o.pipe( \n\t\t\t\t\ttap(item => this.updateProgressMeter(item)), \n\t\t\t\t\t// toArray() \n\t\t\t\t)))\n\t\t\t\t.subscribe(event => {\n\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tevent.forEach((res ,i ) => {\n\t\t\t\t\t\t\t\tif(res?.message === 'File uploaded successfully!') {\n\n\t\t\t\t\t\t\t\t\tthis.uploadError = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tconst suffixes = ['', 'st','nd','rd'];\n\t\t\t\t\t\t\t\t\tthis.failedNo = `${i+1}${suffixes[i+1]}`;\n\t\t\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(i === (this.photoUploadArray.length-1)) {\n\t\t\t\t\t\t\t\t\tthis.photoUploadArray = [];\n\t\t\t\t\t\t\t\t\tthis.uploadingStatus = 'Complete';\n\t\t\t\t\t\t\t\t\tthis.event.emit(this._data.photos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror => {\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\tconsole.log('Error while uploadig room photos: ', error) ;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tprivate updateProgressMeter(item) {\n\t\t\tif(item?.message === 'File uploaded successfully!') {\n\t\t\t\tthis.count++;\n\t\t\t\tthis.uploadProgress = this.total > 0 ? Math.round((this.count / this.total) * 100) : 0;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t}\n\t\t}\n\t\n\t\n\t\treset() {\n\t\t\tthis.uploadProgress = null;\n\t\t\tthis.cdRef.detectChanges();\n\t\t}\n\n\t\tpublic timestamp (photo) {\n\t\t\treturn photo?.index ? '' : `?${(new Date()).getTime()}`;\n\t\t}\n\n\n\t\t/**\n\t\t * update function version -2 - returns observable instead of promise...\n\t\t * @param form_data data to be update \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\t public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/${apiSubRoute}`;\n\t\t\tconst body = form_data;\n\t\n\t\t\tconst token = this._composer.auth.token; //sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n\n\t\tpublic deletePhoto(i: number) {\n\t\t\tconst index = this.photoArray[i].index;\n\t\t\tconst photoName = index ? `${this.room.email.split('@')[0]}-part-${index}.png` : this.photoArray[i].path.split('rooms/')[1];\n\n\t\t\tthis.photoArray.splice(i, 1); \n\t\t\tthis.photoUploadArray.splice(i, 1);\n\n\t\t\tthis.deleteSpacePhotos(i, false, {photo_name: [ photoName ]}).subscribe( val => {\n\t\t\t\tconsole.log(val);\n\t\t\t\tthis._service.notifySuccess('Successfully deleted!');\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tconsole.log('Error while deleting room photos: ', error) ;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t}\n\n\n\t\t/**\n\t\t * \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\tpublic deleteSpacePhotos(index: number, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/delete`;\n\t\t\tconst body = query_params;\n\t\n\t\t\tconst token = this._composer.auth.token; \n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n}\n","
\n
\n
{{ room?.roomname }}
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n
\n\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Selected photos ({{ photoArray.length }}/3)\n\t\t\t\t\tRequired photo parameters: landscape orientation, W 400x H 225 pixels, format PNG or WEBP\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tRoom photo #{{i+1}}\n\t\t\t\t\t\t{{ room.email.split('@')[0] }}-part-{{i+1}}.png \n\t\t\t\t\t\tRatio: 400x225\n\t\t\t\t\t
\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\tDrag & drop or\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{uploadingStatus}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{failedNo}} Photo failed to upload successfully. Please try again.\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n \n
","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RoomAdminComponent } from './room-admin.component';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\n\nconst routes: Routes = [\n { path: '',\n children: [\n { path: '', component: RoomAdminComponent },\n {\n path: 'room-details', \n component: RoomDetailsWrapperComponent\n }\n ]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class RoomAdminRoutingModule { }\n\n\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n DEFAULT_BOOKING_DURATION,\n rulesForSpace,\n SpacesService,\n User,\n} from '@mckinsey-converge/data-common';\nimport {\n OrganisationService,\n ApplicationService,\n BuildingLevel,\n} from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { first, take } from 'rxjs/operators';\nimport { Identity, BaseDirective, closestToTimeSlotTz } from '@mckinsey-converge/base';\nimport { Store } from '@ngrx/store';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { RoomAdminService } from './services/room-admin.service';\nimport jsPDF, { RGBAData } from 'jspdf';\nimport { Hash } from 'crypto';\n\n@Component({\n selector: 'app-room-admin',\n templateUrl: './room-admin.component.html',\n styleUrls: ['./room-admin.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomAdminComponent extends BaseDirective implements OnInit {\n public spaces: Space[] = [];\n public newArr: any[];\n public location: string;\n public isOpen = false;\n\n public itemsCheckboxes = [\n {\n label: '',\n checked: false,\n id: '',\n building_id: '',\n name: '',\n email: '',\n roomname: '',\n isLevel: false,\n },\n ];\n\n public qrCodeUrls = [];\n\n public selectAll: boolean = false;\n\n public allLevels: any; //need this for populating levels in bulk-qr-overlay component\n\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n\n /** ID of the active level */\n @Input() public level: string;\n\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n /** ID of the currently selected level */\n public active_level = '';\n\n /** List of legend keys to show */\n public legend_list: string[] = [];\n\n /** List of available legend keys */\n public readonly legend_keys: readonly Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true },\n ];\n\n public detailsViewIndex = 0;\n\n public rowInfo = [];\n\n public has_access: boolean;\n currentUser: User;\n public enableOverlay = false;\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _router: Router,\n private _booking_state_service: BookingStateService,\n private store: Store,\n private cdref: ChangeDetectorRef,\n private roomAdminService: RoomAdminService\n ) {\n super();\n }\n\n public eventFromChild(data: number) {\n this.detailsViewIndex = data;\n }\n\n public passRowToDetailsView(data: []) {\n this.rowInfo = data;\n }\n\n public returnToRoomAdmin(data: number) {\n this.detailsViewIndex = data;\n this.updatePayload();\n this.cdref.detectChanges();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Room Administration';\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.updateLevel();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(\n building.levels\n );\n this.levels.sort((a, b) =>\n b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n })\n );\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n this._org.space_types\n );\n })\n );\n });\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.enableOverlay = true;\n this._spaces.queryRooms({zone_ids: this._org.building.id }).subscribe(\n (res) => {\n const list = res.map((i) => this._spaces.process(i));\n this._router.navigate(['/room-admin']);\n this.detailsViewIndex = 0;\n this.updatePayload([...list]);\n });\n }\n\n public updatePayload(spaces?) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n /** TO DO : remove _space.filter use */\n this.spaces = spaces ? [...spaces] : this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.location = this._org.building.name;\n const roomDataSource = [];\n for (let i = 0; i < this.spaces.length; i++) {\n if (this.spaces[i].map_id) {\n\n roomDataSource.push({\n roomname: this.spaces[i].local_name,\n roomnum: this.spaces[i].map_id,\n level: this.spaces[i].level.short_name,\n capacity: this.spaces[i].capacity,\n roomtype: this.spaces[i].internal_or_external,\n bookable: this.spaces[i].bookable,\n settings: this.spaces[i].settings,\n equipment: this.spaces[i]?.equipment,\n room_style: this.spaces[i]?.room_style,\n email: this.spaces[i].email,\n roomobject: this.spaces[i],\n id: this.spaces[i].id,\n building: this.spaces[i].building,\n });\n }\n }\n\n this.newArr = [...roomDataSource]; // to make sure tabe is up to date\n\n let checkedFlag = { checked: false };\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag };\n });\n this.allLevels = this._org.building.levels;\n this.enableOverlay = false;\n this.cdref.detectChanges();\n }\n\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public bg_click_close() {\n this.isOpen = false;\n this.qrCodeUrls = [];\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.cdref.detectChanges();\n }\n\n public onQrCodeUrlsChange(newUrls: any[]) {\n this.qrCodeUrls = newUrls;\n }\n\n public downloadQrCode() {\n /**\n * Use the same array of selected rooms/levels for qr code to iterate\n */\n this.roomAdminService.doc = new jsPDF();\n let isRoom: boolean;\n this.qrCodeUrls.forEach((item, i) => {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector(`.qr-code${i} img`);\n let imageData: any = null;\n if (item.roomname) {\n isRoom = true;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.roomname, false, item.level); // roomname should be room name for rooms or [Level ] for levels\n } else if (item.name) {\n isRoom = false;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.name, true, ''); // roomname should be room name for rooms or [Level ] for levels\n }\n // Add generated qr code image to the pdf\n switch ((i + 1) % 4) {\n case 1:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n break;\n case 2:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 5, 100, 100);\n break;\n case 3:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 130, 100, 100);\n break;\n case 0:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 130, 100, 100);\n this.roomAdminService.doc.addPage();\n break;\n }\n });\n this.roomAdminService.doc.save(`${this.location} - ${isRoom ? `rooms.pdf` : `levels.pdf`}`);\n }\n}\n","
\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n

Room Administration

\n
\n
\n
\n
\n
\n
\n

Showing {{ this.location }} Rooms ({{ newArr?.length }})

\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n \n
\n
\n\n
\n\t\n
\n\n
\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RoomAdminRoutingModule } from './room-admin-routing.module';\nimport { RoomAdminComponent } from './room-admin.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { RoomsTableComponent } from './rooms-table/rooms-table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { RoomDetailsComponent } from './room-details/room-details.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { QRCodeModule } from 'angularx-qrcode';\nimport { OverlayModule} from '@angular/cdk/overlay';\nimport { MatTabsModule} from '@angular/material/tabs';\nimport { RoomAdminService } from './services/room-admin.service';\nimport { BulkQrOverlayComponent } from './bulk-qr-overlay/bulk-qr-overlay.component';\nimport { IconComponent, LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\nimport { ManagePhotosComponent } from './manage-photos/manage-photos.component';\nimport { ResizeService, ReadLocalPicService } from './services/';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { ComposerModule } from '@placeos/composer';\nimport { FileDragNDropDirective } from './util/file-drag-n-drop.directive';\n\n\n\n@NgModule({\n declarations: [RoomAdminComponent, RoomsTableComponent, RoomDetailsComponent, RoomDetailsWrapperComponent, BulkQrOverlayComponent, ManagePhotosComponent, FileDragNDropDirective],\n imports: [\n CommonModule,\n RoomAdminRoutingModule,\n SharedContentModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatExpansionModule,\n FormsModule,\n ReactiveFormsModule,\n MatSnackBarModule,\n QRCodeModule,\n LegacyUiModule,\n OverlayModule,\n MatTabsModule,\n UiModule,\n LegacyOverlaysModule,\n MatProgressBarModule,\n ComposerModule\n ],\n providers: [\n ResizeService,\n ReadLocalPicService,\n RoomAdminService\n ],\n})\nexport class RoomAdminModule { }\n","import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'room-details-wrapper',\n template: `\n
\n \n \n
\n
\n
\n
\n \n
\n

Room Administration > Room Detail

\n

Room detail

\n
\n
\n
\n
\n \n
\n
\n
\n `,\n styleUrls: ['./room-details-wrapper.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsWrapperComponent implements OnInit {\n public rowInfo: any;\n \n\n\n constructor(\n private cd: ChangeDetectorRef,\n private _router: Router,\n ) {\n if(this._router.getCurrentNavigation() !== null && this._router.getCurrentNavigation().extras['state']?.details) {\n this.rowInfo = this._router.getCurrentNavigation().extras['state']?.details;\n }\n else {\n this._router.navigate(['room-admin']);\n }\n }\n\n public ngOnInit(): void {\n this.cd.detectChanges();\n }\n\n public getToRoomList() {\n this._router.navigate(['room-admin'])\n }\n\n}","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { SpacesService, noWhitespaceValidator, OrganisationService, SpaceEquipments, SpaceStyles, setupRoomImages, ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DropdownOpion, CngSelectData } from '@mckinsey-converge/ui';\nimport { roomTypeOptions, roomSubsetOptions, roomVisibilityOptions, canteringAvailabilityOptions, room, RoomSubset } from '../util/room-admin-utility';\nimport jsPDF from 'jspdf';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ManagePhotosComponent } from '../manage-photos/manage-photos.component';\nimport { BaseDirective, DialogEvent, SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n\n\n@Component({\n selector: 'app-room-details',\n templateUrl: './room-details.component.html',\n styleUrls: ['./room-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsComponent extends BaseDirective implements OnInit {\n public reactiveForm: FormGroup;\n public room: room;\n public rowInfoData: any;\n public doc: jsPDF;\n public cityname: string;\n\n public roomTypeDD: CngSelectData;\n public roomSubsetDD: CngSelectData;\n public roomVisibilityDD: CngSelectData;\n public canteringAvailabilityDD: CngSelectData;\n\t\tpublic givenRoomType: any = 'internal';\n\t\tpublic givenRoomSubType: any = 'conference';\n\t\tpublic givenCateringAvailability: any;\n\t\tpublic uploadedPhotos : Array = [];\n\t\tpublic roomSubsetOptions:RoomSubset;\n\n @Input() set rowInfo(value: any) {\n this.rowInfoData = value;\n }\n @Input() set location(value: string) {\n this.cityname = value;\n }\n\n @Output('parentFun') parentFun: EventEmitter = new EventEmitter();\n\t\tpublic loadImages = new BehaviorSubject([]);\n\n public disableButtons = false;\n public enableOverlay = false;\n public windowLocation = location;\n\n\t// Set to a config once we know where the files are hosted.\n public rootFolderURL = 'assets/img/rooms/';\n\t\tpublic foundImages: SpaceImageObject[] = [];\n\t\tpublic roomImages: SpaceImageObject[] = [];\n\n\n\t\tpublic get roomImagesFileSlug(): string {\n\t\t\treturn this.rowInfoData.email.split('@')[0];\n\t\t}\n\n constructor(\n private _spaces: SpacesService,\n private cd: ChangeDetectorRef,\n private _snackBar: MatSnackBar,\n private _router: Router,\n\t\tprivate _dialog: MatDialog,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _org:OrganisationService,\n\t\tprivate _service: ApplicationService,\n ) {\n\t\t\t\tsuper();\n this.room = {} as room;\n }\n\n public ngOnInit(): void {\n this.doc = new jsPDF();\n history.pushState({}, '');\n\n this.cityname = this?.rowInfoData?.building?.city;\n\n\t\t\t\tconst internalSubSet: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('internal_room_types');\n\t\t\t\tconst externalSubset: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('external_room_types');\n\t\t\t\tthis.roomSubsetOptions = {internal: internalSubSet, external: externalSubset};\n\n\t\t\t\tconst internal_or_external = this.rowInfoData?.roomobject?.internal_or_external; // ( this.rowInfoData?.roomobject?.filters?.external ? 'external' : 'internal') || this.rowInfoData?.settings;\n\n\t\t\t\tif(internal_or_external) {\n\t\t\t\t\tthis.givenRoomType = typeof(internal_or_external) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof(internal_or_external.value) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: internal_or_external.value.value; // temporary fix\n\t\t\t\t}\n\t\t\t\tconst roomSubType = this.rowInfoData?.roomobject?.room_type;\n\t\t\t\tthis.givenRoomSubType = Array.isArray(roomSubType) && roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? roomSubType[0]\n\t\t\t\t\t\t\t\t\t\t: Array.isArray(roomSubType) && !roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? 'conference'\n\t\t\t\t\t\t\t\t\t\t: roomSubType || 'conference';\n\t\t\t\tthis.givenCateringAvailability = this.rowInfoData?.roomobject?.filters?.catering ? 'yes-onsite' : 'no';\n\n\n\t\t\t\tthis.rowInfoData && this.setAllDropdowns(this.rowInfoData);\n\n\n this.reactiveForm = new FormGroup({\n\n roomname: new FormControl(this.rowInfoData.roomname, [\n Validators.required,\n Validators.maxLength(250),\n Validators.minLength(1),\n Validators.pattern('[^=`~!#$%*{};\\'\"]*'),\n noWhitespaceValidator,\n ]),\n\n city: new FormControl({ value: this.cityname, disabled: true }, []),\n level: new FormControl({ value: this.rowInfoData.level, disabled: true }, []),\n roomnumber: new FormControl({ value: this.rowInfoData.roomnum, disabled: true }, []),\n\n\n\n\n internal_or_external: new FormControl( this.givenRoomType , []),\n\t\t\t\t\t\troom_type: new FormControl( this.givenRoomSubType, [] ),\n\n capacity: new FormControl(this.rowInfoData.capacity.toString(), [\n Validators.required,\n Validators.maxLength(250),\n Validators.pattern(/^(?!0+$)[0-9]{1,10}$/),\n ]),\n\n\n roomvisibility: new FormControl(this.rowInfoData.bookable),\n\t\t\t\t\t\tcatering: new FormControl(this.rowInfoData?.roomobject?.filters?.catering || false),\n\n\t\t\t\t\t\t// equipment_code === booking charge code ! if possible change equipment_code key to booking_charge_code\n\t\t\t\t\t\tequipment_code: new FormControl( this.rowInfoData?.roomobject?.filters?.equipment_code || false), // || this.rowInfoData?.settings['equipment_code']\n\t\t\t\t\t\tcharge_code: new FormControl(this.rowInfoData?.roomobject?.filters?.charge_code || false), // || this.rowInfoData.settings.charge_code\n\n vc: new FormControl(this.isFeatureChecked('vc')),\n conference_phone: new FormControl(this.isFeatureChecked('conference_phone')),\n wireless_content_sharing: new FormControl( this.isFeatureChecked('wireless_content_sharing')),\n flipchart: new FormControl(this.isFeatureChecked('flipchart')),\n glassboard: new FormControl(this.isFeatureChecked('glassboard')),\n whiteboard: new FormControl(this.isFeatureChecked('whiteboard')),\n natural_light: new FormControl(this.isFeatureChecked('natural_light')),\n boardroom: new FormControl(this.isFeatureChecked('boardroom')),\n cocktail: new FormControl(this.isFeatureChecked('cocktail')),\n theatre: new FormControl(this.isFeatureChecked('theatre')),\n workshop: new FormControl(this.isFeatureChecked('workshop')),\n u_shape: new FormControl(this.isFeatureChecked('u_shape')),\n miscellaneous: new FormControl(this.isFeatureChecked('miscellaneous')),\n });\n\n\n\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\n\t\t\t\t\tthis.subscription(\n\t\t\t\t\t\t'found_images',\n\t\t\t\t\t\tthis.loadImages.subscribe((imgArr: SpaceImageObject[]) => {\n\t\t\t\t\t\t\tthis.roomImages = imgArr;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}));\n\n }\n\n\n\n public isFeatureChecked(param: string) {\n switch (param) {\n case 'vc': {\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData.roomobject['filters']?.vc;\n }\n case 'natural_light': {\n return this.rowInfoData.roomobject['filters']?.natural_light; // || this.rowInfoData['settings']?.natural_light;\n }\n default: {\n // const { extra_features } = this.rowInfoData['settings'];\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData['room_style']?.includes(param); //extra_features && extra_features?.includes(param) ||\n }\n }\n }\n\n get capacity() {\n\t\t\treturn this.reactiveForm.get('capacity');\n }\n\n get roomname() {\n\t\t\treturn this.reactiveForm.get('roomname');\n }\n\n public onSubmit(formValue: any) {\n\t\t\tlet roomObject = Object.assign({}, this.rowInfoData.roomobject);\n\n\t\t\tconst allowed_keys = [\n\t\t\t\t\t'edge_id',\n\t\t\t\t\t'name',\n\t\t\t\t\t'description',\n\t\t\t\t\t'email',\n\t\t\t\t\t'equipment',\n\t\t\t\t\t'capacity',\n\t\t\t\t\t'filters',\n\t\t\t\t\t'features',\n\t\t\t\t\t'bookable',\n\t\t\t\t\t'installed_ui_devices',\n\t\t\t\t\t'zones',\n\t\t\t\t\t'modules',\n\t\t\t\t\t'room_type',\n\t\t\t\t\t'room_style',\n\t\t\t\t\t'settings',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'support_url',\n\t\t\t\t\t'version',\n\t\t\t\t\t'id',\n\t\t\t];\n\n\t\t\t// this is to filter unwanted keys and make the request body match room model\n\t\t\troomObject = Object.keys(roomObject)\n\t\t\t\t\t.filter((key) => allowed_keys.includes(key))\n\t\t\t\t\t.reduce((obj, key) => {\n\t\t\t\t\t\t\tobj[key] = roomObject[key];\n\t\t\t\t\t\t\treturn obj;\n\t\t\t\t\t}, {});\n\n\n\t\t\t// roomObject.settings.room_name = formValue.roomname;\n\t\t\troomObject.simple_name = formValue.roomname;\n\n\t\t\tif(formValue.internal_or_external) {\n\t\t\t\t// roomObject.settings.internal_or_external = formValue.internal_or_external;\n\t\t\t\troomObject.filters['external'] = formValue.internal_or_external === 'external';\n\t\t\t}\n\t\t\troomObject.room_type = formValue.room_type;\n\t\t\troomObject.capacity = parseInt(formValue.capacity);\n\n\t\t\troomObject.bookable = formValue.roomvisibility;\n\t\t\t// roomObject.settings['equipment_code'] = formValue.equipment_code;\n\t\t\troomObject.filters['equipment_code'] = formValue.equipment_code;\n\n\t\t\t// roomObject.settings['catering'] = formValue.catering\n\t\t\troomObject.filters['catering'] = formValue.catering;\n\t\t\t// roomObject.settings['charge_code'] = formValue.charge_code;\n\t\t\troomObject.filters['charge_code'] = formValue.charge_code;\n\n\n\n\t\t\t// roomObject.features = getExtraFeatures();\n\t\t\t// roomObject.settings.extra_features = getExtraFeatures();\n\t\t\troomObject.filters.vc = formValue.vc;\n\t\t\t// roomObject.settings.vc = formValue.vc;\n\t\t\t// roomObject.settings.natural_light = formValue.natural_light;\n\t\t\troomObject.filters['natural_light'] = formValue.natural_light;\n\t\t\tgetExtraFeatures();\n\n\t\t\tfunction getExtraFeatures() {\n\t\t\t\t\tconst excludeFromExtraFeatures = ['capacity','charge_code','internal_or_external', 'roomvisibility', 'roomname', 'equipment_code', 'catering', 'room_type'];\n\t\t\t\t\t// let features = '';\n\n\t\t\t\t\tObject.keys(formValue).forEach((element) => {\n\t\t\t\t\t\t\tconst isEqAndDetail = formValue[element];\n\t\t\t\t\t\t\t// console.log(SpaceEquipments[element]);\n\t\t\t\t\t\t\tif (!excludeFromExtraFeatures.includes(element) && isEqAndDetail) {\n\t\t\t\t\t\t\t\t\t// features += ` ${element}`;\n\n\t\t\t\t\t\t\t\t\tif(SpaceEquipments[element]!==undefined && !roomObject?.equipment.includes(element) ) {\n\t\t\t\t\t\t\t\t\t\troomObject?.equipment.push(element);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t else if( SpaceStyles[element]!==undefined && !roomObject?.room_style.includes(element) ){\n\t\t\t\t\t\t\t\t\t\t roomObject.room_style.push(element);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t} else if(!isEqAndDetail) {\n\t\t\t\t\t\t\t\t// roomObject.features = roomObject.features.replace(element, '');\n\t\t\t\t\t\t\t\troomObject.equipment = SpaceEquipments[element]!==undefined ? roomObject.equipment.filter((value)=>value!=element) : roomObject.equipment;\n\t\t\t\t\t\t\t\troomObject.room_style = SpaceStyles[element]!==undefined ? roomObject.room_style.filter((value)=>value!=element) : roomObject.room_style;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// return features;\n\t\t\t}\n\n\t\t\tconst body = roomObject;\n\n\t\t\tif (this.reactiveForm.invalid) {\n\t\t\t\t\tfor (const control of Object.keys(this.reactiveForm.controls)) {\n\t\t\t\t\t\t\tthis.reactiveForm.controls[control].markAsTouched();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\tthis.disableButtons = true;\n\t\t\t\t\tthis.enableOverlay = true;\n\n\t\t\t\t\tthis._spaces.updateSpace(this.rowInfoData.id, body).subscribe(\n\t\t\t\t\t\t\t(data: any) => {\n\t\t\t\t\t\t\t\t\tthis.updateAllRooms(); // TO DO: this call enabled to pull all updated rooms to use on day/week view, In future remove this call here and day/week view should handle it there\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.reactiveForm.markAsPristine();\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t\t\tthis._service.notifySuccess('Operation Successful!');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\t\t\t\tthis._service.notifyError('There was an error');\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.room = this.reactiveForm.value;\n }\n\n public updateAllRooms(): void {\n\t\t // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n\t\t const option = {\n zone_ids: this._org.building.id\n }\n this._spaces.query(option, true).then(() => { }).catch(() => {});\n }\n\n public onCancel() {\n\t\t\tthis._router.navigate(['room-admin']);\n }\n\n\n\n\n\t\tpublic setAllDropdowns(rowInfoData) {\n\t\t\t// const {internal_or_external} = rowInfoData?.settings;\n\t\t\t// const roomType = typeof(internal_or_external) === 'string' ? internal_or_external : internal_or_external.value;\n\n\t\t\tthis.roomTypeDD = {\n\t\t\t\tddBoxClass: 'room-type',\n\t\t\t\toptions: roomTypeOptions,\n\t\t\t\tdefaultSelected: roomTypeOptions.filter(el => el.value === this.givenRoomType )[0],\n\t\t\t\tonChangeCallback: this.roomTypeChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomSubsetDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'room-subset',\n\t\t\t\t\toptions: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()],\n\t\t\t\t\tdefaultSelected: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()].filter(el => el.value === this.givenRoomSubType )[0],\n\t\t\t\t\tonChangeCallback: this.roomTypeSubsetChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomVisibilityDD = {\n\t\t\t\t\tddBoxClass: 'room-visibility',\n\t\t\t\t\toptions: roomVisibilityOptions,\n\t\t\t\t\tdefaultSelected: roomVisibilityOptions.filter(el => el.value === rowInfoData?.bookable.toString())[0],\n\t\t\t\t\tonChangeCallback: this.roomVisibilityChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.canteringAvailabilityDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'catering-availability',\n\t\t\t\t\toptions: canteringAvailabilityOptions,\n\t\t\t\t\tdefaultSelected: canteringAvailabilityOptions.filter(el => el.value === this.givenCateringAvailability )[0],\n\t\t\t\t\tonChangeCallback: this.roomCateringChanged.bind(this)\n\t\t\t};\n\t\t}\n\n /**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic roomTypeChanged(type: DropdownOpion) {\n\t\t\tthis.reactiveForm.controls.internal_or_external.setValue(type.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\n\t\t\tif(!this.roomSubsetDD.disabled) {\n\t\t\t\tthis.roomSubsetDD.options = this.roomSubsetOptions[type.value.toString()];\n this.roomSubsetDD.defaultSelected = type.value === this.givenRoomType ? this.roomSubsetDD.options.filter(el => el.value === this.givenRoomSubType )[0] : this.roomSubsetOptions[type.value.toString()][0];\n\t\t\t\tthis.reactiveForm.controls.room_type.setValue(this.roomSubsetDD.defaultSelected.value);\n\t\t\t}\n\t\t\tthis.reactiveForm.markAsDirty();\n\t\t\tthis.cdRef.detectChanges();\n\t}\n\tpublic roomTypeSubsetChanged(subset: DropdownOpion ) {\n\t\t\t// console.log(subset);\n\t\t\tthis.reactiveForm.controls.room_type.setValue(subset.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomVisibilityChanged(visibility: DropdownOpion) {\n\t\tthis.reactiveForm.controls.roomvisibility.setValue(visibility.value==='true');\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomCateringChanged(isCatering: DropdownOpion) {\n\t\tthis.reactiveForm.controls.catering.setValue(!(isCatering.value==='no'));\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img): string | HTMLCanvasElement | HTMLImageElement {\n\t\t\t// TO DO : move to enum/utility file, while room detail more editable field developement\n\t\t\tconst width = 500;\n\t\t\tconst height = 550;\n\t\t\tconst arcY = 300;\n\t\t\tconst arc_X_Center = width/2;\n\t\t\tconst otrRadius = arc_X_Center - 2 ;\n\t\t\tconst whtRadius = otrRadius - 12;\n\t\t\tconst innrRadius = otrRadius - 15;\n\n\t\t\tconst canvas: HTMLCanvasElement = document.createElement('canvas');\n\t\t\tcanvas.setAttribute('width', width.toString());\n\t\t\tcanvas.setAttribute('height', height.toString());\n\t\t\tconst ctx = canvas.getContext('2d');\n\n\t\t\tctx.strokeStyle = \"transparent\";\n\t\t\tctx.moveTo(arc_X_Center, 0);\n\t\t\tctx.lineTo(arc_X_Center, height);\n\t\t\tctx.stroke();\n\n\t\t\tctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.textAlign = \"center\";\n\t\t\tctx.fillText(this.rowInfoData?.roomname , arc_X_Center, 20);\n\n\t\t\t//oputer arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//inner white arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//second inner arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t// header text\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.font = '44px Bower';\n\t\t\tctx.fillText('Book Me', arc_X_Center, 166);\n\n\t\t\t//centeral rectangle\n\t\t\tctx.fillRect(137, 187, 225, 225);\n\t\t\t//fill central rectangle with color\n\t\t\tctx.fillStyle = '#FFFFFF';\n\n\t\t\t// fill text at the bottom\n\t\t\tctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.fillText('in Converge', arc_X_Center, 470);\n\n\t\t\t// draw QR code image into center of canvas\n\t\t\timg !== null && ctx.drawImage(img, 137, 187);\n\n\t\t\t// create data url\n\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement =\n\t\t\tcanvas.toDataURL('image/png');\n\t\t\treturn dataURL;\n }\n\n /**\n * Function downloadQRPdf\n * download generated QR code to the local system\n */\n public downloadQRPdf(roomid?: string): void {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector('.qr-code img');\n let imageData = this.drawCanvas(qrcode);\n // Add generated qr code image to the pdf\n this.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 5, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 3, 130, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 130, 100, 100);\n // this.doc.addImage(imageData, \"JPEG\", 10, 10); // left commented for alignment reference later in future\n // doc.addPage();\n\t\t\t\t// this.openQRInConverge();\n this.doc.save(`${this.rowInfoData.id}.pdf`);\n }\n\n /**\n * Not in use but keeping for future use\n * Function openQRInConverge\n * Open QR code in seperate tab\n */\n public openQRInConverge(): void {\n const qrcode = document.querySelector('.qr-code img');\n const dataURL = this.drawCanvas(qrcode);\n const win = window.open();\n win &&\n win.document.write(\n '
\\\n\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t
'\n );\n }\n\n\t\t/** Open modal for adding equipment requirements to booking */\n\t\tpublic openManagePhotosModal() {\n\t\t\tconst equipment_ref = this._dialog.open(ManagePhotosComponent, {\n\t\t\t\tmaxWidth: '95vw',\n\t\t\t\twidth: '70em',\n\t\t\t\tdata: {\n\t\t\t\t\tphotos: this.roomImages,\n\t\t\t\t\troom: this.rowInfoData\n\t\t\t\t\t}\n\t\t\t});\n\t\t\tthis.subscription(\n\t\t\t\t'equipments_modal_events',\n\t\t\t\tequipment_ref.componentInstance.event.subscribe((event: any) => {\n\t\t\t\t\t/* istanbul ignore else */\n\n\t\t\t\t\t\t// this.uploadedPhotos = event;\n\t\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\t\t\t\t\t\t//equipment_ref.close();\n\n\t\t\t\t})\n\t\t\t);\n\t\t\tequipment_ref.afterClosed().subscribe(() => {\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\tthis.unsub('equipments_modal_events')\n\t\t\t});\n\t\t}\n\n\n\t\tpublic get timestamp () {\n\t\t\treturn (new Date()).getTime()\n\t\t}\n\n\n}\n","
\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{ \troomname.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.maxlength \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters' \n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t ? 'Some special characters and are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t:\troomname.errors?.whitespace\n\t\t\t\t\t\t\t\t\t\t\t\t? 'Only spaces are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'System generated name '+ roomname.value + ' (can not be changed)' }} \t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {{\n\t\t\t\t\t\t\t\t\t\t\t\tcapacity.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.maxlength\n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t\t? 'Zero, letters and special characters are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t   Booking charge code required \n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t   Catering charge code required \n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Room equipment and detail \n\t\t\t\t\t\t\n\t\t\t\t\t\t

Room Equipment

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Video Conference (VC)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Conference phone

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Wireless content sharing

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Flipchart

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Glassboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Whiteboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

Room Detail

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Room with window only (natural light)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Boardroom room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Cocktail room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Theatre room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Workshop room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

U shape room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Miscellaneous

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\n\t\t
\n\t
\n\n\t\n\t\n\n\t
\n\t\n
\n\n
\n\t
\n\t\tRoom URL\n\t\t
\n\t\t\t{{ windowLocation.origin }}/staff/#/home?id={{ rowInfoData.id }}\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\n\t
\n\t\n\t
\n\t\t\n\t
\n
\n\n
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n\n","import { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { map } from 'rxjs/operators';\nimport { Observable, of as observableOf, merge } from 'rxjs';\nimport { Component, OnInit, Input, Injectable } from '@angular/core';\n\n\n// data model \nexport interface RoomsTableItem {\n roomname: string;\n roomnum: string;\n level: string;\n capacity: number;\n roomtype: string;\n bookable: boolean;\n}\n\n// sample data\nconst EXAMPLE_DATA: RoomsTableItem[] = [\n {\n roomname: 'test',\n roomnum: '02',\n level: '01',\n capacity: 4,\n roomtype: 'internal',\n bookable: true,\n}\n];\n\n/**\n * Data source for the RoomsTable view. This class should\n * encapsulate all logic for fetching and manipulating the displayed data\n * (including sorting, pagination, and filtering).\n */\n\n// convert this class into service and use provider:root\n@Injectable({\n providedIn: 'root',\n})\nexport class RoomsTableDataSource extends DataSource {\n data: RoomsTableItem[] = EXAMPLE_DATA;\n paginator: MatPaginator;\n sort: MatSort;\n\n\n constructor(public datatwo: RoomsTableItem[],\n ) {\n super();\n this.data = datatwo;\n }\n\n /**\n * Connect this data source to the table. The table will only update when\n * the returned stream emits new items.\n * @returns A stream of the items to be rendered.\n */\n \n \n connect(): Observable {\n // Combine everything that affects the rendered data into one update\n // stream for the data-table to consume.\n\n const dataMutations = [\n observableOf(this.data),\n this.paginator.page,\n this.sort.sortChange\n ];\n\n return merge(...dataMutations).pipe(map(() => {\n return this.getPagedData(this.getSortedData([...this.data]));\n }));\n }\n\n /**\n * Called when the table is being destroyed. Use this function, to clean up\n * any open connections or free any held resources that were set up during connect.\n */\n disconnect() {}\n\n /**\n * Paginate the data (client-side). If you're using server-side pagination,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getPagedData(data: RoomsTableItem[]) {\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.splice(startIndex, this.paginator.pageSize);\n }\n\n /**\n * Sort the data (client-side). If you're using server-side sorting,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getSortedData(data: RoomsTableItem[]) {\n if (!this.sort.active || this.sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const isAsc = this.sort.direction === 'asc';\n switch (this.sort.active) {\n case 'roomname': return compare(a.roomname, b.roomname, isAsc);\n case 'roomnum': return compare(+a.roomnum, +b.roomnum, isAsc);\n case 'level': return compare(+a.level, +b.level, isAsc);\n case 'capacity': return compare(+a.capacity, +b.capacity, isAsc);\n case 'roomtype': return compare(a.roomtype, b.roomtype, isAsc);\n case 'bookable': return compare(+a.bookable, +b.bookable, isAsc);\n default: return 0;\n }\n });\n }\n}\n\n\n/** Simple sort comparator for example ID/Name columns (for client-side sorting). */\nfunction compare(a: string | number, b: string | number, isAsc: boolean) {\n return (a < b ? -1 : 1) * (isAsc ? 1 : -1);\n}\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n SimpleChanges,\n} from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTable } from '@angular/material/table';\nimport { RoomsTableDataSource, RoomsTableItem } from './rooms-table-datasource';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'app-rooms-table',\n templateUrl: './rooms-table.component.html',\n styleUrls: ['./rooms-table.component.scss'],\n})\nexport class RoomsTableComponent extends BaseDirective implements AfterViewInit, OnInit {\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n @ViewChild(MatTable) table: MatTable;\n dataSource: RoomsTableDataSource;\n\n constructor(private _org: OrganisationService,\n private _router: Router,\n private route: ActivatedRoute,\n private cdref: ChangeDetectorRef,) {\n super();\n }\n\n public formattedInputValue: [];\n\n @Input() set inputValue(value: []) {\n this.formattedInputValue = value;\n }\n\n @Output() private onDetailsClick = new EventEmitter();\n\n @Output() public rowClicked = new EventEmitter<[]>();\n\n /** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */\n // tslint:disable-next-line: max-line-length\n public displayedColumns = [\n 'roomname',\n 'roomnum',\n 'level',\n 'capacity',\n 'roomtype',\n 'bookable',\n 'details',\n ];\n\n public detailsViewIndex = 0;\n\n public _onDetailsClick(index: number) {\n this.onDetailsClick.emit(index);\n }\n\n public ngOnInit() {\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n }\n public ngOnChanges(changes: SimpleChanges): void {\n // console.log(changes);\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n if(!changes.inputValue.firstChange) {\n this.dataSource.sort = this.sort;\n this.dataSource.paginator = this.paginator;\n this.table.dataSource = this.dataSource;\n this.paginator.firstPage();\n this.cdref.detectChanges();\n }\n\n }\n\n // ngAfterViewInit heavy on performance, figure out api\n // function that gives callback after html loads\n // eg, onchange, check mat table documentation\n\n public ngAfterViewInit() {\n // this.dataSource.sort = this.sort;\n // this.dataSource.paginator = this.paginator;\n // this.table.dataSource = this.dataSource;\n // this.paginator.firstPage();\n }\n\n public getRecord(row: []) {\n const navigationExtras = {\n relativeTo:this.route,\n skipLocationChange: true ,\n state: {\n details: { ...row }\n }\n }\n this._router.navigate(['room-details'], navigationExtras)\n }\n}\n","
\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
Room Name{{ row.roomname }}Room Number{{ row.roomnum }}Level{{ row.level }}Capacity{{ row.capacity }}Room Type\n Internal\n External\n Room visibility\n Bookable\n Non Bookable\n \n \n
\n\n \n \n
\n","export * from './resize.service';\nexport * from './read-local-pic.service';\n// export * from './room-admin.service';","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\n\nexport class ReadLocalPicService {\n /**\n * eventErrorDecoder\n * @param event \n * @returns errorMessage\n */\n private eventErrorDecoder(event: any): string {\n let errorMessage = null;\n\n switch (event.target.error.code) {\n case event.target.error.NOT_FOUND_ERR:\n errorMessage = 'NOT_FOUND_ERR';\n break;\n case event.target.error.SECURITY_ERR:\n errorMessage = 'SECURITY_ERR';\n break;\n case event.target.error.ABORT_ERR:\n errorMessage = 'ABORT_ERR';\n break;\n case event.target.error.NOT_READABLE_ERR:\n errorMessage = 'NOT_READABLE_ERR';\n break;\n case event.target.error.ENCODING_ERR:\n errorMessage = 'ENCODING_ERR';\n break;\n case event.target.error.NO_MODIFICATION_ALLOWED_ERR:\n errorMessage = 'NO_MODIFICATION_ALLOWED_ERR';\n break;\n case event.target.error.INVALID_STATE_ERR:\n errorMessage = 'INVALID_STATE_ERR';\n break;\n case event.target.error.SYNTAX_ERR:\n errorMessage = 'SYNTAX_ERR';\n break;\n case event.target.error.INVALID_MODIFICATION_ERR:\n errorMessage = 'INVALID_MODIFICATION_ERR';\n break;\n case event.target.error.QUOTA_EXCEEDED_ERR:\n errorMessage = 'QUOTA_EXCEEDED_ERR';\n break;\n case event.target.error.TYPE_MISMATCH_ERR:\n errorMessage = 'TYPE_MISMATCH_ERR';\n break;\n case event.target.error.PATH_EXISTS_ERR:\n errorMessage = 'PATH_EXISTS_ERR';\n break;\n default:\n errorMessage = 'Unknown Error: ' + event.target.error.code;\n break;\n }\n return errorMessage;\n }\n\n /**\n * \n * @param inputFile \n * @returns \n */\n async readFileInput(inputFile: any): Promise {\n return new Promise((resolve, reject) => {\n if (!inputFile ) {\n reject('No file selected');\n } else {\n if (\n !(window.File && window.FileReader && window.FileList && window.Blob)\n ) {\n reject('Your browser does not support reading files');\n }\n\n const reader = new FileReader();\n reader.onload = (e: any) => {\n resolve(e.target.result);\n };\n reader.onabort = (e: any) => {\n reject(\n 'Failed to convert file to base64img, aborted: ' +\n this.eventErrorDecoder(e)\n );\n };\n reader.onerror = (e: any) => {\n reject(\n 'Failed to convert file to base64img, error: ' +\n this.eventErrorDecoder(e)\n );\n };\n\n reader.readAsDataURL(inputFile);\n }\n });\n }\n\n\n b64toFile(dataURI): File {\n // convert the data URL to a byte string\n const byteString = atob(dataURI.split(',')[1]);\n\n // pull out the mime type from the data URL\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]\n\n // Convert to byte array\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n // new File\n // Create a blob that looks like a file.\n const blob = new File([ab],'room-photo.png', { 'type': mimeString });\n // blob['lastModifiedDate'] = (new Date()).toISOString();\n // blob['name'] = 'file';\n \n // Figure out what extension the file should have\n // switch(blob.type) {\n // case 'image/jpeg':\n // blob['name'] += '.jpg';\n // break;\n // case 'image/png':\n // blob['name'] += '.png';\n // break;\n // }\n // cast to a File\n return blob;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResizeService {\n private mainCanvas: HTMLCanvasElement;\n\n private isCanvasSupported(): boolean {\n const canvas = document.createElement('canvas');\n return !!(canvas.getContext && canvas.getContext('2d'));\n }\n\n /**\n * Create image on the fly using Image class \n * @param src \n * @param crossOrigin \n * @returns image\n */\n async createImage(\n src: string,\n crossOrigin?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n const img = new Image();\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.onload = () => {\n resolve(img);\n };\n\n img.onerror = (err) => {\n reject(err);\n };\n\n img.src = src;\n });\n }\n\n /**\n * Resize canvas - create canvas on the fly draw image with given diamension\n * @param cnv \n * @param width \n * @param height \n * @returns temp canvas instance\n */\n resizeCanvas(\n cnv: HTMLCanvasElement,\n width: number,\n height: number\n ): HTMLCanvasElement {\n if (!width || !height) {\n return cnv;\n }\n\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n const cnx = tmpCanvas.getContext('2d');\n cnx.drawImage(cnv, 0, 0, tmpCanvas.width, tmpCanvas.height);\n return tmpCanvas;\n }\n\n /**\n * Resize image \n * @param src \n * @param options \n * @returns \n */\n async resizeImage(src: string, options: any): Promise {\n if (!this.isCanvasSupported()) {\n throw new Error('Canvas is not supported on your browser');\n }\n if (!options || !src) {\n throw new Error('Missing argument when calling resizeImage function');\n }\n //Config options\n options = {\n height: options.height\n ? options.height\n : options.width\n ? null\n : options.size\n ? null\n : 1024,\n width: options.width\n ? options.width\n : options.height\n ? null\n : options.size\n ? null\n : 1024,\n size: options.size ? options.size : 500,\n sizeScale: options.sizeScale ? options.sizeScale : 'ko',\n step: options.step ? options.step : 3,\n outputFormat: options.outputFormat ? options.outputFormat : 'image/jpeg',\n crossOrigin: options.crossOrigin ? options.crossOrigin : null,\n };\n\n try {\n const img = await this.createImage(src, options.crossOrigin); // read image first by given base64 or blob image\n\n if (options.height || options.width) {\n // resize image as per height and width\n return this.resizeImageWidthHeight(\n img,\n options.width,\n options.height,\n options.step,\n options.outputFormat\n );\n } else if (options.size) {\n if (typeof options.sizeScale === 'string') {\n switch (options.sizeScale.toLowerCase()) {\n case 'ko':\n options.size *= 1024;\n break;\n case 'mo':\n options.size *= 1024 * 1024;\n break;\n case 'go':\n options.size *= 1024 * 1024 * 1024;\n break;\n }\n }\n return this.resizeImageBySize(img, options.size, options.outputFormat); //resize by size in diamension ration\n } else {\n throw new Error('Missing option to resize the image');\n }\n } catch (err) {\n throw new Error(err);\n }\n }\n\n /**\n * ResizeImageWidthHeight - Create canvas - draw image if given height and with OR use image original diamensions\n * and draw image data url\n * @param image \n * @param width \n * @param height \n * @param step \n * @param outputFormat \n * @returns \n */\n resizeImageWidthHeight(\n image: HTMLImageElement,\n width: number,\n height: number,\n step: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n\n if (!width && !height) {\n width = image.width;\n height = image.height;\n } else if (!width && height) {\n width = (height / image.height) * image.width;\n } else if (width && !height) {\n height = (width / image.width) * image.height;\n }\n\n const pixelStepWidth = image.width === width || !step ? 0 : (image.width - width) / step;\n const pixelStepHeight = image.height === height || !step ? 0 : (image.height - height) / step;\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n for (let i = 1; i < step; i++) {\n const newWidth = image.width - pixelStepWidth * i;\n const newHeight = image.height - pixelStepHeight * i;\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, newWidth, newHeight);\n }\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, width, height);\n\n return this.mainCanvas.toDataURL(outputFormat);\n }\n\n /**\n * resizeImageBySize - resize image by given size in ration \n * \n * @param image \n * @param targetSize \n * @param outputFormat \n * @returns \n */\n resizeImageBySize(\n image: HTMLImageElement,\n targetSize: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n\n let tmpResult = this.mainCanvas.toDataURL(outputFormat);\n let result = tmpResult;\n\n const sizeOfTheImage = this.calulateImageSize(tmpResult, outputFormat);\n let divideStrategy = Math.max(\n 1,\n Math.min(sizeOfTheImage / targetSize, 200)\n );\n\n let iteratorLimit = 20;\n while (sizeOfTheImage > targetSize && iteratorLimit !== 0) {\n iteratorLimit--;\n\n const newImageSize = {\n width: this.mainCanvas.width / divideStrategy,\n height: this.mainCanvas.height / divideStrategy,\n };\n const canvas = this.resizeCanvas(\n this.mainCanvas,\n newImageSize.width,\n newImageSize.height\n );\n\n tmpResult = canvas.toDataURL(outputFormat);\n const sizeOfTheImageTmp = this.calulateImageSize(tmpResult, outputFormat);\n\n if (sizeOfTheImageTmp / targetSize < 0.5 || sizeOfTheImageTmp === 0) {\n divideStrategy = divideStrategy / 2;\n if (divideStrategy < 1) {\n iteratorLimit = 0;\n }\n } else {\n this.mainCanvas = canvas;\n result = tmpResult;\n }\n\n this.mainCanvas = canvas;\n }\n\n return result;\n }\n\n calulateImageSize(imgString: string, outputFormat: string): number {\n switch (outputFormat) {\n case 'image/jpeg':\n outputFormat = 'image/jpg';\n break;\n default:\n outputFormat = 'image/jpg';\n break;\n }\n return Math.max(\n 0,\n Math.round(\n ((imgString.length - ('data:' + outputFormat + ';base64,').length) *3) / 4 \n )\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport jsPDF from 'jspdf';\n@Injectable({ \n providedIn: 'root' \n}) \nexport class RoomAdminService { \n \n public doc = new jsPDF();\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img, name, isForLevels = false, level): string | HTMLCanvasElement | HTMLImageElement {\n // TO DO : move to enum/utility file, while room detail more editable field developement \n const width = 500;\n const height = 550;\n const arcY = 300;\n const arc_X_Center = width/2;\n const otrRadius = arc_X_Center - 2 ;\n const whtRadius = otrRadius - 12;\n const innrRadius = otrRadius - 15;\n \n const canvas: HTMLCanvasElement = document.createElement('canvas');\n canvas.setAttribute('width', width.toString());\n canvas.setAttribute('height', height.toString());\n const ctx = canvas.getContext('2d');\n \n ctx.strokeStyle = \"transparent\";\n ctx.moveTo(arc_X_Center, 0);\n ctx.lineTo(arc_X_Center, height);\n ctx.stroke(); \n \n ctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.textAlign = \"center\"; \n ctx.fillText( isForLevels ? name : name + ' (L-' + level + \")\", arc_X_Center, 20 ); \n\n //oputer arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n //inner white arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#FFFFFF';\n ctx.fill();\n ctx.stroke();\n \n //second inner arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n // header text\n ctx.fillStyle = '#FFFFFF';\n ctx.font = '44px Bower';\n ctx.fillText( isForLevels ? 'Book a room' : 'Book Me', arc_X_Center, 166);\n \n //centeral rectangle\n ctx.fillRect(137, 187, 225, 225);\n //fill central rectangle with color\n ctx.fillStyle = '#FFFFFF';\n \n // fill text at the bottom\n ctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.fillText('in Converge', arc_X_Center, 470);\n \n // draw QR code image into center of canvas\n img !== null && ctx.drawImage(img, 137, 187);\n \n // create data url\n const dataURL: string | HTMLCanvasElement | HTMLImageElement =\n canvas.toDataURL('image/png');\n return dataURL;\n }\n \n}","import { Directive, HostListener, HostBinding, Output, EventEmitter, Input } from '@angular/core';\nimport { RequiredFileType } from './room-admin-utility';\n\n@Directive({\n selector: '[fileDragDrop]'\n})\n\nexport class FileDragNDropDirective {\n //@Input() private allowed_extensions : Array = ['png', 'jpg', 'bmp'];\n @Output() private filesChangeEmiter : EventEmitter = new EventEmitter();\n //@Output() private filesInvalidEmiter : EventEmitter = new EventEmitter();\n @HostBinding('style.background') private background = ''; //'#eee';\n @HostBinding('style.border') private borderStyle = '2px solid'; //'2px dashed';\n @HostBinding('style.border-color') private borderColor = '#E6E6E6';\n @HostBinding('style.border-radius') private borderRadius = '1px';\n\n constructor() { }\n\n @HostListener('dragover', ['$event']) public onDragOver(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = 'lightgray';\n this.borderColor = 'cadetblue';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('dragleave', ['$event']) public onDragLeave(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('drop', ['$event']) public onDrop(evt){\n evt.preventDefault();\n evt.stopPropagation();\n const ext = RequiredFileType.split(',');\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n // debugger;\n let files = [...new Set(evt.dataTransfer.files)].filter((f:File) => ext.includes(f.type)); //evt.dataTransfer.files;\n // let valid_files : Array = files;\n this.filesChangeEmiter.emit(files);\n }\n}","import { DropdownOpion } from '@mckinsey-converge/ui';\n\nexport interface RoomSubset {\n\tinternal: DropdownOpion[];\n\texternal: DropdownOpion[];\n}\n\nexport interface room {\n\troomname: string;\n\troomnumber: number;\n\tcity: string;\n\tlevel: number;\n\tcapacity: number;\n\troomtype: string;\n\troomvisibility: boolean;\n\tvc: boolean;\n\tconference_phone: boolean;\n\twireless_content_sharing: boolean;\n\tflipchart: boolean;\n\tglassboard: boolean;\n\twhiteboard: boolean;\n\tnatural_light: boolean;\n\tboardroom: boolean;\n\tcocktail: boolean;\n\ttheatre: boolean;\n\tworkshop: boolean;\n\tushape: boolean;\n\tmiscellaneous: boolean;\n}\n\nexport const roomTypeOptions: DropdownOpion[] = [\n { display: 'Internal', value: 'internal', meta: {} },\n { display: 'External', value: 'external', meta: {} },\n\t]\n\nexport const roomSubsetOptions: RoomSubset = {\n\t'external': [\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t],\n\t'internal': [\n\t\t{ display: 'Meeting', value: 'meeting', meta: {} },\n\t\t{ display: 'Partner', value: 'partner', meta: {} },\n\t\t{ display: 'Phonebooth', value: 'phonebooth', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t]\n}\n\nexport const roomVisibilityOptions: DropdownOpion[] = [\n\t{ display: 'Bookable', value: 'true', meta: {} },\n\t{ display: 'Non-bookable', value: 'false', meta: {} },\n]\n\nexport const canteringAvailabilityOptions: DropdownOpion[] = [\n\t{ display: 'Yes - Onsite', value: 'yes-onsite', meta: {} },\n\t// { display: 'Yes - Offsite', value: 'yes-offsite', meta: {} },\n\t{ display: 'No', value: 'no', meta: {} },\n]\n\nexport const RoomPhotoDiamension = {\n\twidth: 400,\n\theight: 225\n}\n\nexport const RequiredFileType = 'image/png,image/jpg,image/jpeg,image/webp';\n\nexport function timestamp(){ \n\treturn (new Date()).getTime(); \n} \n","import {\n NgModule,\n Type\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { EditorModule } from '@tinymce/tinymce-angular';\nimport { ComposerModule } from '@placeos/composer';\n\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CdkTableModule } from '@angular/cdk/table';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\nimport { APipesModule } from '@acaprojects/ngx-pipes';\nimport { ACustomEventsModule } from '@acaprojects/ngx-custom-events';\nimport { LoginComponent } from '../login/login.component';\nimport { TopbarHeaderComponent } from '../components/topbar-header/topbar-header.component';\n\nimport {\n CdkDropListScrollContainer,\n ReplacePipe\n} from '@mckinsey-converge/base';\nimport { SidebarComponent } from '../components/sidebar/sidebar.component';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { AccessDenied } from '../components/access-denied/access-denied.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst COMPONENTS: Type[] = [\n LoginComponent,\n TopbarHeaderComponent,\n SidebarComponent,\n AccessDenied\n];\n\nconst DIRECTIVES: Type[] = [\n CdkDropListScrollContainer\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\nconst CDK_MODULES: any[] = [\n ScrollingModule,\n DragDropModule,\n CdkTableModule\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n ...DIRECTIVES,\n ReplacePipe\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n APipesModule,\n ACustomEventsModule,\n RouterModule,\n EditorModule,\n ComposerModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n UiModule\n ],\n exports: [\n APipesModule,\n ACustomEventsModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...COMPONENTS,\n ...DIRECTIVES,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n ReplacePipe\n ]\n})\nexport class SharedContentModule {\n}\n","import { Component, OnInit } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLoadingState, LoadingState } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-shell-wrapper',\n templateUrl: './shell.component.html',\n styleUrls: ['./shell.component.scss'],\n})\nexport class ShellWrapperComponent extends BaseDirective implements OnInit {\n /** Loading state of the application */\n public loading_state: ApplicationLoadingState;\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n /** Whether the user needs to login */\n public get show_login(): boolean {\n return !this._users.is_logged_in;\n }\n\n /** Whether a module is still loading data */\n public get is_loading(): boolean {\n if (this.loading_state) {\n for (const mod in this.loading_state) {\n if (this.loading_state[mod] && this.loading_state[mod].state === 'loading') {\n return true;\n }\n }\n }\n return false;\n }\n\n /** List of modules with a loading state */\n public get loading_state_list(): LoadingState[] {\n const list: LoadingState[] = [];\n for (const mod in this.loading_state) {\n if (this.loading_state[mod]) {\n list.push(this.loading_state[mod]);\n }\n }\n return list;\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'loading',\n this._service.listen('loading').subscribe((loading) => {\n this.loading_state = loading;\n })\n );\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.logo = this._service.setting('app.logo_dark') || { type: 'icon' };\n });\n }\n}\n","\n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n \n
\n
Converge is loading
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseClass, Identity } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-event-form',\n templateUrl: './event-form.component.html',\n styleUrls: ['./event-form.component.scss'],\n})\nexport class EventFormComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Booking details to display */\n @Input() public form: FormGroup;\n\n /** List of attendees in the booking */\n public attendees: User[] = [];\n\n constructor() {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.event || changes.form) {\n this.attendees = this.form?.value.attendees || [];\n this.subscription(\n 'attendees',\n this.form\n .get('attendees')\n ?.valueChanges.subscribe((l) => (this.attendees = l || []))\n );\n }\n }\n\n public addVisitor() {\n const list = this.form.controls.attendees.value;\n const visitor = new User({ visitor: true, external: true, email: '' })\n list.push(visitor);\n //** Create visitor form group */\n const visitorFG = this.createVisitor(visitor);\n //** Push to visitor form array */\n this.getVisitors.push(visitorFG);\n this.form.controls.attendees.setValue(list);\n this.form.markAsDirty();\n }\n\n /**\n * Create visitor form group\n */\n createVisitor(visitor) {\n return new FormGroup({\n name: new FormControl(visitor.name, {validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(visitor.email, { validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n /** Replace visitor with updated values */\n public replaceVisitor(item: User, index: number) {\n const attendees = this.attendees;\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n attendees.splice(actualIndex, 1, item);\n this.form.controls.attendees.setValue(attendees);\n this.form.markAsDirty();\n }\n\n\n /** Remove visitor from attendee list */\n public removeVisitor(item: User, index: number) {\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n const attendees = this.attendees.filter((_, i) => i !== actualIndex);\n this.form.controls.attendees.setValue(attendees);\n \n if (index > -1) {\n this.getVisitors.removeAt(index);\n }\n this.form.markAsDirty();\n }\n\n /**\n * Get the visitor form array \n */\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n public trackByFn(index: number, item: Identity) {\n return index;\n }\n\n getFilteredAttendees() {\n return this.attendees.filter(item => item.external || item.visitor);\n }\n \n getFormControl(i: number) {\n return this.getVisitors.at(i);\n }\n}\n","
\n
\n
\n
\n \n
\n
{{ event.start_time }} - {{ event.duration > 0 ? event.end_time : '' }}
\n
\n
S
\n
{{ event.organiser?.name }}
\n
\n
\n \n \n \n Title is required\n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n \n
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-form',\n templateUrl: './visitor-form.component.html',\n styleUrls: ['./visitor-form.component.scss'],\n})\nexport class VisitorFormComponent extends BaseDirective {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Emitter for changes to the person */\n @Output() public personChange = new EventEmitter();\n /** Form fields for visitor details */\n // public form: FormGroup;\n @Input() public form: FormGroup\n\n constructor(private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void { \n this.form.valueChanges.subscribe( values => {\n this.person = new User({ ...values, visitor: true, external: true });\n this.personChange.emit(this.person);\n })\n }\n\n \n}\n","
\n \n
\n
\n
\n
\n \n \n \n Name is required\n \n
\n
\n \n \n \n A valid email address is required\n \n
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, Validators, FormControl, FormBuilder, FormArray } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nexport interface VisitorsFormModalData {\n /** Details of visitor listing */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-visitors-form-modal',\n templateUrl: './visitors-form-modal.component.html',\n styleUrls: ['./visitors-form-modal.component.scss'],\n})\nexport class VisitorsFormModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for visitor booking */\n public form: FormGroup;\n /** Display string for the loading state */\n public loading: string;\n attendeesStatus: boolean = true;\n\n /** Visitor booking data */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Whether form fields contain an attendee */\n public get has_attendees() {\n return (\n this.form &&\n this.form.controls.attendees.value &&\n this.form.controls.attendees.value.length\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n private fb: FormBuilder,\n @Inject(MAT_DIALOG_DATA) private _data: VisitorsFormModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this.form = new FormGroup({\n title: new FormControl(this.booking.title, [Validators.required]),\n attendees: new FormControl([...this.booking.attendees], [Validators.minLength(1)]),\n visitors: this.fb.array([])\n });\n if (this.booking.id) {\n this.form.controls.title.disable();\n }\n\n /** \n * Create visitor form for existing visitors\n */\n this.booking.attendees.forEach( (el) => {\n if(el.external || el.visitor) {\n const visitorFG = this.createVisitor(el.name, el.email);\n this.getVisitors.push(visitorFG);\n // (this.form.controls.visitors).markAsTouched();\n }\n });\n }\n\n createVisitor(name, email) {\n return new FormGroup({\n name: new FormControl(name, { validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(email, {validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n /** Delete visitor booking */\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: 'Delete meeting',\n content: 'Are you sure you wish to delete this meeting?',\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n /* istanbul ignore else */\n if (this.booking.id) {\n this.loading = 'Deleting visitor booking...';\n this._dialog_ref.disableClose = true;\n this.booking.delete().then(\n () => {\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess('Successfully removed visitors.');\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to remove visitors. Error: ${err.message || err}`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n }\n ref.close();\n })\n );\n }\n\n /** Save changes to visitor booking */\n public save() {\n this.timeout('save', () => {\n this.loading = 'Saving visitor booking...';\n this.form.markAllAsTouched();\n this._dialog_ref.disableClose = true;\n /* istanbul ignore else */\n if (this.form.dirty && this.form.valid) {\n const attendees = this.form.controls.attendees.value;\n for (const attendee of attendees) {\n if (!attendee.email) {\n attendee.email = `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`;\n }\n }\n const new_booking = new Booking({ ...this.booking.toJSON(), ...this.form.value });\n this._bookings.save(new_booking).then(\n (bkn) => {\n this.event.emit({ reason: 'done', metadata: bkn });\n this._service.notifySuccess(\n this.booking.id\n ? 'Successfully updated visitors.'\n : 'Successfully added visitors.'\n );\n this._booking_state.replace(new Booking({ ...this.booking, ...bkn.toApiJSON() }));\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to ${this.booking.id ? 'update' : 'add'} visitors. Error: ${\n err.message || err\n }`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n else {\n this.loading = null;\n this._dialog_ref.disableClose = false;\n this._dialog_ref.close();\n }\n });\n }\n}\n","
\n
{{ booking.id ? 'Edit' : 'New' }} Visitors
\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from '../../overlays/visitors-form-modal/visitors-form-modal.component';\nimport { BaseClass, unique } from '@mckinsey-converge/base';;\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-booking',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class VisitorBookingItemComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Whether attendee list should be shown */\n public show_attendees: boolean;\n /** Whether all the attendees have checked in */\n public checked_in: boolean = false;\n /** Whether all attendees are being checked in */\n public loading: boolean;\n\n public matched_attendees = [];\n\n /** Whether event will start soon or has started */\n public get upcoming() {\n const status = this.event.timeBasedStatusLabel;\n return status === 'upcoming' || status === 'in_progress';\n }\n\n /** Display string for checkin statuses of all attendees */\n public get status(): string {\n const { checked_in, count } = this.checkedInStatus();\n return `${checked_in} / ${count}`;\n }\n\n\n /** Whether user is a match for */\n public is_match(person: any): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n !search ||\n person.name.toLowerCase().indexOf(search) >= 0 ||\n person.email.toLowerCase().indexOf(search) >= 0\n );\n }\n\n constructor(private _service: ApplicationService, private _bookings: BookingsService, private _dialog: MatDialog) {\n super();\n }\n\n public checkedInStatus() {\n const checked_in_users = this.event.checkInsArray;\n return this.event.attendees.reduce(\n (counts, user) => {\n /* istanbul ignore else */\n if (user.external) {\n counts.count++;\n /* istanbul ignore else */\n if (checked_in_users.indexOf(user.email) >= 0) {\n counts.checked_in++;\n }\n }\n return counts;\n },\n { checked_in: 0, count: 0 }\n );\n }\n\n /**\n * Checkin the attendee\n */\n public async checkin() {\n this.loading = true;\n const value = await this._bookings\n .checkin(this.event.id, {\n host_email: this.event.organiser.email,\n attendees: unique(this.event.attendees.map(user => ({ name: user.name, email: user.email }))),\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n })\n .catch((err) => {\n this._service.notifyError(`Error checking in all attendees for booking. Error: ${err.message || err}`);\n });\n if (value) {\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins: value.check_ins\n });\n this.checked.emit();\n }\n this.loading = false;\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n const subject = encodeURIComponent(\n `${this.event.title}\" at ${this.event.start_time}, ${this.event.date_string}`\n );\n return `mailto:${this.event.attendees.filter(user => !user.email.includes('@guest'))\n .map((user) => user.email)\n .join(',')}?Subject=${subject}\"`;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.search) {\n if (!this.search) this.show_attendees = false;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n this.timeout('on_search', () => this.show_attendees = !!this.search, 50);\n }\n if (changes.event) {\n const { checked_in, count } = this.checkedInStatus();\n this.checked_in = checked_in >= count;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n }\n }\n\n public openEditModal() {\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking: this.event,\n },\n }\n );\n }\n}\n","
\n
\n
\n \n
\n
\n \n {{ event.start_time }}\n - {{ event.duration > 0 ? event.end_time : '' }}\n \n All Day\n
\n
\n
{{ event.organiser?.name }}
\n
\n
{{ event.company.length }}
\n
{{ event.title }}
\n
{{ event.multi_rooms?.simple_name || event.local_room_name }}
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n \n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, convertTimezonedTimestampToLocalDateTz} from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'visitor-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class VisitorTimelineComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Filter string */\n @Input() public search: string;\n /** Whether all bookings should be shown */\n @Input() public show_all: boolean;\n /** List of visitor bookings for the current date */\n public bookings: Booking[] = [];\n /** List of filtered bookings */\n public filtered_bookings: Booking[] = [];\n /** Whether visitor list is loading */\n public loading: boolean;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n\n public get nowTz(){\n return DateNow(new Date())\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _bookings: BookingStateService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._bookings.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .subscribe((_) => {\n this.search$.next(`${this.dateTz.ms}|${_.id}`);\n this._bookings.setZone(_.id);\n })\n );\n this.subscription(\n 'bookings',\n this._bookings.filtered.subscribe((list) => this.updateEvents(list))\n );\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz) {\n this.search$.next(`${this.dateTz.ms}`);\n }\n /* istanbul ignore else */\n if (changes.search || changes.show_all) {\n this.filtered_bookings = this.filter(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, booking: Booking) {\n return booking.id;\n }\n\n public resetPolling() {\n this.interval(\n 'update_bookings',\n () => this.search$.next(`${this.dateTz.ms}|${this.nowTz.ms}`),\n 30 * 1000\n );\n }\n\n /** Filter the visitor bookings */\n public filter(str: string = '') {\n const search = str.toLowerCase();\n return this.bookings\n .filter((booking) => {\n return (\n booking.attendees.find(\n (user) =>\n user.name.toLowerCase().indexOf(search) >= 0 ||\n user.email.toLowerCase().indexOf(search) >= 0\n ) ||\n booking.title.toLowerCase().includes(search) ||\n booking.local_room_name.toLowerCase().includes(search)\n );\n })\n .filter((bkn) => (this.show_all ? true : bkn.has_visitors));\n }\n\n private updateEvents(list: Booking[]) {\n const unsorted_bookings = list.filter(\n (bkn) =>\n !bkn.declined &&\n bkn.room.zones.includes(this._org.building.id)\n );\n const bookings = unsorted_bookings.sort((a, b) => {\n if (a.date === b.date) {\n if (a.creator.name === b.creator.name) {\n return a.space.name > b.space.name ? 1 : -1;\n }\n return a.creator.name > b.creator.name ? 1 : -1;\n }\n return a.date > b.date ? 1 : -1;\n })\n this.bookings = bookings;\n this.filtered_bookings = this.filter(this.search);\n }\n}\n","
\n
\n \n
\n
\n
\n
Time
\n
Host
\n
Company
\n
Title
\n
Location
\n
Status
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
\n No visitors {{ search ? 'matching ' + '\"' + search + '\"' : '' }} for {{ date_display }}\n
\n
\n
\n","import { Component, Input, SimpleChanges, Renderer2, ElementRef, OnChanges, Output, EventEmitter} from '@angular/core';\n\nimport { BookingCheckinParams, User } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor',\n templateUrl: './visitor.component.html',\n styleUrls: ['./visitor.component.scss'],\n})\nexport class VisitorComponent implements OnChanges {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Status of the visitor */\n public status: string;\n /** Whether attendee is being checked in */\n public loading: boolean;\n\n /** Whether attendee is late */\n public get late() {\n return this.event.timeBasedStatusLabel === 'in_progress' && this.person.external;\n }\n\n /** Whether attendee has checked in */\n public get approved() {\n return this.event.checkInsArray.includes(this.person.email);\n }\n\n /** Whether user is a match for */\n public get is_match(): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n this.person.name.toLowerCase().indexOf(search) >= 0 ||\n this.person.email.toLowerCase().indexOf(search) >= 0 ||\n this.event.title.toLowerCase().indexOf(search) >= 0 ||\n this.event.local_room_name.toLowerCase().indexOf(search) >= 0\n );\n }\n\n public get invalid_email(): boolean {\n return !this.person.email || this.person.email.includes('@guest.mckinsey.com');\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n return `mailto:${this.person.email}?subject=\"${this.event.title}\"%20at%20${\n this.event.start_time\n },%20${this.event.date_string}${\n this.event.organiser.email.toLowerCase() !== this.person.email\n ? '&cc=' + this.event.organiser.email\n : ''\n }`;\n }\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _bookings: BookingsService,\n private _service: ApplicationService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.search) {\n if (this.search && !this.is_match) {\n this._renderer.addClass(this._element.nativeElement, 'not-match');\n } else {\n this._renderer.removeClass(this._element.nativeElement, 'not-match');\n }\n }\n }\n\n /**\n * Checkin the attendee\n */\n public checkin() {\n this.loading = true;\n const fields: BookingCheckinParams= {\n host_email: this.event.organiser.email,\n attendees: [{ name: this.person.name, email: this.person.email }],\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n };\n this._bookings.checkinIndividualVisitor(this.event.id, fields).subscribe(result => {\n const check_ins = {...result.check_ins};\n check_ins[this.person.email] = true;\n this.event.check_ins = result.check_ins;\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins,\n });\n this.checked.emit();\n this.loading = false;\n }); \n }\n\n\n public get companyString(){\n return this.person.external ? this.event.company.join(',') : 'Mckinsey'\n }\n}\n","\n \n\n
\n
\n
{{ person?.name || person?.email }}
\n
\n
{{ companyString }}
\n
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-visitors',\n templateUrl: './visitors.component.html',\n styleUrls: ['./visitors.component.scss'],\n})\nexport class VisitorsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Search filter string */\n public search_str: string;\n /** Whether all bookings should be listed */\n public show_all: boolean;\n\n public get has_visitor_space(): boolean {\n const building = this._org.building;\n return building && !!this._spaces.find(building.visitor_space || building.holding_bay);\n }\n\n public has_access: boolean;\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Visitors';\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building')?.subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id },\n });\n })\n );\n })\n }\n\n public newVisitorMeeting() {\n const now = DateNow(new Date());\n const date = now.setValue({ minute: Math.ceil(now.minutes / 5) * 5 });\n const building = this._org.building;\n const space = this._spaces.find(building.visitor_space || building.holding_bay);\n const booking = new Booking({ \n start_epoch: date.seconds,\n end_epoch: date.addValue({ minutes: 60 }),\n room: space\n });\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking,\n },\n }\n );\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n \n \n \n
\n \n All meetings\n \n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Route, RouterModule } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { VisitorsComponent } from './visitors.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { VisitorTimelineComponent } from './timeline/timeline.component';\nimport { VisitorBookingItemComponent } from './timeline/item/item.component';\nimport { VisitorComponent } from './timeline/visitor/visitor.component';\nimport { VisitorsFormModalComponent } from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { EventFormComponent } from './overlays/visitors-form-modal/event-form/event-form.component';\nimport { VisitorFormComponent } from './overlays/visitors-form-modal/visitor-form/visitor-form.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: VisitorsComponent },\n { path: ':level', component: VisitorsComponent },\n { path: '**', redirectTo: '' },\n];\n\n@NgModule({\n declarations: [\n VisitorsComponent,\n VisitorTimelineComponent,\n VisitorBookingItemComponent,\n VisitorComponent,\n VisitorsFormModalComponent,\n EventFormComponent,\n VisitorFormComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n ],\n})\nexport class VisitorsModule {}\n","import { EnvironmentData } from '@mckinsey-converge/environment';\n\nexport const environment: EnvironmentData = {\n production: true,\n hmr: false,\n heap_io_id: 91016686,\n};\n","/**\n * GENERAL APPLICATION SETTINGS\n */\nimport { SettingsData } from '@mckinsey-converge/data-common';\n\nconst general = {\n menu: {\n items: [\n {\n name: 'Day View',\n route: '/day-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'wb_sunny',\n },\n },\n {\n name: 'Week View',\n route: '/week-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'date_range',\n },\n },\n {\n name: 'Catering',\n route: '/catering',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'room_service',\n },\n },\n {\n name: 'Visitors',\n route: '/visitors',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'face',\n },\n },\n {\n name: 'Reports',\n route: '/reports',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'warning',\n },\n },\n {\n name: 'Room Admin',\n route: '/room-admin',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'settings',\n }\n },\n ],\n copyright: 'PlaceOS',\n },\n};\n/*=========================*\\\n|| BOOKING FLOW SETTINGS ||\n\\*=========================*/\nconst booking = {\n booking_types: [\n { name: 'Internal', id: 'internal' },\n { name: 'External', id: 'external' },\n ],\n show_fields: [\n 'attendees',\n 'body',\n 'catering',\n 'dateTz',\n 'duration',\n 'organiser',\n 'title',\n 'type',\n 'all_day',\n 'has_catering',\n 'is_recurrent',\n 'company',\n 'is_multiroom',\n 'merged'\n ],\n html_body: false,\n multiple_spaces: true,\n desk_start: 9,\n};\n\n/*=========================*\\\n|| DAY VIEW SETTINGS ||\n\\*=========================*/\nconst day_view = {\n dragdrop: true,\n};\n\n/*=========================*\\\n|| VISITORS SETTINGS ||\n\\*=========================*/\nconst visitors = {};\n\n/*=========================*\\\n|| REPORTS SETTINGS ||\n\\*=========================*/\nconst reports = {};\n/**\n * ROOT APPLICATION SETTINGS\n */\nconst app = {\n title: 'McKinsey Concierge',\n description: 'McKinsey Concierge UI written with Angular Framework',\n short_name: 'CONCIERGE',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: '#0a0d2e',\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: '',\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/concierge/'\n },\n general,\n booking,\n day_view,\n visitors,\n reports,\n};\n\n/**\n * ROOT SETTIGNS\n */\nexport const DEFAULT_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/concierge',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false,\n },\n app,\n mock: false,\n frontend: 'concierge',\n};\n","\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"]} \ No newline at end of file +{"version":3,"sources":["webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/angular-animations.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/animations/src/lib/animations.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/base.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/cdk-drop-list-scroll-container.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/date.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/general.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/image.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/numbers-only.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/base/src/lib/replace.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.reducer.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/bookings/src/lib/bookings.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/buildings/src/lib/buildings.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/api.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/app.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base-api.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/base.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking-filter.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.data.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.form.spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.selectors.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/booking.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/booking/room-results/room-results.viewmodel.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking-state.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.types.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/booking.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookings.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/bookingsPaginated.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/bookings/space.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-categories.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-category.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-item.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-items.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-menu.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-notes.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering-order.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/catering.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/catering/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/close-modal-dialog-service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/collapse-accordion-service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/data-common.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/hotkeys.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/location/location.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/building.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/level.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/organisation/organisation.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/paginated.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/recurrence/recurrence.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/report.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/reports/reports.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/service-manager.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/settings.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/space.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spaces/spaces.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/spec-helpers.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/user.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/users/users.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/data-common/src/lib/validation.utilities.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/date-tz/src/lib/date-tz.class.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/environment.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/environment/src/lib/version.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-confirm/booking-confirm.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/booking-form/booking-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-confirm-modal/catering-confirm-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/catering-details-modal/catering-details-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/confirm-modal/confirm-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/legacy-overlays.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/new-user-modal/new-user-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/no-catering-modal/no-catering-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/requirement-details-modal/requirement-details-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/space-select-modal/space-select-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-overlays/src/lib/user-form/user-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/action-icon/action-icon.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/item/item.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/bookings/catering/package-options-modal/package-options-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/cng-search-bar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/cng-search-bar/hover-class.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/action-field/action-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/counter/counter.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/date-field/date-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/duration-field/duration-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/time-field/time-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-list-field/user-list-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/custom-fields/user-search-field/user-search-field.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/feedback/feedback.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/icon/icon.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/legacy-ui.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/popout-menu/popout-menu.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/searchbar/searchbar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/legacy-ui/src/lib/user-avatar/user-avatar.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.model.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/src/lib/loading.selectors.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/effects.testing.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/loading/testing/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/rooms/src/lib/rooms.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/localstorage.wrapper.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/storage/src/lib/storage.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/aca-date-picker/aca-date-picker.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/alert-banner/alert-banner.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/auto-complete-chip-select-item.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-chip-select-item/groupHeader.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/auto-complete-select-option/auto-complete-select-option.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/base-template.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select-options.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/cng-select.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/cng-select/dropdown-trigger-for.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/collapse-header/collapse-header.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflict-alert-modal/conflict-alert-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/conflicts-modal/conflicts-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/custom-snackbar-component/custom-snackbar-component.service.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-calendar-widget/date-tz-calendar-widget.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-date-picker/date-tz-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-duration-field/date-tz-duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/date-tz-time-field/date-tz-time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/duration-field/duration-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/error-message/error-message.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/calendar-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/calendar/chevron-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/icons/close/close-icon.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/informational-image/informational-image.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/label/label.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/legend-dropdown/legend-dropdown.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/mck-date-picker/mck-date-picker.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal-button-row/modal-button-row.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/modal/modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/override-changes-modal/override-changes-modal.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/filter.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/pipes/sanitise.pipe.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/radio-select/radio-select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-booking-form/recurrence-booking-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-date-form/recurrence-date-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/recurrence-pattern-form/recurrence-pattern-form.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select-option/select-option.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/select/select.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/selected-chip-count/selected-chip-count.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/spacer/spacer.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/switch-group/switch-group.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/time-field/time-field.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/toggle/toggle.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.directive.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/tooltip/tooltip.enums.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/types.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/ui.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/utils/time.utils.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/ui/src/lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component.html","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/index.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.actions.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.effects.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.module.ts","webpack:///home/runner/work/mckinsey-converge/mckinsey-converge/libs/user/src/lib/user.reducer.ts","webpack:///$_lazy_route_resource lazy namespace object","webpack:///src/app/app-routing.module.ts","webpack:///src/app/app.component.ts","webpack:///src/app/app.component.html","webpack:///src/app/app.module.ts","webpack:///src/app/bookings/booking-modal/booking-modal.component.ts","webpack:///src/app/bookings/booking-modal/booking-modal.component.html","webpack:///src/app/bookings/booking-modal/catering/catering.component.ts","webpack:///src/app/bookings/booking-modal/catering/catering.component.html","webpack:///src/app/bookings/booking-modal/catering/order-details/category/category.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-details/category/category.component.html","webpack:///src/app/bookings/booking-modal/catering/order-details/order-details.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-details/order-details.component.html","webpack:///src/app/bookings/booking-modal/catering/order-list/item/item.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-list/item/item.component.html","webpack:///src/app/bookings/booking-modal/catering/order-list/order-list.component.ts","webpack:///src/app/bookings/booking-modal/catering/order-list/order-list.component.html","webpack:///src/app/bookings/booking-modal/find-space/filters/filters.component.ts","webpack:///src/app/bookings/booking-modal/find-space/filters/filters.component.html","webpack:///src/app/bookings/booking-modal/find-space/find-space.component.ts","webpack:///src/app/bookings/booking-modal/find-space/find-space.component.html","webpack:///src/app/bookings/booking-modal/find-space/item/item.component.ts","webpack:///src/app/bookings/booking-modal/find-space/item/item.component.html","webpack:///src/app/bookings/booking-modal/form/form.component.ts","webpack:///src/app/bookings/booking-modal/form/form.component.html","webpack:///src/app/bookings/bookings.module.ts","webpack:///src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.ts","webpack:///src/app/bookings/delete-confirm-modal/delete-confirm-modal.component.html","webpack:///src/app/calendar/calendar.module.ts","webpack:///src/app/calendar/day-view/approvals-view/approvals-view.component.ts","webpack:///src/app/calendar/day-view/approvals-view/approvals-view.component.html","webpack:///src/app/calendar/day-view/approvals-view/event/event.component.ts","webpack:///src/app/calendar/day-view/approvals-view/event/event.component.html","webpack:///src/app/calendar/day-view/day-view.component.ts","webpack:///src/app/calendar/day-view/day-view.component.html","webpack:///src/app/calendar/day-view/day-view.module.ts","webpack:///src/app/calendar/day-view/space/event/event.component.ts","webpack:///src/app/calendar/day-view/space/event/event.component.html","webpack:///src/app/calendar/day-view/space/space.component.ts","webpack:///src/app/calendar/day-view/space/space.component.html","webpack:///src/app/calendar/day-view/timeline/timeline.component.ts","webpack:///src/app/calendar/day-view/timeline/timeline.component.html","webpack:///src/app/calendar/meeting-details-modal/catering/catering.component.ts","webpack:///src/app/calendar/meeting-details-modal/catering/catering.component.html","webpack:///src/app/calendar/meeting-details-modal/details/details.component.ts","webpack:///src/app/calendar/meeting-details-modal/details/details.component.html","webpack:///src/app/calendar/meeting-details-modal/meeting-details-modal.component.ts","webpack:///src/app/calendar/meeting-details-modal/meeting-details-modal.component.html","webpack:///src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.ts","webpack:///src/app/calendar/meeting-details-modal/private-details-modal/private-details-modal.component.html","webpack:///src/app/calendar/meeting-details-modal/private-details/private-details.component.ts","webpack:///src/app/calendar/meeting-details-modal/private-details/private-details.component.html","webpack:///src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.ts","webpack:///src/app/calendar/meeting-details-modal/recurring-details/recurring-details.component.html","webpack:///src/app/calendar/meeting-details-modal/requirements/requirements.component.ts","webpack:///src/app/calendar/meeting-details-modal/requirements/requirements.component.html","webpack:///src/app/calendar/week-view/day-display/day-display.component.ts","webpack:///src/app/calendar/week-view/day-display/day-display.component.html","webpack:///src/app/calendar/week-view/day-display/item/item.component.ts","webpack:///src/app/calendar/week-view/day-display/item/item.component.html","webpack:///src/app/calendar/week-view/timeline/timeline.component.ts","webpack:///src/app/calendar/week-view/timeline/timeline.component.html","webpack:///src/app/calendar/week-view/week-view.component.ts","webpack:///src/app/calendar/week-view/week-view.component.html","webpack:///src/app/calendar/week-view/week-view.module.ts","webpack:///src/app/catering/catering.component.ts","webpack:///src/app/catering/catering.component.html","webpack:///src/app/catering/catering.module.ts","webpack:///src/app/catering/catering.storage.ts","webpack:///src/app/catering/menu/item-list/item-list.component.ts","webpack:///src/app/catering/menu/item-list/item-list.component.html","webpack:///src/app/catering/menu/item/item.component.ts","webpack:///src/app/catering/menu/item/item.component.html","webpack:///src/app/catering/menu/menu.component.ts","webpack:///src/app/catering/menu/menu.component.html","webpack:///src/app/catering/orders/item/item.component.ts","webpack:///src/app/catering/orders/item/item.component.html","webpack:///src/app/catering/orders/orders.component.ts","webpack:///src/app/catering/orders/orders.component.html","webpack:///src/app/catering/overlays/category-modal/category-modal.component.ts","webpack:///src/app/catering/overlays/category-modal/category-modal.component.html","webpack:///src/app/catering/overlays/group-modal/group-modal.component.ts","webpack:///src/app/catering/overlays/group-modal/group-modal.component.html","webpack:///src/app/catering/overlays/item-modal/item-modal.component.ts","webpack:///src/app/catering/overlays/item-modal/item-modal.component.html","webpack:///src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.ts","webpack:///src/app/catering/overlays/order-details-modal/booking-details/booking-details.component.html","webpack:///src/app/catering/overlays/order-details-modal/items/items.component.ts","webpack:///src/app/catering/overlays/order-details-modal/items/items.component.html","webpack:///src/app/catering/overlays/order-details-modal/messages/messages.component.ts","webpack:///src/app/catering/overlays/order-details-modal/messages/messages.component.html","webpack:///src/app/catering/overlays/order-details-modal/order-details-modal.component.ts","webpack:///src/app/catering/overlays/order-details-modal/order-details-modal.component.html","webpack:///src/app/components/access-denied/access-denied.component.ts","webpack:///src/app/components/access-denied/access-denied.component.html","webpack:///src/app/components/sidebar/sidebar.component.ts","webpack:///src/app/components/sidebar/sidebar.component.html","webpack:///src/app/components/topbar-header/topbar-header.component.ts","webpack:///src/app/components/topbar-header/topbar-header.component.html","webpack:///src/app/login/login.component.ts","webpack:///src/app/login/login.component.html","webpack:///src/app/reports/report-display/report-display.component.ts","webpack:///src/app/reports/report-display/report-display.component.html","webpack:///src/app/reports/report-table/report-table.component.ts","webpack:///src/app/reports/report-table/report-table.component.html","webpack:///src/app/reports/reports.component.ts","webpack:///src/app/reports/reports.component.html","webpack:///src/app/reports/reports.module.ts","webpack:///src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.ts","webpack:///src/app/room-admin/bulk-qr-overlay/bulk-qr-overlay.component.html","webpack:///src/app/room-admin/manage-photos/manage-photos.component.ts","webpack:///src/app/room-admin/manage-photos/manage-photos.component.html","webpack:///src/app/room-admin/room-admin-routing.module.ts","webpack:///src/app/room-admin/room-admin.component.ts","webpack:///src/app/room-admin/room-admin.component.html","webpack:///src/app/room-admin/room-admin.module.ts","webpack:///src/app/room-admin/room-details/room-details-wrapper.component.ts","webpack:///src/app/room-admin/room-details/room-details.component.ts","webpack:///src/app/room-admin/room-details/room-details.component.html","webpack:///src/app/room-admin/rooms-table/rooms-table-datasource.ts","webpack:///src/app/room-admin/rooms-table/rooms-table.component.ts","webpack:///src/app/room-admin/rooms-table/rooms-table.component.html","webpack:///src/app/room-admin/services/index.ts","webpack:///src/app/room-admin/services/read-local-pic.service.ts","webpack:///src/app/room-admin/services/resize.service.ts","webpack:///src/app/room-admin/services/room-admin.service.ts","webpack:///src/app/room-admin/util/file-drag-n-drop.directive.ts","webpack:///src/app/room-admin/util/room-admin-utility.ts","webpack:///src/app/shared/shared.module.ts","webpack:///src/app/shell/shell.component.ts","webpack:///src/app/shell/shell.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/event-form/event-form.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/visitor-form/visitor-form.component.html","webpack:///src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.ts","webpack:///src/app/visitors/overlays/visitors-form-modal/visitors-form-modal.component.html","webpack:///src/app/visitors/timeline/item/item.component.ts","webpack:///src/app/visitors/timeline/item/item.component.html","webpack:///src/app/visitors/timeline/timeline.component.ts","webpack:///src/app/visitors/timeline/timeline.component.html","webpack:///src/app/visitors/timeline/visitor/visitor.component.ts","webpack:///src/app/visitors/timeline/visitor/visitor.component.html","webpack:///src/app/visitors/visitors.component.ts","webpack:///src/app/visitors/visitors.component.html","webpack:///src/app/visitors/visitors.module.ts","webpack:///src/environments/environment.ts","webpack:///src/environments/settings.ts","webpack:///src/main.ts"],"names":["ANIMATION_SHOW_ENTER_LEAVE","trigger","transition","style","opacity","height","animate","ANIMATION_SHOW_CONTRACT_EXPAND","state","AnimationsModule","CommonModule","NgModule","imports","BaseClass","_timers","_intervals","_subscriptions","_initialised","BehaviorSubject","key","hasOwnProperty","clearTimeout","clearInterval","unsub","name","fn","delay","Function","setTimeout","Error","setInterval","Subscription","unsubscribe","getValue","BaseDirective","destroy","Directive","selector","BaseModule","NumbersOnlyDirective","declarations","exports","ScrollDirection","CdkDropListScrollContainer","_cdkDropList","_renderer","direction","X","last_scroll","x","y","changes","scrollContainer","element","nativeElement","closest","subscription","items","subscribe","list","toArray","forEach","i","index","listen","onDrop","onDrag","updateListPosition","timeout","scroll","scrollLeft","scrollTop","BOTH","Y","_dropListRef","_cacheOwnPosition","_siblings","isReceiving","CdkDrag","Input","ContentChildren","initialTime","mockDate","timeOverride","set","Date","resetDate","reset","closestToTimeSlot","date","stepMinute","start","millisecond","second","minute","Math","ceil","plus","minutes","closestToTimeSlotTz","dateTz","setValue","addValue","durationHumanized","duration","short","h","floor","d","m","weekDayMonthYearFormat","formatDate","extractDateFromInput","input","checkHour","startDate","dayjs","dayJsTimeFormatString","isValid","cleanedInput","times","split","undefined","length","dayJsHoursMinutes","month","year","hour","nearestStepToInput","step","currentStartDate","luxonDate","DateTime","fromMillis","valueOf","closestDate","toFormat","nearestDurationToInput","durationGroups","value","parseInt","indexOf","add","diff","closestDurationGroup","find","max","offset","reduce","previousValue","currentValue","resetSecondsOnTimestamp","timestamp","toMillis","formatDateWithSuffix","dateObj","day","getDate","toLocaleString","getFullYear","nthNumber","number","getListOfDateFormat","extend","utc","timezone","isToday","weekday","customParseFormat","log","type","msg","args","stream","force","app_name","window","debug","colors","console","getItemWithKeys","keys","map","slice","isMobileDevice","r","navigator","userAgent","match","isMobileSafari","agent","isAndroidChrome","padZero","str","toString","unique","array","filter","el","pos","arr","humaniseDuration","durationInput","size","singular","format","hours","filterList","fields","results","filters","toLowerCase","f","parts","push","word","count","regex","RegExp","sort","a","b","localeCompare","item_list","JSON","parse","stringify","item","match_count","match_index","field_list","matched","field","matches","replace","changed","tokens","k","join","matchToHighlight","timeToDate","time","DateNow","startOfValue","ms","randomInt","random","timeFormatString","is24HourTime","hoursMinutes","timezoneNameToDate","timeZoneName","zone","toZone","e","timezoneDisplay","gmtOffsetDisplay","timeWithZoneFormatString","toLocaleLowerCase","timeWithGmtOffsetFormatString","startEndTimeFormatString","startDateTz","endDateTz","startEndTimeWithZoneFormatString","dateLocalFormatString","comma","formatLocalDate","dateBuildingFormatString","shorterLocalDateFormatString","shorterBuildingDateFormatString","localeString","toLocaleTimeString","document","querySelector","getAttribute","language","downloadFile","filename","contents","createElement","setAttribute","encodeURIComponent","display","body","appendChild","click","removeChild","csvToJson","csv","lines","splice","v","line","part","jsonToCsv","json","Array","Object","valid_keys","detectIE","ua","msie","substring","trident","rv","edge","eventToPoint","event","MouseEvent","clientX","clientY","touches","flatten","an_array","stack","res","next","pop","isArray","reverse","seed","xmur3","rand","sfc32","predictableRandomInt","imul","charCodeAt","c","t","isLessThanBreakpoint","breakpoint","innerWidth","toTitleCase","toUpperCase","ImageDirective","_el","initalValue","stopPropagation","HostListener","ReplacePipe","from","to","Pipe","bookingStateSelector","bookings","loadBookingsWithQuery","createAction","props","loadHomepageBookingsResults","createLoadingAction","loadUpcomingBookingsResults","loadPastBookingsResults","loadCancelledBookingsResults","loadBookingByIdResults","clearBookingByIdResults","BookingsEffects","actions","bookingService","afterBookingsRequestResultsLoadOthersEffect","pipe","ofType","mergeMap","action","DateTZ","yourBookingsRequest","email","pagination","limit","show_cancelled","end_epoch","subtractValue","seconds","include_rooms","upcomingRequest","pastRequest","start_epoch","cancelledRequest","byIdRequest","id","effects","target","request","loadHomepageBookingsResultsEffect","createLoadingEffect","userBookings","loadUpcomingBookingsResultsEffect","loadPastBookingsResultsEffect","loadCancelledBookingsResultsEffect","loadBookingByIdResultsEffect","Effect","Injectable","BookingsModule","EffectsModule","forFeature","StoreModule","bookingsReducer","initialBookingsState","query","LoadingModel","empty","homepage","upcoming","past","cancelled","bookingById","createReducer","on","ons","initialBookingFormState","activeFormFilters","bookingFormReducer","storeBookingFormData","activeForm","payload","clearBookingFormData","openBookingSurvey","bookingCompleted","storeRoomFilters","clearRoomFilters","mapBookingToSelectOption","booking","loadBuildings","buildingStateSelector","buildings","selectLoadBuildingsSuccess","createSelector","selectors","optionalSuccess","selectBuildingOptionsGroupedByCity","success","mapped","Map","s","found","city","get","selectLevelByZoneId","param","levels","l","toQueryString","ApplicationService","store","analytics","_app_ref","_zone","_title","_settings","_hotkeys","_composer","_snackbar","_environment","snack","_subjects","_observers","isStable","first","_","run","waitForSettings","message","on_action","icon","content","openSnack","openSnackBar","notify","asObservable","initialised","init","setupComposer","select","selectCurrentUser","user","take","setupAnalytics","fmno","application","loading","composer","settings","protocol","location","host","domain","hostname","port","url","use_domain","origin","route","includes","mock","href","localStorage","getItem","config","scope","auth_uri","token_uri","redirect_uri","handle_login","local_login","setup","heap_io_id","heapIo","app_id","load","identify","frontend","isIt","_kioskFormFilter","title_suffix","setting","setTitle","getTitle","auth","api_endpoint","is_initialised","providedIn","BaseDataClass","raw_data","event_subject","Subject","events","_server_names","zone_id","_service","form","toJSON","Promise","resolve","reject","promise","update","then","metadata","task_name","parameters","task","obj","_changes","new_key","ServiceManager","serviceFor","BaseAPIService","settingsService","_subscribers","_promises","_compare","_list_filter","_name","_api_route","form_data","concierge","err","engine","endpoint","predicate","query_params","cache","result","http","process","processApiResult","catchError","error","of","new_item","post","injectConcierge","analyticsEvent","updateList","method","post_data","_task","put","removeItem","should_inject_concierge","apiSubRoute","token","sessionStorage","access_token","headers","HttpHeaders","requestOptions","q","label","raw_item","old_list","compareFn","new_list","mixed_list","spaceExtraFeatureToDisplayName","feature","SpaceFeatures","VideoConference","ConferencePhone","WirelessContentSharing","FlipChart","Glassboard","ElectronicWhiteboard","ConferenceRoom","TeamRoom","PartnerOffice","PhoneBooth","NaturalLight","BoardRoom","CocktailRoom","TheatreRoom","WorkshopRoom","UShapeRoom","Miscellaneous","Catering","instantBookOption","shortDisplay","instantBookOptions","mapSpaceFeaturesToSelectOption","roomEquipmentRequiredOptions","internalRoomTypeRequiredOptions","externalRoomTypeRequiredOptions","roomDetailsRequired","roomCateringAvailable","SpaceFilterReason","filterSpacesByAppliedFilters","formFilters","spaces","currentUser","isStaffMap","instantBook","some","onlyCatering","featureFilters","formFiltersEmpty","options","rulesCount","ruleReason","excludedByFiltersCount","statusMap","filteredSpaces","space","Space","raw_space","building","zones","rules","rulesForSpace","booking_rules","reason","valid","hide","hasAllFeatures","internalRoomTypeFilters","every","featuresArray","canBook","bookable","matchesType","bookingType","internal_or_external","hasCatering","has_catering","status","statusFromBookings","Booking","auto_approve","group","is_recurrent","availableOccurrences","totalOccurrences","buildingsInSameCity","meta","alternateBuildings","locationItem","specificReason","None","Filters","OfficeRules","AlternateBuildingsFound","DEFAULT_BOOKING_DURATION","internalBookingTypeOption","allBookingTypeOption","bookingTypeOptions","defaultRoomSizeOption","roomSizeOptions","roomSizeOptionsKiosk","roomCapacityToValue","roomSize","roomMaxCapacityToValue","roomFormDataToQuery","data","filteredLocationIds","groupChild","locations","capacity","capacity_max","is_multiroom","merged","recurrence_period","recurrence_interval","recurrence_endTz","recurrence_count","recurrence_starts","recurrence_exceptions","recurrence_days","ignore","now","defaultTestBookingForm","selectBookingFormsData","bookingForm","selectActiveForm","is_local_tz","building_tz","endTzDate","recEditingSearchPayload","SeriesAction","EDIT","selectBookingType","selectBookingLocations","groupHeader","selectIsInternal","selectFormFilters","selectRoomResultsFromState","roomStateSelector","loadRoomsForResults","model","selectRoomResultsFromState_map","loadRoomsForResultsMap","selectLaterThatDayResultsFromState","loadLaterThatDayResults","selectNextDayResultsFromState","loadNextDayResults","selectByIdResultsFromState","loadByIdResults","selectDiffSizeResultsFromState","loadDiffSizeResults","selectHomepageBookingsResultsFromState","selectUpcomingBookingsResultsFromState","selectPastBookingsResultsFromState","selectCancelledBookingsResultsFromState","selectBookingByIdResultsFromState","filterSpacesByAppliedFiltersIfSuccess","mutate","selectFilteredResults","selectMapFilteredResults","selectFilteredLaterDayResults","selectFilteredNextDayResults","selectFilteredByIdResults","selectFilteredDiffSizeResults","selectSelectedBuildingOptions","MAX_ABBREV_LOCATIONS","mapBuildingToSelectOption","dropdownOverride","code","address","groupId","mapCityToAllSelectOption","flattenDisplayOffices","grouped","toggleSelectedByGroup","selectedOptions","option","toSelect","selected","newGroup","remainingChildrenInGroup","o","ng","truncateLocationList","truncatedLocations","shouldTruncate","mapBuildingLevelToOption","level","flattenBuildingsWithLevels","flattenedLevels","placeholderRoute","num","setupRoomImages","componentReference","image_positions","rootFolderURL","fileSlug","imagesLoaded","foundImages","path","n","desiredImageName","desiredImage","pathname","tester","Image","onload","loadImages","src","bookingStatusDetails","image","text","title","roomHasCateringHours","catering_hours","cateringAllowed","disallowedStatus","opens","closed","end","openMinutes","closeMinutes","startOfDay","cateringOpenTime","cateringCloseTime","checkCollisions","service","availabilityParams","room_ids","breakdown","hide_bookings","recurrence_type","icaluid","available","start_time","end_time","has_conflict","bkn","b_setup","b_breakdown","recurrence_master_id","getStatusErrorMessage","RoomResultsViewModel","levelDisplay","short_name","local_name","office","mapResultsToViewModels","BookingStateService","_org","_spaces","ngZone","_poll","_long_poll","_long_poll_week","_bookings","_noOfMeetings","_filters","_dateTz","_loading","_state","combineLatest","filtered","bdTz","booking_date","startTz","endTz","endOfValue","filterBookings","shareReplay","filtered_week","bd","getEndOfWeek","filtered_month","search","debounceTime","switchMap","fzone","queryBooking","zone_ids","available_from","available_to","search_long_week","querySpace","space_list","processBookings","dailyCount","days","daily_count","buildSpaceLongQuery","counts","details","runOutsideAngular","interval","updateRoomList","new_bookings","concat","undo","attempted_to_delete","bkg","booking_master","period","replaceBookings","room_email","fromTz","toTz","intersects","timePeriodsIntersect","roomSatisfiesConditions","multi_rooms","room","in_zone","has_space","space_emails","in_zones","declined","getType","show","hide_type","dateWeekday","time_changed","SettingsService","is_concierge","nowTz","defaultTitle","defaultLocalTimezone","Intl","DateTimeFormat","resolvedOptions","timeZone","defaultBuildingZone","defaultOrgainiser","User","active_user","defaultBookingType","building_zone","booking_type","attendees","organiser","creator","booked_by","room_setup","room_breakdown","notes","equipment_codes","equipment_code","expected_attendees","headcount","check_ins","notify_users","company","booker","booker_concierge","level_zone","opt_out","outlook_opt_out","multiroom_master_id","room_id","findSpace","roomsData","roomId","newRoom","defaultStartTz","startEpochProvided","startDateTzProvided","round","created_epoch","all_day","show_as","approvalStatus","approval_status","catering","CateringOrder","edited_fields","edits","values","occurrence_edits","recurrence_end","occurrence_ids","occurrence_details","author","isEdit","opts","note","handleRecurrenceFields","recurrence_list","location_name","from_room","approve","old_start","old_end","creation_date","creationDateTz","cateringOrders","allAttendees","checked_in","checkInsArray","has_visitors","occurence","getTime","shift","_recurrence_endTz","byRequest","tentative","isAnyRoomDeclined","delivery_time","getTimezoneOffsetString","abs","dateDiff","displayEndDateTz","external","buildingTzDt","isBeforeDate","isAfterDate","recurrenEndFromOcurrences","mergeCateringOrders","order_list","orders","order","location_id","booking_timezone","BOOKING_STATUS","MINUTE","HOUR","DAY","WEEK","MONTH","DURATION_MAP","months","week","weeks","bookingOptionsToQuery","property","until","getFreeBookingSlots","min_size","dateTzMs","slots","bkn_start","bkn_end","getNextFreeBookingSlot","date_","block","generateBookingForm","use_fields","isConcierge","manualTimezone","user_service","current_user","current","FormControl","disabled","Validators","required","validators","minLength","updateOn","needs_space","is_before_date","setValidators","validateEndTime","disable","dateValidators","isFuture","validDateTZ","updateValueAndValidity","list_length","valueChanges","expected","codes","new_expected","new_codes","space_needed","simplified_fields","handleAllDay","clone","enable","occurrences","RecurrencePeriod","LIST","occurrence","CLONE","BookingAction","start_dateTz","d1","d2","_recurr_end","fields_with_recurrence","WEEKLY","recurrence_pattern","arrayWithValues","FormGroup","control","validDate","isSameDate","JSDate","getMinLength","rule_list","min","min_block","min_length","conditions","stringToMinutes","durationGreaterThanOrEqual","duration_1","duration_2","requestable","free_slots","next_free_slot","currently_free","time_until_next_block","free_tomorrow","free_today","available_until","spaceStatusToDisplay","filter_options","filtered_list","updated_list","start1","end1","start2","end2","formatWhen","startTZ","endTZ","displayEndTZ","isIncludes","searchVaue","searchRoomsAndBookings","allItems","searchValue","relevantItems","filteredItems","duplicateMultiroomEntriesIfAny","updatedBookings","duplicatesCount","duplicatedBooking","cloneDeep","BookingsService","setService","uniqueId","respond","series","toApiJSON","taskObsr","requests","booking_id","forkJoin","BookingsPaginatedService","getHoldingBay","queryHoldingBay","response","PaginatedAPIService","space_rules_for_user","rule_block","checkRules","ruleset","max_length","counter","condition","groups","j","last_location","check","CateringCategoriesService","CateringCategory","is_category","must_select","order_anytime","CateringItem","_amount","instance_id","from_month","to_month","description","prior_notice","notice","unit_price","price","supplier_cost","minimum_quantity","maximum_quantity","parent_categories","category_ids","categories","image_path","admin_only","restricted_from","root_category_restricted_from","catering_type","amount","allergy","cateringItems","filteredCateringItems","out_of_stock","availableItems","substr","expired","anytime","can_order_anytime","CateringItemsService","CateringMenuService","CateringNotesService","cateringNotes","hasBookingAttached","bookingDateTz","charge_code","kitchen","pantry","symbol","total","deliver_date","mergeCateringItemWithFormData","existing","override","CloseDialogService","dialogRefMap","dialogRef","close","DialogIds","CollapseService","collapseSubject","collapse$","DataCommonModule","INVALID_STANDALONE_KEYS","HotkeysService","keydown_states","keydown_observers","combo_end","registered_combos","addEventListener","mapKey","last_down","preventDefault","combo","combination","validCombination","last_key","updateCombinationEndList","presses","key_list","non_meta","MapLocation","map_id","desk_id","normalise","x_max","Organisation","BuildingLevel","levelWithID","fixed","confidence","at_desk","bld","building_id","LocationService","Building","disc_info","discovery_info","extras","extra_id","extra_name","loan_items","_roles","roles","_lockers","lockers","locker_structure","_systems","systems","_phone_numbers","phone_numbers","_location","longitude","latitude","searchables","neighbourhoods","lvl","lvl_features","level_id","booking_details","catering_restricted_from","currency","requires_equipment_code","requires_expected_attendees","holding_bay","visitor_space","sort_order","_data","bld_id","level_name","lower_name","map_url","floor_type","available_buildings","OrganisationService","_users","_spaceTypesSubject","_organisation","ids","bld_list","_active_building","organisation","loadOrganisation","loadLevels","space_types","loadSpaceTypes","tags","org_data","loadBuildingsWithOrg","bld_data","lvl_data","type_data","types","getOrganizationFiltersByRoomType","internalSubSet","getRoomTypeSubsetDDOptions","filterOptions","setItem","DaysOfWeek","RepeatsOn","recurrencePeriodToDurationType","DAILY","ABSOLUTE_MONTHLY","generateWeekDays","params","start_week","week_days","activeDate","active","full_name","day_index","getFirstDateFromList","getLastDateFromList","recurrenceDetails","recurr","getPeriod","recurrenceRecurringDetails","removeExpiredOcurrences","controls","tz","date_now","setStartAndEndDateFromArray","dates","setRecurrenceStartsTime","dateHour","Report","cleanData","txt","charAt","UNIX_timestamp","getMonth","getHours","suffix","getMinutes","timeConverter","formatCancelledBy","room_field","price_field","row","space_service","org_service","CurrencyPipe","transform","organizer","person","isCancelled","cancelled_by","cancelled_date","cancelled_at_epoch","remove_fields","output","idx_a","idx_b","csv_json","ReportsService","fromCSV","_service_list","findIndex","provider","provideFor","useValue","SETTINGS_TOKEN","SettingsObject","_app_name","_overrides","_observables","_bypass_bookings","VERSION","built","semver","hash","override_settings","Inject","OPTION_DEFAULTS","SpaceEquipments","SpaceStyles","EMPTY_ARRAY","allowStaffRoomWithBookings","room_style","equipment","bypass_bookings","defaultGlobalName","defaultSettings","room_name","support_url","features","extra_features","room_type","simple_name","rulesFor","nowMs","runningBookings","bks","startEpoch","endEpoch","spaceWithBookings","roomType","natural_light","Set","recurrence_availability","availabilityOptionsToQuery","hide_declined","blds","bld_b","a_has_zone","b_has_zone","SPACE_LIST","SpacesService","queryRooms","updateSpace","uploadSpacePhotos","setList","filterAvailableSpaces","faker","SERVICE","generateMockOrganisationService","jest","generateMockBuilding","getRoomFilterOptionsPerLocation","generateMockDataService","generateMockSpacesService","generateMockUsersService","loadCurrentUser","bookingState","setZone","setDate","setFilters","remove","startPolling","startPollingMonth","startPollingWeek","startPollingEveryFiveMin","test_app","logo_light","background","logo_dark","heap_io","force_ssl","secure_cookie","disable_text_capture","cookie_path","TEST_SETTINGS","app","generateMockSettingsService","overrides","provideMockSettingsObject","provide","generateMockAppService","settingsOverrides","notifyInfo","notifyWarn","notifySuccess","notifyError","navigate","navigateBack","Composer","Hotkeys","Users","Locations","Base","Menu","Spaces","Bookings","Reports","CateringItems","CateringCategories","Settings","generateMockUser","booking_list","fill","generateMockBooking","mockReturnValue","save","addFrom","removeFrom","clearList","removeFromList","accept","decline","checkin","is_logged_in","queryRoomsForQR","queryObsr","checkinIndividualVisitor","updateObsr","mockImplementation","SPACE_COUNT","generateMinimalRoomDetails","generateMockSpace","space_id","recurring_search","lastName","room_booking_screen","vc","linked","commerce","productName","searchable","controlable","hourly_rate","sort_priority","business","USER_DOMAIN","BOOKING_COUNT","BOOKING_DATE","setMockBookingStartDatetime","visitor","generateMockCateringOrder","menu","date_start","users","lorem","paragraph","BLD_COUNT","LVL_COUNT","generateMockLevel","levelGenerator","firstName","test","nested","level2","org","USER_COUNT","USER_EMAILS","companyName","delegates","delegate_count","first_name","last_name","phone","phoneNumber","department","staff_code","avatar","pickMenuItem","menu_map","category","generateMockLocation","fixed_locations","maps","ORG_COUNT","generateMockOrganisation","generateMockBuildingSetByCity","generateMockModalData","pendingDate","pendingDuration","mockDateToBuildingTz","windows_id","mobile","business_unit","organisation_id","organisation_name","officeLocation","desk","generateUserForm","pattern","maxLength","UsersService","uhttp","expiry","reload","client_id","Md5","hashStr","go","append","authorise","logout","tries","locate","loadDelegates","promises","del","all","HAS_ERROR","buildValidateDate","validateDate","is_from","buildValidateStartTime","validateStartTime","date_obj","buildValidateDuration","validateDuration","buildValidateAttendees","validateAttendees","invalid","dateControlTz","noWhitespaceValidator","isWhitespace","trim","whitespace","date_org","local_tz","zoneName","compare_to","unit","ans_unit","newDate","startOf","monday","sunday","later","endOf","isLastDayOfMonth","minus","hasSame","dateYear","dateMonth","dateDay","trunc","toSeconds","toUTC","toJSDate","getDay","convertLocalTimestampToTimezonedDateTz","buildingTimezone","convertTimezonedTimestampToLocalDateTz","localOffset","getTimezoneOffset","desiredOffset","eleA","localTimezone","offset_minutes","toMiddayUTC","timezoneOffset","EnvironmentModule","providers","ENVIRONMENT_TOKEN","EnvironmentService","environment","production","BookingConfirmComponent","_booking_state_service","_router","_dialog","_dialog_ref","closeDialogService","renderer","EventEmitter","show_attendees","lastMomentConflict","old_booking","is_request","approved","bookingDetails","bookedBy","disableClose","checkSpaceAvailability","newEmail","replaceObjects","constructor","replacement","nk","buffer","elem","has_note_buffer","updated","master_booking","pollOnce","closeDialog","MeetingDetails","emit","erroMessage","queryParams","ref","open","ConflictsModalComponent","maxWidth","width","local_room_name","conflicts","copy_conflicts","componentInstance","clipboard","writeText","conflictsText","afterClosed","listType","collapseList","attendeesListRef","expandList","show_locations","locationsListRef","show_orders","cateringListRef","listRef","listElement","listItems","getElementsByClassName","totalHeight","offsetHeight","setStyle","addClass","removeClass","duration_value","recurrenceDates","a_space","dateTZ","MAT_DIALOG_DATA","Component","templateUrl","styleUrls","Output","ViewChild","$event","BookingFormComponent","cdRef","user_list","fromDateTz","untilDateTz","localStart","localEnd","chipOptions","showTimeCateringWarning","updateCoachmarkTimes","skip","distinctUntilChanged","recurrenceStarts","clearValidators","arrayValidators","disableInputs","checkTimeCateringWarning","has_id","is_edit","patchValue","SpaceSelectModalComponent","multiple","needsCatering","noCatering","NewUserModalComponent","detectChanges","localTzOffset","buildingTzOffset","toggledControlName","startDateTime","fromISO","endDateTime","bookingDate","dayStartAt7am","dayEndAt8pm","markForCheck","changeDetection","ChangeDetectionStrategy","OnPush","BookingCateringConfirmModalComponent","CateringDetailsModalComponent","_cateringNotesService","head_counts","needs_charge_code","active_space","note_list","notes_field","generateFormFields","markAllAsTouched","is_valid","new_notes","setNotes","_scrollToBottom","_content_el","scrollTo","top","scrollHeight","left","behavior","active_form","errors","minlength","submit","CONFIRM_METADATA","maxHeight","ConfirmModalComponent","DECLARATIONS","NoCateringModalComponent","RequirementDetailsModalComponent","UserFormComponent","LegacyOverlaysModule","LegacyUiModule","FormsModule","ReactiveFormsModule","UiModule","EditorModule","new_user","confirm","cancel","codes_field","head_counts_field","firstSpaceEmail","head_count","anySpaceNeedsChargeCode","roomBasedEqCode","officeBasedEqCode","change$","selected_spaces","request_map","formGroup","triggerSearch","savedSelection","request_id","search_results$","active_building","resp","active_type","_space","setDefaultBuilding","grouped_by_city","city_buildings","noCateringDialogRef","panelClass","autoFocus","backdropClass","defaultBld","opt","space_a","space_b","withLatestFrom","formData","ActionIconComponent","hasSelectionRequirements","getActiveList","CateringMenuItemComponent","initial_state","an_cat","setAmount","cat","an_item","updatePackageSelection","setPrice","selectPackageOptions","confirmed_item","cart_item","active_items","updatedList","PackageOptionsModalComponent","done","a_list","animations","checkItemRequirements","getActiveItems","a_package","needed","CngSearchBarComponent","placeholder","totalFoundItem","showSrchWarning","searchStr","configChanges","clearSearch","box","onSearch","resetSearch","HoverClassDirective","elementRef","hoverClass","classList","ActionFieldComponent","show_tooltip","performAction","CounterComponent","useInput","previous_value","handleTimeout","ctrl_key","shift_key","new_value","changeInput","Number","isNaN","_onChange","_onTouch","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","DateFieldComponent","_from","position","onChange","old_date","new_d","new_date","_trigger","closeMenu","openMenu","_to","years","menuOpen","MatMenuTrigger","openDatePicker","closeDatePicker","DurationFieldComponent","specialPreprops","duration_options","generateDurationOptions","blocks","TimeFieldComponent","no_past_times","show_select","_time_options","generateAvailableTimes","select_field","focus","openedChange","datestamp","show_past","showSelect","UserListFieldComponent","search$","search_str","match_name","match_email","inputAutoComplete","openPanel","closePanel","active_list","a_user","file","files","reader","FileReader","readAsText","evt","processCsvData","srcElement","endsWith","addUser","template","MatAutocompleteTrigger","addUsersFromFile","downloadCSVTemplate","read","UserSearchFieldComponent","resetSearchString","onInputChange","FeedbackComponent","updateRoute","NavigationEnd","current_page","IconComponent","PopoutMenuComponent","SearchbarComponent","UserAvatarComponent","MATERIAL_MODULES","MatButtonModule","MatSnackBarModule","MatDialogModule","MatFormFieldModule","MatInputModule","MatProgressSpinnerModule","MatProgressBarModule","MatAutocompleteModule","MatSelectModule","MatChipsModule","MatRippleModule","MatMenuModule","MatCheckboxModule","MatTooltipModule","MatRadioModule","MatTabsModule","MatSlideToggleModule","ACA_PIPES_MODULE","valueChange","autofocus","focusField","input_field","actionPrefix","stateKey","buildAction","postfix","clear","wrapLoading","selectData","warn","selSuccess","selectSuccess","selOptionalSuccess","selectOptionalSuccess","selError","selectOptionalError","selLoading","selectIsLoading","actionObject","caller","flatMap","isLoading","hasError","hasSuccess","_success","isEmpty","isSuccess","isError","hasLoaded","shouldLoad","selectIsSuccess","selectIsError","selectHasLoaded","selectIsEmpty","generateMockActions","dispatcher","Actions","verifyActionSuccess","effect","expect","toBeDefined","toStrictEqual","verifyActionError","rooms","loadRoomsWithQuery","selectRoomResultsSuccess","LocalStorageWrapper","prefix","StorageModule","AcaDatePickerComponent","klass","show_last_selection","min_offset","max_offset","date_list","month_name","days_of_week","day_format","month_format","generateMonth","generateDaysOfTheWeek","updateOptions","counters","difference","today","end_","non_month","_change_timer","new_offset","updateDate","changeMonth","AlertMode","AlertBannerDisplay","AlertBannerComponent","mode","Warning","showClose","V1","iconPath","materialColor","closeIcon","_onModeChange","Coachmark","BlueCoachmark","AutoCompleteChipSelectItemComponent","optionSelected","feedbackOutput","chipsCleared","onClickConfirm","selectOnlyOneGroup","localFilter","selectOnlyOneGroupChange","separatorKeysCodes","ENTER","COMMA","filterFormControl","focused","mobileFullScreen","autocompleteOptions","filteredAutocompleteOptions","enableCTAs","hasChips","scrollEvent","panelOpen","contains","onFocus","blur","valueAccessor","color","enabled","selectedGroupHeader","getFilteredAutocompleteOptions","groupHeaders","g","searchString","exactMatches","moreOptions","joinedOptions","groupIds","parents","jo","matInput","feedbackInput","useCTAs","focusIn","fromPanel","componentInput","loseFocus","isDisabled","spl","removeEventListener","dirty","touched","keyedInput","onPanelFocusChange","selectOption","encapsulation","ViewEncapsulation","Self","Optional","GroupHeaderPipe","hasHeader","displayAsHeader","AutoCompleteSelectOptionComponent","filteredOptionsChange","inputTextChange","emptyBoxEvent","_options","updateFilteredOptions","selectedValue","resetInput","filteredOptions","startWith","_filter","filterValue","filterValues","matchesAll","onChangeInput","BaseTemplateComponent","vcRef","isRendered","attemptViewEmbed","createEmbeddedView","TemplateRef","CateringDropComponent","onCancel","onConfirm","CngSelectOptionsComponent","CngSelectComponent","isClosed","defaultSelected","onChangeCallback","DropdownTriggerForDirective","overlay","viewContainerRef","isDropdownOpen","dropdownClosingActionsSub","EMPTY","isPanelOpened","destroyDropdown","openDropdown","ddWidth","dropdownPanel","offsetWidth","overlayRef","create","hasBackdrop","scrollStrategy","scrollStrategies","positionStrategy","flexibleConnectedTo","withPositions","originX","originY","overlayX","overlayY","offsetY","templatePortal","TemplatePortal","templateRef","attach","dropdownClosingActions","backdropClick$","backdropClick","detachment$","detachments","dropdownClosed","merge","detach","dispose","CollapseHeaderComponent","collapseService","expandedIds","updateSectionIdOnOpen","isExpanded","collapseSubscription","expansionPanel","isOpen","expandedTitleId","updateOpenedSectionId","ConflictAlertModalComponent","dialogData","callback","dateIsToday","CustomSnackbarComponent","snackBar","dismiss","snackType","MAT_SNACK_BAR_DATA","closeSnackbar","SnackBarService","verticalPosition","horizontalPosition","_snackType","openFromComponent","DateTzCalendarWidgetComponent","className","selectedDateTz","_today","registerOnChange","registerOnTouched","startOfMonthDateTz","DateTzDatePickerComponent","icon_only","onSelect","can_pick_today","selectedDateTzValue","resetToLastSelection","_acaDatePicker","initialDateSelectionTz","writeValue","newValueTz","newDateTz","onDatePickerClose","DateTzDurationFieldComponent","defaultDurationGroups","DEFAULT_DURATION","currentStartDateTz","nearestStep","placeHolderOption","selectedOption","generateDurationOptionsFromGroups","extended","dopt","DateTzTimeFieldComponent","noPastTimes","show_current","startFromDateTz","selectedTimeString","generateAvailableTimesTz","generateOptionForDateTz","os","timeOptions","displayString","newTimeTz","setSelectedValues","ErrorMessageComponent","CalendarIconComponent","ChevronIconComponent","CloseIconComponent","InformationalImageComponent","LabelComponent","LegendDropdownComponent","placeholderOpen","MckDatePickerComponent","dateValue","initialDateSelection","goToToday","secondarySubmit","primarySubmit","ModalButtonRowComponent","primaryDisabled","disableFixed","secondaryDisabled","smallButtons","ModalComponent","shouldClose","OverrideChangesModalComponent","getDateString","epoch","toISOString","uniqueDates","filteredEdits","dateString","has","FilterPipe","searchText","objectKey","splitKeys","it","included","SecurityContext","SanitizePipe","sanitizer","sanitize","RESOURCE_URL","URL","SCRIPT","STYLE","HTML","RadioSelectComponent","RecurringBookingForm","recurrence_types","PATTERN","DATE","recurrencePeriod","current_type","pattern_form","recurrencePatternFormControl","RecurrencePatternForm","onChangeType","RecurrenceDateForm","selected_dates","setPickerToGivenDate","tempForSort","start_date","formDateTz","is_selected","setDateTzForm","dateTsValue","addDate","fromStartTz","untilTz","repeat_period_options","validateRecurrenceInterval","repeat_every_options","recurrenceIntervalFormControl","fromEndTz","setEndDateFromStartDate","recurrenceDateStartTzFormControl","recurrencePeriodFormControl","generateMaxIntervals","recurrenceDaysFormControl","current_days","generateOcurrenceList","recurrenceEndFormControl","end_date","updateActiveWeekday","updateValidators","date_diff","periodToDurationType","first_date","recurr_days","daysInMonth","_week_days","new_day","current_index","setRepeatEvery","setRepeatPeriod","SelectOptionComponent","ignoreDisabled","noEntriesFoundLabel","SelectComponent","searchEnabled","splitDisplay","showDivider","SelectedChipCountComponent","SpacerMode","SpacerComponent","Horizontal","SwitchGroupComponent","optionChecked","closestTimeSlot","buildingDate","newTime","ToggleComponent","selectedChange","TooltipComponent","isVisible","TooltipPosition","DEFAULT","theme","TooltipTheme","tooltip","visible","TooltipDirective","appRef","componentFactoryResolver","injector","showDelay","hideDelay","componentRef","triggerType","hasTrigger","initializeTooltip","setHideTooltipTimeout","touchTimeout","bind","componentFactory","resolveComponentFactory","attachView","hostView","rootNodes","tooltipDOMElement","setTooltipComponentProperties","showTimeout","showTooltip","instance","getBoundingClientRect","right","bottom","BELOW","ABOVE","RIGHT","LEFT","hideTimeout","detachView","MatIconModule","MatExpansionModule","OverlayModule","NgxMatSelectSearchModule","NgxSkeletonLoaderModule","ZoomWarningComponent","entryComponents","ALL_DAY_BOOKING_VALUE","showPast","inputDate","allDayOption","oneWeekOption","onCloseClick","loadUser","selectUserState","selectHasUserData","UserEffects","userService","UserModule","userReducer","initialUserState","webpackEmptyAsyncContext","req","module","routes","component","ShellWrapperComponent","children","loadChildren","DayViewModule","WeekViewModule","CateringModule","VisitorsModule","ReportsModule","RoomAdminModule","redirectTo","AppRoutingModule","RouterModule","forRoot","useHash","AppComponent","_uploads","_md5_workers","timezoneString","initUploads","adjustZoom","clientWidth","isMobileOrTablet","vendor","maxTouchPoints","mobileAgents","autoStart","UploadManager","addProvider","Amazon","localStorageSyncReducer","reducer","localStorageSync","rehydrate","metaReducers","AppModule","app_loaded","MAT_LABEL_GLOBAL_OPTIONS","DEFAULT_SETTINGS","BrowserModule","BrowserAnimationsModule","HttpClientModule","ComposerModule","CalendarModule","SharedContentModule","bootstrap","BookingModalComponent","iscloning","getModalTitle","flow_step","only_catering","loadFormData","modalTitle","toNextFlowStep","toPreviousFlowStep","resetForm","openRecurrenceConflictsModal","openEquipmentDetailsModal","confirmBooking","openCateringDetailsModal","markAsDirty","is_recurr_series_edit","available_fields","addControl","is_cloning_or_edit","isFromGrid","edit_recurrence","markAsTouched","equipment_ref","catering_ref","clearRecurrenceValidators","formValues","sanitizeBookingFromCloning","dialog_ref","emitEvent","acc","recurr_ref","BookingCateringComponent","active_order","an_order","CateringMenuCategoryComponent","BookingCateringOrderDetailsComponent","_menu","category_list","available_times","matched_items","initForm","_input_el","show_search","val","flattenArray","loadMenu","generateStartAndEndTimes","logDateTz","space_email","building_time","cat_start_time","cat_end_time","has_available_items","out_of_hours","form_controls","confirmOrder","CateringOrderListItemComponent","edit","BookingCateringOrderListComponent","previous","BookingSpaceFiltersComponent","initBuildings","locationsChange","building_list","now_","is_today","BookingFindSpaceComponent","_booking_state","searchQuery","selectedSpace","oldSpace","disableCondition","handleEditConflicts","occurrences_org","booking_org","ocurr","to_hours","to_minutes","new_conflicts","savedSpace","updatedSpaces","sp","spaceConflicts","OriginalSpaceList","sv","sh","isCloning","original_space","updateSelectedSpace","sortByRecurrenceAvailability","booking_space_list","idsFromUpadatedSpaceList","isExists","originalSpace","catering_order","has_catering_order","selected_space","openNoCateringModal","emitNextEvent","a_availability","b_availability","spaceToRemove","spaceName","toggle","BookingSpaceItemComponent","BookingSpaceFlowFormComponent","can_return","attendeesControl","setErrors","customError","isOutsideCateringHours","checkIfOutsideCateringHours","container","scrollIntoView","inline","DeleteConfirmModalComponent","ScrollingModule","MeetingDetailsModalComponent","PrivateDetailsModalComponent","MeetingDetailsDisplayComponent","MeetingRecurringDetailsDisplayComponent","MeetingDetailsRequirementsComponent","MeetingCateringDetailsComponent","MeetingPrivateDetailsComponent","DayViewApprovalsComponent","_bookings_service","inputText","incommingRequests","selectedSort","updatedRequest","sortOrderByOptions","isMissingRoom","bkng","hasInvalidEndDateInMasterBookings","endDateString","masterIds","filterMasterBookings","filterStandardBookings","filterStandardAndMasterBookings","expiredBkngs","pendingBkngs","timeBasedStatusLabel","declineExpiredBookings","searchRequest","sortingValue","date_string","street_and_city","att","weekdayLong","weekdayShort","applyOrderBy","declineMultiple","resArray","STATES","DayViewApprovalsEventComponent","_booking_state_sevice","datePipe","acting","showCateringNote","showEquipmentNote","cateringNote","equipmentNote","cateringOrderItems","isRecurrentBooking","recurrenceExceptions","updateData","createdDate","createdTime","creationDate","officeAddress","specific_occurances","ocurrence","specificDates","length_string","bookingOptions","acceptedBooking","is_conflict","total_Conflicts","dateBuildingString","endDate","DatePipe","view","DayViewComponent","_route","active_level","legend","legend_list","legend_keys","banner_mode","showBanner","undo_banner_mode","event_list","foundSearchLength","searchedCounter","paramMap","has_access","updateLevel","initSpace","numeric","ignorePunctuation","spaceTypeOptions","spaceTypesObservable","spaceTypesSubscription","spaceTypes","undo_action","_undo_timer","attentToDelete","configureIfLinksFromEmail","filterEvents","filterd_booking","startsWith","bookingId","snapshot","dispatch","levelId","updateDateTz","replaceUrl","checked","ROUTES","forChild","DayViewTimelineComponent","DayViewSpaceComponent","DayViewSpaceEventComponent","registerDialog","reattach","calculatePosition","overlap","storeOrder","shown_date","from_previous_day","toFixed","overflow_top","overflow_bottom","time_period","_temp","cdr","eventMovingLoader","inView","dragging","moving","overlap_details","position_list","time_blocks","generateTimeBlocks","overflow_only","checkInView","last_update","calculateOverlaps","override_state","isRecurrentMaster","isRoomEmailMatch","isIncludedInSetupOrBreakdown","collisions","cmp","cmp_start","cmp_end","in_view","offsetLeft","delta","pointerPosition","scroll_top","top_minutes","previousContainer","new_start","handleDropError","isMoving","movingId","room_list","room_count","new_booking","cateringWillBeDropped","isOutsideCatering","roomDoesNotHaveCatering","moveBooking","startDateTimeLuxon","endDateTimeLuxon","confirm_msg","selectedBlockStart","selectedBlockEnd","hasValidBreakdown","topMinutes","closestDateTz","isConflict","checkAvailabilityOnGivenTime","drop","gridBookingOnClick","UPDATE_INTERVAL","scroll_left","scroll_offset","filtered_spaces","loading_space","show_holding_bay","space_zones","modalInitialized","isEventMoving","scroll_area","initSpaces","updateTime","virtualScroll","space_type","stopPolling","queryParamMap","view_id","spaceJson","active_hour","searchData","column","spaceId","bookingEl","timeoutID","scroll_box","date_percent","scrollWidth","is_dragging","scrollView","cancelScroll","isDragging","subscribeToMouseMove","unsubscribeFromMouseMove","calculateScrollDirection","runAutoScroll","tolerance","calculateDirection","CdkVirtualScrollViewport","clearSelected","updateScroll","updateBooking","isApproved","_updateOrders","closeAll","ord","editMeetingCatering","edited","setDetails","isMasterApproved","_on_error","setLoading","acceptOptions","declineOptions","deleteMeeting","booking_data","book","available_durations","old_notes","openPrivateDetailsModal","confirmDelete","_specific_dates","expired_ocurrences","recurrence_startTz","specific_dates","duplicate","_recurrence_startTz","_recurrence_period","_recurrence_interval","_occurrence_details","_master_booking","editSeries","cloneSeries","cancelSeries","bookingChange","roomNames","standalone","temp","WeekViewDayDisplayComponent","WeekViewItemComponent","WeekViewTimelineComponent","dateListTz","generateDatesTz","weekends","WeekViewComponent","orderDetailsExpanded","CateringComponent","cateringStorage","order_type","menuWithOthers","allCategories","childItems","catering_menu","orderDetails","page","loadAllCategory","relativeTo","filtered_menu","otherCategories","mailEl","isThere","subEl","parent","CateringStorage","CateringOrdersComponent","CateringMenuComponent","CateringMenuItemListComponent","CateringCategoryModalComponent","CateringGroupModalComponent","CateringItemModalComponent","CateringOrdersItemComponent","OrderDetailsModalComponent","OrderDetailsItemsComponent","OrderBookingDetailsComponent","OrderDetailsNotesComponent","CateringMenuOrderComponent","removeValue","orderDetailsKey","openGroupModal","parent_id","_menu_items","_menu_categories","updateItemList","old_item","itm","openItemModal","deleteItem","removeFromMenu","loadCateringMenu","openCategoryModal","depth","item_details","showIndividualItem","statuses","colour","active_status","updateItemDetails","show_items","updated_booking","sub_item","sub_sub_item","viewOrderDetails","expandMore","filtered_orders","display_orders","deliver_at_time","isOtherCategory","orderList","filterOrdersByCategory","filterOrdersByCategoryType","itemSearchResults","filterOrdersByItemName","filteredOrders","matchingItems","findItemsMatchingSearch","locationMatches","organiserMatches","newOrder","itemMatches","subItems","newItem","findMatchingOrders","categoryName","findCategoryName","subOrder","itemName","subCategoryName","categoryType","filterMatchingItems","filteredSubItems","flat","toFlatten","_upload_manager","fileReader","uploading","arrayBuffer","blob","blobUtil","arrayBufferToBlob","upload","file_name","uploads","complete","access_url","readAsArrayBuffer","storeBooking","editing","new_note","order_id","pending_booking","addNote","AccessDenied","SidebarComponent","TopbarHeaderComponent","show_add_item","show_events","dateChangeTz","timezone_value","event_map","dateInputTz","changeDate","noOfCount","applyDatePickerValue","LoginComponent","username","password","logo","login","ReportDisplayComponent","_reports","multipleLocations","locationChanged","report","report_data","downloadCSV","checkDates","generateReport","downloadReport","NewlineToBRPipe","pure","ReportTableComponent","sortField","sortOrder","hide_fields","isSortingDisabled","sortTable","sortedList","aValue","bValue","dateWithTimeRegex","parseDateString","datePart","timePart","formattedDate","disabledFields","ReportsComponent","reports","multi_locations","active_report","BulkQrOverlayComponent","selectItemChange","selectAllChange","downloadQrCodeRequested","cancelClick","qrCodeUrlsChange","qrCodeUrls","qrTabClick","itemsCheckboxes","newArr","isLevel","checkbox","selectAll","roomname","checkedRoomObj","checkedLevelObj","checkedFlag","assign","allLevels","onSubmit","onSelectAllChange","ManagePhotosComponent","resizeService","readLocalPicService","httpClient","imageInitial","imageToModify","photoArray","photoUploadArray","uploadError","uploadingStatus","resizedFiles","requiredFileType","RequiredFileType","photos","indexToReplace","canvas","context","getContext","ext","unusedIdx","readFileInput","base64Img","that","resizeImage","RoomPhotoDiamension","outputFormat","imgResized","createImage","clearRect","drawImage","dataURL","toDataURL","uploadProgress","obs","img","FormData","b64toFile","tap","updateProgressMeter","suffixes","failedNo","photo","photoName","deleteSpacePhotos","photo_name","RoomAdminComponent","RoomDetailsWrapperComponent","RoomAdminRoutingModule","cdref","roomAdminService","detailsViewIndex","rowInfo","enableOverlay","updatePayload","roomDataSource","roomnum","roomtype","roomobject","newUrls","doc","isRoom","qrcode","imageData","drawCanvas","addImage","addPage","ResizeService","ReadLocalPicService","RoomAdminService","MatTableModule","MatPaginatorModule","MatSortModule","QRCodeModule","RoomsTableComponent","RoomDetailsComponent","FileDragNDropDirective","cd","getCurrentNavigation","getToRoomList","_snackBar","givenRoomType","givenRoomSubType","uploadedPhotos","parentFun","disableButtons","windowLocation","roomImages","history","pushState","cityname","rowInfoData","externalSubset","roomSubsetOptions","internal","roomSubType","givenCateringAvailability","setAllDropdowns","reactiveForm","roomnumber","roomvisibility","isFeatureChecked","conference_phone","wireless_content_sharing","flipchart","glassboard","whiteboard","boardroom","cocktail","theatre","workshop","u_shape","miscellaneous","roomImagesFileSlug","imgArr","formValue","roomObject","allowed_keys","getExtraFeatures","excludeFromExtraFeatures","isEqAndDetail","updateAllRooms","markAsPristine","roomTypeDD","ddBoxClass","roomTypeOptions","roomTypeChanged","roomSubsetDD","roomTypeSubsetChanged","roomVisibilityDD","roomVisibilityOptions","roomVisibilityChanged","canteringAvailabilityDD","canteringAvailabilityOptions","roomCateringChanged","subset","visibility","isCatering","arcY","arc_X_Center","otrRadius","whtRadius","innrRadius","ctx","strokeStyle","moveTo","lineTo","stroke","font","textAlign","fillText","beginPath","arc","PI","fillStyle","fillRect","roomid","win","write","downloadQRPdf","openManagePhotosModal","EXAMPLE_DATA","RoomsTableDataSource","datatwo","dataMutations","paginator","sortChange","getPagedData","getSortedData","startIndex","pageIndex","pageSize","isAsc","compare","DataSource","onDetailsClick","rowClicked","displayedColumns","dataSource","formattedInputValue","inputValue","firstChange","table","firstPage","navigationExtras","skipLocationChange","MatPaginator","MatSort","MatTable","errorMessage","NOT_FOUND_ERR","SECURITY_ERR","ABORT_ERR","NOT_READABLE_ERR","ENCODING_ERR","NO_MODIFICATION_ALLOWED_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","QUOTA_EXCEEDED_ERR","TYPE_MISMATCH_ERR","PATH_EXISTS_ERR","inputFile","File","FileList","Blob","onabort","eventErrorDecoder","onerror","readAsDataURL","dataURI","byteString","atob","mimeString","ab","ArrayBuffer","ia","Uint8Array","crossOrigin","cnv","tmpCanvas","cnx","isCanvasSupported","sizeScale","resizeImageWidthHeight","resizeImageBySize","mainCanvas","pixelStepWidth","pixelStepHeight","newWidth","newHeight","resizeCanvas","targetSize","tmpResult","sizeOfTheImage","calulateImageSize","divideStrategy","iteratorLimit","newImageSize","sizeOfTheImageTmp","imgString","isForLevels","filesChangeEmiter","borderStyle","borderColor","borderRadius","dataTransfer","HostBinding","COMPONENTS","DIRECTIVES","CDK_MODULES","DragDropModule","CdkTableModule","APipesModule","ACustomEventsModule","loading_state","mod","EventFormComponent","visitorFG","createVisitor","getVisitors","filteredAttendees","getFilteredAttendees","actualIndex","removeAt","at","VisitorFormComponent","personChange","VisitorsFormModalComponent","fb","attendeesStatus","visitors","attendee","VisitorBookingItemComponent","matched_attendees","checked_in_users","host_email","response_type","is_match","checkedInStatus","subject","VisitorTimelineComponent","filtered_bookings","updateEvents","show_all","unsorted_bookings","VisitorComponent","_element","VisitorsComponent","hmr","general","copyright","booking_types","show_fields","html_body","multiple_spaces","desk_start","day_view","dragdrop","enableProdMode","platformBrowser","bootstrapModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAoB,EAAE,IAJjB;AAKLC,mBAAW,EAAE;AALR,OAdD;AAqBR8zD,aAAO,EAAPA,OArBQ;AAsBRh0F,aAAO,EAAPA,OAtBQ;AAuBRu0F,cAAQ,EAARA,QAvBQ;AAwBR1B,cAAQ,EAARA,QAxBQ;AAyBRtS,aAAO,EAAPA;AAzBQ,KAAZ;AA4BA;;;;AAGa,YAAAjhB,gBAAA,GAA6C;AACtDzuE,WAAK,EAAE,IAD+C;AAEtD8S,cAAQ,EAAE;AACNK,cAAM,EAAE,EADF;AAENM,aAAK,EAAE,YAFD;AAGNT,gBAAQ,EAAE,EAHJ;AAINK,YAAI,EAAE,EAJA;AAKNE,kBAAU,EAAE,KALN;AAMNc,mBAAW,EAAE;AANP,OAF4C;AAUtDk7B,SAAG,EAAHA,GAVsD;AAWtD57B,UAAI,EAAE,KAXgD;AAYtDiB,cAAQ,EAAE;AAZ4C,KAA7C;;;;;;;;;;;;;;;;;;;;AChJb;AAAA;AAAA;;AAIA;AAAA;AAAA;;;;;;;;;;AAEA,QAAI,cAAAsmC,WAAA,CAAYC,UAAhB,EAA4B;AAC1B,aAAAyoD,cAAA;AACD;;AAED,wBAAAC,eAAA,GAAyBC,eAAzB,CAAyC,mBAAD,UAAxC,WACS,UAAApsF,GAAG;AAAA,aAAIxX,OAAO,CAACmY,KAAR,CAAcX,GAAd,CAAJ;AAAA,KADZ","file":"main-es5.js","sourcesContent":["export * from './lib/animations.module';\nexport * from './lib/angular-animations'\n","import { trigger, transition, style, animate, state } from '@angular/animations';\n\nexport const ANIMATION_SHOW_ENTER_LEAVE = trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(300, style({ opacity: 1, height: '*' }))\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(300, style({ opacity: 0, height: 0 }))\n ])\n]);\n\nexport const ANIMATION_SHOW_CONTRACT_EXPAND = trigger('show', [\n state('show', style({ opacity: 1, height: '*' })),\n state('hide', style({ opacity: 0, height: 0 })),\n transition('show <=> hide', animate('200ms ease-in'))\n]);\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class AnimationsModule {}\n","export * from './lib/base.module';\nexport * from './lib/types.utilities';\nexport * from './lib/general.utilities';\nexport * from './lib/base.class';\nexport * from './lib/base.directive';\nexport * from './lib/date.utils'\nexport * from './lib/date.spec-helpers'\nexport * from './lib/replace.pipe'\nexport * from './lib/cdk-drop-list-scroll-container.directive'\nexport * from './lib/image.directive';\n","import { Subscription, BehaviorSubject } from \"rxjs\";\n\nexport class BaseClass {\n /** Store for named timers */\n protected _timers: { [name: string]: number } = {};\n /** Store for named intervals */\n protected _intervals: { [name: string]: number } = {};\n /** Store for named subscription unsub callbacks */\n protected _subscriptions: { [name: string]: (Subscription | (() => void)) } = {};\n /** Subject which stores the initialised state of the object */\n protected readonly _initialised = new BehaviorSubject(false);\n\n /** Observable of the initialised state of the object */\n public get initialised(): BehaviorSubject {\n return this._initialised;\n }\n /** Whether the object has been initialised */\n public get is_initialised(): boolean {\n return this._initialised.getValue();\n }\n\n protected destroy() {\n for (const key in this._timers) {\n if (this._timers.hasOwnProperty(key)) {\n this.clearTimeout(key);\n }\n }\n for (const key in this._intervals) {\n if (this._intervals.hasOwnProperty(key)) {\n this.clearInterval(key);\n }\n }\n for (const key in this._subscriptions) {\n if (this._subscriptions.hasOwnProperty(key)) {\n this.unsub(key);\n }\n }\n }\n\n /**\n * Creates a named timer\n * @param name Name of the timer\n * @param fn Callback function for the timer\n * @param delay Callback delay\n */\n protected timeout(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearTimeout(name);\n this._timers[name] = setTimeout(() => {\n fn();\n this._timers[name] = null;\n }, delay);\n } else {\n throw new Error(\n name ? 'Cannot create named timeout without a name' : 'Cannot create a timeout without a callback'\n );\n }\n }\n\n /**\n * Clears the named timer\n * @param name Timer name\n */\n protected clearTimeout(name: string) {\n if (this._timers[name]) {\n clearTimeout(this._timers[name]);\n this._timers[name] = null;\n }\n }\n\n /**\n * Creates a named interval\n * @param name Name of the interval\n * @param fn Callback function for the interval\n * @param delay Callback delay\n */\n protected interval(name: string, fn: () => void, delay: number = 300) {\n if (name && fn && fn instanceof Function) {\n this.clearInterval(name);\n this._intervals[name] = setInterval(() => fn(), delay);\n } else {\n throw new Error(\n name ? 'Cannot create named interval without a name' : 'Cannot create a interval without a callback'\n );\n }\n }\n\n /**\n * Clears the named interval\n * @param name Timer name\n */\n protected clearInterval(name: string) {\n if (this._intervals[name]) {\n clearInterval(this._intervals[name]);\n this._intervals[name] = null;\n }\n }\n\n /**\n * Store named subscription\n * @param name Name of the subscription\n * @param unsub Unsubscribe callback or Subscription object\n */\n protected subscription(name: string, unsub: Subscription | (() => void)) {\n this.unsub(name);\n this._subscriptions[name] = unsub\n }\n\n /**\n * Call unsubscribe callback with the given name\n * @param name\n */\n protected unsub(name: string) {\n if (this._subscriptions && this._subscriptions[name]) {\n this._subscriptions[name] instanceof Subscription\n ? (this._subscriptions[name] as Subscription).unsubscribe()\n : (this._subscriptions[name] as any)();\n this._subscriptions[name] = null;\n }\n }\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\n\n@Directive({\n selector: 'a-very-basic-component-base-that-should-not-be-used'\n})\nexport class BaseDirective extends BaseClass implements OnDestroy {\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NumbersOnlyDirective } from './numbers-only.directive';\n\n@NgModule({\n imports: [CommonModule,],\n declarations: [\n NumbersOnlyDirective\n ],\n exports: [\n NumbersOnlyDirective\n ]\n})\nexport class BaseModule {\n}\n","import {\n Directive,\n Input,\n Renderer2,\n SimpleChanges,\n OnChanges,\n ContentChildren,\n QueryList,\n AfterContentInit\n} from '@angular/core';\nimport { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport { BaseDirective } from './base.directive';\n\nexport enum ScrollDirection {\n NONE,\n X,\n Y,\n BOTH\n}\n\n@Directive({\n selector: '[cdkDropList][scrollContainer]'\n})\nexport class CdkDropListScrollContainer extends BaseDirective\n implements OnChanges, AfterContentInit {\n /** Direction of scroll to determine updating the position of the drop list */\n @Input() direction: ScrollDirection = ScrollDirection.X;\n /** Name of the scroll container for the list */\n @Input() scrollContainer: string;\n /** Scroll container element */\n public element: HTMLElement;\n /** Last scroll position */\n public last_scroll: { x: number; y: number } = { x: 0, y: 0 };\n\n /** Draggable children elements */\n @ContentChildren(CdkDrag) private items: QueryList;\n\n constructor(private _cdkDropList: CdkDropList, private _renderer: Renderer2) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.scrollContainer && this.scrollContainer) {\n this.element = this._cdkDropList.element.nativeElement.closest(\n this.scrollContainer\n ) as HTMLElement;\n }\n }\n\n public ngAfterContentInit(): void {\n this.subscription(\n 'drag_items',\n this.items.changes.subscribe((items: QueryList) => {\n const list = items.toArray();\n list.forEach((i, index) => {\n this.subscription(\n `list-item-${index}`,\n this._renderer.listen(i.element.nativeElement, 'mousedown', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'mouseup', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n this.subscription(\n `list-item-touch-${index}`,\n this._renderer.listen(i.element.nativeElement, 'touchstart', () => {\n this.subscription(\n 'item-dragged',\n this._renderer.listen('window', 'touchend', () => this.onDrop())\n );\n this.onDrag();\n })\n );\n });\n })\n );\n }\n\n /** Start listing for scroll events on the container */\n public onDrag() {\n if (this.element) {\n this.subscription(\n 'scroll',\n this._renderer.listen(this.element, 'scroll', () => this.updateListPosition())\n );\n }\n }\n\n /** Stop listening for scroll events on the container */\n public onDrop() {\n this.unsub('scroll');\n }\n\n /**\n * Forcefully update the position data of the drop list\n */\n private updateListPosition() {\n this.timeout(\n 'update_positions',\n () => {\n const scroll = { x: this.element.scrollLeft, y: this.element.scrollTop };\n if (\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.Y) &&\n scroll.y !== this.last_scroll.y) ||\n ((this.direction === ScrollDirection.BOTH ||\n this.direction === ScrollDirection.X) &&\n scroll.x !== this.last_scroll.x)\n ) {\n (this._cdkDropList._dropListRef as any)._cacheOwnPosition();\n (this._cdkDropList._dropListRef as any)._siblings.forEach(i =>\n i.isReceiving() ? i._cacheOwnPosition() : null\n );\n }\n this.last_scroll = scroll;\n },\n 50\n );\n }\n}\n","import MockDate from 'mockdate';\n\n/**\n * August 13, 2020 at 7:22:12 UTC\n */\nconst initialTime = 1597346532 * 1000;\n\nexport const mockDate = (timeOverride = initialTime) => MockDate.set(new Date(timeOverride));\n\nexport const resetDate = () => MockDate.reset();\n","import { DateNow, DateTZ } from '@mckinsey-converge/date-tz'\nimport { DateTime } from 'luxon';\nimport * as dayjs from 'dayjs';\nimport {\n dayJsHoursMinutes,\n dayJsTimeFormatString,\n} from './general.utilities';\n\n/**\n * Allows you to split up durations into a group.\n */\nexport interface DurationGroup {\n /**\n * Step amount to generate between start and max.\n */\n step: number;\n /**\n * Where to start in minutes.\n */\n start: number;\n /**\n * Where to end in minutes.\n */\n max: number;\n}\n\n/**\n * Find the multiple of `stepMinute` which is closest to the 'minutes' property of the given date.\n * @param date - Any Lexon date.\n * @param stepMinute - The number of minutes between one timeslot and the next. Integer value\n * 1 to 59, inclusive.\n */\n// R--- depreciate this one\nexport const closestToTimeSlot = (date: DateTime, stepMinute: number, start: number = 0) : DateTime => {\n return date.set({ millisecond: 0, second: 0, minute: Math.ceil(date.minute / stepMinute) * stepMinute })\n .plus({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\nexport const closestToTimeSlotTz = (dateTz: DateTZ, stepMinute: number, start: number = 0) : DateTZ => {\n return dateTz.setValue({ millisecond: 0, second: 0, minute: Math.ceil(dateTz.minutes / stepMinute) * stepMinute })\n .addValue({ minutes: start % 60 }) // apply offset as well if it starts at 15.\n};\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as hrs, or minutes as mins\n */\nexport function durationHumanized(duration: number, short: boolean = false): string {\n if (!duration || duration < 0) {\n return '';\n }\n const h = Math.floor(duration / 60);\n let d = `${h >= 1 ? h + (short ? ' hr' : ' hour' + (h === 1 ? '' : 's')) : ''}`;\n if (duration % 60 !== 0) {\n if (d) {\n d += short ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${m >= 1 ? m + (short ? ' min' : ' minute' + (m === 1 ? '' : 's')) : ''}`;\n }\n return d;\n}\n\nexport const weekDayMonthYearFormat = (date: DateTZ): string => date.formatDate('ccc dd MMM yyyy');\n\n/**\n * Tries to extract best-fit input\n * @return undefined if not valid. otherwise if good\n */\nexport const extractDateFromInput = (input: string,\n checkHour,\n startDate: dayjs.Dayjs): dayjs.Dayjs | undefined => {\n // check if input has am/pm or normal 24 hour time.\n // let date = dayjs(input, 'HH:mm');\n // let date = dayjs(input, 'h:mma');\n let date = dayjs(input, dayJsTimeFormatString());\n if (!date.isValid()) {\n // patch if time is in format xx:x to assume you meant xx:x0\n let cleanedInput = input;\n const times = input.split(':');\n if(!input){\n return undefined\n }\n if (times.length === 2) {\n if (times[1].length === 1) {\n cleanedInput = `${times[0]}:${times[1]}0`;\n }\n }\n // may be other input, lets try next value (without am/pm)\n date = dayjs(cleanedInput, dayJsHoursMinutes());\n // might be just purely an hour\n if (!date.isValid() && checkHour) {\n date = dayjs(input, 'H');\n }\n }\n // We expect input times to be in the future. If now is in the afternoon, this\n // simple block will ensure the returned date is also in the afternoon.\n //\n // NB: dayjs parses times as morning by default.\n if (date.isValid()) {\n // Move to the selected start date\n date = date.month(startDate.month()).date(startDate.date()).year(startDate.year());\n if (startDate.hour() > date.hour() && date.date() === startDate.date()) {\n date = date.set('hour', date.hour() + 12);\n }\n }\n\n return date.isValid() ? date : undefined;\n};\n\n\n/**\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 3. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n * @param step The step between time slots.\n * @param input The input text.\n */\nexport const nearestStepToInput = (\n step: number,\n input: string,\n currentStartDate: number,\n start: number = 0\n): string => {\n let date = extractDateFromInput(input, false, dayjs(currentStartDate));\n if (date) {\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, step, start);\n return closestDate.toFormat(dayJsHoursMinutes());\n } else {\n return input;\n }\n};\n/**\n * Similiar to {@link nearestStepToInput} instead:\n * 1. Calculates the date from input via {@link extractDateFromInput}.\n * 2. Finds which duration group is closest to the currentStartDate. If not found\n * return vanilla text.\n * 3. Finds the nearest time slot that it can be via {@link closestToTimeSlot}.\n * 4. Then returns the time-format string the input expects so autocomplete can suggest\n * closest match.\n */\nexport const nearestDurationToInput = (durationGroups: DurationGroup[],\n currentStartDate: number,\n value: string): string => {\n\n let date = extractDateFromInput(value, false, dayjs(currentStartDate));\n\n if (!date) {\n // Check if the input is a duration \n const duration = parseInt(value);\n if (typeof (duration) === 'number' && value.indexOf(':') === -1 && duration > 12) {\n date = dayjs(currentStartDate).add(duration, 'm');\n }\n }\n\n if (date) {\n const minutes = date.diff(currentStartDate, 'minute');\n const closestDurationGroup = durationGroups.find(d => {\n return (minutes <= d.max);\n });\n if (closestDurationGroup) {\n const offset = [closestDurationGroup].reduce((previousValue, currentValue) => {\n return previousValue + currentValue.start;\n }, 0);\n const luxonDate = DateTime.fromMillis(date.valueOf());\n const closestDate = closestToTimeSlot(luxonDate, closestDurationGroup.step, 0);\n return closestDate.toFormat(dayJsHoursMinutes());\n }\n }\n\n return value;\n};\n\nexport const resetSecondsOnTimestamp = (timestamp: number) => {\n return DateTime.fromMillis(timestamp).set({ second: 0, millisecond: 0 }).toMillis();\n}\n\nexport const formatDateWithSuffix = (date: string): string => {\n const dateObj = new Date(date);\n const day = dateObj.getDate();\n const month = dateObj.toLocaleString(\"default\", { month: \"short\" });\n const year = dateObj.getFullYear();\n return `${day}${nthNumber(day)} ${month} ${year}`; //this.event.date_string;\n}\n\nconst nthNumber = (number) => {\n return number > 0\n ? [\"th\", \"st\", \"nd\", \"rd\"][\n (number > 3 && number < 21) || number % 10 > 3 ? 0 : number % 10\n ]\n : \"\";\n};\n\nexport const getListOfDateFormat = () => {\n return [\t\n 'MMMM dd y', \t//March 07 2023\n 'MMM dd, y',\t//Mar 07 2023\n 'MMMM dd',\t\t//March 07\n 'MMM dd', \t\t//Mar 07\n 'MM dd', \t\t//03 07\n\n 'MM-dd-yy',\t\t//03-07-23\n 'MM-dd-yyyy',\t//03-07-2023\n 'MMMM-dd-yyyy', //March-07-2023\n 'MMMM-dd-yy',\t//March-07-23\n\n 'MMMM-dd',\t\t//March-07\n 'MMM-dd',\t\t//Mar-07\n \n 'MMM-dd-y',\t\t//Mar-07-2023\n\n 'MM/dd',\t\t//03/07\n 'MM/dd/yy',\t\t//03/07/23\n 'MM/dd/yyyy',\t//03/07/2023\n \n 'dd/MM',\t\t//07/03\n 'dd/MM/yy',\t\t//07/03/23\n 'dd/MM/yyyy',\t//07/03/2023\n \n 'dd-MMMM',\t\t//07-March\n 'dd MMMM',\t\t//07 March\n 'dd-MMM',\t\t//07-Mar\n 'dd MMM',\t\t//07 Mar\n\n 'dd-MM-y',\t\t//07-03-23\n 'dd MMMM yy',\t//07 March 23\n \n 'dd/MMM/y',\t //07/Mar/2023\n 'dd/MMMM/y', //07/March/2023\n 'dd/MMM/yy', //07/Mar/23\n 'dd/MMMM/yy', //07/March/23\n \n\n 'dd-MMMM-yy',\t//07-March-23\n 'dd-MMM-yy',\t//07-Mar-23\n 'dd-MM-yy',\t\t//07-03-23\n 'MMMM-dd-yy',\t//March-07-23\n 'MMM-dd-yy',\t//Mar-07-23\n\n 'MMMM dd yy',\t//March 07 23\n 'MMM dd, yy',\t//Mar 07 23\n 'MM dd, yy',\t//03 07 23\n\n 'dd MMMM y',\t//07 March 2023\n 'dd MMM, y',\t//07 Mar 2023\n 'dd MM, yy',\t//07 03, 23\n 'dd-MMM-y',\t//07-Mar-2023\n\n 'h:mm a', // 3:30 pm\n 'h:mma' // 3:30 pm\n\n ];\n}","import { HashMap, Point } from './types.utilities';\n\nimport * as dayjs from 'dayjs';\nimport * as utc from 'dayjs/plugin/utc';\nimport * as timezone from 'dayjs/plugin/timezone';\nimport * as isToday from 'dayjs/plugin/isToday';\nimport * as weekday from 'dayjs/plugin/weekday';\nimport * as customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n// TODO: this is not the best place to import this timezone addition\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isToday);\ndayjs.extend(weekday);\ndayjs.extend(customParseFormat);\n\n/** Available console output streams. */\nexport type ConsoleStream = 'debug' | 'warn' | 'log' | 'error' | 'info';\n\n/**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\nexport function log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false,\n app_name: string = 'STAFF'\n) {\n if ((window as any).debug || force) {\n const colors: string[] = [\n 'color: #E91E63',\n 'color: #3F51B5',\n 'color: default',\n ];\n if (args) {\n console[stream](\n `%c[${app_name}]%c[${type}] %c${msg}`,\n ...colors,\n args\n );\n } else {\n console[stream](`%c[${app_name}]%c[${type}] %c${msg}`, ...colors);\n }\n }\n}\n\n/**\n * Get item from the nested object\n * @param keys List of sub-keys to search for\n * @param map Object to search\n */\n export function getItemWithKeys(keys: string[], map: HashMap) {\n const key = keys[0];\n if (map && key in map) {\n return keys.length > 1\n ? getItemWithKeys(keys.slice(1), map[key] || {})\n : map[key];\n }\n return null;\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the platform is a mobile device.\n */\nexport function isMobileDevice(): boolean {\n const r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;\n return !!navigator.userAgent.match(r);\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Mobile Safari.\n */\nexport function isMobileSafari(): boolean {\n const agent = navigator.userAgent;\n return !!(\n agent.match(/iPhone|iPad|iPod/) &&\n agent.match(/AppleWebKit/) &&\n !agent.match('CriOS')\n );\n}\n\n/* istanbul ignore next */\n/**\n * Checks whether the browser is Android Chrome.\n */\nexport function isAndroidChrome(): boolean {\n const agent = navigator.userAgent;\n return !!(agent.match(/Android/) && agent.match(/Chrome/));\n}\n\n/**\n * Generate string representation of a number with zeros padding the length\n * @param value Number to pad with zeros\n * @param length Length of the resulting string\n */\nexport function padZero(value: number, length: number): string {\n let str = value.toString();\n while (str.length < length) {\n str = '0' + str;\n }\n return str;\n}\n\n/**\n * Remove duplicates from the given array\n * @param array List of items to remove duplicates from\n * @param key Key on array objects to compare for uniqueness\n */\nexport function unique(array: T[], key: keyof T | undefined = undefined) {\n return array.filter(\n (el, pos, arr) =>\n el &&\n arr.indexOf(\n key\n ? arr.find((i) => i && i[key] === el[key])\n : arr.find((i) => i === el)\n ) === pos\n );\n}\n\n/**\n * Convert duration to human readable string\n * @param duration Duration in minutes\n * @param short Whether to use short form of duration words e.g. hours as h\n */\nexport function humaniseDuration(durationInput: number, size: string = 'long') {\n const duration = Math.floor(durationInput);\n if (!duration || duration < 0) {\n return '';\n }\n let singular = false;\n let format = { hours: ' hour', minutes: ' minute' };\n switch (size) {\n case 'medium':\n format = { hours: 'hr', minutes: 'min' };\n break;\n case 'short':\n format = { hours: 'h', minutes: 'm' };\n singular = true;\n break;\n }\n const h = Math.floor(duration / 60);\n let d = `${\n h >= 1\n ? h +\n (singular ? format.hours : format.hours + (h === 1 ? '' : 's'))\n : ''\n }`;\n if (duration % 60 !== 0) {\n if (d) {\n d += singular ? ' ' : ', ';\n }\n const m = duration % 60;\n d += `${\n m >= 1\n ? m +\n (singular\n ? format.minutes\n : format.minutes + (m === 1 ? '' : 's'))\n : ''\n }`;\n }\n return d;\n}\n\n/**\n * Get a filtered list of items\n * @param filter Value to filter on\n * @param items List of results to filter\n * @param fields Fields to check for matches on each item\n */\nexport function filterList(\n filter: string,\n items?: T[],\n fields: string[] = ['id']\n): T[] {\n let results: any[];\n // Tokenise filter string\n const filters = (filter || '').toLowerCase().split(' ');\n const list = {};\n for (const f of filters) {\n /* istanbul ignore else */\n if (f) {\n /* istanbul ignore else */\n if (!list[f]) {\n list[f] = 0;\n }\n list[f]++;\n }\n }\n // Group similar tokens\n const parts = [];\n for (const f in list) {\n /* istanbul ignore else */\n if (list.hasOwnProperty(f)) {\n parts.push({ word: f, count: list[f], regex: new RegExp(f, 'gi') });\n }\n }\n parts.sort(\n (a, b) => b.word.length - a.word.length || a.word.localeCompare(b.word)\n );\n const item_list = JSON.parse(JSON.stringify(items || []));\n /* istanbul ignore else */\n if (filter) {\n results = item_list.filter((item) => {\n let match_count = 0;\n item.match_index = 65535;\n item.match = '';\n const field_list = {};\n // Initialise field match variables\n for (const f of fields) {\n field_list[f] = {\n value: (item[f] || '').toLowerCase(),\n index: 65536,\n matched: 0,\n };\n }\n // Search for matches with the tokenised filter string\n for (const i of parts) {\n /* istanbul ignore else */\n if (i.word) {\n // Check fields for matches\n for (const f of fields) {\n const field = field_list[f];\n const index = field.value.indexOf(i.word);\n field.index = index < field.index ? index : field.index;\n field.matches = (\n field.value.match(i.regex) || []\n ).length;\n field.value = field.value.replace(i.regex, ' ');\n }\n // Update token match count\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.matches >= i.count) {\n match_count++;\n // Update field matches\n let changed = 0;\n const tokens = (\n item[`match_${f}`] ||\n item[f] ||\n ''\n ).split(' ');\n for (const k of tokens) {\n /* istanbul ignore else */\n if (changed >= i.count) {\n break;\n }\n /* istanbul ignore else */\n if (\n k.toLowerCase().indexOf(i.word) >= 0 &&\n k.indexOf('`') < 0\n ) {\n tokens[tokens.indexOf(k)] = k.replace(\n i.regex,\n '`$&`'\n );\n changed++;\n }\n }\n item[`match_${f}`] = tokens.join(' ');\n break;\n }\n }\n }\n }\n // Get field with the most relevent match\n for (const f of fields) {\n const field = field_list[f];\n /* istanbul ignore else */\n if (field.index < item.match_index && field.index >= 0) {\n item.match_index = field.index;\n item.match = f;\n }\n }\n return (\n item.match_index >= 0 &&\n item.match &&\n match_count >= parts.length\n );\n });\n } else {\n results = item_list;\n }\n // Sort by order of relevence then name\n results.sort((a, b) => {\n const diff = a.match_index - b.match_index;\n return diff === 0 ? a.name.localeCompare(b.name) : diff;\n });\n return results;\n}\n\n/**\n * Convert a match string from `filterList` to renderable HTML\n * @param str Match string to change\n */\nexport function matchToHighlight(str: string): string {\n /* istanbul ignore else */\n if (str) {\n str = str.replace(\n /\\`[a-zA-Z0-9\\@\\.\\_]*\\`/g,\n '$&'\n );\n str = str.replace(/\\`/g, '');\n }\n return str;\n}\n\n/**\n * Convert time string to ms from UTC epoch for today\n * @param time Time string in the format `HH:mm`\n */\nexport function timeToDate(time: string): number {\n const parts = time.split(':');\n const date = DateNow(new Date())\n .setValue({\n hour: +parts[0],\n minute: +parts[1],\n })\n .startOfValue('minute');\n return date.ms;\n}\n\n/**\n * Generate a random number\n * @param ceil Biggest value to generate not inclusive\n * @param floor Smallest value to generate. Defaults to 0\n */\nexport function randomInt(ceil: number, floor: number = 0) {\n return Math.floor(Math.random() * (ceil - floor)) + floor;\n}\n\n/**\n * Get time format string for locale\n * @param isLowerCaseAmPm - if true, we use lowercase for am/pm.\n */\nexport function timeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const hoursMinutes = (): string => (is24HourTime() ? 'HH:mm' : 'h:mma');\n\nexport function dayJsTimeFormatString(): string {\n return is24HourTime() ? 'HH:mm' : 'h:mma';\n}\n\nexport const dayJsHoursMinutes = (): string =>\n is24HourTime() ? 'HH:mm' : 'h:mm';\n\n/**\n * Converts a timeZone name into a date object.\n * @param timeZoneName - name of timezone\n */\nexport const timezoneNameToDate = (\n timeZoneName: string | undefined\n): DateTZ | undefined => {\n let zone: DateTZ | undefined;\n if (timeZoneName) {\n try {\n zone = DateNow(new Date()).toZone(timeZoneName);\n } catch (e) {\n // invalid timezone. Suppress logs here.\n // console.error(e);\n }\n }\n return zone;\n};\n\nexport const timezoneDisplay = (date: DateTZ) =>\n !!date ? `${date.formatDate('ZZZZ')}` : '';\nexport const gmtOffsetDisplay = (date: DateTZ) =>\n !!date ? `(GMT${date.formatDate('ZZ')})` : '';\n\n/**\n * Returns a full time with timezone.\n * @param date\n */\nexport function timeWithZoneFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${timezoneDisplay(date)}`;\n}\n\nexport function timeWithGmtOffsetFormatString(date: DateTZ): string {\n return `${date\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(date)}`;\n}\n\n/**\n * Returns a full start end range.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}`;\n}\n\n/**\n * Returns a full start end range with timezone.\n *\n * Start and end both use lowercase am/pm markers (c.f. timeFormatString).\n * @param startDateTz start time DateTZ object\n * @param endDateTz end time DateTZ object\n */\nexport function startEndTimeWithZoneFormatString(\n startDateTz: DateTZ,\n endDateTz: DateTZ\n): string {\n return `${startDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()}-${endDateTz\n .formatDate(timeFormatString())\n .toLocaleLowerCase()} ${gmtOffsetDisplay(startDateTz)}`;\n}\n\n/**\n * Returns a full date with weekday day month year.\n * @param date\n * @param comma optional boolean to display a comma after the month\n */\nexport function dateLocalFormatString(date: DateTZ, comma?: boolean): string {\n if (comma) {\n return date.formatLocalDate('cccc d MMMM, yyyy');\n }\n return date.formatLocalDate('cccc d MMMM yyyy');\n}\n\nexport function dateBuildingFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('cccc d MMMM, yyyy');\n }\n return date.formatDate('cccc d MMMM yyyy');\n}\n\nexport function shorterLocalDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatLocalDate('ccc d MMM, yyyy');\n }\n return date.formatLocalDate('ccc d MMM yyyy');\n}\n\nexport function shorterBuildingDateFormatString(\n date: DateTZ,\n comma?: boolean\n): string {\n if (comma) {\n return date.formatDate('ccc d MMM, yyyy');\n }\n return date.formatDate('ccc d MMM yyyy');\n}\n\n/** Whether locale string is displayed in 24 hour time */\nexport function is24HourTime(): boolean {\n const date = new Date();\n const localeString = date\n .toLocaleTimeString(\n document.querySelector('html').getAttribute('lang') ||\n navigator.language\n )\n .toLowerCase();\n return localeString.indexOf('am') < 0 && localeString.indexOf('pm') < 0;\n}\n\n/* istanbul ignore next */\n/**\n * Downloads a file to the users computer with the given filename and contents\n * @param filename Name of the file to download\n * @param contents Contents of the file to download\n */\nexport function downloadFile(filename: string, contents: string) {\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' +\n encodeURIComponent('\\uFEFF' + contents)\n );\n element.setAttribute('download', filename);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\n/**\n * Parse raw CSV data into a JSON object\n * @param csv CSV data to parse\n */\nexport function csvToJson(csv: string) {\n const lines = csv.split('\\n');\n let fields = lines.splice(0, 1)[0].split(',');\n fields = fields.map((v) => v.replace('\\r', ''));\n const list: any[] = [];\n for (const line of lines) {\n let parts = line.split(',');\n parts = parts.map((v) => v.replace('\\r', ''));\n /* istanbul ignore else */\n if (parts.length >= fields.length) {\n const item: any = {};\n for (let i = 0; i <= parts.length; i++) {\n let part = null;\n part = parts[i];\n /* istanbul ignore else */\n if (part !== undefined) {\n item[(fields[i] || '').split(' ').join('_').toLowerCase()] =\n part;\n }\n }\n list.push(item);\n }\n }\n\n return list;\n}\n\n/**\n * Convert javascript array to CSV string\n * @param json Javascript array to convert\n */\nexport function jsonToCsv(json: HashMap[]) {\n /* istanbul ignore else */\n if (json instanceof Array && json.length > 0) {\n const keys = Object.keys(json[0]);\n const valid_keys = keys.filter((key) => json[0].hasOwnProperty(key));\n return `${valid_keys.join(',')}\\n${json\n .map((item) =>\n valid_keys\n .map((key) => {\n return typeof item[key] !== 'boolean'\n ? `\"${item[key] || ''}\"`\n : item[key];\n })\n .join(',')\n )\n .join('\\n')}`;\n }\n return '';\n}\n\n/* istanbul ignore next */\n/**\n * detect IE\n * returns version of IE or false, if browser is not Internet Explorer\n */\nexport function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n/**\n * Grab point details from mouse or touch event\n * @param event Event to grab details from\n */\nexport function eventToPoint(event: MouseEvent | TouchEvent): Point {\n if (!event) {\n return { x: -1, y: -1 };\n }\n if (event instanceof MouseEvent) {\n return { x: event.clientX, y: event.clientY };\n } else {\n return event.touches && event.touches.length > 0\n ? { x: event.touches[0].clientX, y: event.touches[0].clientY }\n : { x: -1, y: -1 };\n }\n}\n\n/* istanbul ignore next */\n/**\n * Flatten nested array\n * @param an_array Array to flatten\n */\nexport function flatten(an_array: T[]) {\n const stack = [...an_array];\n const res = [];\n while (stack.length) {\n // pop value from stack\n const next = stack.pop();\n if (Array.isArray(next)) {\n // push back array items, won't modify the original input\n stack.push(...next);\n } else {\n res.push(next);\n }\n }\n // reverse to restore input order\n return res.reverse();\n}\n\nconst seed = xmur3('PlaceOS');\nconst rand = sfc32(0x9e3779b9, 0x243f6a88, 0xb7e15162, seed());\n\nexport function predictableRandomInt(ceil: number = 100, floor: number = 0) {\n return Math.floor(rand() * (ceil - floor)) + floor;\n}\n\n// https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript\nfunction xmur3(str) {\n for (var i = 0, h = 1779033703 ^ str.length; i < str.length; i++)\n (h = Math.imul(h ^ str.charCodeAt(i), 3432918353)),\n (h = (h << 13) | (h >>> 19));\n return function () {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n}\n\nfunction sfc32(a, b, c, d) {\n return function () {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n var t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n\nexport function isLessThanBreakpoint(breakpoint: number): boolean {\n if (window) {\n return window.innerWidth < breakpoint;\n }\n return false;\n}\n\nexport function toTitleCase(str: string): string {\n return typeof str === 'string'\n ? str\n .toLowerCase()\n .split(' ')\n .map(function (word) {\n return word.replace(word[0], word[0].toUpperCase());\n })\n .join(' ')\n : '';\n}\n","\nimport { Directive, OnDestroy } from '@angular/core';\nimport { BaseClass } from './base.class';\nimport { SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n@Directive({\n selector: 'a-very-basic-component-image-that-should-not-be-used'\n})\nexport class ImageDirective extends BaseClass implements OnDestroy {\n public foundImages?: SpaceImageObject[];\n public loadImages?: BehaviorSubject\n public ngOnDestroy(): void {\n this.destroy();\n }\n}","import {\n Directive,\n ElementRef,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=number], input[numbersOnly]'\n})\nexport class NumbersOnlyDirective {\n\n constructor(private _el: ElementRef) {\n }\n\n @HostListener('input', ['$event']) onInputChange(event) {\n const initalValue = this._el.nativeElement.value;\n this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');\n if (initalValue !== this._el.nativeElement.value) {\n event.stopPropagation();\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'replace'\n})\nexport class ReplacePipe implements PipeTransform {\n\n transform(value: string, from: string = '_', to: string = ' '): string {\n return (value|| '').split(from).join(to);\n }\n}\n","export * from './lib/bookings.module';\nexport * from './lib/bookings.actions'\nexport * from './lib/bookings.reducer'\nexport * from './lib/bookings.types'\nexport * from './lib/bookings.utils'\n","\nimport { IBookingQueryOptions, PaginatedBooking } from '@mckinsey-converge/data-common';\nimport { \n createLoadingAction\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n MyBookingsState,\n MyBookingsStoreState,\n} from './bookings.types';\nimport {\n createAction,\n props\n} from '@ngrx/store';\n\nexport const bookingStateSelector = (state: MyBookingsStoreState) => state.bookings;\n\nexport const loadBookingsWithQuery = createAction('[Bookings] Load Bookings with query', props());\n\nexport const loadHomepageBookingsResults = createLoadingAction('HomepageBookings', 'homepage');\n\nexport const loadUpcomingBookingsResults = createLoadingAction('UpcomingBookings', 'upcoming');\n\nexport const loadPastBookingsResults = createLoadingAction('PastBookings', 'past');\n\nexport const loadCancelledBookingsResults = createLoadingAction('CancelledBookings', 'cancelled');\n\nexport const loadBookingByIdResults = createLoadingAction('BookingById', 'bookingById');\n\nexport const clearBookingByIdResults = createAction('[BookingById] Clear Booking Data');\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect,\n ofType\n} from '@ngrx/effects';\nimport {\n IBookingQueryOptions,\n BookingsPaginatedService\n} from '../../../data-common/src/lib/bookings';\nimport {\n createLoadingEffect,\n LoadingAction\n} from '@mckinsey-converge/loading';\nimport {\n loadHomepageBookingsResults,\n loadPastBookingsResults,\n loadUpcomingBookingsResults,\n loadCancelledBookingsResults,\n loadBookingsWithQuery,\n loadBookingByIdResults\n} from './bookings.actions';\nimport { mergeMap } from 'rxjs/operators';\nimport {\n\n} from './bookings.utils';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Injectable()\nexport class BookingsEffects {\n constructor(private actions: Actions,\n private bookingService: BookingsPaginatedService) {\n }\n\n @Effect()\n public afterBookingsRequestResultsLoadOthersEffect = this.actions.pipe(\n ofType(loadBookingsWithQuery),\n mergeMap((action: LoadingAction) => {\n const date = new DateTZ({date: action.from})\n const yourBookingsRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.subtractValue({ minutes: 5 }).seconds}`,\n },\n include_rooms: true\n };\n const upcomingRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch asc',\n filters: {\n end_epoch: `>=${date.seconds}`,\n },\n include_rooms: true\n };\n const pastRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: false,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n end_epoch: `<${date.seconds}`,\n },\n include_rooms: true\n };\n const cancelledRequest = {\n email: action.email,\n pagination: true,\n limit: null,\n offset: action.offset,\n show_cancelled: true,\n sort: 'start_epoch desc',\n filters: {\n start_epoch: `>${date.subtractValue({ hours: 48 }).seconds}`,\n },\n include_rooms: true\n };\n const byIdRequest = {\n email: action.email,\n id: action.id,\n pagination: true,\n limit: 1,\n include_rooms: true\n };\n\n const effects = [];\n switch(action.target) {\n case 'upcoming':\n effects.push(loadUpcomingBookingsResults.request(upcomingRequest));\n break;\n case 'past':\n effects.push(loadPastBookingsResults.request(pastRequest));\n break;\n case 'cancelled':\n effects.push(loadCancelledBookingsResults.request(cancelledRequest));\n break;\n case 'bookingById':\n effects.push(loadBookingByIdResults.request(byIdRequest));\n break\n case 'homepage':\n effects.push(loadHomepageBookingsResults.request(yourBookingsRequest));\n // effects.push(loadPastBookingsResults.request(pastRequest));\n break\n default:\n }\n return effects;\n })\n );\n\n @Effect()\n public loadHomepageBookingsResultsEffect = createLoadingEffect(this.actions, loadHomepageBookingsResults,\n (action) => this.bookingService.userBookings(action, `homepage-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadUpcomingBookingsResultsEffect = createLoadingEffect(this.actions, loadUpcomingBookingsResults,\n (action) => this.bookingService.userBookings(action, `upcoming-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n \n @Effect()\n public loadPastBookingsResultsEffect = createLoadingEffect(this.actions, loadPastBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `past-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadCancelledBookingsResultsEffect = createLoadingEffect(this.actions, loadCancelledBookingsResults,\n (action) =>\n this.bookingService.userBookings(action, `cancelled-${action.filters?.start_epoch || ''}${action.filters?.end_epoch || ''}`));\n\n @Effect()\n public loadBookingByIdResultsEffect = createLoadingEffect(this.actions, loadBookingByIdResults,\n (action) => \n this.bookingService.userBookings(action, `bookingById-${action.id}`));\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { bookingsReducer } from './bookings.reducer';\nimport { BookingsEffects } from './bookings.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n EffectsModule.forFeature([BookingsEffects]),\n StoreModule.forFeature('bookings', bookingsReducer)\n ]\n})\nexport class BookingsModule {\n}\n","import { LoadingModel } from '@mckinsey-converge/loading';\nimport {\n createReducer,\n on\n} from '@ngrx/store';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n clearBookingByIdResults,\n} from './bookings.actions';\nimport { MyBookingsState } from './bookings.types';\n \nimport { \n BookingFormState,\n clearBookingFormData,\n clearRoomFilters,\n openBookingSurvey,\n storeBookingFormData,\n storeRoomFilters\n} from '@mckinsey-converge/data-common';\n\n\nexport const initialBookingsState: MyBookingsState = {\n query: LoadingModel.empty(),\n homepage: LoadingModel.empty(),\n upcoming: LoadingModel.empty(),\n past: LoadingModel.empty(),\n cancelled: LoadingModel.empty(),\n bookingById: LoadingModel.empty(),\n};\n\nexport const bookingsReducer = createReducer(initialBookingsState,\n on(clearBookingByIdResults, (state: MyBookingsState) => ({\n ...state,\n bookingById: LoadingModel.empty(),\n }) as MyBookingsState),\n ...loadHomepageBookingsResults.ons,\n ...loadUpcomingBookingsResults.ons,\n ...loadPastBookingsResults.ons,\n ...loadCancelledBookingsResults.ons,\n ...loadBookingByIdResults.ons,\n );\n\n\n\n export const initialBookingFormState: BookingFormState = {\n activeFormFilters: []\n };\n \n export const bookingFormReducer = createReducer(initialBookingFormState,\n on(storeBookingFormData, (state: BookingFormState, action) => {\n return {\n ...state,\n activeForm: {\n ...state.activeForm,\n ...action.payload\n }\n } as BookingFormState;\n }),\n on(clearBookingFormData, state => ({\n ...state,\n activeForm: undefined\n }) as BookingFormState),\n on(openBookingSurvey, state => ({\n ...state,\n bookingCompleted: new Date()\n }) as BookingFormState),\n on(storeRoomFilters, (state: BookingFormState, action) => {\n return {\n ...state,\n activeFormFilters: action.payload\n } as BookingFormState;\n }),\n on(clearRoomFilters, (state: BookingFormState) => ({\n ...state,\n activeFormFilters: initialBookingFormState.activeFormFilters\n }) as BookingFormState)\n );\n \n","import { Booking } from '@mckinsey-converge/data-common';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport const mapBookingToSelectOption = (booking?: Booking): SelectOption => booking ? ({\n value: booking.id,\n display: booking.name\n}) : undefined;\n","import { \n createLoadingAction,\n} from '../../../loading/src/lib/loading.actions';\nimport {\n Building,\n BuildingCity,\n} from '../../../data-common/src/lib/organisation/building.class';\nimport {\n BuildingLevel,\n} from '../../../data-common/src/lib/organisation/level.class'\nimport {\n Organisation,\n} from '../../../data-common/src/lib/organisation/organisation.class'\nimport { createSelector } from '@ngrx/store';\nimport {\n BuildingState,\n BuildingStoreState\n} from './buildings.types';\n\nexport const loadBuildings = createLoadingAction('Buildings', 'data');\n\nexport const buildingStateSelector = (state: BuildingStoreState) => state.buildings;\n\nexport const selectLoadBuildingsSuccess = createSelector(buildingStateSelector, loadBuildings.selectors.optionalSuccess);\n\n/**\n * Groups buildings by city\n */\nexport const selectBuildingOptionsGroupedByCity = createSelector(loadBuildings.selectors.optionalSuccess, (success) => {\n if (success) {\n const mapped = new Map();\n success.forEach(s => {\n const found = Array.from(mapped.keys()).find(c => c.name === s.city);\n let list = found ? mapped.get(found) : undefined;\n if (!list) {\n list = [];\n mapped.set({\n name: s.city,\n timezone: s.timezone\n }, list);\n }\n list.push(s);\n });\n return mapped;\n }\n return new Map();\n});\n\nexport const selectLevelByZoneId = createSelector(selectLoadBuildingsSuccess,\n (buildings, param: string) => {\n if (buildings) {\n return buildings.map(b => b.levels.find((l: BuildingLevel) => l.id === param))\n ?.[0] ?? undefined;\n }\n return undefined;\n });\n","export * from './lib/data-common.module';\nexport * from './lib/booking';\nexport * from './lib/bookings';\nexport * from './lib/catering';\nexport * from './lib/location';\nexport * from './lib/organisation';\nexport * from './lib/spaces';\nexport * from './lib/users';\nexport * from './lib/app.service';\nexport * from './lib/hotkeys.service';\nexport * from './lib/base.service';\nexport * from './lib/base-api.class';\nexport * from './lib/reports'\nexport * from './lib/service-manager.class';\nexport * from './lib/settings.service';\nexport * from './lib/spec-helpers';\nexport * from './lib/settings.interfaces';\nexport * from './lib/validation.utilities';\nexport * from './lib/status.interfaces';\nexport * from './lib/recurrence/recurrence.utils';\nexport * from './lib/close-modal-dialog-service';\nexport * from './lib/validation.utilities';\nexport * from './lib/collapse-accordion-service';","import { HashMap } from '@mckinsey-converge/base';\n\n/**\n * Convert map into a query string\n * @param map Key value pairs to convert\n */\nexport function toQueryString(map: HashMap) {\n let str = '';\n if (map) {\n for (const key in map) {\n if (map.hasOwnProperty(key) && map[key] !== undefined && map[key] !== null) {\n str += `${(str ? '&' : '')}${key}=${map[key]}`;\n }\n }\n }\n return str;\n}\n","import {\n ApplicationRef,\n Injectable,\n NgZone,\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { take, first } from 'rxjs/operators';\n\nimport { ComposerService } from '@placeos/composer';\nimport { PlaceOSOptions } from '@placeos/ts-client';\nimport { HeapIoService } from '@acaprojects/ngx-heap-io';\n\nimport {\n BehaviorSubject,\n Observable,\n Subject\n} from 'rxjs';\n\nimport {\n ApplicationLoadingState,\n BaseClass,\n ConsoleStream,\n log\n} from '@mckinsey-converge/base';\nimport { SettingsService } from './settings.service';\n\nimport { HotkeysService } from './hotkeys.service';\nimport {\n ApplicationIcon,\n ComposerSettings\n} from './settings.interfaces';\nimport { EnvironmentService } from '../../../environment/src/lib/environment.service'; // '@mckinsey-converge/environment';\nimport {\n Store\n} from '@ngrx/store';\nimport { selectCurrentUser } from '../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../user/src/lib/user.types';\nimport { Booking } from './bookings';\nimport { filter } from 'rxjs/operators';\nimport { SnackBarService } from '../../../ui/src/lib/custom-snackbar-component/custom-snackbar-component.service';\n\ndeclare global {\n interface Window {\n application: ApplicationService;\n mock: {\n enabled: boolean;\n backend: any;\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApplicationService extends BaseClass {\n /** Map of state variables for Service */\n protected _subjects: {\n [key: string]: BehaviorSubject | Subject;\n } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n _kioskFormFilter: boolean;\n\n constructor(\n public store: Store,\n public analytics: HeapIoService,\n private _app_ref: ApplicationRef,\n private _zone: NgZone,\n private _title: Title,\n private _settings: SettingsService,\n private _hotkeys: HotkeysService,\n private _composer: ComposerService,\n private _snackbar: MatSnackBar,\n private _environment: EnvironmentService,\n private snack: SnackBarService\n\n ) {\n super();\n this.set('system', null);\n this.set('title', 'Home');\n this.set('loading', {});\n this.set('CONCIERGE.day_view.viewing', null);\n this.set('undo', new BehaviorSubject<{\n action: 'series' | 'booking',\n booking: Booking\n } | null>(null));\n\n this.set('APP.breakdown', false);\n\n this._app_ref.isStable.pipe(first(_ => _)).subscribe(() => {\n this._zone.run(() => {\n this.log('APP', `Application has stablised.`);\n this.waitForSettings();\n });\n });\n }\n\n public set kioskFormFilter(isIt: boolean) {\n this._kioskFormFilter = isIt;\n }\n\n public get kioskFormFilter():boolean {\n return this._kioskFormFilter \n }\n\n /** Analytics service */\n public get Analytics() {\n return {};\n }\n\n /** Hotkeys service */\n public get Hotkeys() {\n return this._hotkeys;\n }\n\n /**\n * Get a setting from the settings service\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n return this._settings.get(key);\n }\n\n /**\n * Title of the page\n */\n public set title(value: string) {\n const title_suffix = this.setting('app.title');\n this.set('title', value);\n this._title.setTitle(`${value ? value + ' | ' : ''}${title_suffix}`);\n }\n\n /**\n * Title of the page\n */\n public get title(): string {\n return this._title.getTitle();\n }\n\n /** Root API Endpoint */\n public get endpoint() {\n return `/api/staff/`;\n }\n\n /** Root API Endpoint for engine */\n public get engine_endpoint() {\n return this._composer.auth.api_endpoint + '/';\n }\n\n /** Whether settings has been loaded */\n public get has_settings(): boolean {\n return this._settings.is_initialised;\n }\n\n /**\n * Create notification popup\n * @param type CSS Class to add to the notification\n * @param message Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n * @param icon Icon to render to the left of the notification message\n */\n public notify(\n type: string,\n message: string,\n action: string = 'OK',\n on_action?: () => void,\n icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'info'\n }\n ): void {\n this.openSnack(message, type);\n // const snackbar_ref = this._snackbar.open(message, action, {\n // panelClass: [type],\n // duration: 5000\n // });\n // this.subscription(\n // 'snackbar_close',\n // snackbar_ref.afterDismissed().subscribe(() => {\n // this.unsub('snackbar_close');\n // this.unsub('notify');\n // })\n // );\n // if (action) {\n // on_action = on_action || (() => snackbar_ref.dismiss());\n // this.subscription(\n // 'notify',\n // snackbar_ref.onAction().subscribe(() => on_action())\n // );\n // }\n }\n\n public openSnack(message, type) {\n this.snack.openSnackBar(message, type, 5000);\n }\n \n /**\n * Create success notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifySuccess(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'done'\n };\n this.notify('success', msg, action, on_action, icon);\n }\n\n /**\n * Create error notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyError(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'error'\n };\n this.notify('error', msg, action, on_action, icon);\n }\n\n /**\n * Create warning notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyWarn(msg: string, action?: string, on_action?: () => void): void {\n const icon: ApplicationIcon = {\n type: 'icon',\n class: 'material-icons',\n content: 'warning'\n };\n this.notify('warn', msg, action, on_action, icon);\n }\n\n /**\n * Create info notification popup\n * @param msg Message to display on the notificaiton\n * @param action Display text for the callback action\n * @param on_action Callback of action on the notification\n */\n public notifyInfo(msg: string, action?: string, on_action?: () => void): void {\n this.notify('info', msg, action, on_action);\n }\n\n /**\n * Log data to the browser console\n * @param type Type of message\n * @param msg Message body\n * @param args array of argments to log to the console\n * @param stream Stream to emit the console on. 'debug', 'log', 'warn' or 'error'\n * @param force Whether to force message to be emitted when debug is disabled\n */\n public log(\n type: string,\n msg: string,\n args?: any,\n stream: ConsoleStream = 'debug',\n force: boolean = false\n ): void {\n log(type, msg, args, stream, force);\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n return this._subjects[name] && this._subjects[name] instanceof BehaviorSubject\n ? (this._subjects[name] as BehaviorSubject).getValue()\n : null;\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n public set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /** Wait for settings to be initialised before setting up the application */\n private waitForSettings() {\n // Wait until the settings have loaded before initialising\n this._settings.initialised.pipe(first(_ => _)).subscribe(() => this.init());\n }\n\n /**\n * Initialise application services\n */\n private init(): void {\n this.setupComposer();\n this.subscription('currentUser', this.store.select(selectCurrentUser)\n .pipe( filter(user => user !== undefined) )\n .pipe(take(1))\n .subscribe((user: any) => {\n // Once we know we have the user loaded.\n this.setupAnalytics(user?.fmno);\n })\n );\n this._composer.initialised.pipe(first(_ => _)).subscribe(() => {\n this._initialised.next(true);\n });\n // Add service to window if in debug mode\n if (window.debug) {\n window.application = this;\n }\n }\n\n /**\n * Initialise the composer library comms\n */\n private setupComposer(): void {\n this.log('SYSTEM', 'Setup up composer...');\n const loading: ApplicationLoadingState = this.get('loading');\n loading.composer = {\n message: 'Initialising service connection',\n state: 'loading'\n };\n this.set('loading', loading);\n // Get application settings\n const settings: ComposerSettings = this._settings.get('composer') || {};\n const protocol = settings.protocol || location.protocol;\n const host = settings.domain || location.hostname;\n const port = settings.port || location.port;\n const url = settings.use_domain ? `${protocol}//${host}:${port}` : location.origin;\n const route = host.includes('localhost') && port === '4200' ? '' : settings.route || '';\n const mock =\n this._settings.get('mock') ||\n location.href.includes('mock=true') ||\n localStorage.getItem('mock') === 'true';\n // Generate configuration object\n const config: PlaceOSOptions = {\n scope: 'public',\n host: `${host}:${port}`,\n auth_uri: `${url}/auth/oauth/authorize`,\n token_uri: `${url}/auth/token`,\n redirect_uri: `${location.origin}${route}/oauth-resp.html`,\n handle_login: !settings.local_login,\n mock\n };\n this._composer.setup(config);\n loading.composer = {\n message: 'Initialising service connection',\n state: 'complete'\n };\n this.set('loading', loading);\n }\n\n private setupAnalytics(fmno: string) {\n this.log('HEAP', `Loading heap ${this._environment?.heap_io_id}`);\n // Default Heap app ID via the default setting\n const heapIo = this._settings.get('app.heap_io');\n if (this._environment?.heap_io_id) {\n // Apply Heap app ID via the environmental setting\n heapIo.app_id = this._environment.heap_io_id;\n }\n if (heapIo) {\n this.analytics.load(heapIo);\n if (fmno) {\n this.analytics.identify(fmno);\n }\n } else {\n this.log('HEAP', `Heap could not be found for the current frontend ${this._settings.frontend}`);\n }\n }\n\n}\n","import { Subject } from 'rxjs';\n\nimport {\n BaseClass,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n ServiceLike,\n ServiceManager\n} from './service-manager.class';\n\nexport type ApiEventType = 'value_change' | 'item_saved' | 'reset' | 'other';\n\nexport interface ApiEvent {\n type: ApiEventType;\n metadata: T;\n}\n\n\nexport class BaseDataClass extends BaseClass {\n /** Subject for emitting events on the object */\n protected readonly event_subject = new Subject();\n /** Observable for events on this object */\n public readonly events = this.event_subject.asObservable();\n /** Unique Identifier of the object */\n public readonly id: string;\n /** Human readable name of the object */\n public readonly name: string;\n /** Email address associated with the object */\n public readonly email: string;\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(BaseDataClass);\n }\n\n constructor(raw_data: HashMap) {\n super();\n this.id = raw_data.id || raw_data.zone_id || raw_data.email || '';\n this.name = raw_data.name || '';\n this.email = `${raw_data.email || ''}`.toLowerCase();\n }\n\n /**\n * Save pending changes to server\n */\n public save(): Promise {\n if (this._service) {\n const form = this.toJSON();\n return new Promise((resolve, reject) => {\n const promise = this.id\n ? this._service.update(this.id, form)\n : this._service.add(form);\n promise.then(\n (d) => {\n this.event_subject.next({ type: 'item_saved', metadata: d });\n resolve(d);\n },\n (_) => reject(_)\n );\n });\n } else {\n Promise.reject('No service to process request');\n }\n }\n\n /**\n * Delete this item from the server\n */\n public delete(): Promise {\n if (this.id) {\n return this._service.delete(this.id);\n }\n }\n\n /**\n * Run task for this item on the service\n * @param task_name Name of the task\n * @param parameters Parameters to pass to the task request\n */\n public runTask(task_name: string, parameters: HashMap): Promise {\n if (this.id) {\n return this._service.task(this.id, task_name, parameters);\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: BaseDataClass): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._service;\n delete obj._changes;\n delete obj.event_subject;\n delete obj.events;\n // Remove parent private members\n delete obj._timers;\n delete obj._intervals;\n delete obj._subscriptions;\n delete obj._server_names;\n delete obj._initialised;\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substring(1)] || key.substring(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): BaseDataClass {\n return new BaseDataClass(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): BaseDataClass {\n return new BaseDataClass({ ...this, id: null, email: null });\n }\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseDataClass } from './base-api.class';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class BaseAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = typeof query_params.cache !== 'boolean' ? query_params.cache || 1000 : 1000;\n typeof query_params.cache !== 'boolean' && delete query_params.cache;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n // Bring back once implemented in the API\n // if (this.settingsService.concierge) {\n // query = query + '&check_access=true';\n // }\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: T[] | HashMap[] = [];\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n result =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryObsr(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );;\n }\n\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse | HashMap[]{\n let result: IEngineResponse | HashMap[] =\n d && d instanceof Array\n ? d.map((i) => this.process(i))\n : d && !(d instanceof Array) && d.results\n ? (d.results as HashMap[])\n : d && !(d instanceof Array) && !d.results \n ? [d]\n : [];\n return result;\n }\n\n /**\n * query function version -2 - returns observable instead of promise...\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public queryRoomsForQR(query_params: HashMap = {}):Observable{\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n let query = toQueryString(query_params);\n const key = `query|${query}`;\n const url = `${this.route(engine)}${query ? '?' + query : ''}`;\n return this.http.get(url);\n }\n \n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public \n task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * V-2\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public taskObsr( \n id: string, \n task_name: string, \n form_data: HashMap = {}, \n method: 'post' | 'get' = 'post' ):Observable{\n const query = toQueryString(this.injectConcierge(form_data));\n let engine = false;\n let cache = 1000;\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n\n const request = method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n \n return request;\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param id url id with respect to update api\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public updateObsr(id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n \n return this.http.put(url, body)\n .pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) \n ),\n catchError((error: any, result?: T) => {\n console.log(error);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n return of(error as T);\n })\n );\n\n }\n\n /**\n * update function version -2 - returns observable instead of promise...\n * @param form_data data to be update \n * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n * @param query_params Map of query paramaters to add to the request URL\n */\n public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n const query = should_inject_concierge ? toQueryString(this.injectConcierge(query_params)) : false;\n const url = `${this.route(query_params.engine)}/${apiSubRoute}${query ? '?' + query : ''}`;\n const body = should_inject_concierge ? this.injectConcierge(form_data) : form_data;\n\n const token = sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\n const headers = new HttpHeaders({\n 'Authorization': `Bearer ${token}`,\n });\n \n const requestOptions = { headers: headers };\n\n // return this.httpClient.post(url, body, {\n // ...requestOptions \n // });\n\n return this.http.post(url, body);\n\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { Building } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { User } from '../users';\nimport { Space } from '../spaces';\nimport { SpaceBookingRuleOptions } from '../spaces/space.class';\nimport {\n BookingFormData,\n} from './booking.form.data';\nimport { statusFromBookings } from '../bookings/booking.utilities';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { SpaceStatus } from '../bookings/space.types';\nimport { SpaceFeatures } from '../spaces/space.class';\nimport { HashMap } from 'libs/base/src/lib/types.utilities';\n\nexport const spaceExtraFeatureToDisplayName = (feature: SpaceFeatures) => {\n switch (feature) {\n case SpaceFeatures.VideoConference:\n return 'Video conference (VC)';\n case SpaceFeatures.ConferencePhone:\n return 'Conference phone';\n case SpaceFeatures.WirelessContentSharing:\n return 'Wireless content sharing';\n case SpaceFeatures.FlipChart:\n return 'Flip chart';\n case SpaceFeatures.Glassboard:\n return 'Glassboard';\n case SpaceFeatures.ElectronicWhiteboard:\n return 'Whiteboard';\n case SpaceFeatures.ConferenceRoom:\n return 'Conference';\n case SpaceFeatures.TeamRoom:\n return 'Team';\n case SpaceFeatures.PartnerOffice:\n return 'Partner';\n case SpaceFeatures.PhoneBooth:\n return 'Phone booth';\n case SpaceFeatures.NaturalLight:\n return 'Room with window only (natural light)';\n case SpaceFeatures.BoardRoom:\n return 'Boardroom room style';\n case SpaceFeatures.CocktailRoom:\n return 'Cocktail room style';\n case SpaceFeatures.TheatreRoom:\n return 'Theatre room style';\n case SpaceFeatures.WorkshopRoom:\n return 'Workshop room style';\n case SpaceFeatures.UShapeRoom:\n return 'U Shape room style';\n case SpaceFeatures.Miscellaneous:\n return 'Miscellaneous room style'\n case SpaceFeatures.Catering:\n return 'Rooms with catering';\n // TODO: add any special display handling here.\n default:\n return feature;\n }\n};\n\n\nexport const instantBookOption: SelectOption = {\n value: 'instant-book',\n display: 'Listing you can book without waiting for a host approval',\n shortDisplay: 'Instant book'\n};\nexport const instantBookOptions: SelectOption[] = [\n instantBookOption\n];\n\nexport const mapSpaceFeaturesToSelectOption = (f: SpaceFeatures): SelectOption => {\n const display = spaceExtraFeatureToDisplayName(f);\n return ({\n value: f,\n display,\n // Useful for long text, like that of the instant-book\n // option.\n //\n // We do not expect this option object to be modified\n // at any further point before it appears on screen -\n // although that may change in future releases.\n shortDisplay: display\n });\n};\n\nexport const roomEquipmentRequiredOptions: SelectOption[] = [\n SpaceFeatures.VideoConference,\n SpaceFeatures.ConferencePhone,\n SpaceFeatures.WirelessContentSharing,\n SpaceFeatures.FlipChart,\n SpaceFeatures.Glassboard,\n SpaceFeatures.ElectronicWhiteboard\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const internalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.PartnerOffice,\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom,\n SpaceFeatures.PhoneBooth\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const externalRoomTypeRequiredOptions: SelectOption[] = [\n SpaceFeatures.ConferenceRoom,\n SpaceFeatures.TeamRoom\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomDetailsRequired: SelectOption[] = [\n SpaceFeatures.NaturalLight,\n SpaceFeatures.BoardRoom,\n SpaceFeatures.CocktailRoom,\n SpaceFeatures.TheatreRoom,\n SpaceFeatures.WorkshopRoom,\n SpaceFeatures.UShapeRoom,\n SpaceFeatures.Miscellaneous\n].map(mapSpaceFeaturesToSelectOption);\n\nexport const roomCateringAvailable: SelectOption[] = [\n SpaceFeatures.Catering,\n].map(mapSpaceFeaturesToSelectOption);\n\n/**\n * Defines the reason by which spaces are filtered out / missing.\n */\nexport enum SpaceFilterReason {\n /**\n * Spaces were shown and not all filtered out.\n */\n None = 'None',\n\n /**\n * If room filters are applied to the set of rooms,\n * and rooms are available if not applied by filtering.\n */\n Filters = 'Filters',\n\n /**\n * We check office rules first to determine if its been filtered.\n */\n OfficeRules = 'OfficeRules',\n\n /**\n * Fallback as the end case if no results are found.\n */\n DateTime = 'DateTime',\n\n /**\n * In case there are no results for a buiding but there are other office buidings in the same city.\n */\n AlternateBuildingsFound = 'AlternateBuildingsFound',\n\n /**\n * If room is non-bookable in the system\n */\n NonBookable = 'NonBookable'\n}\n\nexport interface FilteredSpaces {\n spaces: Space[] | undefined;\n reason: SpaceFilterReason;\n statusMap: HashMap;\n specificReason?: SpaceFilterReason;\n}\n\n/**\n * Filter spaces by filters locally. TBD in the future for real API pagination.\n *\n * @param formFilters - the set of filters to apply on the list of spaces.\n * @param spaces - the list of spaces to filter\n * @param activeForm - the landing page set of filters.\n * @param buildings - the list of buildings loaded, used to retrieve building-specific booking rules.\n * @param currentUser - the current user\n */\nexport const filterSpacesByAppliedFilters = (\n formFilters: SelectOption[],\n spaces: Space[] | undefined, // the resultshere are raw JSON Spaces, not an array of the Space class\n activeForm: BookingFormData,\n buildings: Building[] = [],\n currentUser: User | undefined,\n isStaffMap: boolean = false): FilteredSpaces => {\n const instantBook: boolean = formFilters.some(f => f.value === instantBookOption.value);\n const onlyCatering: boolean = formFilters.some(f => f.value === SpaceFeatures.Catering);\n // Drop incompatible spaces. If no filters were given, just return the array unchanged.\n const featureFilters = formFilters.filter(filter => ![instantBookOption.value, SpaceFeatures.Catering].includes(filter.value));\n const formFiltersEmpty = featureFilters.length === 0;\n\n // R--- refactor activeForm? Only after forms can handle dateTz\n // Blocked by date time input refactor\n const options: SpaceBookingRuleOptions = {\n duration: activeForm.duration,\n host: currentUser,\n dateTz: activeForm.dateTz,\n };\n let rulesCount = 0;\n let ruleReason = '';\n let excludedByFiltersCount = 0;\n const statusMap: HashMap = {};\n // console.group();\n const filteredSpaces = spaces?.map(space => space instanceof Space ? space : new Space(space)).filter(raw_space => {\n const space = new Space(raw_space); // Construct the full fledged space\n const building = buildings.find(b => space.zones.includes(b.id));\n const rules = rulesForSpace({\n time: options?.dateTz?.ms,\n duration: options.duration,\n user: options.host,\n rules: building?.booking_rules,\n space\n });\n ruleReason = rules.reason;\n let valid = !rules.hide;\n if (!valid) {\n rulesCount++;\n return false;\n }\n\n\n // Check for all the form filters ( except 'catering' )\n let hasAllFeatures: boolean;\n const internalRoomTypeFilters = [\n 'conference',\n 'meeting_room',\n 'partner',\n 'phone_booth',\n 'team_room',\n ];\n\n if (featureFilters.length === 0) {\n hasAllFeatures = true;\n } else if(featureFilters.every(f => internalRoomTypeFilters.includes(f.value))) { // If all featureFilters(selected filters) are present in internalRoomTypeFilters, make the filtering inclusive(return on first true) \n hasAllFeatures = featureFilters.some(f => space.featuresArray.includes(f.value));\n } else { // If any featureFilters(selected filters) are not present in internalRoomTypeFilters, make the filtering exclusive(return on first false)\n hasAllFeatures = featureFilters.every(f => space.featuresArray.includes(f.value));\n }\n\n const canBook = instantBook ? space.bookable : true;\n const matchesType = activeForm?.bookingType?.value === 'allRooms'\n ? true\n : space?.internal_or_external?.length\n ? space.internal_or_external === activeForm?.bookingType?.value\n : true;\n valid = valid && matchesType && (formFiltersEmpty || hasAllFeatures) && canBook;\n let hasCatering = building?.has_catering;\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n // need the room catering to override.\n if (onlyCatering && !hasCatering) {\n valid = false;\n // console.log('Excluded by Catering');\n }\n\n // count this space if the only reason it can't be shown is because one of the filters excluded it\n if (!hasAllFeatures) {\n valid = false;\n // console.log('Excluded by Status');\n }\n\n const status = statusFromBookings(\n space.bookings.length ? space.bookings.map(b => new Booking(b)) : space.settings.bookings.map(b => new Booking(b)),\n space.bookable && !rules.hide,\n !rules.auto_approve,\n activeForm.dateTz,\n space\n );\n\n // only compute room availability here right now if instant book option is chosen and room still valid.\n if (instantBook && valid) {\n valid = status.status === SpaceStatus.Available;\n if (!valid) console.group('Excluded by Status');\n \n }\n\n\n /** \n * If there are rooms that are recurring but not available at all during the queried times, we filter them out from the results displayed on the page.\n * The \"Available\" status indicates whether a room can be booked during the queried times.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\n if(activeForm.is_recurrent && !space.availableOccurrences && !isStaffMap) {\n valid = false;\n }\n /** */\n\n // cache space status\n if (valid) {\n if(activeForm.is_recurrent && space.availableOccurrences && space.availableOccurrences<= space.totalOccurrences) {\n // space is available and requested for recurrence booking and few occurences are available to book then let the space select/bookable from map with limited availability\n statusMap[space.id] = !rules.auto_approve ? SpaceStatus.Requestable : SpaceStatus.Available;\n }else\n {\n statusMap[space.id] = status.status;\n }\n \n } else {\n excludedByFiltersCount++;\n }\n // console.log('Valid:', valid);\n return valid;\n });\n\n const buildingsInSameCity = buildings.filter(\n (_) =>activeForm?.location!==undefined && activeForm?.location?.length && _.city === activeForm?.location[0]?.meta?.building?.city\n ) || [];\n const alternateBuildings = buildingsInSameCity.filter(building =>\n !activeForm.location.some(locationItem =>\n locationItem.meta?.building?.id === building.id\n )\n );\n\n // console.groupEnd();\n let reason, specificReason = SpaceFilterReason.None;\n // console.log('Spaces:', filteredSpaces?.length, excludedByFiltersCount, rulesCount, ruleReason)\n if (filteredSpaces?.length === 0) {\n if (excludedByFiltersCount > 0 && (!formFiltersEmpty || onlyCatering)) {\n reason = SpaceFilterReason.Filters;\n } else if (rulesCount > 0) {\n reason = SpaceFilterReason.OfficeRules;\n } else if(alternateBuildings){\n reason = SpaceFilterReason.AlternateBuildingsFound;\n }\n else {\n reason = SpaceFilterReason.DateTime;\n }\n\n if (ruleReason === SpaceFilterReason.OfficeRules) {\n specificReason = SpaceFilterReason.OfficeRules;\n }\n }\n\n return { spaces: filteredSpaces, reason, statusMap, specificReason };\n};\n","import { BookingFormData } from './booking.form.data';\nimport {\n createAction,\n props\n} from '@ngrx/store';\nimport { Payload } from '../../../../loading/src/lib/loading.actions';;\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\n\nexport const storeBookingFormData = createAction('[BookingForm] Store Form Data',\n props>>());\n\nexport const clearBookingFormData = createAction('[BookingForm] Clear Form Data');\n\nexport const storeRoomFilters = createAction('[BookingForm] Store Room Filters',\n props[]>>());\n\nexport const clearRoomFilters = createAction('[BookingForm] Clear Room Filters');\n\nexport const openBookingSurvey = createAction('[BookingSurvey] Open Survey Modal');\n","import { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { RoomQueryOptions } from '../../../../rooms/src/lib/rooms.types';\nimport { User } from '../users/user.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { Building } from '../organisation';\n\nexport const DEFAULT_BOOKING_DURATION = 30;\n\nexport const internalBookingTypeOption = {\n value: 'internal',\n display: 'Internal',\n};\n\nexport const allBookingTypeOption = {\n value: 'allRooms',\n display: 'All Rooms',\n};\n\nexport const bookingTypeOptions: SelectOption[] = [\n internalBookingTypeOption,\n {\n value: 'external',\n display: 'External',\n }\n];\n\nexport const defaultRoomSizeOption = {\n value: '2',\n display: '3-9 People',\n};\n\nexport const roomSizeOptions: SelectOption[] = [\n {\n value: '1',\n display: '1-2 People',\n },\n defaultRoomSizeOption,\n {\n value: '3',\n display: '10+ People',\n }\n];\n\nexport const roomSizeOptionsKiosk: SelectOption[] = [\n ...roomSizeOptions,\n {\n value: '4',\n display: 'All Rooms',\n },\n];\n\nexport const roomCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 1;\n case '2':\n return 3;\n case '3':\n return 10;\n case '4':\n return null;\n }\n};\n\nexport const roomMaxCapacityToValue = (roomSize: string): number => {\n switch (roomSize) {\n case '1':\n return 2;\n case '2':\n return 9;\n default:\n return null;\n }\n};\n\nexport interface BookingFormData {\n // R--- off the rails, define these \"any's\"\n id?: string;\n location: SelectOption[];\n dateTz: DateTZ;\n /**\n * Duration, in minutes.\n */\n duration: number;\n bookingType: SelectOption;\n roomSize: SelectOption;\n selectedRoom?: any;\n organiser?: SelectOption;\n title?: string;\n attendees?: any[];\n code?: string;\n notes?: string;\n head_count?: number;\n creator?: User;\n company?: any[];\n //Recurrence fields\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array;\n recurrence_exceptions?: Array; //SHOULD BE DATETZ\n recurrence_days?: Array;\n timezone?: string;\n offset?: number;\n buildings?: Building[];\n is_recurrent?: boolean;\n is_multiroom?: boolean;\n merged?: boolean;\n action?: string; // helping to set staff app recurring action flag for edit/clone in the active form\n ignore?: string; // helping while editing - recurring series rooms search api call\n bookable?: boolean; // set while editing - recurring series rooms search api call\n occurrence_edits?: string[];\n opt_out?:boolean;\n nextBusinessDay?: boolean; // set property if user room selection from next business day section on result page\n outlook_opt_out?:boolean;\n expanded_section_ids?: string[]; // set property if user room selection from next business day section on result page\n resultLoaded?: number; // set property if user room selection from any section on result page after clicking load more button\n}\n\n/**\n * Converts form data into API query parameters.\n */\nexport const roomFormDataToQuery = (\n data: BookingFormData\n): RoomQueryOptions => {\n // remove all buildings chip from query\n const filteredLocationIds = data?.location\n .filter((l) => l.groupChild)\n .map((l) => l.value)\n .join(',');\n return {\n dateTz: data?.dateTz,\n duration: data?.duration,\n locations: filteredLocationIds,\n capacity: roomCapacityToValue(data?.roomSize?.value),\n capacity_max: roomMaxCapacityToValue(data?.roomSize?.value),\n\n is_recurrent: data?.is_recurrent,\n is_multiroom: data?.is_multiroom,\n merged: data?.merged,\n recurrence_period: data?.recurrence_period,\n recurrence_interval: data?.recurrence_interval,\n recurrence_endTz: data?.recurrence_endTz,\n recurrence_count: data?.recurrence_count,\n recurrence_starts: data?.recurrence_starts,\n recurrence_exceptions: data?.recurrence_exceptions, //SHOULD BE DATETZ\n recurrence_days: data?.recurrence_days,\n timezone: data?.timezone,\n offset: data?.offset,\n buildings: data?.buildings,\n bookable: data?.bookable,\n ignore: data?.ignore\n };\n};\n","import { BookingFormState } from './booking.form.types';\nimport {\n DEFAULT_BOOKING_DURATION,\n defaultRoomSizeOption,\n internalBookingTypeOption\n} from './booking.form.data';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nconst now = DateNow(new Date())\n\nexport const defaultTestBookingForm = (): BookingFormState => ({\n activeForm: {\n dateTz: now,\n duration: 2 * DEFAULT_BOOKING_DURATION,\n location: [],\n bookingType: internalBookingTypeOption,\n roomSize: defaultRoomSizeOption\n },\n activeFormFilters: []\n});\n","import { createSelector } from '@ngrx/store';\nimport {\n RoomStoreState\n} from '../../../../rooms/src/lib/rooms.types';\nimport {\n loadLaterThatDayResults,\n loadNextDayResults,\n loadRoomsForResults,\n roomStateSelector,\n loadByIdResults,\n loadDiffSizeResults,\n loadRoomsForResultsMap\n} from '../../../../rooms/src/lib/rooms.actions';\nimport {\n loadHomepageBookingsResults,\n loadUpcomingBookingsResults,\n loadPastBookingsResults,\n loadCancelledBookingsResults,\n loadBookingByIdResults,\n bookingStateSelector\n} from '../../../../bookings/src/lib/bookings.actions';\nimport { Building } from '../organisation/building.class';\nimport { BuildingStoreState } from '../../../../buildings/src/lib/buildings.types';\nimport { selectLoadBuildingsSuccess } from '../../../../buildings/src/lib/buildings.actions';\nimport { Space } from '../spaces/space.class';\nimport { User } from '../users/user.class';\nimport { selectCurrentUser } from '../../../../user/src/lib/user.actions';\nimport { UserStoreState } from '../../../../user/src/lib/user.types';\nimport { LoadingModel } from '../../../../loading/src/lib/loading.model';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\n\nimport {\n SpaceFilterReason,\n filterSpacesByAppliedFilters,\n FilteredSpaces\n} from './booking-filter.utils';\nimport {\n BookingFormData,\n internalBookingTypeOption,\n} from './booking.form.data';\nimport {\n BookingFormState,\n BookingStoreState,\n} from './booking.form.types';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\n\n\nexport const selectBookingFormsData =\n (state: BookingStoreState | RoomStoreState | BuildingStoreState | UserStoreState) =>\n (state as any).bookingForm as BookingFormState;\n\nexport const selectActiveForm = createSelector(selectBookingFormsData, state => {\n // Recreate because serialized form dateTz doesn't have DateTZ class methods\n if (!state.activeForm?.dateTz) {\n return state.activeForm\n }\n const { date, is_local_tz, building_tz} = state.activeForm?.dateTz;\n const endTzDate = state.activeForm?.recurrence_endTz?.date;\n const recurrence_endTz = endTzDate ? {\n recurrence_endTz : new DateTZ({ date: endTzDate.valueOf(), is_local_tz, building_tz })\n } : {};\n\n const recurrence_starts = state.activeForm?.recurrence_starts\n\t\t\t? {\n\t\t\t\t\trecurrence_starts: state.activeForm?.recurrence_starts.map( el =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// at final step of booking creation process recurrence_start becomes Array which need to be Array\n\t\t\t\t\t\t\t// To Do: Refactor - apps/staff/src/app/booking/booking-create/booking-form-base.component.ts lno: 186\n\t\t\t\t\t\t\treturn new DateTZ({ date: typeof el === 'number' ? el * 1000 : el.date.valueOf(), is_local_tz, building_tz })\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t: {};\n\n\n const recEditingSearchPayload = (state.activeForm.action === SeriesAction.EDIT && state.activeForm.is_recurrent)\n\t\t\t?\n\t\t {\n\t\t\t\tid: state.activeForm.id,\n\t\t\t\tignore: state.activeForm.ignore,\n\t\t\t\tbookable: state.activeForm.bookable\n\t\t\t}\n\t\t\t: {};\n\n\n\n\n return {\n ...state.activeForm,\n dateTz: new DateTZ({ date: date.valueOf(), is_local_tz, building_tz }),\n ...recurrence_endTz,\n ...recurrence_starts,\n\t\t\t\t...recEditingSearchPayload\n }\n});\n\nexport const selectBookingType = createSelector(selectActiveForm,\n (form) => form?.bookingType);\n\nexport const selectBookingLocations = createSelector(selectActiveForm,\n (form) => (form?.location || []).filter(f => !f.groupHeader));\n\nexport const selectIsInternal = createSelector(selectBookingType,\n (type) => type?.value === internalBookingTypeOption.value);\n\nexport const selectFormFilters = createSelector(selectBookingFormsData,\n (state) => state.activeFormFilters || []);\n\nconst selectRoomResultsFromState = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.model);\n\nconst selectRoomResultsFromState_map = createSelector(roomStateSelector,\n loadRoomsForResultsMap.selectors.model);\n\nconst selectLaterThatDayResultsFromState = createSelector(roomStateSelector,\n loadLaterThatDayResults.selectors.model);\nconst selectNextDayResultsFromState = createSelector(roomStateSelector,\n loadNextDayResults.selectors.model);\nconst selectByIdResultsFromState = createSelector(roomStateSelector,\n loadByIdResults.selectors.model);\nconst selectDiffSizeResultsFromState = createSelector(roomStateSelector,\n loadDiffSizeResults.selectors.model);\n\nexport const selectHomepageBookingsResultsFromState = createSelector(bookingStateSelector,\n loadHomepageBookingsResults.selectors.model);\nexport const selectUpcomingBookingsResultsFromState = createSelector(bookingStateSelector,\n loadUpcomingBookingsResults.selectors.model);\nexport const selectPastBookingsResultsFromState = createSelector(bookingStateSelector,\n loadPastBookingsResults.selectors.model);\nexport const selectCancelledBookingsResultsFromState = createSelector(bookingStateSelector,\n loadCancelledBookingsResults.selectors.model);\nexport const selectBookingByIdResultsFromState = createSelector(bookingStateSelector,\n loadBookingByIdResults.selectors.model);\n\n/**\n * Wraps {@link filterSpacesByAppliedFilters} with {@link LoadingModel} interop.\n * This will only filter data if there is data to filter, and returns a success {@link LoadingModel}.\n * The \"isStaffMap\" flag- This helps to indicate that all occurrences of this room are booked during the queried times and are currently in use.\n * \"isStaffMap\" flag allows including such rooms in the list, which will be displayed in red on the map.\n */\nconst filterSpacesByAppliedFiltersIfSuccess = (\n results: LoadingModel,\n formFilters: SelectOption[],\n activeForm: BookingFormData,\n buildings: Building[] | undefined,\n currentUser: User | undefined,\n isStaffMap: boolean = false): LoadingModel => {\n const data = results.optionalSuccess;\n\n // don't filter model if no success found\n return !activeForm ? results.mutate({\n spaces: data, // the result here is a raw JSON Space, not the Space class\n reason: SpaceFilterReason.None,\n statusMap: {}\n }) : results.mutate(\n filterSpacesByAppliedFilters(formFilters, data, activeForm, buildings || activeForm.buildings, currentUser, isStaffMap));\n};\n\nexport const selectFilteredResults = createSelector(selectRoomResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectMapFilteredResults = createSelector(selectRoomResultsFromState_map,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser, isStaffMap) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser, true));\n\nexport const selectFilteredLaterDayResults = createSelector(selectLaterThatDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\nexport const selectFilteredNextDayResults = createSelector(selectNextDayResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n\nexport const selectFilteredByIdResults = createSelector(selectByIdResultsFromState,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n (results, activeForm, buildings, currentUser) => filterSpacesByAppliedFiltersIfSuccess(results, [], activeForm, buildings, currentUser));\n\nexport const selectFilteredDiffSizeResults = createSelector(selectDiffSizeResultsFromState,\n selectFormFilters,\n selectActiveForm,\n selectLoadBuildingsSuccess,\n selectCurrentUser,\n filterSpacesByAppliedFiltersIfSuccess);\n\n/**\n * Maps selected options by loaded buildings.\n */\nexport const selectSelectedBuildingOptions = createSelector(\n selectBookingLocations,\n selectLoadBuildingsSuccess,\n (locations, buildings) => (locations\n .map(l => buildings?.find(b => b.id === l.value))\n .filter(f => !!f) as Building[])\n);\n\n","import { Building, BuildingCity } from '../organisation/building.class';\nimport { Booking } from '../bookings/booking.class';\nimport { BuildingLevel } from '../organisation/level.class';\nimport { Space } from '../spaces/space.class';\nimport { SpacesService } from '../spaces/spaces.service';\nimport {\n timezoneDisplay,\n timezoneNameToDate,\n unique,\n ImageDirective,\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../../../../ui/src/lib/options/select-option';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * If more than 3 are selected, we truncate location display.\n */\nconst MAX_ABBREV_LOCATIONS = 3;\n\nexport const mapBuildingToSelectOption = (\n city: string,\n building: Building\n): SelectOption => ({\n display: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n dropdownOverride: `${building.code}-${building.name}, ${building.address}`,\n value: building.id,\n groupId: city,\n groupChild: true,\n shortDisplay: `${building.name} ${timezoneDisplay(\n timezoneNameToDate(building.timezone)\n )}`,\n meta: { building, city },\n});\n\nexport const mapCityToAllSelectOption = (\n city: BuildingCity\n): SelectOption => ({\n display: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n value: city.name,\n groupHeader: true,\n groupId: city.name,\n shortDisplay: `${city.name} (All Offices) ${timezoneDisplay(\n timezoneNameToDate(city.timezone)\n )}`,\n meta: { city },\n});\n\n/**\n * Flattens a map of {@link BuildingCity} to {@link Building} array into a list of {@link SelectOption}.\n * @param grouped The grouping\n */\nexport const flattenDisplayOffices = (\n grouped: Map\n) => {\n const options: SelectOption[] = [];\n grouped.forEach((value, key) => {\n options.push(mapCityToAllSelectOption(key));\n value.forEach((b) =>\n options.push(mapBuildingToSelectOption(key.name, b))\n );\n });\n return options;\n};\n\n/**\n * This method will either add or remove a selected option from the selectedOptions list based on\n * these conditions:\n * 1. If the option EXISTS in the list AND is a groupHeader, de-select all of its children.\n * 2. If the option EXISTS in the list AND is a groupChild, remove it and its associated header from the list.\n * 3. If the option does NOT EXIST in the list AND is a groupHeader, select all other children.\n * 4. If the option does NOT EXIST in the list AND is a groupChild, add it to the list.\n *\n * Special note regarding item 4:\n * 4a. If that selection completes the children selection, select its associated header as well.\n */\nexport const toggleSelectedByGroup = (\n options: SelectOption[],\n selectedOptions: SelectOption[],\n option: SelectOption\n) => {\n if (selectedOptions.find((s) => s.value === option.value)) {\n return selectedOptions.filter((s) => {\n let filter = s.value !== option.value;\n // if group header, also remove any option that is the child of it.\n if (option.groupHeader) {\n filter =\n filter &&\n (!s.groupChild ||\n (s.groupChild && s.groupId !== option.groupId));\n } else if (option.groupChild) {\n // if child removing, remove the associated header.\n filter =\n filter &&\n (!s.groupHeader ||\n (s.groupHeader && s.groupId !== option.groupId));\n }\n return filter;\n });\n }\n // option does NOT EXIST\n // if adding header, add the other children to the selected list, ensuring no dupes.\n if (option.groupHeader) {\n const toSelect = options.filter(\n (v) =>\n v.groupChild &&\n v.groupId === option.value &&\n !selectedOptions.find((selected) => selected.value === v.value)\n );\n return [...selectedOptions, option, ...toSelect];\n }\n // add group child, add the group header if all satisfied\n const newGroup = [...selectedOptions, option];\n\n // check if we have selected all children from options by filtering down by city and checking if\n // they're in the selected options list.\n const remainingChildrenInGroup = options.filter(\n (o) =>\n o.groupChild &&\n o.groupId === option.groupId &&\n !newGroup.find((ng) => ng.value === o.value)\n );\n // if we dont have remaining children, add the group\n if (remainingChildrenInGroup.length === 0) {\n return [\n ...newGroup,\n options.find((o) => o.groupHeader && o.groupId === option.groupId),\n ];\n }\n return newGroup;\n};\n\n/**\n * If the list of locations are larger than {@link MAX_ABBREV_LOCATIONS}, then truncate\n * and display the remaining count.\n */\nexport const truncateLocationList = (\n locations: readonly SelectOption[]\n): string => {\n // comma separate the locations\n let truncatedLocations = [...locations];\n const shouldTruncate = locations.length > MAX_ABBREV_LOCATIONS;\n if (shouldTruncate) {\n truncatedLocations = truncatedLocations.splice(0, MAX_ABBREV_LOCATIONS);\n }\n let display = truncatedLocations\n .map((l) => l.shortDisplay || l.display)\n .join(', ');\n if (shouldTruncate) {\n display += `...(${locations.length})`;\n }\n return display;\n};\n\nexport const mapBuildingLevelToOption = (\n level?: BuildingLevel\n): SelectOption =>\n level\n ? {\n value: level.id,\n display: level.name,\n }\n : undefined;\n\n/**\n * Returns all levels included with the building, deduped.\n * @param buildings\n */\nexport const flattenBuildingsWithLevels = (buildings: Building[]) => {\n const flattenedLevels = unique(\n buildings.reduce((next: BuildingLevel[], building: Building) => {\n next.push(...building.levels);\n return next;\n }, []),\n 'id'\n );\n return {\n flattenedLevels,\n buildings,\n };\n};\n\n/** Gets route to image placeholder if room image isn't found */\n\nexport const placeholderRoute = (num: number): string => {\n let index: number;\n if (num <= 3) {\n index = num;\n } else if (num % 3 === 0) {\n index = 3;\n } else {\n index = 1;\n }\n return `assets/img/rooms/placeholder-${index}.png`;\n};\n\n/**\n * Method takes the rootFolderURL and fileSlug to create an array of three images\n * that should exist. If a room image exists, it replaces the placehoder image.\n */\nexport const setupRoomImages = (\n componentReference: ImageDirective,\n image_positions: number[],\n rootFolderURL: string,\n fileSlug: string,\n imagesLoaded: boolean = false\n): void => {\n let foundImages: any[] = image_positions.map((i) =>\n i ? { path: placeholderRoute(i) } : false\n );\n image_positions.forEach((n) => {\n const desiredImageName = `${rootFolderURL}${fileSlug}-part-${n}.png`;\n const desiredImage = location.pathname.includes('concierge') ? `${location.origin}/staff/${desiredImageName}` : desiredImageName;\n if (!imagesLoaded) {\n const tester = new Image();\n tester.onload = () => {\n // Will never run on unit test\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = [...foundImages.slice()];\n componentReference?.loadImages && componentReference?.loadImages.next([...foundImages.slice()]);\n };\n tester.src = desiredImage;\n }\n\n // Force valid image output on unit test\n if (imagesLoaded) {\n foundImages[n - 1] = { path: desiredImage };\n componentReference.foundImages = foundImages.slice();\n }\n });\n};\n\nexport const bookingStatusDetails = (booking: Booking) => {\n const now = DateNow(new Date());\n let image = '';\n let text = '';\n let title = '';\n\n if (booking?.status) {\n const status = now > booking.endDateTz ? 'expired' : booking.status;\n switch (status) {\n case 'unavailable':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Unavailable';\n text = 'Unavailable';\n break;\n case 'declined':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'cancelled':\n image = 'assets/icon/booking_cancelled.svg';\n title = 'Cancelled';\n text = 'Cancelled';\n break;\n case 'expired':\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n case 'tentative':\n image = 'assets/icon/booking_pending.svg';\n title = 'Requested';\n text = 'Pending';\n break;\n case 'accepted':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n case 'approved':\n image = 'assets/icon/booking_confirmed.svg';\n title = 'Confirmed';\n text = 'Confirmed';\n break;\n default:\n // TODO\n image = 'assets/icon/booking_expired.svg';\n title = 'Expired';\n text = 'Expired';\n break;\n }\n }\n return { text, title, image };\n};\n\nexport const roomHasCateringHours = (building: Building, space: Space) => {\n let hasCatering = building\n ? building.has_catering && building.catering_hours\n : false;\n // Room catering status as false overrides building status\n if (space?.has_catering === false) {\n hasCatering = false;\n }\n return hasCatering;\n};\n\nexport const cateringAllowed = (booking: Booking, building: Building) => {\n const status = bookingStatusDetails(booking);\n const disallowedStatus = ['declined', 'cancelled', 'expired'].includes(\n status.text\n );\n const opens = building?.catering_hours?.start;\n const closed = building?.catering_hours?.end;\n\n if (disallowedStatus) {\n return false;\n }\n\n if (typeof opens === 'undefined' || typeof closed === 'undefined') {\n return false;\n }\n\n // Catering time could be a decimal so convert to a date\n const openMinutes = opens * 60;\n const closeMinutes = closed * 60;\n\n const startOfDay = booking.startDateTz.startOfValue('day');\n const cateringOpenTime = startOfDay.addValue({ minutes: openMinutes });\n const cateringCloseTime = startOfDay.addValue({ minutes: closeMinutes });\n\n if (\n cateringOpenTime.ms <= booking.startDateTz.ms ||\n cateringCloseTime.ms > booking.startDateTz.ms\n ) {\n // Booking ends before catering opens\n if (booking.endDateTz.ms <= cateringOpenTime.ms) {\n return false;\n }\n // Booking starts after catering closes\n if (booking.startDateTz.ms > cateringCloseTime.ms) {\n return false;\n }\n\n // Start time is OK\n if (booking.startDateTz.ms > DateNow(new Date()).ms) {\n // Due to COVID, no orders are available once a meeting begins.\n return true;\n }\n }\n\n return false;\n};\n\nexport const checkCollisions = (\n service: SpacesService,\n booking: Booking\n): Promise => {\n return new Promise((resolve, reject) => {\n\n let availabilityParams: {\n room_ids: string;\n dateTz: DateTZ;\n duration: number;\n setup: number;\n breakdown: number;\n hide_bookings: boolean;\n [key: string]: any;\n } = {\n room_ids: booking.space.id,\n dateTz: booking.startDateTz,\n duration: booking.duration,\n setup: booking.setup[booking.space.email],\n breakdown: booking.breakdown[booking.space.email],\n hide_bookings: false,\n };\n\n if (booking.recurrence_type === \"master\" || booking.recurrence_type === null) {\n availabilityParams = {\n ...availabilityParams,\n ignore: booking?.icaluid,\n recurrence_count: booking?.recurrence_count,\n recurrence_period: booking?.recurrence_period,\n recurrence_endTz: booking?.recurrence_endTz,\n recurrence_interval: booking?.recurrence_interval,\n recurrence_starts: booking?.recurrence_starts,\n is_recurrent: booking?.is_recurrent,\n recurrence_days: booking?.recurrence_days\n } as typeof availabilityParams;\n }\n\n service\n .available(\n availabilityParams,\n null,\n false\n )\n .then(\n (list) => {\n const space = list.length ? list[0] : null;\n if (space) {\n if (!space.bookable) return reject('Has conflict');\n const setup = booking?.setup[space?.email] || 0;\n const breakdown = booking?.breakdown[space?.email] || 0;\n const start_time = booking?.startDateTz.seconds - setup;\n const end_time = booking.endDateTz.seconds + breakdown;\n\n const bookings = space.settings.bookings;\n // console.log('Bookings:', bookings);\n // Compare the existing bookings to see if any truely conflict.\n if (bookings.length) {\n const has_conflict = bookings.find(bkn => {\n const b_setup = bkn.setup[space.email] || 0;\n const b_breakdown = bkn.setup[space.email] || 0;\n const start = (bkn.start_epoch || bkn.start) - b_setup;\n const end = (bkn.end_epoch || bkn.end) + b_breakdown;\n return (\n (end_time > start && end_time <= end) || // Booking ends during the meeting\n (start_time >= start && start_time < end) || // Booking starts during a meeting\n (start_time <= start && end_time >= end) // Booking overlaps entire meeting\n ) && \n ( \n bkn.id !== booking.id \n || \n ( !!booking.is_recurrent && (booking.recurrence_type === \"master\" || booking.recurrence_type === null ) ) \n ?\n bkn.recurrence_master_id !== booking.id\n :\n false\n \n )\n\n\n\n });\n // Conflicts found, reject\n if (has_conflict) return reject('has booking conflict');\n }\n return resolve(space.bookable);\n }\n reject('space not found');\n },\n () => reject('available error')\n );\n });\n};\n\nexport const getStatusErrorMessage = (status?: number) => {\n let msg = '';\n switch (status) {\n\t\t\tcase 400:\n\t\t\t\tmsg = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 403:\n\t\t\t\tmsg = 'Your do not have permission to update this booking.';\n\t\t\t\tbreak;\n\t\t\tcase 409:\n\t\t\t\tmsg = 'Sorry, your booking time conflicts with another booking.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmsg = 'Your booking failed to update, please try again';\n }\n return msg;\n};\n","export * from './room-results/room-results.viewmodel'\nexport * from './booking-filter.utils'\nexport * from './booking.form.actions'\nexport * from './booking.form.data'\nexport * from './booking.form.spec-helpers'\nexport * from './booking.form.types'\nexport * from './booking.selectors'\nexport * from './booking.utils'","import { Space } from '../../spaces/space.class';\nimport { BuildingLevel } from '../../organisation/level.class';\nimport { Building } from '../../organisation/building.class';\n\nexport class RoomResultsViewModel {\n\n public levelDisplay: string;\n public title: string;\n public office: string;\n public capacity: string;\n\n constructor(public space: Space,\n public level?: BuildingLevel,\n public building?: Building) {\n\n this.levelDisplay = `Level ${this.space?.level?.short_name}`;\n this.title = this.space.local_name;\n this.office = this.building ? `(${this.building?.code}) ${this.building?.name}` : '';\n this.capacity = `Capacity: ${this.space.capacity} people`;\n }\n}\n\n/**\n * For each result from results, we find its level and building from the lists.\n */\nexport const mapResultsToViewModels = (results: Space[],\n flattenedLevels: BuildingLevel[],\n buildings: Building[]): RoomResultsViewModel[] =>\n results.map((r: Space) => {\n const level = flattenedLevels.find(l => r.zones.includes(l.id));\n const building = buildings.find(b => r.zones.includes(b.id));\n return new RoomResultsViewModel(\n r,\n level,\n building\n );\n });\n","import { Injectable, NgZone } from '@angular/core';\nimport { BehaviorSubject, combineLatest, of, Observable } from 'rxjs';\nimport {\n catchError,\n debounceTime,\n filter,\n first,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { replaceBookings, timePeriodsIntersect } from './booking.utilities';\nimport { SpacesService } from '../spaces/spaces.service';\nimport { Booking } from '../bookings/booking.class';\nimport { Space } from '../spaces/space.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { OrganisationService } from '../organisation/organisation.service';\n\nexport type BookingType =\n | 'internal'\n | 'client'\n | 'external'\n | 'setup'\n | 'training'\n | 'interview'\n | 'declined';\n\nexport interface BookingFilters {\n /** List of zone ids to get bookings for */\n zone_ids?: string[];\n space_emails?: string[];\n hide_type?: BookingType[];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BookingStateService extends BaseClass {\n /** List of bookings */\n private _poll = new BehaviorSubject(false);\n /** List of bookings */\n private _long_poll = new BehaviorSubject<'month' | ''>('');\n private _long_poll_week = new BehaviorSubject<'week' | ''>('');\n /** List of bookings */\n private _bookings = new BehaviorSubject([]);\n /** List of meeting count per date */\n public _noOfMeetings = new BehaviorSubject<{}>({});\n /** Filter details for bookings */\n private _filters = new BehaviorSubject({});\n /** Currently active date */\n private _dateTz = new BehaviorSubject(DateNow(new Date()));\n /** Currently displayed zone */\n private _zone = new BehaviorSubject(' ');\n /** Whether booking data is being loaded */\n private _loading = new BehaviorSubject(false);\n /** Observable for filter and booking list changes */\n private _state = combineLatest(\n this._bookings,\n this._filters,\n this._dateTz,\n this._zone\n );\n\n /** Observable for list of bookings */\n public readonly bookings = this._bookings.asObservable();\n /** Observable for active date */\n public readonly dateTz = this._dateTz.asObservable();\n /** Observable for active zone */ // R-- zone was this._date.asObservable(); this looks like a mistake but it exists from the beginning of time\n public readonly zone = this._dateTz.asObservable();\n /** Observable for loading state of bookings */\n public readonly loading = this._loading.asObservable();\n\n public get booking_date() {\n // When this class is initialized this._dateTz is local timezone\n return this._dateTz.value;\n }\n\n public get timezone() {\n return localStorage.getItem('CONCIERGE.timezone');\n }\n\n /** Obsevable for filtered list of bookings */\n public readonly filtered = this._state.pipe(\n map((state) => {\n const bdTz = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const startTz = bdTz.startOfValue('day');\n const endTz = startTz.addValue({}).endOfValue('day');\n return this.filterBookings(startTz, endTz);\n }),\n shareReplay(1)\n );\n\n /** Obsevable for filtered list of bookings of the active week */\n public readonly filtered_week = this._state.pipe(\n map(() => {\n // Tested to be valid in building time now.\n const bd = this.timezone\n ? new DateTZ({\n date: this.booking_date.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n })\n : this.booking_date;\n const start = bd.startOfValue('week').startOfValue('day');\n const end = this.getEndOfWeek(bd);\n return this.filterBookings(start, end);\n })\n );\n\n /** Obsevable for filtered list of bookings for active month */\n public readonly filtered_month = this._state.pipe(\n map(() => {\n const start = this.booking_date.startOfValue('month');\n const end = this.booking_date.endOfValue('month');\n return this.filterBookings(start, end);\n })\n );\n\n /** Active filters */\n public get filters() {\n return this._filters.getValue();\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private ngZone: NgZone,\n ) {\n super();\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Just to get the timezone correct\n this._dateTz.next(\n new DateTZ({\n date: this._dateTz.value.ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone,\n })\n );\n });\n\n /** Generate observable for updating bookings */\n const search = combineLatest(this._poll, this._zone, this._dateTz).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap(() => {\n const fzone = this._zone.getValue();\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n const start = this.booking_date.startOfValue('day');\n const end = start.endOfValue('day');\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start.seconds,\n available_to: end.seconds,\n });\n }),\n catchError(() => of([]))\n );\n\n const search_long_week = combineLatest(\n this._long_poll_week,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, false);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n\n //TO DO: make sure both spaces have same booking\n /** Subscribe to update observable */\n search.subscribe((space_list) => {\n this.processBookings(space_list);\n this._loading.next(false);\n });\n search_long_week.subscribe((space_list) => {\n this.processBookings(space_list, this._long_poll_week.getValue() as any);\n this._loading.next(false);\n });\n }\n\n /**\n * Function to build\n */\n private buildSpaceLongQuery(dailyCount: boolean = false): Observable {\n return combineLatest(\n this._long_poll,\n this._zone,\n this._dateTz\n ).pipe(\n filter((i) => !!i[0]),\n debounceTime(500),\n switchMap((props) => {\n const type = props[0];\n const fzone = dailyCount ? this._org.building.id : props[1];\n const dateTz = props[2];\n if (!fzone) {\n return of([]);\n }\n this._loading.next(true);\n return this.querySpace(type, fzone, dateTz, dailyCount);\n }),\n catchError((e) => { \n return of([]);\n })\n );\n }\n\n private querySpace(type: string, fzone: string, dateTz: DateTZ, dailyCount: boolean = false) : Observable | Observable{\n const start = () => {\n const s = dateTz;\n if (type === 'week') {\n return s.startOfValue('week');\n } else {\n return s.startOfValue('month');\n }\n };\n\n const end = () => {\n const e = start();\n if (type === 'week') {\n /**\n * To Do: date-tz.class.ts endOfValue subtracts 1 day from end of week for 7 days a week type which returns Friday instead of Saturday\n * below is the adjustment -\n */\n return e.addValue({ days: 1 }).endOfValue('week');\n } else {\n return e.endOfValue('month');\n }\n /**\n * R--- when testing March 2022 London offices, the month is an hour short.\n * Is this a Luxon bug or London DST?\n */\n };\n\n // dates here are ok\n return this._spaces.queryBooking({\n zone_ids: fzone,\n available_from: start().seconds,\n available_to: end().seconds,\n ...(dailyCount) ? { daily_count: true } : ''\n });\n }\n\n\n public getDailyMeetingCount() : void {\n this._long_poll.next('month');\n this.buildSpaceLongQuery(true).subscribe((counts) => {\n this._noOfMeetings.next(counts);\n this._loading.next(false);\n });\n }\n\n /**\n * Update the booking filters\n * @param details\n */\n public setFilters(details: BookingFilters) {\n this._filters.next(details);\n }\n\n /**\n * Update the booking date\n * @param details\n */\n public setDate(dateTz: DateTZ) {\n this._dateTz.next(dateTz);\n }\n\n /**\n * Update the booking's zone\n * @param details\n */\n public setZone(zone: string) {\n this._zone.next(zone);\n }\n\n /**\n * update day view once\n */\n public pollOnce(){\n this._poll.next(true);\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPolling(delay: number = 30 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingWeek(delay: number = 4 * 30 * 1000 ) {\n this._long_poll_week.next('week');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll_week.next('week'),\n delay\n );\n });\n }\n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingEveryFiveMin(delay: number = 60 * 1000) {\n this._poll.next(true);\n this.ngZone.runOutsideAngular(() => {\n this.interval('polling', () => this._poll.next(true), delay);\n });\n }\n \n /**\n * Start polling to update bookings\n * @param delay Duration between polling events in milliseconds\n */\n public startPollingMonth(delay: number = 5 * 60 * 1000) {\n this._long_poll.next('month');\n this.ngZone.runOutsideAngular(() => {\n this.interval(\n 'polling_long',\n () => this._long_poll.next('month'),\n delay\n );\n });\n }\n\n\n /**\n * Stop polling to update bookings;\n */\n public stopPolling() {\n this._poll.next(false);\n this.clearInterval('polling');\n this._long_poll.next('');\n this.clearInterval('polling_long');\n }\n\n public updateRoomList() {\n this._spaces.updateRoomList();\n }\n\n /**\n * Add booking to bookings listing\n * @param booking\n */\n public add(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Update booking in the bookings list\n * @param booking\n */\n public replace(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings\n .filter(\n (bkn) =>\n bkn.icaluid !== booking.icaluid && bkn.id !== booking.id\n )\n .concat([booking]);\n this._bookings.next(new_bookings);\n }\n\n /**\n * Remove booking in the bookings list\n * @param booking\n */\n public remove(booking: Booking) {\n const bookings = this._bookings.getValue();\n const new_bookings = bookings.filter(\n (bkn) => bkn.icaluid !== booking.icaluid\n );\n this._bookings.next(new_bookings);\n }\n\n public attentToDelete(\n booking: Booking,\n action: 'series' | 'booking' = 'booking',\n undo: boolean = false\n ) {\n const bookings = this._bookings.getValue();\n const attempted_to_delete = ((action) => {\n return (bkg: Booking) => {\n switch (action) {\n case 'booking': {\n const booking_master = bookings.find(\n (bkn) => bkn.icaluid === booking.icaluid\n );\n if (!booking_master) return false;\n return bkg.id === booking.id;\n }\n case 'series': {\n const booking_master = bookings.find(\n (bkg) =>\n bkg.id ===\n (booking.recurrence_type === 'occurrence'\n ? booking.recurrence_master_id\n : booking.id)\n );\n if (!booking_master) return false;\n return (\n booking_master.id === bkg.id ||\n bkg.recurrence_master_id === booking_master.id\n );\n }\n default:\n false;\n }\n };\n })(action);\n\n const new_bookings = [...bookings].map((bkg) => {\n if (!undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = action;\n }\n\n if (undo && attempted_to_delete(bkg)) {\n bkg.attempted_to_delete = null;\n }\n\n return bkg;\n });\n\n this._bookings.next(new_bookings);\n }\n\n private processBookings(\n space_list: Space[],\n period: 'day' | 'week' | 'month' = 'day'\n ) {\n const start = () => {\n switch (period) {\n case 'month':\n return this.booking_date.startOfValue('month');\n case 'week':\n return this.booking_date.startOfValue('week');\n default:\n return this.booking_date.startOfValue('day');\n }\n };\n const end = () => {\n const s = start();\n switch (period) {\n case 'month':\n return s.endOfValue('month');\n case 'week':\n return s.endOfValue('week');\n default:\n return s.endOfValue('day');\n }\n };\n\n let bookings = this._bookings.getValue();\n space_list.forEach((space) => {\n return (bookings = replaceBookings(\n bookings,\n space.bookings.map((bkn) => new Booking(bkn)),\n {\n room_email: space.email,\n fromTz: start(),\n toTz: end(),\n }\n ));\n });\n this._bookings.next(bookings);\n }\n\n // private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n // const filters = this._filters.getValue();\n // const bookings = this._bookings.getValue();\n // const fzone = this._zone.getValue();\n // return bookings.filter((bkn) => {\n // const intersects = timePeriodsIntersect(\n // startTz.ms,\n // endTz.ms,\n // bkn.startDateTz.ms,\n // bkn.endDateTz.ms\n // );\n // const in_zone = bkn.room.zones.includes(fzone);\n // const has_space =\n // !filters.space_emails?.length ||\n // filters.space_emails.includes(bkn.room.email);\n // const in_zones =\n // !filters.zone_ids?.length ||\n // !!bkn.room.zones.find((zone) =>\n // filters.zone_ids.includes(zone)\n // );\n // const type = bkn.declined ? 'declined' : bkn.getType();\n\n // const show =\n // !filters.hide_type?.length ||\n // !filters.hide_type.includes(type as any);\n // return intersects && has_space && in_zone && in_zones && show;\n // });\n // }\n\n private filterBookings(startTz: DateTZ, endTz: DateTZ) {\n const filters = this._filters.getValue();\n const bookings = this._bookings.getValue();\n const fzone = this._zone.getValue();\n return bookings.filter((bkn) => {\n const intersects = timePeriodsIntersect(\n startTz.ms,\n endTz.ms,\n bkn.startDateTz.ms,\n bkn.endDateTz.ms\n );\n // Check if any room in the booking satisfies the conditions\n const roomSatisfiesConditions = bkn.multi_rooms.some((room) => {\n const in_zone = room.zones.includes(fzone);\n const has_space =\n !filters.space_emails?.length ||\n filters.space_emails.includes(room.email);\n const in_zones =\n !filters.zone_ids?.length ||\n !!room.zones.find((zone) => filters.zone_ids.includes(zone));\n return in_zone && has_space && in_zones;\n });\n \n const type = bkn.declined ? 'declined' : bkn.getType();\n \n const show =\n !filters.hide_type?.length ||\n !filters.hide_type.includes(type as any);\n return intersects && roomSatisfiesConditions && show;\n });\n } \n\n /**If Sunday add one day to get Saturday as end of week */\n private getEndOfWeek(date: DateTZ): DateTZ {\n return date.dateWeekday === 7\n ? date.addValue({ days: 1 }).endOfValue('week').endOfValue('day')\n : date.endOfValue('week').endOfValue('day');\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport { CateringOrder } from '../catering';\nimport { User } from '../users';\nimport {\n flatten,\n HashMap,\n humaniseDuration,\n shorterBuildingDateFormatString,\n shorterLocalDateFormatString,\n toTitleCase,\n unique\n} from '@mckinsey-converge/base';\nimport { Space } from '../spaces/space.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport {\n BookingNote,\n} from './booking.types';\nimport { convertLocalTimestampToTimezonedDateTz, DateNow, DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, getLastDateFromList, handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { findSpace } from '../spaces';\nimport { DateTime } from 'luxon';\n\n\nexport interface IBookingQueryOptions {\n /** booking ID */\n id?: string;\n email?: string;\n target?: string;\n from?: number; // R--- depreciate\n until?: number; // R--- depreciate\n fromTz?: DateTZ;\n untilTz?: DateTZ;\n show_cancelled?: boolean;\n pagination?: boolean;\n limit?: number;\n offset?: number;\n sort?: string,\n filters?: any;\n include_rooms?: boolean;\n building_zone?: string;\n}\n\nexport class Booking extends BaseDataClass {\n /** Unique calendar event ID */\n // public readonly icaluid: string;\n /** Subject or title of the booking */\n public title: string;\n /** Luxon based date class of the booking start time */\n public startDateTz: DateTZ;\n /** Luxon based date class of the booking start time */\n public endDateTz: DateTZ;\n /** Description or details of the booking */\n public readonly body: string;\n /** Type of booking */\n public readonly booking_type: string;\n /** List of catering orders for the booking */\n public catering: readonly CateringOrder[];\n /** Whether booking's duration covers all day */\n public readonly all_day: boolean;\n /** Mapping of emails to approval statuses */\n public approval_status: HashMap;\n /**\n * New booking approval status set in constructor\n *\n * timeBasedStatusLabel is a getter calculated via current time, some parts of the application\n * may use status when it should use timeBasedStatusLabel\n */\n public status: 'tentative' | 'accepted' | 'approved' | 'declined' | 'cancelled' | 'expired' | 'unavailable';\n /** Host/Organiser of the booking */\n public organiser: User;\n /** List of people invited to attend the booking */\n public attendees: User[];\n /** Author of the booking */\n public readonly creator: User;\n\n /** List of notes associated with the booking */\n public notes: readonly BookingNote[];\n /** Mapping of spaces to equipment charge codes */\n public equipment_codes: HashMap;\n /** Mapping of spaces to expected number of attendees */\n public expected_attendees: HashMap;\n /** Map of space emails to the setup time before the meeting in minutes */\n public setup: HashMap;\n /** List of checked in attendees */\n public check_ins: object;\n /** Map of space emails to the breakdown time before the meeting in minutes */\n public breakdown: HashMap;\n /** List of fields edited since creation */\n public readonly edits: string[];\n /** List of users to be notified on visitor arrivals */\n public readonly notify_users: readonly string[];\n /** Whether the time or duration has changed */\n public time_changed = false;\n /**\n * Booking Space\n * Bookings only have one room on MCK\n */\n public room: Space;\n /** building_zone */\n public building_zone: string;\n /** Initialized Timezone */\n public timezone: string;\n /** Array of company names */\n public company?: string[];\n /** Flag for multiroom booking */\n public is_multiroom: boolean;\n /** Multiroom booking ID */\n public multiroom_master_id: string; \n /** Merged - field holds flag for merged-multiroom booking which tightly coupled with multiroom booking only */\n public merged: boolean;\n /** Type of recurrence, Shows whether this is a master or an occurence in the series. */\n public readonly recurrence_type: string;\n /** The frequency of the recurring booking. */\n public readonly recurrence_period: RecurrencePeriod;\n /** The interval time between each period. Defaults to 1. For example, with a period of \"weekly\" and an interval of 2, the recurrencd happen every 2 weeks. */\n public readonly recurrence_interval: number;\n /** Unix epoch in seconds of the recurrence end date */\n private _recurrence_endTz: DateTZ;\n /** The number of times to repeat the recurring booking. */\n public readonly recurrence_count: number;\n /** ID of the booking considered the master */\n public readonly recurrence_master_id: string;\n /** An array of booking IDs which belong to this recurring series. This INCLUDES the master booking ID. */\n public readonly occurrence_ids: string[];\n /** A list of INDIVIDUAL edits to any of the bookings in the series. This is so we can prompt the user if they are going to override previously updated bookings with a whole-series update. */\n public readonly occurrence_edits: string[];\n /** A list of Ocurrences */\n public readonly occurrence_details: { id: string, start_epoch: number }[];\n /** When the booking was created */\n public created_epoch: number;\n /** Is the Application concierge */\n public is_concierge: boolean;\n /**helper to know if recurring toggle is on */\n public is_recurrent: boolean;\n /**array of start dates of each ocurrence in the series */\n public recurrence_starts: Array\n /**array of conflicting dates not to be included in the recurrence series */\n public recurrence_exceptions: Array\n\n public recurrence_days?: Array\n\n /** Master recurrence start */\n public recurrence_start: number;\n\n /** Start Epoch */\n public start_epoch: number;\n public end_epoch: number;\n public level_zone: string;\n public opt_out: boolean;\n public outlook_opt_out: boolean;\n public multi_rooms: Space[];\n public room_setup: any;\n public room_breakdown: any;\n public headcount: number;\n public equipment_code: string;\n\n /** Currently back-end is not properly setting the recurrence_end property, this is a workaround */\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz;\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date;\n }\n\n /** Mark a booking for deleting */\n public attempted_to_delete?: 'series' | 'booking' | null;\n\n // No specific reason to set readonly but canm be change if needed to update in future\n public readonly booked_by : string | { name: string };\n public readonly booker: Object;\n public readonly booker_concierge: Object\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = settingsService.concierge;\n\n /**\n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = new DateTZ();\n\n const defaultTitle = ''; // Blank since the create booking form will init with test values.\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n const defaultBuildingZone = null // R --- no idea, should be a building.id but which and how\n const defaultOrgainiser = User.active_user || new User(); // meh, non American use.\n const defaultBookingType = 'internal';\n\n /**\n * Process the simple raw_data with defaults mixed in\n */\n this.title = raw_data.title || defaultTitle;\n this.timezone = raw_data.timezone || defaultLocalTimezone;\n // Used by components to get the building details\n this.building_zone = raw_data.building_zone || defaultBuildingZone;\n this.body = raw_data.body || '';\n // Provided booking type\n this.booking_type = raw_data.booking_type || defaultBookingType;\n // Attendees provided in API booking data\n this.attendees = (raw_data.attendees || []).map((i) => new User(i));\n // Provided organiser, active user, or empty user?\n this.organiser = raw_data.organiser ? new User(raw_data.organiser) : defaultOrgainiser;\n // Creator is provided or defaults to the organizer\n this.creator = (raw_data.booked_by ? new User(raw_data.booked_by) : defaultOrgainiser) || this.organiser;\n // Setup and breakdown times can conflict but not the true event start and end times\n this.setup = raw_data.setup || {};\n this.breakdown = raw_data.breakdown || {};\n this.room_setup = raw_data.room_setup;\n this.room_breakdown = raw_data.room_breakdown;\n // Notes are assigned by room but we only support a single room\n this.notes = raw_data.notes || [];\n this.equipment_codes = raw_data.equipment_codes || {};\n this.equipment_code = raw_data.equipment_code || '';\n this.expected_attendees = raw_data.expected_attendees || {};\n this.headcount = raw_data.headcount;\n this.check_ins = raw_data.check_ins || {};\n this.notify_users = raw_data.notify_users?.length ? raw_data.notify_users : [this.organiser?.name];\n this.company = raw_data.company || [];\n // retain booked by if there : helps to get correct creator above\n this.booked_by = raw_data.booked_by;\n this.booker = raw_data.booker;\n this.booker_concierge = raw_data.booker_concierge;\n this.level_zone = raw_data.level_zone;\n this.opt_out = raw_data.opt_out;\n this.outlook_opt_out = raw_data.outlook_opt_out;\n\n /**\n * \n */\n this.merged = raw_data?.merged || null;\n\n /**\n * Multiroom fields\n */\n this.is_multiroom = raw_data.is_multiroom || null;\n this.multiroom_master_id = raw_data.multiroom_master_id || null;\n\n /**\n * Setup Defaults when raw_data values are not provided\n *\n * all room_ids and space_list inputs can be refactored into just room like an API booking\n *\n * raw_data.room can be provides as the Space class or JSON object\n */\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n // this.room = raw_data?.room ? (Array.isArray(raw_data?.room) && raw_data.room.length > 0) ? raw_data?.room.map((element) => new Space(element))[0]: [new Space(raw_data.room)][0] : [new Space()][0];\n // this.room = raw_data.room ? new Space(raw_data.room) : new Space();\n\n if (raw_data && raw_data.room) {\n if (Array.isArray(raw_data.room) && raw_data.room.length) {\n this.room = raw_data.room.map((element) => new Space(element))[0];\n } else if (Array.isArray(raw_data.room) && raw_data.room.length === 0) {\n this.room = [new Space()][0];\n } else {\n this.room = [new Space(raw_data.room)][0];\n }\n } else {\n this.room = [new Space()][0];\n }\n\n\n const room_id = raw_data.room_id || raw_data.room_ids // Not sure why we have room_id and room_ids\n if (!this.room?.id && room_id?.length) {\n this.room = findSpace(room_id[0]) || this.room;\n }\n\n const roomsData = raw_data?.multi_rooms || raw_data?.room;\n this.multi_rooms = roomsData\n ? Array.isArray(roomsData)\n ? roomsData.map((element) => new Space(element))\n : [new Space(roomsData)]\n : [new Space()];\n\n \n const room_ids = [...(raw_data?.room_id || []), ...(raw_data?.room_ids || [])];\n\n room_ids.forEach(roomId => {\n const newRoom = findSpace(roomId);\n // Check if the room is found and not already included in this.room\n if (newRoom && !this.multi_rooms.some(room => room.id === newRoom.id)) {\n // Add the new room to this.room\n this.multi_rooms.push(newRoom);\n }\n });\n\n // this.room is sometimes getting set to undefined when raw_data?.room is coming as an object\n if(this.multi_rooms.length && this.room === undefined){\n this.room = this.multi_rooms[0];\n }\n \n /**\n * Setup the booking start and end time\n *\n *\n * Booking defaults to now if start is not defined.\n * Booking durration is now a getter\n */\n // now rounded to the next 5 minute increment\n const defaultStartTz = new DateTZ({ date: nowTz.ms, is_local_tz: false, building_tz: this.timezone }).setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n\n /**\n * When saving a booking the BaseDataClass doens't know to use the toAPIJson\n * so startDateTz isn't being convert to the epoch timestamp\n *\n * I'm not testing for the end time values because we can assume those follow the same pattern.\n */\n const startEpochProvided = !!(raw_data.start_epoch || raw_data.start);\n const startDateTzProvided = !!raw_data.startDateTz;\n\n /**\n * Not trying to be fancy here, just clear.\n */\n if (!startEpochProvided && startDateTzProvided) {\n /**\n * Once a booking is saved the BaseDataClass recreates the Booking\n * but doesn't use the toApiJSON method adapt the class input, mainly the\n * startDateTz isn't converted to the start_epoch timestamp.\n */\n this.startDateTz = raw_data.startDateTz;\n this.endDateTz = raw_data.endDateTz;\n } else if (startEpochProvided) {\n /**\n * A Booking created from the API responses arrives with the booking\n * start_epoch and end_epoch timestamps.\n */\n this.startDateTz = new DateTZ({\n date: ((raw_data.start_epoch || raw_data.start) * 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n this.endDateTz = new DateTZ({\n date: ((raw_data.end_epoch || raw_data.end)* 1000),\n is_local_tz: false,\n building_tz: this.timezone\n });\n } else {\n /**\n * And there are uses of new Booking where there are no inputs\n * and defaults are necessary.\n */\n this.startDateTz = defaultStartTz;\n this.endDateTz = defaultStartTz.addValue({ minutes: 60 });;\n }\n\n /**\n * End time was by design ending at one minute before, IE 4:00PM is 3:59PM,\n * because of calendar and conflcit checking\n *\n * Check and finesse it.\n * Not sure why but some booking endtime added extra seconds\n */\n if ((this.endDateTz.minutes % 5) !== 0 || this.endDateTz.second > 0) {\n // Not sure of the source but some bookings do not conform.\n this.endDateTz = this.endDateTz.setValue({ second: 0, minute: Math.round(this.endDateTz.minutes / 5) * 5 });\n }\n\n\n\n /**\n * Setup the booking created_date\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n this.created_epoch = raw_data.created_epoch || nowTz.seconds;\n\n\n /**\n * Setup the booking all_day boolean\n *\n * if it exists as a key, use the value directly.\n * if we initialize without a value, switch to checking duration.\n * Ref: MCK-826\n */\n if ('all_day' in raw_data) {\n this.all_day = raw_data.all_day;\n } else {\n this.all_day = !!raw_data.all_day || this.duration > 23 * 60;\n }\n\n\n // R--- TODO Concierge will use startDateTz so i'm not sure if this is needed.\n if (!this.is_concierge && this.all_day && this.timezone) {\n /**\n * Concierge has a all_day form field, I can see it may need this for that, does it really?\n */\n this.startDateTz = this.startDateTz.startOfValue('day')\n }\n\n /**\n * Setup the booking approval status\n */\n let status = raw_data.status;\n // If not provided default to approved.\n if (!raw_data.status) {\n status = 'accepted';\n }\n // \"show_as\" is a special rule to override how the applications display the status\n if (raw_data.show_as && raw_data.show_as === 'cancelled') {\n status = 'declined';\n }\n const approvalStatus = {};\n this.multi_rooms.forEach(room => {\n approvalStatus[room.email] = status;\n });\n // Tracking new \"status\" and legacy \"approval_status\" from raw_data.status.\n this.status = status;\n this.approval_status = raw_data.approval_status || {};\n\n /**\n * Catering setup\n *\n * Bring in and sort the catering order by delivery time\n */\n\n this.catering = (raw_data.catering instanceof Array ? raw_data.catering : []).map(\n (i) => new CateringOrder(i)\n );\n\n\n\n /**\n * Edited fields setup\n *\n * Bring in and sort the catering order by delivery time\n *\n * cateringOrders can return the order sorted\n */\n const edited_fields = Array.isArray(raw_data.edits)\n ? raw_data.edits\n : unique(\n flatten(\n Object.keys(raw_data.edits || {}).map((room) => {\n return flatten(Object.values(raw_data.edits[room]));\n })\n )\n );\n this.edits = edited_fields;\n\n /**\n * New Recurring booking feilds\n *\n * New fields do not match the BookingRecurrenceDetails type\n * and are simpler to manage this way\n */\n this.recurrence_count = raw_data.recurrence_count || null;\n this.recurrence_days = raw_data.recurrence_days || null;\n this.occurrence_edits = raw_data.occurrence_edits || null;\n this.recurrence_endTz = raw_data.recurrence_end ? new DateTZ({date: raw_data.recurrence_end * 1000, is_local_tz: false, building_tz: this.timezone}) : null;\n this.recurrence_exceptions = raw_data.recurrence_exceptions || null;\n this.occurrence_ids = raw_data.occurrence_ids || null;\n this.recurrence_interval = raw_data.recurrence_interval || null;\n this.recurrence_period = raw_data.recurrence_period || null;\n this.recurrence_type = raw_data.recurrence_type || null;\n this.recurrence_master_id = raw_data.recurrence_master_id\n this.occurrence_details = raw_data.occurrence_details\n this.is_recurrent = raw_data.is_recurrent || (!!this.recurrence_type && !!this.recurrence_period) || null;\n this.recurrence_starts = raw_data.recurrence_starts || []\n this.start_epoch = raw_data.start_epoch\n this.end_epoch = raw_data.end_epoch\n\n /**\n * I'm not clear why, but the booking body, aka description is copied into the notes.\n * R--- In concerge data description is only a key when saving, also in the note array?\n */\n if (raw_data.body && !this.notes.find((i) => i.type === 'description')) {\n this.notes = [\n ...this.notes,\n {\n type: 'description',\n date: 0,\n message: raw_data.body,\n author: this.organiser.email\n }\n ];\n }\n\n /**\n * In case there is a cancellation in progress the property attempted_to_delete is set to false\n * And it is persisted until the booking is gone\n */\n this.attempted_to_delete = raw_data.attempted_to_delete || null;\n }\n\n\n /** Service for managing Bookings */\n protected get _service() {\n return ServiceManager.serviceFor(Booking);\n }\n\n /** Alias to approval_status */\n public get auto_approve(): boolean {\n // if concierge we auto_approve always.\n if (this.is_concierge) {\n return true;\n }\n return !this.multi_rooms.some(room => room.byRequest({\n dateTz: this.startDateTz,\n duration: this.duration,\n host: this.organiser\n }));\n }\n\n /** Whether booking has been approved */\n public get approved(): boolean {\n return !this.declined && !this.tentative;\n }\n\n /** All of the booking attendees including the organizer */\n public get allAttendees(): User[] {\n return unique([this.organiser].concat(this.attendees), 'email');\n }\n\n /** Computer format for booking type */\n public get bookingTypeId(): string {\n return this.booking_type.toLowerCase();\n }\n\n /** Human format for booking type */\n public get bookingTypeLabel(): string {\n return toTitleCase(this.booking_type);\n }\n\n /** Get accessor for the check in object, app expect array */\n public get checkInsArray(): string[] {\n return Object.keys(this.check_ins || {})\n }\n\n /** Legacy getter for \"class\" */ // R-- TODO remove\n public get class(): string {\n return this.booking_type;\n }\n\n /** */\n public get displayEndDateTz(): DateTZ {\n if ((this.endDateTz.minutes % 5) !== 0) {\n // All the bookings should end in 59 seconds\n return this.endDateTz.addValue({ seconds: 1 });\n }\n // but if not they return 00\n return this.endDateTz;\n }\n\n /** Whether booking has been declined */\n public get declined(): boolean {\n /**\n * I'm not sure, nor is Cam if this is ever used to decline\n * all booking for a specific room\n */\n const isAnyRoomDeclined = this.multi_rooms.some(room => room.name.toLowerCase().includes('decline'));\n if (isAnyRoomDeclined) {\n return true;\n }\n\n if (this.status.includes('decline')) {\n return true;\n }\n\n return false;\n }\n\n /** Description of the booking purpose */\n public get description(): string {\n const note = (this.notes || []).find((i) => i.type === 'description');\n return note ? note.message : '';\n }\n\n /** Catering getter */\n public get cateringOrders() {\n // Return the catering orders sorted by delivery time\n return this.catering ? this.catering.slice().sort((a, b) => {\n if (a?.delivery_time > b?.delivery_time) return 1;\n if (b?.delivery_time > a?.delivery_time) return -1;\n\n return 0;\n }) : [];\n }\n\n /** Get the created date as DateTz */\n public get creationDateTz() {\n return new DateTZ({ date: this.created_epoch * 1000, is_local_tz: false, building_tz: this.timezone })\n }\n\n public get tz_offset() {\n return getTimezoneOffsetString(this.timezone);\n }\n\n /** Display value for the date */\n public get date_string(): string {\n return this.startDateTz.formatDate('dd MMM yyyy');\n }\n\n /**\n * Get the booking durration based on start and end times\n */\n public get duration(): number {\n return Math.abs(this.startDateTz.startOfValue('minute').dateDiff(this.displayEndDateTz, 'minutes'));\n }\n\n /** Unix timestamp of the booking start */\n public get date() { // R--- remove if not necessary\n return this.startDateTz.ms;\n }\n\n /** Whether booking contains external visitors in the attendee list */\n public get has_visitors(): boolean {\n return this.attendees.reduce((a, v) => a || v.external, false);\n }\n\n /** Does the booking have catering orders */\n public get has_catering(): boolean {\n return !!this.catering.length;\n }\n\n /**\n * Unique calendar event ID\n * same as this.id, used to support existing component usage\n */\n public get icaluid(): string {\n return this.id;\n }\n\n /**\n * Get the booking room id\n */\n public get room_id(): string {\n return this.room.id;\n }\n\n /** Legacy getter of room, aka space */\n public get space(): Space {\n return this.room;\n }\n\n /** Status of the booking */\n public get timeBasedStatusLabel(): 'future' | 'upcoming' | 'done' | 'started' | 'in_progress' | 'expired_yesterday' {\n const buildingTzDt = DateNow(new Date()).toZone(this.timezone) ; // building time\n\n if (DateNow(new Date()).isBeforeDate(this.startDateTz.subtractValue({ minutes: 15 }))) {\n return 'future';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz)) {\n return 'upcoming';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: 15 }))) {\n return 'started';\n } else if (DateNow(new Date()).isBeforeDate(this.startDateTz.addValue({ minutes: this.duration }))) {\n return 'in_progress';\n }\n // if current time is 12 AM (as per timezone) and booking expired yesterday\n else if(buildingTzDt.startOfValue('day').addValue({ minutes: 1 }).isAfterDate(this.startDateTz, 'day') ) {\n return 'expired_yesterday'\n }\n\n return 'done';\n }\n\n /** Whether booking is tentative */\n public get tentative(): boolean {\n if (\n this.status &&\n this.status.indexOf('tentative') >= 0\n ) {\n return true;\n }\n\n return false;\n }\n\n /** Display valuie for the start and end times of the booking */\n public get time_period(): string {\n return `${this.startDateTz.formatDate('h:mma')} - ${this.displayEndDateTz.formatDate('h:mma')}`;\n }\n\n /** Display value for the start time of the booking */\n public get start_time(): string {\n return this.startDateTz.formatDate('h:mma');\n }\n\n /** Display value for the end time of the booking */\n public get end_time(): string {\n return this.endDateTz.formatDate('h:mma');\n }\n\n /** Display value for the duration of the booking */\n public get length_string(): string {\n return humaniseDuration(this.duration);\n }\n\n /** Display value for the location of the booking */\n // public get local_room_name(): string {\n // return this.room?.local_name || 'No location';\n // }\n public get local_room_name(): string {\n if (this.multi_rooms.length === 0) {\n return 'No location';\n } else {\n return this.multi_rooms.map(room => room.local_name).join(', ');\n }\n } \n\n /** Display value for the level of the first space in the booking */\n public get level(): string {\n return this.space.level.name;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Booking {\n return new Booking(this.toJSON());\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(isEdit = false): Booking {\n return new Booking({\n ...this.toJSON(),\n id: isEdit ? this.id : null,\n });\n }\n\n /**\n *\n * @param status\n * @returns void\n */\n public undo(status?: 'accept' | 'decline', opts: { series?: boolean } = {}): Promise {\n return this._service.undo(\n this.id, status || 'accept',\n opts\n );\n }\n\n /**\n * Delete booking from the server\n */\n public delete(opts: { series?: boolean } = {}): Promise {\n if (this.id) {\n return this._service.delete(this.id, { ...opts });\n\n // R-- ask Cam again is he's positive these extra params are not needed for anything\n // return this._service.delete(this.id, {\n // concierge: this.is_concierge,\n // host: this.organiser.email,\n // room_id: this.space?.id,\n // icaluid: this.icaluid,\n // start: json.start,\n // end: json.end\n // });\n }\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Booking): HashMap {\n let data = super.toJSON();\n // Remove the description from the notes\n data.notes = Array.isArray(data.notes) ? data.notes.filter((note) => note.type !== 'description') : data.notes;\n // Encode the nested objects\n data.room = data.room.toJSON();\n\n\n\n data.organiser = data.organiser.toJSON();\n data.creator = data.creator?.toJSON ? data.creator.toJSON(): data.creator;\n // Map the attendees User objects\n data.attendees = data.attendees.map((i: User) => i.toJSON());\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n return data;\n }\n\n /**\n * Convert object into plain object\n */\n public toApiJSON(this: Booking): HashMap {\n let data = super.toJSON();\n\n // Update booking payload contains additional fields\n data.icaluid = \"\";\n if (data.id) {\n data.icaluid = data.id;\n data.location_name = this.multi_rooms.map((item)=>{return item.local_name}).join(', ');\n data.from_room = this.multi_rooms.map((item)=>{return item.email}).join(', ');\n data.building_zone = this.room?.building?.id;\n }\n\n /**\n * These fields are rather in flux\n * According to Cam \"approve\" will be the prefered field\n * and auto_approve and approval_status can be removed.\n */\n data.approve = this.auto_approve; // this value appear incorrect on update\n data.auto_approve = [this.auto_approve]; // Needed to update approval status until BE accepts \"approve\"\n // delete data.approval_status;\n\n // Booking start and end data\n delete data.startDateTz;\n delete data.endDateTz;\n data.start = this.startDateTz.seconds;\n data.end = this.endDateTz.seconds;\n data.old_start = this.startDateTz.seconds; // remove is not necessary\n data.old_end = this.endDateTz.seconds; // remove is not necessary\n\n // Creation date value\n delete data.created_epoch;\n data.creation_date = this.creationDateTz.seconds;\n\n // Catering fields\n // data.catering = data.catering.toJSON();\n data.catering = this.cateringOrders;\n data.has_catering = this.has_catering;\n delete data.cateringOrders\n\n // Attendees appear quite incomplete\n // Map the attendees User objects\n data.attendees = this.allAttendees.map((i: User) => i.toJSON ? i.toJSON() : i);\n\n // Orgainizer and Creator data\n data.organiser = data.organiser.toJSON ? data.organiser.toJSON() : data.organiser;\n data.creator = data.creator.toJSON ? data.creator.toJSON() : data.creator;\n\n // Convert check_ins to checked_in array\n delete data.check_ins;\n data.checked_in = this.checkInsArray;\n\n // edits - edit booking is showing all fields even w/o an edit :(\n\n // Room data\n data.room_ids = this.multi_rooms.map((item)=>{return item.email});\n delete data.room;\n\n // New recurring booking\n data = handleRecurrenceFields(data)\n\n\n if(data.recurrence_list){\n data.recurrence_starts = [...data.recurrence_list]\n delete data.recurrence_list\n }\n\n // Not found in dev data\n delete data.name;\n delete data.email;\n delete data.is_concierge;\n // delete data.building_zone;\n // delete data.status;\n\n return data;\n }\n\n public getType(): string {\n if (!this || this.status?.includes('decline')) {\n return 'cancelled';\n }\n const booking_type = this.booking_type;\n if (booking_type === 'internal' && this.has_visitors) {\n return 'external';\n }\n return booking_type;\n }\n\n /** fallback for a booking when the recurrence_end is null but it's a series booking */\n public recurrenEndFromOcurrences(occurrence_details: { id: string, start_epoch: number }[]): DateTZ {\n const date = occurrence_details?.map(occurence => occurence)\n .sort((a, b) => new Date(a.start_epoch * 1000).getTime() - new Date(b.start_epoch * 1000).getTime())\n .reverse()\n .shift()\n .start_epoch * 1000\n return new DateTZ({date, is_local_tz: false, building_tz: this.timezone});\n }\n\n public get dateString() {\n return shorterLocalDateFormatString(this.startDateTz);\n }\n public get dateBuildingString() {\n return shorterBuildingDateFormatString(this.startDateTz);\n }\n\n public get endDateString(): string {\n return shorterLocalDateFormatString(this.recurrenEndFromOcurrences(this.occurrence_details));\n }\n}\n\n/**\n * Merge catering orders with same time and location\n * @param order_list List of catering orders\n */\nexport function mergeCateringOrders(order_list: CateringOrder[]) {\n // R--- investigate when this is used. Staff doesn't use it when adding catering orders.\n for (let i = 0; i < order_list.length; i++) {\n const orders = order_list.filter(\n (order) =>\n order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time\n );\n if (orders.length > 1) {\n const new_list = order_list.filter(\n (order) =>\n !(order.location_id === order_list[i].location_id &&\n order.delivery_time === order_list[i].delivery_time)\n );\n new_list.push(new CateringOrder({\n ...order_list[i],\n items: flatten(orders.map(order => order.items)),\n booking_date: this.startDateTz.ms,\n booking_timezone: this.booking_timezone,\n }));\n order_list = new_list;\n i = 0;\n }\n }\n return order_list;\n}\n","import { DateTZ } from \"@mckinsey-converge/date-tz\";\n\nexport interface SpaceRules {\n auto_approve: boolean; // if false sapce is requestable else bookable\n hide: boolean;\n max_length?: number;\n min_length?: number;\n reason?: string // specially for non-bookable rooms\n}\n\nexport interface BookingNote {\n /** Type of note */\n type: 'equipment' | 'catering' | 'description' | 'private' | 'other' | 'catering-private';\n /** Name of the note's author */\n author: string;\n /** Contents of the note */\n message: string;\n /** Time the note was added to the booking */\n date: number;\n /** Display value for the time */\n time?: string;\n /** ID of the space associated with the note */\n space?: string;\n /** ID of the catering order associated with the note */\n order_id?: string;\n}\n\nexport interface DateDurationData {\n dateTz: DateTZ,\n duration: number,\n mobile: boolean,\n save?: boolean,\n}\n\nexport enum BOOKING_STATUS {\n approved = 'approved',\n declined = 'declined',\n tentative = 'tentative',\n unavailable = 'unavailable'\n}","import {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { AvailableBookingFields } from '../settings.interfaces';\nimport {\n HashMap,\n humaniseDuration,\n mockDate as mockDateBase,\n resetDate as resetDateBase,\n timeFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { CateringOrder } from '../catering/catering-order.class';\nimport { ServiceManager } from '../service-manager.class';\nimport { User } from '../users/user.class';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport {\n BookingRule,\n SpaceStatus\n} from './space.types';\nimport { validateEndTime } from '../validation.utilities';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingAction, RecurrencePeriod, SeriesAction } from '../recurrence/recurrence.utils';\nimport { Space } from '../spaces';\nimport * as cloneDeep from 'lodash/cloneDeep';\n\nconst MINUTE = 1;\nconst HOUR = 60;\nconst DAY = 24 * HOUR;\nconst WEEK = 7 * DAY;\nconst MONTH = 30 * DAY;\n\nconst DURATION_MAP: { [duration: string]: number } = {\n month: MONTH,\n months: MONTH,\n week: WEEK,\n weeks: WEEK,\n day: DAY,\n days: DAY,\n hour: HOUR,\n hours: HOUR,\n minute: MINUTE,\n minutes: MINUTE\n};\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const mockDate = mockDateBase;\n\n/**\n * Deprecated. Use @mckinsey-converge/base's import.\n */\nexport const resetDate = resetDateBase;\n\nexport interface IBookingSlot {\n start: number;\n end: number;\n}\n\n\nexport function bookingOptionsToQuery(options: IBookingQueryOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n delete query.type;\n if (options.filters) {\n delete query.filters;\n for (const property in options.filters) {\n if (!query[property]) {\n query[property] = options.filters[property]\n }\n }\n }\n\n // id?: string;\n // cancelled?: boolean;\n if (options.until) {\n query.to = options.until;\n delete query.until;\n }\n \n }\n return query;\n}\n\n\n/**\n * Generate a list of free time slots between the given bookings\n * @param list List of bookings to find slots between\n * @param min_size Minimum length of a free slot in minutes\n */\nexport function getFreeBookingSlots(list: Booking[]=[], min_size: number = 30, dateTzMs: number = DateNow(new Date()).ms,): IBookingSlot[] {\n /* istanbul ignore else */\n if (!list.length) {\n return [\n {\n start: 0,\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n }\n ];\n }\n const slots: IBookingSlot[] = [];\n let start = new DateTZ({ date: dateTzMs });\n list.sort((a, b) => a.date - b.date);\n for (const booking of list) {\n const bkn_start = booking.startDateTz;\n const bkn_end = booking.endDateTz;\n if (bkn_start.isAfterDate(start)) {\n const diff = Math.abs(bkn_start.dateDiff(start, 'minutes'));\n /* istanbul ignore else */\n if (diff >= min_size) {\n slots.push({ start: start.ms, end: bkn_start.ms });\n }\n start = bkn_end;\n } else if (start.startOfValue('minute').ms === bkn_start.startOfValue('minute').ms) {\n start = bkn_end;\n }\n }\n slots.push({\n start: start.ms,\n // R--- these X 10's make no sense. why not + 2 years?\n end: DateNow(new Date()).startOfValue('minute').ms * 10\n });\n\n return slots;\n}\n\n/**\n * Get the next free time slot from the given bookings\n * @param list List of bookings to find the next slot\n * @param date Date to find next slot after in ms since UTC epoch\n * @param min_size Minimum length of the free slot in minutes\n * \n * R--- Possibly depreciate, I don't see it used anywhere except for its own test\n */\nexport function getNextFreeBookingSlot(\n list: Booking[],\n date: number = DateNow(new Date()).ms,\n min_size: number = 15\n): IBookingSlot {\n const slots = getFreeBookingSlots(list, min_size, date);\n const date_ = new DateTZ({date})\n const time = date_.startOfValue('minute').setValue({ second: 1 });\n for (const block of slots) {\n const start = new DateTZ({date: block.start});\n const end = new DateTZ({date: block.end});\n if (start.startOfValue('minute').isAfterDate(time)) {\n return block;\n } else if (time.isBeforeDate(end.startOfValue('minute'))) {\n const duration = end.startOfValue('minute').dateDiff(time, 'minutes');\n /* istanbul ignore else */\n if (duration >= min_size) {\n return block;\n }\n }\n }\n return slots[slots.length - 1];\n}\n\n/**\n * Generate form fields for the given booking\n * @param booking Booking to generate form for\n * @param current_user Current user of the system to default as the host\n */\nexport function generateBookingForm(\n booking: Booking,\n use_fields: AvailableBookingFields[],\n isConcierge: boolean = false,\n manualTimezone?: string,\n action?: SeriesAction | BookingAction | null\n ): FormGroup {\n if (!booking) {\n throw Error('No booking passed');\n }\n\n const user_service = ServiceManager.serviceFor(User);\n const current_user =\n user_service.current ||\n new User({ id: 'local-user', name: 'Local User', email: 'local@place.tech' });\n\n const fields: HashMap = {\n id: new FormControl(booking.id || ''),\n space_list: new FormControl( booking.is_multiroom? booking.multi_rooms : [booking.room], []),\n room: new FormControl(booking.room, {}),\n dateTz: new FormControl({ value: booking.startDateTz || DateNow(), disabled: false }, [Validators.required]),\n duration: new FormControl({ value: booking.duration, disabled: false }),\n organiser: new FormControl(booking.organiser || current_user, [Validators.required]),\n attendees: new FormControl(booking.attendees, []),\n title: new FormControl(booking.title || '', { validators: [ Validators.required, Validators.minLength(1) ], updateOn: 'blur' }), //Validators.pattern(\"[^=`~!@#$%*{};:'\\\",_.<>]*\")\n booking_type: new FormControl(booking.booking_type),\n body: new FormControl(booking.body),\n notes: new FormControl(booking.notes),\n equipment_codes: new FormControl(booking.equipment_codes),\n expected_attendees: new FormControl(booking.expected_attendees),\n company: new FormControl(booking.company),\n is_multiroom: new FormControl(booking.is_multiroom),\n merged: new FormControl({value: booking?.merged, disabled: true}),\n catering: new FormControl(\n booking.cateringOrders.map(\n (order) => new CateringOrder({\n ...order,\n booking_date: booking.startDateTz.ms,\n booking_timezone: booking.timezone,\n })\n )\n ),\n all_day: new FormControl(!!booking.all_day),\n has_catering: new FormControl(!!booking.has_catering),\n needs_space: new FormControl(true),\n action: new FormControl(''),\n timezone: new FormControl(manualTimezone || \"\"),\n is_before_date: new FormControl(false)\n };\n if (!isConcierge) {\n fields.duration.setValidators([Validators.required, validateEndTime(fields.dateTz)]);\n }\n /* istanbul ignore else */\n if (booking.id && booking.id !== 'ad-hoc') {\n fields.organiser.disable();\n /* istanbul ignore else */\n if (booking.endDateTz.ms < DateNow(new Date()).ms) {\n fields.dateTz.disable();\n }\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n fields.dateTz.setValidators(dateValidators);\n fields.dateTz.updateValueAndValidity();\n }\n let list_length = -1;\n fields.space_list.valueChanges.subscribe((list) => {\n const expected = fields.expected_attendees.value || {};\n const matches = Object.keys(expected).filter((key) =>\n list?.find((space) => space.email === key)\n ).length;\n if (list && list.length && matches === 0) {\n const codes = fields.equipment_codes.value || {};\n if (Object.keys(expected).length >= 0 || Object.keys(codes).length >= 0) {\n const key = Object.keys(expected)[0] || Object.keys(codes)[0];\n const new_expected = {};\n const new_codes = {};\n const notes = fields.notes.value;\n notes.forEach((note) => (note.space === key ? (note.space = list[0].email) : ''));\n new_expected[list[0].email] = expected[key];\n new_codes[list[0].email] = codes[key];\n fields.expected_attendees.setValue(new_expected);\n fields.equipment_codes.setValue(new_codes);\n }\n }\n list_length = list?.length;\n });\n fields.dateTz.valueChanges.subscribe((_) => {\n fields.duration.updateValueAndValidity();\n });\n fields.needs_space.valueChanges.subscribe((space_needed) => {\n if (!space_needed) {\n fields.space_list.setValue([]);\n }\n });\n fields.has_catering.valueChanges.subscribe((has_catering) => {\n if (!has_catering) {\n fields.catering.setValue([]);\n }\n });\n const simplified_fields: HashMap = [\n 'id',\n 'space_list',\n 'space_ids',\n 'notes',\n 'dateTz',\n 'booking_type',\n 'equipment_codes',\n 'expected_attendees',\n 'timezone',\n 'is_before_date',\n ...use_fields\n ].reduce((map, key) => {\n /* istanbul ignore else */\n if (fields[key]) {\n map[key] = fields[key];\n }\n return map;\n }, {});\n \n if (simplified_fields.all_day) {\n const handleAllDay = (value) => {\n if (value) {\n let startOfDay = simplified_fields.dateTz.value.clone();\n // When the booking space isn't set we still need a way to determine midnight\n // and here we use the current concierge building selection's timezone.\n if (manualTimezone) {\n startOfDay = startOfDay.toZone(manualTimezone);\n }\n\n simplified_fields.dateTz.setValidators([Validators.required]);\n simplified_fields.dateTz.setValue(simplified_fields.all_day.value\n ? startOfDay.startOfValue('day')\n : simplified_fields.dateTz.value);\n simplified_fields.duration.setValue(simplified_fields.all_day.value\n ? 24 * 60\n : simplified_fields.duration.value);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.disable();\n // simplified_fields.dateTz.disable();\n } else {\n const dateValidators = [Validators.required];\n if (!isConcierge) {\n dateValidators.push(isFuture);\n }\n dateValidators.push(validDateTZ)\n simplified_fields.dateTz.setValidators(dateValidators);\n simplified_fields.duration.setValue(booking.duration || 30);\n simplified_fields.dateTz.updateValueAndValidity();\n simplified_fields.duration.enable();\n simplified_fields.dateTz.enable();\n }\n };\n simplified_fields.all_day.valueChanges.subscribe(handleAllDay);\n handleAllDay(simplified_fields.all_day.value);\n }\n\n const occurrences = booking.occurrence_details || [];\n\n //Add recurrence fields\n if(action && booking.recurrence_period === RecurrencePeriod.LIST){\n booking.recurrence_starts = occurrences\n .filter(occurrence => occurrence.id !== booking.recurrence_master_id)\n .map((occurrence) => new DateTZ({date: occurrence.start_epoch * 1000, is_local_tz: false, building_tz: booking.timezone})\n ) \n }\n /**If series exists then set the start and end dates from the first and last bookings in the occurrences array\n * this prevents prefilled form errors due to individual edits\n */\n if(action && action !== SeriesAction.CLONE && action !== BookingAction.CLONE && occurrences && occurrences.length && !booking.id){\n const start_dateTz = new DateTZ({\n date: occurrences.sort((d1, d2) => d1.start_epoch - d2.start_epoch)[0].start_epoch * 1000, \n is_local_tz: false, building_tz: booking.timezone\n })\n simplified_fields.dateTz.setValue(start_dateTz)\n const end = occurrences.sort((d1, d2) => d2.start_epoch - d1.start_epoch)[0].start_epoch * 1000\n booking.recurrence_endTz = new DateTZ({date: end, is_local_tz: false, building_tz: booking.timezone}) \n }\n\n // R-- needs TZ aware fields\n const _recurr_end = simplified_fields.dateTz?.value || new DateTZ({ date: 1 }); // new DateTZ({date: simplified_fields.date?.value}) \n const fields_with_recurrence = {\n ...simplified_fields,\n recurrence_period: new FormControl(booking.recurrence_period || RecurrencePeriod.WEEKLY),\n recurrence_interval: new FormControl(booking.recurrence_interval || 1),\n recurrence_endTz: new FormControl(booking.recurrence_endTz || _recurr_end.addValue({days: 1})),\n recurrence_count: new FormControl(booking.recurrence_count || 0),\n is_recurrent: new FormControl(booking.is_recurrent),\n recurrence_starts: new FormControl(booking.recurrence_starts || []),\n recurrence_exceptions: new FormControl([]),\n recurrence_pattern: new FormControl(RecurrencePeriod.WEEKLY), //Helper value to store the last selected pattern (daily, weekly, monthly),\n recurrence_days: new FormControl(booking.recurrence_days || [])\n }\n\n if(booking.is_recurrent && action !== BookingAction.CLONE){\n fields_with_recurrence.recurrence_starts.setValidators([arrayWithValues])\n fields_with_recurrence.recurrence_starts.updateValueAndValidity()\n fields_with_recurrence.recurrence_endTz.setValidators([Validators.required, validDateTZ]);\n }\n // Generate form group for booking item\n const form = new FormGroup(fields_with_recurrence);\n return form;\n}\n\n/**\n * Validate whether date is in the future\n * @param control Control to check value\n */\nexport function isFuture(control: AbstractControl) {\n const dateTz = control.value; // new DateTZ({date: control.value});\n return dateTz.isBeforeDate(DateNow(new Date()).subtractValue({ minutes: 5 }))\n ? { dateTz: 'Date needs to be in the future' }\n : null;\n}\n\n/**\n * Validate whether an array has values\n * @param control Control to check value\n */\nexport function arrayWithValues (control: AbstractControl) {\n return control.value.length !== 0 ? null : { field: 'Needs at least one value'}\n}\n\n/**\n * Validate whether a date has a valid value (future or current date)\n * @param control Control to check value\n */\n export function validDate (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = new DateTZ({date: control.value})\n const now = DateNow(new Date())\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Validate whether a date has a valid DateTZ value (future or current date)\n * @param control Control to check value\n */\n export function validDateTZ (control: AbstractControl) {\n if(!control.value){\n return { date: 'Needs a valid date'}\n }\n const date = DateNow(control.value.JSDate);\n const now = DateNow(new Date());\n const isValid = now.isBeforeDate(date, 'day') || now.isSameDate(date, 'day')\n return isValid ? null : { date: 'Needs a valid date'}\n}\n\n/**\n * Get minimum duration from ruleset in minutes\n * Default to 5min\n */\nexport function getMinLength(rule_list: HashMap): number {\n return Object.values(rule_list).reduce((min, block) => {\n const min_block = block.reduce((min_length, el) => {\n if (el.conditions.min_length && stringToMinutes(el.conditions.min_length) > min) {\n return stringToMinutes(el.conditions.min_length);\n } else {\n return min_length;\n }\n }, 5);\n if (min_block > min) {\n return min_block;\n } else {\n return min;\n }\n }, 5) as number;\n}\n\n/**\n * Whether the first input is greater than the last. Converts duration strings into minutes\n * @param duration_1 First input can be a number in minutes or a duration string e.g. `1 hour`\n * @param duration_2 Second input can be a number in minutes or a duration string e.g. `30 minutes`\n */\nexport function durationGreaterThanOrEqual(\n duration_1: string | number,\n duration_2: string | number\n) {\n const first: number = typeof duration_1 === 'string' ? stringToMinutes(duration_1) : duration_1;\n const second: number =\n typeof duration_2 === 'string' ? stringToMinutes(duration_2) : duration_2;\n return first >= second;\n}\n\n/**\n * Conver time string into minutes\n * @param str timestring e.g. `'1 day'`, `'15 minutes'`, `'2 weeks'`\n */\nexport function stringToMinutes(str: string): number {\n const parts = str.split(' ');\n return +parts[0] * DURATION_MAP[parts[1]];\n}\n\n/**\n * Get current status within bookings\n * @param bookings List of bookings\n * @param host Host of the new event\n * @param date Datetime of the new event\n */\nexport function statusFromBookings(\n bookings: Booking[] = [],\n bookable: boolean = true,\n requestable: boolean = false,\n dateTz: DateTZ = DateNow(),\n space?: Space\n) {\n const free_slots = getFreeBookingSlots(bookings.filter((bkn) => !bkn.declined));\n const now = DateNow() // new DateTZ({date}); // now should be now\n // commeted bellow piece as correct way to get next free booking slot is at line- 488\n // const next_free_slot = free_slots.find((slot) => {\n // return slot && (slot.start > now.ms || now.ms > slot.start - slot.start % 1000 || now.ms < slot.end - slot.end % 60 * 1000);\n // // const start = new DateTZ({date: slot?.start || 0 });\n // // const end = new DateTZ({date: slot?.end || 0}); // slot end isn't late enough? or after now/\n // // return start.isAfterDate(now) || (now.isAfterDate(start.startOfValue('second')) && now.isBeforeDate(end.startOfValue('minute')))\n // });\n\n const next_free_slot = getNextFreeBookingSlot(bookings.filter((bkn) => !bkn.declined), dateTz.ms);\n \n const start = new DateTZ({date: next_free_slot?.start || 0});\n const end = new DateTZ({date: next_free_slot?.end || 0});\n const currently_free = dateTz.isAfterDate(start.startOfValue('second')) && dateTz.isBeforeDate(end.startOfValue('minute'));\n const time_until_next_block = humaniseDuration(\n currently_free ? end.dateDiff(dateTz, 'minutes') : start.dateDiff(dateTz, 'minutes'),\n 'short'\n );\n\n const free_tomorrow = !currently_free && !start.isSameDate(dateTz, 'day');\n const free_today = currently_free && !end.isSameDate(dateTz, 'day');\n \n return {\n status: (!bookable\n ? SpaceStatus.NotBookable\n : currently_free\n ? requestable\n ? SpaceStatus.Requestable\n : SpaceStatus.Available\n : SpaceStatus.InProgress) as SpaceStatus,\n available_until: free_today\n ? 'No meetings today'\n : currently_free\n ? `Free until ${end.formatDate(timeFormatString())}(${time_until_next_block})`\n : free_tomorrow\n ? 'Unavailable today'\n : `Free at ${start.formatDate(timeFormatString())}(${time_until_next_block})`\n };\n}\n\n/**\n * V1 version display.\n */\nexport const spaceStatusToDisplay = (status: SpaceStatus): string => {\n switch (status) {\n case SpaceStatus.NotBookable:\n return 'Not Bookable';\n case SpaceStatus.Requestable:\n return 'Available by Request';\n case SpaceStatus.Unavailable:\n return 'Unavailable';\n case SpaceStatus.InProgress:\n return 'Meeting in Progress';\n case SpaceStatus.Available:\n default:\n return 'Available';\n }\n};\n\nexport function replaceBookings(\n list: Booking[],\n new_bookings: Booking[],\n filter_options: { room_email: string; fromTz: DateTZ; toTz: DateTZ }\n) {\n const filtered_list = list.filter((booking) => {\n return (\n !(booking.multi_rooms.some(room => room?.email === filter_options.room_email)) ||\n !timePeriodsIntersect(filter_options.fromTz.ms, filter_options.toTz.ms, booking.startDateTz.ms, booking.endDateTz.ms)\n );\n });\n const updated_list = filtered_list.concat(new_bookings);\n updated_list.sort((a, b) => a.date - b.date);\n return unique(updated_list, 'icaluid');\n}\n\nexport function timePeriodsIntersect(\n start1: number,\n end1: number,\n start2: number,\n end2: number,\n type = ''\n) {\n return (\n (start1 >= start2 && start1 < end2) ||\n (end1 > start2 && end1 <= end2) ||\n (start2 >= start1 && start2 < end1) ||\n (end2 > start1 && end2 <= end1)\n );\n}\n\nexport function formatWhen({\n all_day,\n startTZ,\n endTZ,\n displayEndTZ\n}): string {\n if (all_day) {\n return `${startTZ.formatDate('dd MMM yyyy')} - All Day`;\n } else {\n if (startTZ.isSameDate(endTZ, 'day')) {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('h:mma')}`;\n } else {\n return `${startTZ.formatDate('dd MMM yyyy, h:mma')} - ${displayEndTZ.formatDate('dd MMM yyyy, h:mma')}`;\n }\n }\n}\n\nexport const isIncludes = (item: any, field: string, searchVaue: string) => (item && item[field] && item[field].toLowerCase().includes(searchVaue));\n\nexport function searchRoomsAndBookings(allItems: (Space | Booking)[], searchValue: string, isConcierge:boolean = false) {\n\n let relevantItems: (Space | Booking)[] = [];\n\n if(isConcierge) {\n relevantItems = allItems.filter( (item: any ) => \n isIncludes(item, 'title', searchValue) ||\n isIncludes(item.creator, 'name', searchValue) ||\n isIncludes(item.organiser, 'name', searchValue) ||\n isIncludes(item, 'simple_name', searchValue) || // search with room name \n (item?.attendees && !!item?.attendees.filter(el => el.name.toLowerCase().includes(searchValue)).length ) \n );\n } else {\n relevantItems = allItems.filter( (item: any ) => \n this.isIncludes(item.creator, 'name', searchValue) ||\n this.isIncludes(item.organiser, 'name', searchValue) ||\n this.isIncludes(item, 'simple_name', searchValue) \n );\n }\n\n const filteredItems = this.duplicateMultiroomEntriesIfAny(relevantItems);\n \n return filteredItems;\n} \n\nexport function duplicateMultiroomEntriesIfAny(bookings) {\n // Initialize an array to hold the original and duplicated entries \n const updatedBookings = [...bookings];\n\n // Loop through the original bookings array \n [...bookings].forEach(booking => {\n if(booking?.is_multiroom) {\n // calculate the number of times to duplicates the booking\n const duplicatesCount = booking.multi_rooms.filter(el => el.id !== booking.space.id);\n\n // Create the duplicate and add them to the updatedBookings array.\n for(let i = 0; i < duplicatesCount.length; i++) {\n // Deep copy the booking to ensure references are not copied\n const duplicatedBooking = cloneDeep(booking); \n duplicatedBooking.room = duplicatesCount[i]; \n updatedBookings.push(duplicatedBooking);\n }\n }\n });\n\n // Return the array with duplicated entries \n return updatedBookings;\n\n}\n \n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { Booking, IBookingQueryOptions } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { DateNow } from \"@mckinsey-converge/date-tz\";\nimport { Observable } from 'rxjs/internal/Observable';\nimport { forkJoin } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n const now = DateNow(new Date())\n if (!options.from) {\n options.from = now\n .startOfValue('day')\n .subtractValue({ days: 2 })\n .ms;\n }\n if (!options.until) {\n options.until = null;\n }\n\n const key = `bookings|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Booking[]) => {\n delete this._promises[key];\n resolve(list);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking, series?: boolean): Promise {\n const body = booking.toApiJSON()\n if(series){\n body.series = true\n }\n return booking.id ? this.update(booking.id, body) : this.add(body);\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n public checkinIndividualVisitor(id: string, fields: BookingCheckinParams) {\n return this.taskObsr(id, 'checkin', fields); \n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n public declineMultiple(bookings: Booking[]): Observable {\n const requests = [];\n bookings.forEach(bkg => {\n const booking = bkg.toJSON();\n const id = booking.id;\n const fields = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: booking.space?.email,\n icaluid: booking.icaluid,\n start: booking.startDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n end: booking.endDateTz.formatDate('h:mm a').toLocaleLowerCase(),\n };\n if (bkg.is_recurrent && bkg.recurrence_type === 'master') {\n // Add series=true for recurrent bookings\n fields['series'] = true;\n } \n requests.push(this.taskObsr(id, 'concierge_decline', fields) ); \n });\n return forkJoin(requests);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { PaginatedAPIService } from '../paginated.service';\nimport { Booking, IBookingQueryOptions, } from './booking.class';\nimport { bookingOptionsToQuery } from './booking.utilities';\nimport {\n HashMap\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { BookingCheckinParams } from './space.types';\nimport { Observable } from 'rxjs';\n\nexport interface PaginatedBooking {\n results: Booking[];\n total: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookingsPaginatedService extends PaginatedAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Booking, this);\n this._name = 'Bookings';\n this._api_route = 'bookings';\n this._compare = (a, b) => !(a.id || '').localeCompare(b.id) || !(a.icaluid || '').localeCompare(b.icaluid);\n }\n\n /**\n * Get user bookings\n * @param options\n */\n public userBookings(options: IBookingQueryOptions,\n uniqueId?: string): Promise {\n if (!options) {\n throw new Error('Booking avilability requires request options');\n }\n\n const key = `bookingsPaginated|${options.id ? options.id : ''}|${uniqueId ?? ''}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (response: any) => {\n delete this._promises[key];\n resolve(response);\n };\n const error = e => {\n reject(e);\n delete this._promises[key];\n };\n const query = bookingOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(i => respond([i]), error);\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n\n /**\n * Save changes to the booking\n * @param booking Booking update or add to the database\n */\n public save(booking: Booking): Promise {\n return booking.id ? this.update(booking.id, booking.toJSON()) : this.add(booking.toJSON());\n }\n\n /**\n * Checkin atteendee of a booking\n * @param id ID of the booking\n * @param fields Fields associated with the booking and attendee\n */\n public checkin(id: string, fields: BookingCheckinParams) {\n return this.task(id, 'checkin', fields);\n }\n\n public accept(id: string, fields?: HashMap) {\n return this.task(id, 'accept', fields);\n }\n\n public decline(id: string, fields?: HashMap) {\n return this.task(id, this.settingsService.concierge ? 'concierge_decline' : 'decline', fields);\n }\n\n public undo(id: string, status: 'accept' | 'decline', fields?: HashMap) {\n return this.task(id, status, fields);\n }\n\n protected process(raw_data: HashMap): Booking {\n return new Booking(raw_data);\n }\n\n // public getHoldingBay(query: IBookingQueryOptions): Promise {\n // const key = `bookingsPaginated|holding-bay`;\n // if (!this._promises[key]) {\n // this._promises[key] = new Promise((resolve, reject) => {\n // const respond = (response: any) => {\n // delete this._promises[key];\n // resolve(response);\n // };\n // const error = e => {\n // reject(e);\n // delete this._promises[key];\n // }; \n // this.query(query, { url: '/api/staff/bookings/holding_bay' }).then(respond, error);\n // });\n // }\n\n // return this._promises[key];\n // }\n\n public getHoldingBay = (query: IBookingQueryOptions): Observable => this.queryHoldingBay(query, { url: '/api/staff/bookings/holding_bay' });\n}\n","export * from './booking.class'\nexport * from './space.types'\nexport * from './bookings.service'\nexport * from './bookingsPaginated.service'\nexport * from './booking.utilities'\nexport * from './booking-state.service'\nexport * from './space.utilities'\nexport * from './booking.types'\n","import { SpaceRules } from './booking.types';\n\nimport {\n durationGreaterThanOrEqual,\n stringToMinutes\n} from './booking.utilities';\nimport {\n SpaceCheckOptions,\n SpaceRuleOptions\n} from './space.types';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/**\n * Get booking rules for the given user and space\n * @param options\n */\nexport function rulesForSpace(options: SpaceRuleOptions): SpaceRules {\n if (!options) {\n throw Error('Options are needed to check for rule matches');\n }\n const space_rules_for_user: SpaceRules = {\n auto_approve: true,\n hide: true,\n reason: ''\n };\n let match = false;\n /* istanbul ignore else */\n if (options.space) {\n for (const type in options.rules) {\n if (\n options.rules.hasOwnProperty(type) &&\n options.rules[type] instanceof Array &&\n options.space.zones.find((zone) => zone === type)\n ) {\n for (const rule_block of options.rules[type]) {\n /* istanbul ignore else */\n if (\n checkRules({\n user: options.user,\n space: options.space,\n time: options.time,\n duration: options.duration,\n rules: rule_block.conditions\n })\n ) {\n const ruleset = rule_block.rules;\n const conditions = rule_block.conditions;\n space_rules_for_user.hide = false;\n /* istanbul ignore else */\n if (conditions.max_length) {\n space_rules_for_user.max_length = stringToMinutes(\n conditions.max_length as string\n );\n }\n /* istanbul ignore else */\n if (conditions.min_length) {\n space_rules_for_user.min_length = stringToMinutes(\n conditions.min_length as string\n );\n }\n // NOTE: use max_length in conditions instead of book_length in rules\n // if (ruleset.book_length) {\n // space_rules_for_user.max_length = stringToMinutes(ruleset.book_length as string);\n // }\n /* istanbul ignore else */\n if (ruleset.auto_approve !== undefined) {\n space_rules_for_user.auto_approve = ruleset.auto_approve;\n }\n match = true;\n space_rules_for_user.reason = '';\n break;\n }\n else {\n space_rules_for_user.reason = 'OfficeRules';\n }\n }\n }\n \n /* istanbul ignore else */\n if (!space_rules_for_user.hide) {\n break;\n }\n }\n }\n if (!match) {\n space_rules_for_user.hide = true;\n }\n return space_rules_for_user;\n}\n\n\n/**\n * Check if user matches the given ruleset\n * @param options\n */\nfunction checkRules(options: SpaceCheckOptions): boolean {\n /* istanbul ignore else */\n if (options.rules) {\n const time = new DateTZ({date: options.time});\n const count = Object.keys(options.rules).length;\n let matches = 0;\n Object.keys(options.rules).forEach((key) => {\n let counter = 0;\n const condition: string[] =\n options.rules[key] instanceof Array\n ? (options.rules[key] as [])\n : [options.rules[key] as string];\n switch (key) {\n case 'groups':\n /* istanbul ignore else */\n if (options.user && options.user.groups) {\n counter = 0;\n condition.forEach((i) =>\n options.user.groups.find((j) => j === i) ? counter++ : null\n );\n /* istanbul ignore else */\n if (counter > 0) {\n matches++;\n }\n }\n break;\n case 'locations':\n /* istanbul ignore else */\n if (options.user && options.user.location) {\n counter = 0;\n condition.forEach((i) =>\n (options.user.last_location.name || '').indexOf(i) >= 0\n ? counter++\n : null\n );\n /* istanbul ignore else */\n if (counter >= options.rules[key].length) {\n matches++;\n }\n }\n break;\n case 'is_before':\n /* istanbul ignore else */\n if (options.time) {\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date()).addValue({ minutes: duration });\n let match = time.isBeforeDate(check);\n /* istanbul ignore else */\n matches += match ? 1 : 0;\n }\n break;\n case 'is_after':\n /* istanbul ignore else */\n if (options.time) {\n\n const duration = stringToMinutes(condition[0]);\n const check = DateNow(new Date());\n time.isAfterDate(check.addValue({ minutes: duration })) ? matches++ : '';\n }\n break;\n case 'min_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(options.duration, condition[0])\n ) {\n matches++;\n }\n break;\n case 'max_length':\n /* istanbul ignore else */\n if (\n options.duration &&\n durationGreaterThanOrEqual(condition[0], options.duration)\n ) {\n matches++;\n }\n break;\n }\n });\n return matches >= count;\n }\n return false;\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringCategoriesService extends BaseAPIService {\n\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringCategory, this);\n this._name = 'catering category/group';\n this._api_route = 'catering/category';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering categories. Use catering menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering categories. Use catering menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringCategory(raw_item);\n }\n\n public format(item: CateringCategory) {\n return { ...item };\n }\n}\n","import { CateringItem } from \"./catering-item.class\";\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport class CateringCategory extends CateringItem {\n /** Whether item is a category */\n public is_category = true;\n public admin_only: boolean;\n public restricted_from: number;\n\n constructor(data: HashMap) {\n super(data);\n this.is_category = true;\n (this as any).must_select = this.must_select || 0;\n (this as any).order_anytime = !!data.order_anytime && this.package;\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj = super.toJSON();\n obj.order_anytime = !!obj.order_anytime && obj.package;\n return obj;\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\nexport interface CateringAvailability {\n /** Month of the year that the item starts being available */\n readonly from_month: number;\n /** Month of the year that the item ends being available */\n readonly to_month: number;\n}\n\nexport class CateringItem {\n /** Unique ID of the catering item */\n public readonly id: string;\n /** Display name of the catering item */\n public readonly name: string;\n /** Description of the item */\n public readonly description: string;\n /** URL to the image associated with the item */\n public readonly image_path: string;\n /** Type of catering item */\n public readonly catering_type: string;\n /** Availability of the item */\n public readonly available: CateringAvailability;\n /** Time in hours that is needed to prepare the item beforehand */\n public readonly prior_notice: number;\n /** Cost of the item without decimals */\n private unit_price: number;\n /** Cost of the item without decimals */\n public readonly supplier_cost: number;\n /** Minimum number this item allowed in an order */\n public readonly minimum_quantity: number;\n /** Maximum number this item allowed in an order */\n public readonly maximum_quantity: number;\n /** List of categories that the item is contained in */\n public readonly parent_categories: readonly string[];\n /** Allegen information associated with the item */\n public readonly allergy: string;\n /** Whether the supply of this item has run out */\n public out_of_stock: boolean;\n /** Whether item can be ordered within the time limit set by the building */\n public readonly order_anytime: boolean;\n /** Number of child items that must be selected as part of the package */\n public readonly must_select: number;\n /** List of associated items */\n public readonly items: CateringItem[];\n public readonly availableItems: CateringItem[];\n /** Whether child items are part of a package */\n public readonly package: boolean;\n /** List of zone ids associated with the category */\n public readonly zones: readonly string[];\n /** Number of this item in the assoicated order */\n private _amount = 0;\n /** Unique ID of the catering item */\n private instance_id: string;\n /** Whether item is a category */\n public is_category: boolean = false;\n /** Whether item is disabled in Staff App */\n public admin_only: boolean;\n /** restricted_from indicates category restriction from hours ahead of delivery time */\n public restricted_from: number;\n\n public get can_order_anytime(): boolean {\n return (\n this.order_anytime ||\n !this.package && this.items.reduce(\n (anytime, item) => anytime || item.can_order_anytime,\n false,\n )\n );\n }\n\n /** Number of this item in the assoicated order */\n public get amount(): number {\n return this._amount || 0;\n }\n\n /** Unit price in the assoicated order */\n public get price(): number {\n return this.unit_price || 0;\n }\n\n /** Total cost of the amount of items set */\n public get total(): number {\n return (this._amount * this.unit_price) || 0;\n }\n\n constructor(data: HashMap) {\n this.instance_id = `item-${Math.floor(Math.random() * 999_999_999)}`;\n this.id = data.id || '';\n this.name = data.name || '';\n this.is_category = this.id.includes('category-');\n this.available = {\n from_month: (data.available ? data.available.from_month : data.available_from) || -1,\n to_month: (data.available ? data.available.to_month : data.available_to) || -1,\n };\n this.description = data.description || '';\n this.prior_notice = data.prior_notice || data.notice;\n this.unit_price = data.unit_price || data.price || 0;\n this.supplier_cost = data.supplier_cost;\n this.minimum_quantity = Math.max(0, data.minimum_quantity || 0);\n this.maximum_quantity = Math.max(1, data.maximum_quantity || 999);\n this.parent_categories = data.category_ids || data.parent_categories || data.categories;\n this.order_anytime = !!data.order_anytime;\n this.image_path = data.image_path || '';\n this.admin_only = data.admin_only;\n this.restricted_from = data.restricted_from || data?.root_category_restricted_from || 0;\n \n this.catering_type = data.catering_type;\n this.must_select = data.must_select ?? 0;\n this._amount = data._amount || data.amount || 0;\n this.allergy = data.allergy || '';\n const cateringItems: CateringItem[] = (data.items || []).map(item => new CateringItem(item));\n this.items = cateringItems;\n const filteredCateringItems = cateringItems.filter(c => !c.out_of_stock);\n this.availableItems = filteredCateringItems;\n this.out_of_stock = !!data.out_of_stock ||\n // if original items are empty, we hit the bottom, so if we filter out items then its out of stock.\n (cateringItems.length > 0 && filteredCateringItems.length === 0);\n this.package = data.package === 'true' || data.package === true;\n this.zones = data.zones && data.zones.length ? [...data.zones] : [];\n }\n\n public setAmount(amount: number = 0): void {\n if (amount <= this._amount) {\n if (amount < this.minimum_quantity) {\n amount = 0;\n }\n } else {\n if (amount < this.minimum_quantity) {\n amount = this.minimum_quantity;\n }\n }\n this._amount = Math.max(0, Math.min(this.maximum_quantity, amount));\n }\n\n /**\n * Updates the unit_price in the assoicated order if necessary\n * @param price value to compare to unit_price\n */\n public setPrice(price: number = 0): void {\n if(this.unit_price !== price) this.unit_price = price;\n }\n\n /**\n * Increase amount of the item the order\n * @param amount Amount to increase by\n */\n public addToOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount += amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = this.minimum_quantity;\n } else if (this._amount > this.maximum_quantity) {\n this._amount = this.maximum_quantity;\n }\n }\n\n /**\n * Decrease amount of the item the order\n * @param amount Amount to decrease by\n */\n public removeFromOrder(amount: number = 1) {\n amount = Math.max(1, amount);\n this._amount -= amount;\n if (this._amount < 0) {\n this._amount = 0;\n } else if (this._amount < this.minimum_quantity) {\n this._amount = 0;\n }\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringItem): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._changes;\n delete obj._server_names;\n // Convert remaining members to be public\n obj.price = obj.unit_price;\n obj.categories = obj.parent_categories;\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n return obj;\n }\n\n\n\n public within_category_restricted_time(dateTz): boolean {\n /**\n * Update : https://mckinsey.atlassian.net/browse/CNG-574\n * Right now the frontend is restricting catering orders based off the field .settings.discovery_info.catering_restricted_from,\n * so for this ticket change it’s best we keep that field as the default time restriction, then add a new field to catering categories called \n * restricted_from which will override the old field if it’s present!\n * restricted_from can be set by concierge admin to restrict item from being order before set time ex if it been set to 24 then the item should\n * available to order before 24 hours of booking/order time!\n */\n\n if(!!this?.restricted_from) {\n const expired = DateNow(new Date()).addValue({ hours: this?.restricted_from }).startOfValue('minute');\n return dateTz.isBeforeDate(expired);\n } else {\n return false;\n }\n \n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { BaseAPIService } from '../base.service';\nimport { CateringItem } from './catering-item.class';\nimport { SettingsService } from '../settings.service';\nimport { ServiceManager } from '../service-manager.class';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringItemsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(CateringItem, this);\n this._name = 'Catering Menu';\n this._api_route = 'catering/item';\n }\n\n public query(): never {\n throw Error('No index endpoint for catering items. Use menu service.');\n }\n\n public show(): never {\n throw Error('No show endpoint for catering items. Use menu service.');\n }\n\n public processItem(raw_item: any) {\n return new CateringItem(raw_item);\n }\n\n public format(item: CateringItem) {\n return item instanceof CateringItem ? item.toJSON() : item;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { CateringItem } from './catering-item.class';\nimport { CateringCategory } from './catering-category.class';\nimport { BaseAPIService } from '../base.service';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringMenuService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Catering Menu';\n this._api_route = 'menu';\n }\n\n /**\n * Convert user data to local format\n * @param user User data\n */\n protected processItem(item: HashMap) {\n return item.items ? new CateringCategory(item) : new CateringItem(item);\n }\n}\n","\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CateringNotesService {\n\n public cateringNotes = [];\n\n \n public setNotes(notes) {\n this.cateringNotes = notes;\n }\n\n public getNotes() {\n return this.cateringNotes;\n }\n}","import { CateringItem } from './catering-item.class';\nimport { HashMap } from '@mckinsey-converge/base';\n\nimport { CateringCategory } from './catering-category.class';\nimport { Booking } from '../bookings';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport type CateringOrderMutableProperties =\n | 'items'\n | 'location_id'\n | 'location'\n | 'delivery_time'\n | 'charge_code'\n | 'notes'\n | 'status';\n\nexport type CateringOrderStatus = 'accepted' | 'preparing' | 'ready' | 'delivered' | 'cancelled';\n\nconst now = DateNow(new Date());\n\n// R--- refactor booking date to be dateTz\nexport class CateringOrder {\n /**\n * Booking fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Unique Booking ID for the catering order */\n readonly booking_id: string;\n /** \n * Timestamp based booking time of the booking associated with the order\n * \n * Must be provide as the true Booking startDateTz or as a new DateTZ with \n * the correct date: timestamp, local_tz = false and bulding_tz values\n */\n readonly booking_date: number;\n /**\n * Timezone of the booking associated with the order\n */\n readonly booking_timezone: string;\n /** ID of the location to deliver the items to */\n location_id: string = '';\n /** Display text for the location to deliver the items to */\n location: string = '';\n /**\n * Smart timezone aware catering datetime with timezone\n */\n readonly bookingDateTz: DateTZ;\n\n /** \n * Booking associated with the order \n * \n * The booking attached to the CateringOrder is a special case used \n * mainly on the Concierge catering reports because someone created \n * a bad pattern to save catering changes to the booking. \n * \n * Avoid when possible.\n */\n public booking: Booking = null;\n\n /**\n * Catering specific fields\n * \n * The app handles booking data inconsisently. Ususally these booking fields are provided\n * for related booking data, but on occasion the full Booking class is used.\n */\n\n /** Whether the order status change is loading */\n public loading: boolean;\n /** Unique ID for the catering order */\n readonly id: string;\n /** Number of minutes after the start of the associated meeting to delivery the order */\n readonly delivery_time: number = 0;\n /** Status of the catering order */\n readonly status: CateringOrderStatus;\n /** Whether items in the order need to be prepared in the kitchen */\n readonly kitchen: boolean;\n /** Whether items in the order are in the pantry */\n readonly pantry: boolean;\n /** List of items */\n readonly items: readonly (CateringItem | CateringCategory)[] = [];\n /** Creation time of the order */\n readonly created_at: number;\n /** Charge code associated with the order */\n readonly charge_code: string;\n /** Notes associated with the order */\n readonly notes: string;\n // /** Mapping of properties to their changes */\n // private _changes: HashMap = {};\n /** Map of local property names to server ones */\n protected _server_names: HashMap = {};\n /** Currency code for the location of the order */\n public symbol: string;\n /** Whether the is an error with the order */\n public error: boolean;\n\n\n constructor(data: HashMap) {\n /** \n * Setup Defaults when raw_data values are not provided\n */\n const nowTz = DateNow(new Date());\n // now rounded to the next 5 minute increment\n const defaultStartTz = nowTz.setValue({ minute: Math.ceil(nowTz.minutes / 5) * 5 });\n const defaultLocalTimezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;\n\n this.id = data.id || `order-${Math.floor(Math.random() * 999_999_999)}`;\n\n // If the booking is provided default the booking values to the true booking values\n this.booking = data.booking || null;\n\n \n // Has a booking so init with those values\n if (this.hasBookingAttached) {\n this.booking_date = this.booking.startDateTz.ms;\n this.booking_timezone = this.booking.timezone;\n this.bookingDateTz = this.booking.startDateTz;\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n } else {\n this.booking_date = data.booking_date || defaultStartTz.ms;\n this.booking_timezone = data.booking_timezone || defaultLocalTimezone;\n this.bookingDateTz = new DateTZ({ date: this.booking_date, is_local_tz: false, building_tz: this.booking_timezone });\n this.location_id = data.location_id || '';\n this.location = data.location || '';\n }\n \n this.delivery_time = typeof data.delivery_time === 'number' ? data.delivery_time : 0;\n this.status = data.status || 'accepted';\n this.charge_code = data.charge_code || data.code;\n this.notes = data.notes;\n this.kitchen = data.kitchen instanceof Array ? !!data.kitchen.length : data.kitchen;\n this.pantry = data.pantry instanceof Array ? !!data.pantry.length : data.pantry;\n this.symbol = data.symbol || 'USD';\n this.items = (data.items || [])\n .map(item => (item.items ? new CateringCategory(item) : new CateringItem(item)))\n .filter(item => !!item.amount);\n }\n\n /** Special Case, check if a full booking is attached */\n public get hasBookingAttached(): boolean {\n return !!this.booking;\n }\n\n /** Display string for the types of items in the order */\n public get type(): string {\n let type = '';\n /* istanbul ignore else */\n if (this.kitchen) type += 'Kitchen';\n /* istanbul ignore else */\n if (this.pantry) {\n /* istanbul ignore else */\n if (type) type += ' + ';\n type += 'Pantry';\n }\n return type;\n }\n\n /** Total cost of the order */\n public get total(): number {\n return this.items.reduce((total, item) => total + (item.total || 0), 0);\n }\n\n /** Total number of items in the order */\n public get item_count(): number {\n return this.items.reduce((total, item) => total + (item.amount || 0), 0);\n }\n\n public get deliver_date(): DateTZ {\n return (this.bookingDateTz || this.booking?.startDateTz).addValue({ minutes: this.delivery_time })\n }\n\n /** Display string for the delivery time of the order (short version) */\n public get deliver_at(): string {\n return this.deliver_date.formatDate('h:mm a');\n }\n\n /** Display string for the delivery time of the order */\n public get deliver_at_time(): string {\n return this.deliver_date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Display string for the delivery date of the order */\n public get deliver_on_date(): string {\n return this.deliver_date.formatDate('dd MMM yyyy');\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): CateringOrder {\n return new CateringOrder(this.toJSON());\n }\n\n /**\n * Convert class object into plain object\n */\n public toJSON(this: CateringOrder): HashMap {\n const obj: any = { ...this };\n // Remove local private members\n delete obj._server_names;\n // Remove local public members\n delete obj.booking;\n delete obj.loading;\n delete obj.bookingDateTz;\n\n // Convert remaining members to be public\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (key[0] === '_') {\n const new_key = this._server_names[key.substr(1)] || key.substr(1);\n obj[new_key] = obj[key];\n delete obj[key];\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n obj.items = obj.items.map((item: CateringItem) => item.toJSON());\n\n return obj;\n }\n}\n","import { CateringItem } from './catering-item.class';\n\nexport const mergeCateringItemWithFormData = (existing: CateringItem, override: any) =>\n new CateringItem({\n ...(existing instanceof CateringItem ? existing.toJSON() : existing),\n ...override\n });\n","export * from './catering-item.class';\nexport * from './catering-category.class';\nexport * from './catering-menu.service';\nexport * from './catering-order.class';\nexport * from './catering-categories.service';\nexport * from './catering-items.service';\nexport * from './catering.utilities';\nexport * from './catering-notes.service';\n","import { Injectable } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloseDialogService {\n private dialogRefMap = new Map>();\n\n constructor() { }\n\n // Register a dialog with its ID\n registerDialog(id: string, dialogRef: MatDialogRef): void {\n this.dialogRefMap.set(id, dialogRef);\n }\n\n // Close a specific dialog by ID\n closeDialog(id: string): void {\n const dialogRef = this.dialogRefMap.get(id);\n if (dialogRef) {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n }\n }\n\n // Optional: Close all dialogs\n closeAllDialogs(): void {\n this.dialogRefMap.forEach((dialogRef, id) => {\n dialogRef.close();\n this.dialogRefMap.delete(id);\n });\n }\n}\n\nexport enum DialogIds {\n MeetingDetails = 'meetingDetailsDialogId',\n BookingConfirmation = 'bookingConfirmationDialogId',\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CollapseService {\n private collapseSubject = new BehaviorSubject(false);\n collapse$ = this.collapseSubject.asObservable();\n\n collapsePanel() {\n this.collapseSubject.next(false);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class DataCommonModule {}\n","import { Injectable } from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n Subscription\n} from 'rxjs';\n\nimport {\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\n/** List of keys that cannot be in a combination by themselves or with each other */\nconst INVALID_STANDALONE_KEYS: string[] = ['control', 'shift', 'alt', 'meta', 'os'];\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HotkeysService {\n /** Map of subjects which store press states of keys */\n private keydown_states: HashMap> = {};\n /** Map of obserers for key state subjects */\n private keydown_observers: HashMap> = {};\n /** List of keys at the end of a combination */\n private combo_end: string[] = [];\n /** List of registered hotkey combinations */\n private registered_combos: string[][] = [];\n /** Counter for the number of keydown events. Used for checking order of key presses */\n private counter: number = 0;\n /** Last key code to be pressed */\n private last_down: string;\n\n constructor() {\n window.addEventListener('keydown', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.last_down !== code) {\n /* istanbul ignore else */\n if (!this.keydown_states[code]) {\n this.keydown_states[code] = new BehaviorSubject(null);\n this.keydown_observers[code] = this.keydown_states[code].asObservable();\n }\n this.keydown_states[code].next(++this.counter);\n /* istanbul ignore else */\n if (this.combo_end.indexOf(code) >= 0) {\n event.preventDefault();\n }\n this.last_down = code;\n }\n });\n\n window.addEventListener('keyup', (event: KeyboardEvent) => {\n const code = this.mapKey((event.code || '').toLowerCase());\n /* istanbul ignore else */\n if (this.keydown_states[code]) {\n this.keydown_states[code].next(null);\n }\n /* istanbul ignore else */\n if (this.last_down === code) {\n this.last_down = null;\n }\n });\n }\n\n /**\n * Listen to the given key combination\n * @param combo Array of key codes to listen to or a hotkey string e.g. `Alt+Shift+KeyK`\n * @param next Callback for combination presses\n */\n public listen(combo: string | string[], next: () => void): Subscription {\n combo = (combo instanceof Array ? combo : combo.split('+'));\n const combination: string[] = combo.map(i => this.mapKey(i.toLowerCase()));\n /* istanbul ignore else */\n if (combination.length > 0 && this.validCombination(combination)) {\n this.registered_combos.push(combination);\n const last_key = combination[combination.length - 1];\n /* istanbul ignore else */\n if (!this.keydown_states[last_key]) {\n this.keydown_states[last_key] = new BehaviorSubject(null);\n this.keydown_observers[last_key] = this.keydown_states[last_key].asObservable();\n }\n this.updateCombinationEndList();\n return this.keydown_observers[last_key].subscribe((count) => {\n /* istanbul ignore else */\n if (count) {\n const presses: number[] = [];\n /* istanbul ignore else */\n if (combination.length > 0) {\n // Check that keys are pressed\n for (const key of combination) {\n const state = this.keydown_states[key];\n presses.push(state ? state.getValue() || -1 : -1);\n }\n // Check that keys are pressed in the correct order\n for (let i = 0; i < combination.length - 1; i++) {\n if (presses[i] > presses[i + 1]) {\n return;\n }\n }\n }\n const total = presses.reduce((a, v) => a + (v > 0 ? 1 : -1), 0);\n /* istanbul ignore else */\n if (total >= combination.length) {\n next();\n }\n }\n });\n }\n return null;\n }\n\n /**\n * Map key codes with multiple versions to simple form\n * @param code Code to transform\n */\n private mapKey(code: string): string {\n /* istanbul ignore else */\n if (code.indexOf('alt') >= 0 || code.indexOf('shift') >= 0 || code.indexOf('control') >= 0) {\n return code.replace('left', '').replace('right', '');\n }\n return code;\n }\n\n /**\n * Update the list of the last keys in combinations to allow for prevent default actions on pre-existing hotkeys\n */\n private updateCombinationEndList(): void {\n const key_list = [];\n for (const combo of this.registered_combos) {\n this.combo_end.push(combo[combo.length - 1]);\n }\n this.combo_end = unique(key_list);\n }\n\n /**\n * Checks if the given hotkey combination is allowed and valid\n * @param combo Array of key codes\n */\n private validCombination(combo: string[]): boolean {\n let non_meta = 0;\n for (const key of combo) {\n /* istanbul ignore else */\n if (INVALID_STANDALONE_KEYS.indexOf(key) < 0) {\n non_meta++;\n }\n }\n return non_meta > 0;\n }\n}\n","export * from './location.class';\nexport * from './location.service';\n","import { HashMap } from '@mckinsey-converge/base';\n\nimport { Organisation } from '../organisation/organisation.class';\nimport {\n ServiceLike,\n ServiceManager\n} from '../service-manager.class';\nimport { BuildingLevel } from '../organisation/level.class';\n\nexport class MapLocation {\n /** ID of the element on the associated map */\n public readonly id?: string;\n /** Name of the location */\n public readonly name?: string;\n /** X coordinate of the location */\n public readonly x?: number;\n /** Y coordinate of the location */\n public readonly y?: number;\n /** Level details for the location */\n public readonly level: BuildingLevel;\n /** Whether the position is fixed */\n public readonly fixed: boolean;\n /** Accuracy of the location when not fixed */\n public readonly confidence?: number;\n /** Whether location is at a desk */\n public readonly at_desk?: boolean;\n /** Whether location is set */\n public readonly empty: boolean;\n\n /** Service for managing model on the server */\n protected get _service(): ServiceLike {\n return ServiceManager.serviceFor(MapLocation);\n }\n\n /** Display string for the building and level of the location */\n public get display(): string {\n const service = ServiceManager.serviceFor(Organisation);\n if (!service) {\n return this.level.name;\n }\n const bld = service.buildings.find((bld) => bld.id === this.level.building_id);\n return bld ? `${bld.name}, ${this.level.name}` : this.level.name;\n }\n\n /** Whether location is in a different building from the active one */\n public get in_another_building(): boolean {\n const service = ServiceManager.serviceFor(Organisation);\n return service && service.building.id !== this.level.building_id;\n }\n\n constructor(raw_data: HashMap) {\n this.id = raw_data.id || raw_data.map_id || raw_data.desk_id;\n this.name = raw_data.name || '';\n this.x = raw_data.x\n ? Math.floor(this.normalise(raw_data.x, raw_data.x_max || 10000) * 10000)\n : null;\n this.y = raw_data.y\n ? Math.floor(this.normalise(raw_data.y, raw_data.x_max || 10000) * 10000)\n : null;\n const service = ServiceManager.serviceFor(Organisation);\n this.level =\n raw_data.level instanceof BuildingLevel\n ? raw_data.level\n : service\n ? service.levelWithID(raw_data.level)\n : new BuildingLevel(raw_data.level);\n this.fixed = this.x === null && this.y === null;\n this.confidence = Math.max(5, Math.min(15, raw_data.confidence || 0));\n this.at_desk = this.id && this.id.indexOf('area-') === 0;\n this.empty = !(this.name && this.level && (this.id || this.x || this.y));\n }\n\n /** Normalise the given value within the max */\n private normalise(value: number, max: number): number {\n return value / (max * 1.0);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { MapLocation } from './location.class';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocationService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n ServiceManager.setService(MapLocation, this);\n this._name = 'Location';\n this._api_route = 'people';\n }\n\n public add(...args): never {\n throw new Error('Create not allowed for location service')\n }\n\n public update(...args): never {\n throw new Error('Update not allowed for location service')\n }\n\n public delete(...args): never {\n throw new Error('Delete not allowed for location service')\n }\n\n public process(item: HashMap) {\n return new MapLocation(item) as any;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { BookingRule } from '../bookings';\nimport { ServiceManager } from '../service-manager.class';\n\nexport interface BuildingCity {\n timezone: string\n name: string\n}\n\nexport interface IBuildingRoleUser {\n name: string;\n email: string;\n phone: string;\n}\n\nexport interface LockerMap {\n [zone: string]: {\n [area: string]: {\n [type: string]: (string | boolean)[][];\n };\n };\n}\n\nexport interface ICoordinates {\n longitude: number;\n latitude: number;\n}\n\nexport interface LevelFeature {\n id: string;\n level_id: string;\n name: string;\n}\n\nexport interface BookingRuleDetails {\n /** List of booking rules details for the building */\n readonly rules: readonly string[];\n /** Custom booking rules for the map */\n readonly map_rules?: readonly string[];\n /** Custom booking rules for the map */\n readonly other_rules?: readonly string[];\n /** Contact email address for the building */\n readonly contact?: string;\n /** Information string to display before the rule listings */\n readonly info?: string;\n /** Link for more details */\n readonly link?: { url?: string, name?: string };\n /**\n * Allow buildings to define their own rules formats where needed or for special messages.\n */\n readonly custom_html?: string;\n}\n\nexport class Building extends BaseDataClass {\n /** Service for managing buildings */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Engine Zone ID for the building */\n public readonly zone_id: string;\n /** Organisation Code for the building */\n public readonly code: string;\n /** Geographical address of the building */\n public readonly address: string;\n /** Details about the booking rules for the building */\n public readonly booking_details: BookingRuleDetails;\n /** Details about the booking rules for the building */\n public readonly booking_rules: HashMap;\n /** Number of hour before a booking catering is restricted */\n public readonly catering_restricted_from: number;\n /** Currency code for the country assoicated with the building */\n public readonly currency: string;\n /** Map of fields that are required on the form */\n public readonly required: HashMap;\n /** IANA timezone database string for the location the building resides */\n public readonly timezone: string;\n /** Whether catering is available in this building */\n public readonly has_catering: boolean;\n /** ID of the system used for the holding bay */\n public readonly holding_bay: string;\n /** ID of the system used for standalone visitors bookings */\n public readonly visitor_space: string;\n /** List of zones to determine sort order spaces */\n public readonly sort_order: readonly string[];\n /** Searchable map features */\n public readonly searchables: readonly LevelFeature[];\n /** List of available extras for the building */\n public readonly extras: readonly Identity[];\n /** List of available extra equipment for loan at the building */\n public readonly loan_items: readonly Identity[];\n /** List of available levels for the building */\n public readonly levels: readonly BuildingLevel[];\n /** The city the building belongs in **/\n public readonly city: string;\n\n public readonly catering_hours: { readonly start: number, readonly end: number };\n /** Map of custom settings for the building */\n private _settings: HashMap;\n /** Map of roles and list of the associated users */\n private _roles: HashMap;\n /** Map of the locker ID arrays */\n private _lockers: LockerMap;\n /** Map of important system ids for the building */\n private _systems: HashMap;\n /** Map of important phone numbers for the building */\n private _phone_numbers: HashMap;\n /** Globe coordiates for the build */\n private _location: ICoordinates;\n /** List of zones associated with the building */\n public readonly zones: readonly string[];\n\n constructor(raw_data: HashMap) {\n super(raw_data);\n const settings = raw_data.settings || {};\n const disc_info = settings.discovery_info || {};\n this.zone_id = raw_data.zone_id || raw_data.zone;\n this.extras = (raw_data.extras || disc_info.extras || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.loan_items = (raw_data.loan_items || disc_info.loan_items || []).map(i => ({\n id: i.extra_id || i.id,\n name: i.extra_name || i.name\n }));\n this.levels = (raw_data.levels || disc_info.levels || []).map(i => new BuildingLevel({\n ...i,\n building_id: this.id\n }));\n this._roles = raw_data.roles || disc_info.roles || {};\n this._lockers = raw_data.lockers || raw_data.locker_structure || disc_info.locker_structure || {};\n this._systems = raw_data.systems || disc_info.systems || {};\n this._settings = settings;\n this._phone_numbers = raw_data.phone_numbers || disc_info.phone_numbers || {};\n this._location = raw_data.location || disc_info.location || { longitude: null, latitude: null };\n this.catering_hours = raw_data.catering_hours || disc_info.catering_hours || settings.catering_hours || {\n start: 7,\n end: 20\n };\n const searchables = [];\n if (raw_data.neighbourhoods) {\n for (const lvl in raw_data.neighbourhoods) {\n if (raw_data.neighbourhoods.hasOwnProperty(lvl)) {\n const lvl_features = raw_data.neighbourhoods[lvl] || {};\n for (const feature in lvl_features) {\n if (lvl_features.hasOwnProperty(feature)) {\n searchables.push({\n id: lvl_features[feature],\n name: feature,\n level_id: lvl\n });\n }\n }\n }\n }\n }\n this.searchables = searchables;\n this.code = raw_data.code || disc_info.code || settings.code || '';\n this.address = raw_data.address || disc_info.address || settings.address || '';\n this.booking_details = raw_data.booking_details || disc_info.booking_details || settings.booking_details || {};\n this.booking_rules = raw_data.booking_rules || disc_info.booking_rules || settings.booking_rules || {};\n this.catering_restricted_from = raw_data.catering_restricted_from || disc_info.catering_restricted_from || settings.catering_restricted_from || 0;\n this.currency = raw_data.currency || disc_info.currency || settings.currency || 'USD';\n this.required = raw_data.required || disc_info.required || settings.required || {};\n if (disc_info.requires_equipment_code) {\n this.required.equipment_code = true;\n }\n if (disc_info.requires_expected_attendees) {\n this.required.expected_attendees = true;\n }\n this.timezone = raw_data.timezone || disc_info.timezone || settings.timezone || '';\n this.has_catering = raw_data.has_catering || disc_info.has_catering || settings.has_catering || false;\n this.holding_bay = raw_data.holding_bay || disc_info.holding_bay || settings.holding_bay || '';\n this.visitor_space = raw_data.visitor_space || disc_info.visitor_space || settings.visitor_space || '';\n this.sort_order = raw_data.sort_order || disc_info.sort_order || settings.sort_order || [];\n this.city = raw_data.city || disc_info.city || 'No City';\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings) || getItemWithKeys(['discovery_info', ...keys], this._settings);\n return value;\n }\n\n /**\n * Get list of users with the associated role\n * @param name Role to find users for\n */\n public role(name: string): IBuildingRoleUser[] {\n return [...(this._roles[name] || [])];\n }\n\n /**\n * Get list of the names of available user role lists\n */\n public get role_names(): string[] {\n return Object.keys(this._roles).filter(i => this._roles.hasOwnProperty(i));\n }\n\n /** Map of the locker ID arrays */\n public get lockers(): LockerMap {\n return { ...(this._lockers || {}) };\n }\n\n /** Map of important system ids for the building */\n public get systems(): HashMap {\n return { ...(this._systems || {}) };\n }\n\n /** Map of important phone numbers for the building */\n public get phone_numbers(): HashMap {\n return { ...(this._phone_numbers || {}) };\n }\n\n /** Real coordinates */\n public get location(): ICoordinates {\n return { ...this._location };\n }\n\n /**\n * Get search map feature for the given level ID\n * @param level_id ID of level to grab features for\n */\n public featuresForLevel(level_id: string): LevelFeature[] {\n return (this.searchables || []).filter(i => i.level_id === level_id);\n }\n\n /**\n * Building objects are readonly and cannot be changed\n */\n public async save(): Promise {\n throw new Error('Building objects are readonly and cannot be changed');\n }\n\n /**\n * Building objects are readonly and cannot be deleted\n */\n public async delete(): Promise {\n throw new Error('Building objects are readonly and cannot be deleted');\n }\n}\n","export * from './building.class';\nexport * from './level.class';\nexport * from './organisation.class';\nexport * from './organisation.service';\n","import { HashMap } from 'libs/base/src/lib/types.utilities';\n\n/** Building Level data */\nexport class BuildingLevel {\n /** ID of the building level zone */\n readonly id: string;\n /** ID of the building zone associated with the level */\n readonly building_id: string;\n /** Name of the level */\n readonly name: string;\n /** Number or short identifier of the level */\n readonly short_name: string;\n /** Map URL for the level */\n readonly map_url: string;\n /** Usage type for the level */\n readonly type: 'staff' | 'client' | 'any';\n /** Setting for the level */\n readonly settings: HashMap;\n\n constructor(_data: HashMap = {}) {\n this.id = _data.id || _data.level_id || '';\n this.building_id = _data.bld_id || _data.building_id || '';\n this.name = _data.name || _data.level_name || '';\n const lower_name = this.name.toLowerCase();\n const num = lower_name.indexOf('level') >= 0 ? lower_name.replace(/ ?level ?/gi, '') : lower_name.substr(0, 1).toUpperCase();\n this.short_name = _data.short_name || num || '';\n this.map_url = _data.map_url || '';\n this.type = _data.type || _data.floor_type || 'any';\n this.settings = _data.settings;\n }\n}\n","import { BaseDataClass } from '../base-api.class';\nimport {\n getItemWithKeys,\n HashMap\n} from '@mckinsey-converge/base';\n\n/* istanbul ignore next */\n\nexport class Organisation extends BaseDataClass {\n /** List of available building zone ids for the organisation */\n public readonly available_buildings: readonly string[];\n /** Map of custom settings for the building */\n private _settings: HashMap;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this._settings = raw_data.settings || {};\n this.available_buildings = (raw_data.settings?.discovery_info?.buildings || []).map(\n (bld) => bld.zone_id\n );\n }\n\n /**\n * Get a custom building setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string): any {\n const keys = key.split('.');\n const value = getItemWithKeys(keys, this._settings);\n return value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { BaseAPIService } from '../base.service';\nimport { Organisation } from './organisation.class';\nimport { Building } from './building.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BuildingLevel } from './level.class';\nimport { first } from 'rxjs/operators';\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { UsersService } from '../users';\nimport { SettingsService } from '../settings.service';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganisationService extends BaseAPIService {\n /** Organisation data for the application */\n private _organisation: Organisation;\n /** Actively displayed building */\n private _active_building: string;\n\n private _spaceTypesSubject: Subject = new Subject();\n\n constructor(\n protected _composer: ComposerService,\n private _service: ApplicationService,\n private _users: UsersService,\n settingsService: SettingsService,\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(Organisation, this);\n ServiceManager.setService(Building, this);\n this._name = 'Organisation';\n this._api_route = 'zones';\n this.set('buildings', []);\n this.set('active_building', null);\n this._users.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /**\n * Add is not available on organisation service\n */\n public async add(form_data: HashMap, query_params?: HashMap): Promise {\n throw new Error('Add is not available on the organisation service');\n }\n\n /**\n * Update is not available on organisation service\n */\n public async update(\n id: string,\n form_data: HashMap,\n query_params?: HashMap\n ): Promise {\n throw new Error('Update is not available on the organisation service');\n }\n\n /**\n * Delete is not available on organisation service\n */\n public async delete(id: string): Promise {\n throw new Error('Delete is not available on the organisation service');\n }\n\n /**\n * Get list of levels for the given building ID\n * @param bld_id Building ID\n */\n public levels(bld_id: string): readonly BuildingLevel[] {\n return (this.buildings.find((i) => i.id === bld_id) || ({} as Building)).levels;\n }\n\n /**\n * Get a setting from the organisation or active building\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public setting(key: string) {\n return this.building.setting(key) || this._organisation.setting(key);\n }\n\n /** Active building */\n public get building(): Building {\n return this.buildings.find((i) => i.id === this._active_building);\n }\n\n /** List of types of spaces */\n public get space_types(): Identity[] {\n return this.get('space_types') || [];\n }\n\n public set building(bld: Building) {\n if (bld instanceof Building) {\n this._active_building = bld.id;\n } else {\n this._active_building = bld;\n }\n this.set('active_building', this.building);\n this.loadSpaceTypes();\n localStorage.setItem('PlaceOS.building', this._active_building);\n localStorage.setItem('CONCIERGE.timezone', bld.timezone);\n }\n\n /** List of buildings for the organisation */\n public get buildings(): Building[] {\n return this.get('buildings') || [];\n }\n\n /**\n * Get list of available equipment\n * @param id ID of the building to get the list from. i.e. Defaults to the active building\n */\n public getExtras(id: string, bld_id?: string) {\n const bld = this.buildings.find((i) => i.id === bld_id) || this.building;\n if (bld && id) {\n return bld.extras.filter((i) => `${i.id}`.indexOf(id) >= 0);\n }\n return [];\n }\n\n /**\n * Get the first level matching the list of given IDs\n * @param ids List of ID to search with\n */\n public levelWithID(ids: string | string[]): BuildingLevel {\n const list = ids instanceof Array ? ids : [ids];\n const bld_list = this.buildings;\n for (const id of list) {\n for (const bld of bld_list) {\n for (const lvl of bld.levels) {\n if (lvl.id === id) {\n return lvl;\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Initialise service data\n */\n protected async load(): Promise {\n /* istanbul ignore else */\n if (localStorage) {\n this._active_building = localStorage.getItem(`${this.settingsService.frontend.toUpperCase()}.building`);\n }\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.organisation = { message: 'Loading organisation data', state: 'loading' };\n await this.loadOrganisation();\n loading.organisation = { message: 'Loading organisation data', state: 'complete' };\n loading.buildings = { message: 'Loading building data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadBuildings();\n loading.buildings = { message: 'Loading building data', state: 'complete' };\n loading.levels = { message: 'Loading building floor data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadLevels();\n loading.levels = { message: 'Loading building floor data', state: 'complete' };\n this._service.set('loading', loading);\n loading.space_types = { message: 'Loading space type data', state: 'loading' };\n this._service.set('loading', loading);\n await this.loadSpaceTypes();\n loading.space_types = { message: 'Loading space type data', state: 'complete' };\n this._service.set('loading', loading);\n const user = this._users.current;\n\n if (user) {\n const id = localStorage.getItem('PlaceOS.building');\n const building = this.buildings.find(bld => id && bld.id === id) || this.buildings.find((bld) => bld.code === user.location);\n if (building) {\n this._active_building = building.id;\n this.set('active_building', building);\n } else if(this.building) {\n // This conditional solves a problem of infinite loop when user building doesn't exist.\n this._active_building = this.building.id;\n this.set('active_building', this.building);\n }\n }\n }\n\n /**\n * Load organisation data for application\n */\n public async loadOrganisation(): Promise {\n const org_data = await this.query({ tags: 'org', engine: true });\n this._organisation = new Organisation(org_data[0]);\n this.set('organisation', this._organisation);\n return this._organisation;\n }\n\n /**\n * Load building data for the organisation already stored in the service..\n */\n public async loadBuildings(): Promise {\n return this.loadBuildingsWithOrg(this._organisation);\n }\n\n /**\n * Load building data for the organisation passed.\n */\n public async loadBuildingsWithOrg(organisation: Organisation): Promise {\n const bld_data = await this.query({ tags: 'building', engine: true, limit: 1000 });\n const buildings = (bld_data as HashMap[])\n .map((i) => new Building(i))\n .filter((bld) => organisation.available_buildings.includes(bld.id));\n this.set('buildings', buildings);\n /* istanbul ignore else */\n if (!this._active_building && buildings && buildings.length > 0) {\n this._active_building = buildings[0].id;\n }\n return buildings;\n }\n\n /**\n * Load level data for the buildings\n */\n public async loadLevels(): Promise {\n const lvl_data = await this.query({ tags: 'level', engine: true, limit: 1000 });\n const levels = (lvl_data as HashMap[]).map((i) => new BuildingLevel(i));\n this.set('levels', levels);\n return levels;\n }\n\n /**\n * Load space type data for the buildings\n */\n public async loadSpaceTypes(): Promise {\n const type_data = await this.query({ tags: 'room', engine: true, limit: 1000, building_id: this._active_building });\n const types = (type_data as HashMap[]).map((i) => ({ id: i.id, name: i.name }));\n this.set('space_types', types);\n // Emit the updated space_types\n this._spaceTypesSubject.next(types);\n }\n\n /**\n * Observable to listen for changes in space_types\n */\n public get spaceTypesObservable(): Observable {\n return this._spaceTypesSubject.asObservable();\n }\n\n public getOrganizationFiltersByRoomType(key: string) {\n if (!this._organisation) {\n return {}\n }\n const discovery_info = this._organisation.setting('discovery_info')\n\n return discovery_info && discovery_info[key] ? discovery_info[key] : {}\n }\n\n public getRoomTypeSubsetDDOptions(type:string) {\n const filters = this.getOrganizationFiltersByRoomType(type) || {}\n return [...Object.keys(filters).map((key) => {\n const display = filters[key].toString();\n return {\n display,\n value: key,\n meta: {}\n }\n }) ];\n }\n\n\n\n /**\n * The function will generate filter options, excluding London. London has its own set of options as per the request. \n * The filter options pertain to a subset of room type options managed by the room admin module.\n * @returns filterOptions: filter options for day view space type filter\n */\n public getRoomFilterOptionsPerLocation() {\n let internalSubSet = this.getRoomTypeSubsetDDOptions('internal_room_types');\n if(this.building.name.toLowerCase().includes('london')) {\n internalSubSet = internalSubSet.filter(e => !e.value.includes('meeting') && !e.value.includes('partner') );\n }\n const filterOptions = [];\n internalSubSet.forEach(el => filterOptions.push({name: el.display, id: el.value} ) ); \n return filterOptions\n }\n\n}\n","import { ComposerService } from '@placeos/composer';\nimport { BehaviorSubject, Observable, of, Subject, Subscriber } from 'rxjs';\n\nimport { BaseAPIService } from './base.service';\nimport { BaseClass, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from './app.service';\nimport { toQueryString } from './api.utilities';\nimport { SettingsService } from './settings.service';\nimport { catchError, map } from 'rxjs/operators';\n\nexport interface IEngineResponse {\n results: HashMap[];\n total: number;\n}\n\nexport class PaginatedAPIService extends BaseClass {\n /** Application service */\n public parent: ApplicationService;\n /** Display name of the service */\n protected _name: string;\n /** API Route of the service */\n protected _api_route: string;\n /** Map of state variables for Service */\n protected _subjects: { [key: string]: BehaviorSubject | Subject } = {};\n /** Map of observables for state variables */\n protected _observers: { [key: string]: Observable } = {};\n /** Map of poll subscribers for API endpoints */\n protected _subscribers: { [key: string]: Subscriber } = {};\n /** Map of promises for Service */\n protected _promises: { [key: string]: Promise } = {};\n /** Comparison function for service items */\n protected _compare: (a: T, b: T) => boolean = (a, b) =>\n a === b || (a as any).id === (b as any).id;\n /** Default filter function for list method */\n protected _list_filter: (a: T) => boolean = (a) => !!a;\n\n /** Http Client */\n protected get http() {\n return this._composer.http;\n }\n\n constructor(protected _composer: ComposerService,\n protected settingsService: SettingsService) {\n super();\n this._name = 'Base';\n this._api_route = 'base';\n this.set('list', []);\n }\n\n /**\n * Injects concierge into form_data.\n */\n private injectConcierge(form_data: HashMap) {\n // we only send it over when concierge, since the BE may check for presence rather than\n // if its true or not.\n if (this.settingsService.concierge) {\n return { ...form_data, concierge: true }\n }\n return form_data;\n }\n\n /**\n * Initailise service\n */\n public init() {\n this.load().then(\n (_) => this._initialised.next(true),\n (err) => this.timeout('init', () => this.init(), 1000)\n );\n }\n\n /**\n * Get API route for the service\n * @param engine Whether endpoint is using the application API or engine API\n */\n public route(engine: boolean = false) {\n const endpoint = engine\n ? this._composer.auth.api_endpoint\n : '/api/staff';\n return `${endpoint}/${this._api_route}`;\n }\n\n /** API Route of the service */\n public get api_route() {\n return this._api_route;\n }\n\n /**\n * Get the current value of the named property\n * @param name Property name\n */\n public get(name: string): U {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return (this._subjects[name] as BehaviorSubject).getValue();\n }\n\n /**\n * Listen to value change of the named property\n * @param name Property name\n * @param next Callback for value changes\n */\n public listen(name: string): Observable {\n if (!this._observers[name]) {\n this.set(name, null);\n }\n return this._observers[name];\n }\n\n /**\n * Update the value of the named property\n * @param name Property name\n * @param value New value\n */\n protected set(name: string, value: U): void {\n if (!this._subjects[name]) {\n this._subjects[name] = new BehaviorSubject(value);\n this._observers[name] = this._subjects[name].asObservable();\n } else {\n this._subjects[name].next(value);\n }\n }\n\n /**\n * Get list of loaded items\n * @param predicate Function for filtering the list\n */\n public filter(predicate: (a: T) => boolean = this._list_filter): T[] {\n const list: T[] = this.get('list');\n return list.filter(predicate);\n }\n\n /**\n * Get item with the given id from the loaded items\n * @param id ID of the item\n */\n public find(id: string): T {\n const list = this.get('list');\n return list.find((i) => i.id === id || (i.email?.toLowerCase() === id?.toLowerCase()));\n }\n\n /**\n * Query the index of the API route associated with this service\n * @param query_params Map of query paramaters to add to the request URL\n */\n public query(query_params: HashMap = {}, config: { url?: string } = {}): Promise {\n let engine = false;\n let cache = 1000;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n cache = query_params.cache || 1000;\n delete query_params.cache;\n }\n const query = toQueryString(query_params);\n const key = `query|${query}`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = config && config.url ? `${config.url}${query ? '?' + query : ''}` : `${this.route(engine)}${query ? '?' + query : ''}`;\n let result: IEngineResponse;\n this.http.get(url).subscribe(\n (d: IEngineResponse | HashMap[]) => {\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n },\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), cache);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * \n * @param query_params \n * @param config \n * @returns \n */\n queryHoldingBay(query_params: HashMap = {}, config: { url?: string } = {}):Observable {\n const query = toQueryString(query_params);\n const url = `${config.url}${query ? '?' + query : ''}`;\n return this.http.get(url).pipe(\n map((d: IEngineResponse | HashMap[]) => this.processApiResult(d) ),\n catchError((error: any, result?: T) => {\n console.log(error);\n return of(result as T);\n })\n );\n }\n\n /**\n * \n * @param d \n * @returns \n */\n processApiResult(d: IEngineResponse | HashMap[]): IEngineResponse{\n let result: IEngineResponse;\n if (d && d instanceof Array) {\n const results = d.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else if (d && !(d instanceof Array) && d.results && d.total) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: d.total,\n }\n } else if (d && !(d instanceof Array) && d.results) {\n const results = d.results.map((i) => this.process(i));\n result = {\n results,\n total: results.length,\n }\n } else {\n result = {\n results: [],\n total: 0,\n }\n }\n return result;\n }\n \n\n /**\n * Query the API route for a sepecific item\n * @param id ID of the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public show(id: string, query_params: HashMap = {}): Promise {\n let engine = false;\n /* istanbul ignore else */\n if (query_params) {\n engine = !!query_params.engine;\n delete query_params.engine;\n }\n const query = toQueryString(query_params);\n const key = `show|${id}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const url = `${this.route(engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.get(url).subscribe(\n (d) => {\n result = this.process(d); \n },\n (e) => {\n reject(e);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.timeout(key, () => (this._promises[key] = null), 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make post request for a new item to the service\n * @param form_data Data to post to the server\n * @param query_params Map of query paramaters to add to the request URL\n */\n public add(form_data: HashMap, query_params: HashMap = {}): Promise {\n /* istanbul ignore else */\n if (!this._promises.new_item) {\n this._promises.new_item = new Promise((resolve, reject) => {\n const query = toQueryString(query_params);\n const url = `${this.route(query_params.engine)}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.post(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`create-${this._name.toLowerCase()}-failed`);\n this._promises.new_item = null;\n },\n () => {\n resolve(result);\n this.set('list', this.updateList(this.get('list'), [result]));\n this.analyticsEvent(`create-${this._name.toLowerCase()}-success`);\n this._promises.new_item = null;\n }\n );\n });\n }\n return this._promises.new_item;\n }\n\n /**\n * Perform API task for the given item ID\n * @param id ID of the item\n * @param task_name Name of the task\n * @param form_data Map of data to pass to the API\n * @param method Verb to use for request\n */\n public task(\n id: string,\n task_name: string,\n form_data: HashMap = {},\n method: 'post' | 'get' = 'post'\n ): Promise {\n const query = toQueryString(this.injectConcierge(form_data));\n const key = `task|${id}|${task_name}|${query}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const post_data = { ...form_data, id, _task: task_name };\n const url = `${this.route(false)}/${id}/${task_name}`;\n let result: any;\n const request =\n method === 'post'\n ? this.http.post(url, post_data)\n : this.http.get(`${url}${query ? '?' + query : ''}`);\n request.subscribe(\n (d) => (result = d),\n (e) => {\n reject(e);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-failed`,\n id\n );\n delete this._promises[key];\n },\n () => {\n resolve(result as U);\n this.analyticsEvent(\n `${this._name.toLowerCase()}-task-${task_name}-success`,\n id\n );\n this.timeout(key, () => delete this._promises[key], 1000);\n }\n );\n });\n }\n return this._promises[key];\n }\n\n\n /**\n * Make put request for changes to the item with the given id\n * @param id ID of the item being updated\n * @param form_data New values for the item\n * @param query_params Map of query paramaters to add to the request URL\n */\n public update(id: string, form_data: HashMap, query_params: HashMap = {}): Promise {\n const key = `update|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(this.injectConcierge(query_params));\n const url = `${this.route(query_params.engine)}/${id}${query ? '?' + query : ''}`;\n let result: T = null;\n this.http.put(url, this.injectConcierge(form_data)).subscribe(\n (d) => (result = this.process(d)),\n (e) => {\n reject(e);\n this.analyticsEvent(`update-${this._name.toLowerCase()}-failed`, id);\n this._promises[key] = null;\n },\n () => {\n resolve(result);\n this.set(\n 'list',\n this.updateList(this.removeItem(this.get('list'), { id } as any), [\n result\n ])\n );\n this.analyticsEvent(`update-${this._name.toLowerCase()}-success`, id);\n this._promises[key] = null;\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Make delete request for the given item\n * @param id ID of item\n */\n public delete(id: string, q: HashMap = {}): Promise {\n const key = `delete|${id}`;\n /* istanbul ignore else */\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const query = toQueryString(q);\n const url = `${this.route()}/${id}${query ? '?' + query : ''}`;\n this.http.delete(url).subscribe(\n (_) => null,\n (e) => {\n reject(e);\n this._promises[key] = null;\n },\n () => {\n this.set('list', this.removeItem(this.get('list'), { id } as any));\n this._promises[key] = null;\n resolve();\n }\n );\n });\n }\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n }\n\n /**\n * Post analytics event for this service\n * @param action Name of the action to post\n */\n protected analyticsEvent(action: string, label?: string) {\n // if (this.parent && this.parent.Analytics) {\n // this.parent.Analytics.track(this._name, { desc: `${this.parent.name.toLowerCase()}-${action}`, label });\n // }\n }\n\n /**\n * Convert raw API data into a valid API Object\n * @param raw_item Raw API data\n */\n protected process(raw_item: HashMap): T {\n return raw_item as T;\n }\n\n /**\n * Update recorded list of items\n * @param old_list Old list of items\n * @param list List of updated items\n * @param compareFn Function to compare items to remove duplicates\n */\n public updateList(\n old_list: T[],\n list: T[],\n compareFn: (a: T, b: T) => boolean = this._compare\n ): T[] {\n /* istanbul ignore else */\n if (!list || list.length === 0) {\n return old_list;\n }\n const new_list: T[] = [];\n const mixed_list = [...list, ...old_list];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n for (const item of mixed_list) {\n const found = new_list.find((i) => compareFn(i, item));\n /* istanbul ignore else */\n if (!found) {\n new_list.push(item);\n }\n }\n return new_list;\n }\n\n /**\n * Remove the given item from the given list\n * @param list List of items\n * @param item Item to remove\n * @param compareFn Function to compare items\n */\n protected removeItem(list: T[], item: T, compareFn?: (a: T, b: T) => boolean) {\n const new_list = [];\n /* istanbul ignore else */\n if (!compareFn) {\n compareFn = this._compare;\n }\n list.forEach((i) => (compareFn(item, i) ? null : new_list.push(i)));\n return new_list;\n }\n}\n","import { FormGroup } from \"@angular/forms\";\nimport { HashMap } from \"@mckinsey-converge/base\"\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\n\nexport enum RecurrencePeriod {\n LIST = 'list',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n //RELATIVE_MONTHLY = 'relativeMonthly', for the moment we will only support absoluteMonthly\n ABSOLUTE_MONTHLY = 'monthly'\n}\n\nexport enum DaysOfWeek {\n SUNDAY = 'sunday',\n MONDAY = 'monday',\n TUESDAY = 'tuesday',\n WEDNESDAY = 'wednesday',\n THURSDAY = 'thursday',\n FRIDAY = 'friday',\n SATURDAY = 'saturday'\n\n}\n\nexport enum SeriesAction {\n EDIT = 'edit',\n CLONE = 'clone'\n}\n\nexport enum BookingAction {\n CLONE = 'booking_clone',\n EDIT = 'booking_edit'\n}\n\nexport interface WeekDays {\n id: string;\n active: boolean;\n day_index: number;\n full_name: string;\n}\n\nexport interface RepeatPeriod {\n id: RecurrencePeriod;\n label: string\n}\n\nexport enum RepeatsOn {\n PATTERN = 'pattern',\n DATE = 'date'\n}\n\nexport interface RecurrenceType {\n type: RepeatsOn;\n label: string;\n}\n\nexport interface RecurrenceDetails {\n period: RecurrencePeriod,\n end: DateTZ,\n list: Array\n interval: number\n}\n\nexport interface RecurrenceRecurringDetails extends RecurrenceDetails {\n start: number\n}\n\nexport const recurrencePeriodToDurationType = (period: RecurrencePeriod) =>{\n switch (period) {\n case RecurrencePeriod.DAILY:\n return 'days'\n case RecurrencePeriod.WEEKLY:\n return 'weeks' \n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return 'months' \n default:\n return 'days'\n }\n}\n\n/**\n * Generate weekdays from monday to saturday\n */\nexport const generateWeekDays = (date: number, params: { building_tz?: string } = {}): Array=> {\n const { building_tz } = params;\n let start_week = DateNow(new Date()).startOfValue('week').addValue({days : 1}); //set monday as start of week\n const week_days: Array = []\n for (let i = 1; i <= 7; i++) {\n const activeDate = new DateTZ({date, building_tz, is_local_tz: false })\n const active = activeDate.dateWeekday === i\n const full_name = start_week.formatDate('EEEE')\n const day_index = i === 7 ? 0 : i //Sunday must be indexed as day 0\n week_days.push({id: full_name.substring(0, 1), active, day_index, full_name: full_name.toLocaleLowerCase()});\n start_week = start_week.addValue({ days : 1 });\n }\n return week_days\n}\n\nexport const getFirstDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isBeforeDate(b) ? a : b; });\n}\n\nexport const getLastDateFromList = (list: Array) => {\n return list.reduce((a, b) => { return a.isAfterDate(b) ? a : b; });\n}\n\nexport const recurrenceDetails = (recurr: RecurrenceDetails): string => {\n const end = getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `Occurs Every ${period} until ${end}`\n }else{\n return `Occurs Every ${recurr.interval} ${period}s until ${end}`\n }\n } \n \n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `Occurs on Specific Dates until ${getLastDateFromList(recurr.list).formatDate('ccc dd MMM yyyy')}`\n default:\n return ''\n }\n}\n\nexport const recurrenceRecurringDetails = (recurr: RecurrenceRecurringDetails): string => {\n const end = recurr.end\n const start = new DateTZ({ date: recurr.start })\n\n const getPeriod = (period: string) => {\n if(recurr.interval === 1){\n return `occurs every ${period} effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }else{\n return `occurs every ${recurr.interval} ${period}s effective ${start.formatDate('dd MMM yyyy')} until ${end.formatDate('dd MMM yyyy')}`\n }\n }\n\n switch (recurr.period) {\n case RecurrencePeriod.DAILY:\n return getPeriod('Day')\n case RecurrencePeriod.WEEKLY:\n return getPeriod('Week')\n case RecurrencePeriod.ABSOLUTE_MONTHLY:\n return getPeriod('Month')\n case RecurrencePeriod.LIST:\n return `occurs on Specific Dates`\n default:\n return ''\n }\n}\n\nexport const handleRecurrenceFields = (data: HashMap) => {\n if(data.is_recurrent){\n if(data.recurrence_period !== RecurrencePeriod.LIST){\n delete data.recurrence_starts\n delete data.recurrence_endTz\n if(data.recurrence_period !== RecurrencePeriod.WEEKLY){\n delete data.recurrence_days\n }\n } else if(data.recurrence_period){\n data.recurrence_list = [...(data.recurrence_starts || []).map((date: DateTZ) => date.startOfValue('minute').seconds)]\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.recurrence_days\n }\n delete data.is_recurrent\n }else{\n delete data.recurrence_period;\n delete data.recurrence_interval;\n delete data.recurrence_endTz;\n delete data.recurrence_count;\n delete data.recurrence_starts\n delete data.is_recurrent\n delete data.recurrence_exceptions\n delete data.recurrence_days\n }\n\n return data\n}\n\n/** Removes expired occurrences and updates start and end dates when cloning a series */\nexport const removeExpiredOcurrences = (form: FormGroup) =>{\n if(form.controls.action?.value === SeriesAction.CLONE ){\n const tz = form.controls.space_list.value[0].timezone\n const date_now = new DateTZ({ is_local_tz: false, building_tz: tz });\n const occurrences = form.controls.recurrence_starts.value.filter((date: DateTZ) =>\n date_now.isBeforeDate(date, 'day') || date_now.isSameDate(date, 'day')\n )\n form.controls.recurrence_starts.setValue(occurrences)\n const { start, end } = setStartAndEndDateFromArray(occurrences, tz)\n form.controls.dateTz.setValue(start)\n form.controls.recurrence_endTz.setValue(end)\n }\n}\n\n/** \n * Returns starts and end dates from an array of dates in milliseconds \n **/\n export const setStartAndEndDateFromArray = (dates: Array, tz: string): {start: DateTZ, end: DateTZ} =>{\n if(dates.length !== 0){\n return {\n start: dates.sort((d1, d2) => d1.ms - d2.ms)[0] ,\n end: dates.sort((d1, d2) => d2.ms - d1.ms)[0]\n }\n }\n //if the dates array is empty set the start and end dates as the current and next day\n const now = DateNow(new Date()).toZone(tz)\n return {start: now, end: now.addValue({days: 1})}\n}\n\nexport const setRecurrenceStartsTime = (form: FormGroup) => {\n const { recurrence_starts, dateTz } = form.value\n const list = (recurrence_starts || []).map((date: DateTZ) => date.setValue({hour: dateTz.dateHour, minute: dateTz.minutes}))\n form.controls.recurrence_starts.setValue(list)\n}","export * from './report.class'\nexport * from './reports.service'\n","import { CurrencyPipe } from '@angular/common';\n\nimport {\n csvToJson,\n downloadFile,\n HashMap,\n humaniseDuration,\n jsonToCsv,\n} from '@mckinsey-converge/base';\n\nimport { ServiceManager } from '../service-manager.class';\nimport { Space } from '../spaces';\nimport { Organisation } from '../organisation';\n\nexport class Report {\n /** Type of report */\n public readonly type: string;\n /** List of data associated with the report */\n public readonly data: T[];\n\n constructor(raw_data: HashMap = {}) {\n this.type = raw_data.type || '';\n this.data = this.cleanData(raw_data.data);\n }\n\n /** Create report data structure from CSV */\n public static fromCSV(type: string, data: string): Report {\n const csv_json = csvToJson(data);\n return new Report({ type, data: csv_json });\n }\n\n /** Download report data as CSV format */\n public downloadCSV(name: string = 'unnamed.csv'): void {\n downloadFile(name, jsonToCsv(this.data));\n }\n\n /** Download report data as JSON format */\n public downloadJSON(name: string = 'unnamed.json'): void {\n downloadFile(name, JSON.stringify(this.data, undefined, 4));\n }\n\n public formatCancelledBy(email: string) {\n if (email !== null && email !== undefined) {\n let name = email.split('@')[0];\n name = name.split('_').join(' '); //get name from email and convert it to title case\n name = name.replace(/\\w\\S*/g, function (txt) {\n return `${txt\n .charAt(0)\n .toUpperCase()}${txt.substr(1).toLowerCase()}`;\n });\n return name;\n } else {\n return email;\n }\n }\n\n public timeConverter( UNIX_timestamp: number ){\n if(!UNIX_timestamp) return '';\n let a = new Date(UNIX_timestamp * 1000);\n let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n let year = a.getFullYear();\n let month = months[a.getMonth()];\n let date = a.getDate();\n let hour = ((a.getHours() + 11) % 12 + 1);\n let suffix = a.getHours() >= 12 ? \"PM\":\"AM\";\n let min = a.getMinutes() === 0 ? '00':a.getMinutes();\n let time = date + ' ' + month + ' ' + year + ' - ' + hour + ':' + min + ' ' + suffix;\n return time;\n }\n\n private cleanData(data: T[] = []) {\n if (data.length > 0 && this.type === 'day') {\n for (let i = 0; i < data.length; i++) {\n data[i]['booker'] = data[i]['booker'].name;\n data[i]['expected_attendees'] = Object.values(data[i]['expected_attendees'])[0];\n }\n } else if (data.length > 0 && this.type === 'audit') {\n for (let i = 0; i < data.length; i++) {\n data[i]['created_at'] = this.timeConverter(data[i]['created_at']);\n }\n } else if (data.length > 0 && this.type === 'catering') {\n for (let i = 0; i < data.length; i++) {\n data[i]['Cancelled By'] = this.formatCancelledBy(\n data[i]['Cancelled By']\n );\n }\n const fields = Object.keys(data[0]);\n const room_field = fields.find(\n (key) =>\n key.toLowerCase().includes('room') &&\n key.toLowerCase().includes('email')\n );\n const price_field = fields.find((key) =>\n key.toLowerCase().includes('price')\n );\n\n for (let row of data) {\n /* istanbul ignore else */\n const space_service = ServiceManager.serviceFor(Space);\n if (room_field && price_field && space_service) {\n const room = space_service.find(\n row[room_field].toLowerCase()\n );\n const org_service = ServiceManager.serviceFor(Organisation);\n const bld = org_service.buildings.find(\n (bld: { id: any }) =>\n bld.id === room?.level?.building_id\n );\n row[price_field] = new CurrencyPipe('en_us').transform(\n row[price_field] / 100,\n bld?.currency\n );\n }\n /* istanbul ignore else */\n for (let field of fields) {\n row[field] =\n typeof row[field] === 'string'\n ? row[field].replace(/\\,/g, '٫')\n : row[field];\n }\n }\n } else if (this.type === 'bookings') {\n data = data.map((i: HashMap) => {\n const booking = i;\n try {\n if (booking.setup instanceof Object) {\n booking.setup = booking.setup[booking.room_email];\n }\n if (booking.breakdown instanceof Object) {\n booking.breakdown =\n booking.breakdown[booking.room_email];\n }\n booking.setup = humaniseDuration((booking.setup || 0) / 60);\n booking.breakdown = humaniseDuration(\n (booking.breakdown || 0) / 60\n );\n booking.description = (booking.description || '')\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ');\n booking['Meeting Host'] =\n booking.organizer?.name || booking.organizer;\n booking['Booked By'] =\n booking.booked_by?.name ||\n booking.booked_by?.email ||\n '';\n booking.charge_code =\n booking.equipment_codes[booking.room_email] || '';\n // booking.expected_attendees = Object.keys(booking.expected_attendees).map(key => booking.expected_attendees[key]).join(', ');\n booking.attendees = (booking.attendees || [])\n .map((person) => person.name || person.email || person)\n .join('٫ ');\n booking.notes = (booking.notes || [])\n .map((note) =>\n note.author &&\n (note.type === 'description' ||\n note.type === 'private')\n ? `[${note.author}|${note.type}]${note.message\n .replace(/<[^>]*>?/gm, '')\n .replace(/\\,/g, '٫')\n .replace(/\\r?\\n|\\r/g, ' ')}`\n : ''\n )\n .join(' | ');\n booking.cancelled = booking.isCancelled;\n booking.status = booking.status[booking.room_email] || '';\n booking.company = booking.company.join(', ');\n if (booking.cancelled_by) {\n booking.cancelled_by = this.formatCancelledBy(\n booking.cancelled_by\n );\n }\n booking.cancelled_date = this.timeConverter(booking.cancelled_at_epoch);\n\n } catch (e) {}\n const remove_fields = [\n 'id',\n 'icaluid',\n 'accepted_at',\n 'accepted_by',\n 'check_ins',\n 'changeKey',\n 'created',\n 'booking_type',\n 'edit_history',\n 'end_epoch',\n 'old_attendees',\n 'start_epoch',\n 'expected_attendees',\n 'isAllDay',\n 'isCancelled',\n 'body',\n 'is_free',\n 'lastModifiedDateTime',\n 'locationType',\n 'locations',\n 'organizer',\n 'booked_by',\n 'originalEndTimeZone',\n 'originalStartTimeZone',\n 'room_booking_status',\n 'room_email',\n 'room_emails',\n 'room_id',\n 'sensitivity',\n 'seriesMasterId',\n 'show_as',\n 'notes',\n 'subject',\n 'type',\n 'previous_booking',\n 'catering',\n 'responseStatus',\n 'equipment_codes',\n 'cancelled_at_epoch',\n ];\n for (const field of remove_fields) {\n if (booking[field] !== undefined) {\n delete booking[field];\n }\n }\n const output = {};\n const order = [\n 'title',\n 'start',\n 'end',\n 'location',\n 'Meeting Host',\n 'Booked By',\n 'booked_at',\n 'booked_ahead_by',\n 'all_day',\n 'attendees',\n 'company',\n 'description',\n 'cancelled',\n 'cancelled_by',\n 'cancelled_date',\n ];\n const keys = Object.keys(booking);\n keys.sort((a, b) => {\n const idx_a = order.indexOf(a);\n const idx_b = order.indexOf(b);\n return (\n (idx_a === -1 ? keys.length : idx_a) -\n (idx_b === -1 ? keys.length : idx_b)\n );\n });\n for (const key of keys) {\n output[key] = booking[key];\n }\n return output;\n }) as any;\n }\n return data;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComposerService } from '@placeos/composer';\n\nimport { Report } from './report.class';\nimport { BaseAPIService } from '../base.service';\nimport { SettingsService } from '../settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReportsService extends BaseAPIService {\n constructor(protected _composer: ComposerService,\n settingsService: SettingsService) {\n super(_composer, settingsService);\n this._name = 'Reports';\n this._api_route = 'reports';\n }\n\n protected process(raw_data: any): Report {\n return raw_data instanceof Array\n ? new Report({ data: raw_data })\n : Report.fromCSV('', raw_data);\n }\n}\n","import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { HashMap } from '@mckinsey-converge/base';\n\n\nexport interface ServiceLike extends HashMap {\n parent: any;\n add: (_: HashMap) => Promise;\n update: (id: string, _: HashMap) => Promise;\n delete: (id: string, params?: HashMap) => Promise;\n task: (id: string, name: string, data: HashMap) => Promise;\n listen: (prop: string) => Observable;\n}\n\nexport interface ServiceProvider {\n provideFor: Type;\n useValue: T;\n}\n\nexport class ServiceManager {\n /** Map of available services for child classes */\n private static _service_list: ServiceProvider[] = [];\n\n /** Set the services used to handle data model requests */\n public static setService(type: Type, service: any): void {\n if (window.debug) {\n (window as any).ServiceManager = this._service_list;\n }\n const index = ServiceManager._service_list.findIndex(provider => provider.provideFor === type);\n if (index >= 0) {\n ServiceManager._service_list.splice(index, 1, { provideFor: type, useValue: service });\n } else {\n ServiceManager._service_list.push({ provideFor: type, useValue: service });\n }\n }\n\n /** Get the services used to handle data model requests */\n public static serviceFor(type: Type): ServiceLike {\n const provider = ServiceManager._service_list.find(provider => provider.provideFor === type) || { useValue: null };\n return provider.useValue;\n }\n\n constructor() {\n throw new Error('ServiceMananger is static class');\n }\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\n\nimport { VERSION } from '@mckinsey-converge/environment';\nimport {\n BaseClass,\n getItemWithKeys,\n HashMap,\n log\n} from '@mckinsey-converge/base';\nimport { ServiceManager } from './service-manager.class';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ndeclare global {\n interface Window {\n debug: boolean;\n }\n}\n\nexport const SETTINGS_TOKEN = 'settings_service_data';\n\ntype SettingsAppData = T & {\n title: string;\n description: string;\n short_name: string;\n logo_light: {\n type: string;\n src: string;\n background: string;\n }\n logo_dark: {\n type: string;\n src: string;\n background: string;\n }\n heap_io: {\n app_id: number;\n force_ssl: boolean;\n secure_cookie: boolean;\n disable_text_capture: boolean;\n cookie_path: string;\n }\n}\n\nexport interface SettingsData {\n debug: boolean;\n mock: boolean;\n frontend: 'staff' | 'concierge' | 'booking';\n composer: {\n domain: string;\n route: string;\n protocol: string;\n port: string;\n use_domain: boolean;\n local_login: boolean;\n }\n app: SettingsAppData;\n}\n\nexport class SettingsObject {\n constructor(public data: SettingsData) {\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SettingsService extends BaseClass {\n /** Name of the application */\n private _app_name = 'Converge';\n /** List of override settings in order of priority */\n private _overrides = new BehaviorSubject([]);\n /** Mapping of behaviour subjects */\n private _subjects: HashMap> = {};\n /** Mapping of observables */\n private _observables: HashMap> = {};\n /** Which frontend we're in. staff, concierge, or bookings **/\n public readonly frontend: string;\n private _bypass_bookings: boolean = false;\n\n /**\n * @hidden\n */\n public set overrides(value: HashMap[]) {\n this._overrides.next(value);\n }\n\n /** Get observable for key */\n public listen(name: string): Observable {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n return this._observables[name];\n }\n\n /** Update observable value for key */\n public post(name: string, value: T): void {\n if (!this._observables[name]) {\n this._subjects[name] = new BehaviorSubject(null);\n this._observables[name] = this._subjects[name].asObservable();\n }\n this._subjects[name].next(value);\n }\n\n public value(name: string): T {\n return !this._observables[name] ? null : this._subjects[name].getValue();\n }\n\n /** Page title */\n public get title() {\n return this._title.getTitle();\n }\n\n public set title(value: string) {\n this._title.setTitle(`${value} | ${this._app_name}`);\n }\n\n constructor(private _title: Title,\n @Inject(SETTINGS_TOKEN)\n private settings: SettingsObject) {\n super();\n ServiceManager.setService(SettingsService, this);\n const time = new DateTZ({date: VERSION.time});\n const built = DateNow(new Date()).isSameDate(time, 'day')\n ? `Today at ${time.formatDate('h:mma')}`\n : time.formatDate('do MMM yyyy, h:mma');\n const frontend = this.get('frontend') || 'Unknown';\n this.frontend = frontend;\n log('CORE', `${VERSION.semver}`, null, 'debug', true, frontend?.toUpperCase());\n log('APP', `${VERSION.hash} | Built: ${built}`, null, 'debug', true, frontend?.toUpperCase());\n this.init();\n }\n\n /**\n * Initialise the settings\n */\n public async init() {\n if (this.get('debug')) {\n window.debug = true;\n }\n if (this.get('app')?.name) {\n this._app_name = this.get('app').name;\n }\n log('Settings', 'Successfully loaded settings');\n this._initialised.next(true);\n }\n\n /** Whether settings service has initialised */\n public get app_name() {\n return this._app_name;\n }\n\n public get concierge() {\n return this.frontend === 'concierge';\n }\n\n public set bypass_bookings(value: boolean) {\n this._bypass_bookings = value;\n }\n\n public get bypass_bookings() {\n return this._bypass_bookings;\n }\n\n /**\n * Get a setting\n * @param key Name of the setting. i.e. nested items can be grabbed using `.` to seperate key names\n */\n public get(key: string): any {\n const keys = key.split('.');\n if (keys[0] !== 'app') {\n return getItemWithKeys(keys, this.settings.data);\n }\n const override_settings = this._overrides.getValue();\n for (const override of override_settings) {\n const value = getItemWithKeys(keys.slice(1), override);\n if (value != null) {\n return value;\n }\n }\n return getItemWithKeys(keys, this.settings.data);\n }\n}\n","export * from './space.class';\nexport * from './spaces.service';\nexport * from './space.utilities';\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n} from '@mckinsey-converge/base';\nimport {\n Building,\n BuildingLevel,\n Organisation\n} from '../organisation';\nimport { User } from '../users';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { SpaceRules } from '../bookings/booking.types';\nimport { rulesForSpace } from '../bookings/space.utilities';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DaysOfWeek, RecurrencePeriod } from '../recurrence/recurrence.utils';\nimport { DateTime } from 'luxon';\n\nexport interface ISpaceAvailabilityOptions {\n /** Start date and time of the availability block */\n dateTz?: DateTZ;\n /** Length of the availability block */\n duration: number;\n /** */\n id?: string;\n /** List of spaces to look at the availability for */\n room_ids?: string;\n /** Whether the spaces looked at should be bookable */\n bookable?: boolean;\n /** List of spaces or zones to ignore */\n ignore?: string;\n /** List of zones to look at the availability for */\n zone_ids?: string | string[];\n /** Whether space bookings should not be returned */\n hide_bookings?: boolean;\n /** Min capacity on the room **/\n capacity?: number\n clear?: boolean;\n /** Length of the setup */\n setup?: number;\n /** Length of the breakdown */\n breakdown?: number;\n /** Hide declined bookings */\n hide_declined?: boolean;\n /** Max capacity on the room **/\n capacity_max?: number\n\n diff_capacity?: boolean\n\n /** Fields to include recurrence in the availability search */\n recurrence_period?: RecurrencePeriod;\n recurrence_interval?: number;\n recurrence_endTz?: DateTZ;\n recurrence_count?: number;\n recurrence_starts?: Array\n is_recurrent?: boolean\n is_multiroom?: boolean\n merged?: boolean\n recurrence_days?: Array\n}\n\nexport interface SpaceBookingRuleOptions {\n dateTz: DateTZ;\n duration: number;\n host: User;\n}\n\nexport const OPTION_DEFAULTS: ISpaceAvailabilityOptions = {\n duration: 60\n};\n\nexport interface RecurrenceAvailability {\n /** Unix epoch in seconds */\n readonly date: number;\n /** Whetehr space is available at this time */\n readonly available: boolean;\n}\n\n/**\n * Room Settings Type\n *\n * Exmaple:\n * available: true\n * available_until: 1644344999\n * bookings: []\n * catering: false\n * charge_code: false\n * extra_features: \"meeting_room boardroom\"\n * internal_or_external: \"internal\"\n * map_id: \"08.8.15\"\n * natural_light: false\n * room_booking_screen: true\n * room_name: \"8.15 Meeting\"\n * vc: false\n * recurrence_availability: {\n * date: \"1642596300\",\n * available: false,\n * }\n */\nexport interface RoomSettings {\n // Local room name is required.\n room_name?: string\n // TBD if anything else should be required\n available?: boolean\n available_until?: number\n bookings?: HashMap[]\n catering?: boolean\n charge_code?: boolean\n extra_features?: string\n internal_or_external?: string\n map_id?: string\n natural_light?: boolean\n room_booking_screen?: boolean\n vc?: boolean\n recurrence_availability?: RecurrenceAvailability[]\n equipment_code?: boolean\n external?: boolean\n}\n\n/**\n * List of space features that come from settings.\n *\n * Im sure this list will grow. It is not the most comprehensive list.\n */\nexport enum SpaceFeatures {\n BoardRoom = 'boardroom',\n Catering = 'catering',\n CocktailRoom = 'cocktail',\n ConferencePhone = 'conference_phone',\n ConferenceRoom = 'conference',\n ElectronicWhiteboard = 'whiteboard',\n FlipChart = 'flipchart',\n Glassboard = 'glassboard',\n PartnerOffice = 'partner',\n PhoneBooth = 'phone_booth',\n TheatreRoom = 'theatre',\n TeamRoom = 'team_room',\n VideoConference = 'vc',\n NaturalLight = 'natural_light',\n WirelessContentSharing = 'wireless_content_sharing',\n WorkshopRoom = 'workshop',\n UShapeRoom = 'u_shape',\n Miscellaneous = 'miscellaneous'\n}\n\nexport enum SpaceEquipments {\n conference_phone,\n whiteboard,\n vc,\n flipchart,\n glassboard,\n wireless_content_sharing\n}\nexport enum SpaceStyles {\n boardroom,\n cocktail,\n conference,\n partner,\n theatre,\n team_room,\n // natural_light,\n workshop,\n u_shape,\n miscellaneous\n}\n\nconst EMPTY_ARRAY = [];\n\nexport class Space extends BaseDataClass {\n /** Whether space can be booked by users */\n public readonly bookable: boolean;\n /** People capacity of the space */\n public readonly capacity: number;\n /** Index to force order when sorting multiple spaces */\n public readonly sort_priority: number;\n /** Settings has extensive info displayed in the app. */\n public readonly settings: RoomSettings;\n /** URL for the control interface of the space */\n public readonly support_url: string;\n /** Engine zones associated with the space */\n public readonly zones: readonly string[];\n /** Is the Application concierge */\n public is_concierge: boolean = false;\n /** To allow bookings with rooms for staff calendar view only */\n public allowStaffRoomWithBookings: boolean = false;\n\n /** Simple name == local name being using in seeting.room_name\n\t\t *\n\t\t*/\n public simple_name: string;\n\n /** Room style set of all room style one room has\n * [\"boardroom\", \"cocktail\", \"miscellaneous\", \"natural_light\", \"theatre\", \"u-shape\", \"workshop\"] */\n public room_style: string[] = [];\n\n /** Equipment set of all room equipment one room has\n * [\"conference_phone\", \"whiteboard\", \"vc\", \"flipchart\", \"glassboard\", \"whiteboard\", \"wireless_content_sharing\"] */\n public equipment: string[] = [];\n\n /** Filters has charge code settings for booking and catering */\n public filters: RoomSettings;\n\n /** room_type subset of internal or external rooms */\n public room_type: string[] | string;\n /**\n * Features used in identifying room types.\n *\n * Both features and extra_features are space delimited strings.\n *\n * There is a getter featuresArray that returns the\n * combination of the two as an array.\n */\n public readonly features: string;\n public readonly extra_features: string;\n public map_id: string;\n\n\n /** Service for managing spaces */\n protected get _service() {\n return ServiceManager.serviceFor(Building);\n }\n\n /** Return the rooms' building */\n public get building() {\n return this._service?.buildings.find((bld) => {\n return this.zones.includes(bld.id);\n });\n }\n\n /** Return building timezone */\n public get timezone() {\n return this.building?.timezone;\n }\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n\n // Needed to check if the current app is Concierge or Staff\n const settingsService = ServiceManager.serviceFor(SettingsService) as unknown as SettingsService;\n this.is_concierge = !!settingsService?.concierge;\n this.allowStaffRoomWithBookings = settingsService?.bypass_bookings || false;\n\n const defaultGlobalName = raw_data.name || raw_data.email || 'Meeting Room';\n const defaultSettings = {\n room_name: defaultGlobalName\n }\n /**\n * Duplicate of base-api.class just for readability\n * .name is the full, mckinsey standardised name of the room.\n * You can think of it was what people would call the room when\n * considering every office and room globally.\n *\n * this.name = raw_data.name;\n */\n /**\n * Settings has extensive info displayed in the app.\n * setting.room_name is always used when displaying the room name in the applications\n * setting.room_name is the more office-specific room name, you can think of this as\n * the one people in that office would refer to the room as.\n *\n */\n this.settings = raw_data.settings || defaultSettings;\n this.filters = raw_data?.filters;\n // Room fields\n this.bookable = raw_data.bookable || false;\n this.capacity = raw_data.capacity || 0;\n this.support_url = raw_data.support_url;\n this.zones = raw_data.zones instanceof Array ? raw_data.zones : [];\n // Feature fields\n this.features = raw_data.features || '';\n this.extra_features = raw_data.settings?.extra_features || '';\n\n\t\tthis.room_type = raw_data?.room_type;\n this.simple_name = raw_data?.simple_name;\n this.map_id = raw_data?.map_id || raw_data.settings?.map_id || '';\n this.room_style = raw_data?.room_style || [];\n this.equipment = raw_data?.equipment || [];\n\n }\n\n /**\n * Return the global room name\n * IE LDN-4-408-06\n */\n public get global_name(): string {\n return this.name || ''\n }\n\n /**\n * Return the local room name\n * i.e. 4.08\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.room_name\n */\n public get local_name(): string {\n return this.simple_name || this.name || ''; // this.settings?.room_name\n }\n\n public get street_and_city(): string {\n return this.building ? `${this.building.address}, ${this.building.city}` : '';\n }\n\n /**\n * Return the map_id from settings\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.map_id and use map_id from space modal( after testing over prod)\n */\n // public get map_id(): string {\n // return this?.map_id || this.settings?.map_id || '';\n // }\n\n /** Internal / External status */\n public get internal_or_external(): string {\n const external = this.filters?.external;\n return external ? 'external' : 'internal'; // ( external ? 'external' : this.settings?.internal_or_external ) || 'internal';\n }\n\n /**\n * Works in conjunction with available_until.\n *\n * If a room is bookable that only means you can make a booking but not when.\n * Available indicates that it is available to be booked durring the queried times.\n */\n public get available(): boolean {\n return this.settings?.available ?? false;\n }\n\n public get currently_in_use(): boolean {\n const nowMs = new DateTZ({ date: DateTime.now(), is_local_tz: false, building_tz: this.timezone }).ms;\n const runningBookings = this.settings?.bookings?.filter( bks => {\n const startEpoch = new DateTZ({ date: bks.start_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n const endEpoch = new DateTZ({ date: bks.end_epoch * 1000, is_local_tz: false, building_tz: bks.timezone}).ms;\n return startEpoch <= nowMs && endEpoch >= nowMs;\n })\n // console.log(raw_data.settings.room_name+' : '+ nowMs.ms);\n // console.log('IS IN USER CURRENTLY : ', isinUsernow);\n return !!runningBookings.length;\n }\n\n /** Last returned availability time */\n public get available_until(): number {\n return this.settings?.available_until;\n }\n\n /** Bookings associated with the space */\n public get bookings(): HashMap[] {\n // We should need to care if a room as bookings in Staff\n if (!this.is_concierge && !this.allowStaffRoomWithBookings) {\n return EMPTY_ARRAY;\n }\n\n if (this.settings?.bookings?.length) {\n /**\n * When we're dealing with Concierge the API data arriving is rooms, and those rooms contain booking,\n * but those bookings don't contain a room since the room is the root.\n * In order for Concierge to filter bookings by room we need to reattach this room\n * to each of the bookings, with it's own bookings.\n *\n * It's loopy and kooky but correcting for this pattern is beyond the scope of this refactor.\n */\n const spaceWithBookings = new Space(this.toJSON());\n return this.settings?.bookings.map(b => {\n b.room = spaceWithBookings;\n return b;\n });\n }\n return EMPTY_ARRAY;\n }\n\n /**\n\t\t * Whether space has catering\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove seetings.catering and use filters?.catering instead\n\t\t */\n public get has_catering(): boolean {\n return this.filters?.catering || this.settings?.catering || false;\n }\n\n /** Returns an array of the space delimited feature and extra_feature strings.\n * TO DO: ROOM-DATA-STRUCTURE-REFACTOR - stop using/remove features, extra_features\n */\n public get featuresArray(): (SpaceFeatures | string)[] {\n // (this.simple_name === \"Entresol M-06\" ) && console.log('raw_data : ', this)\n const roomType = Array.isArray(this.room_type) ? this.room_type : [this.room_type]\n const features = [\n ...this.features.split(' '),\n ...this.extra_features?.split(' '),\n\n ...roomType, // required to work with staff>result>filters\n ...this?.room_style,\n ...this?.equipment,\n\n (this.filters?.natural_light) && SpaceFeatures.NaturalLight || undefined, // || this.settings?.natural_light\n // this.settings?.natural_light && SpaceFeatures.NaturalLight || undefined,\n // this.settings?.vc && SpaceFeatures.VideoConference || undefined,\n ].filter(f => !!f).map(f => f.toLowerCase());\n //will be an array... new Set() turns it into a set, but [... ] turns it back into an array again\n return [ ...new Set(features) ];\n }\n\n /** Level in which the space is associated */\n public get level(): BuildingLevel {\n const service = ServiceManager.serviceFor(Organisation);\n return (service ? service.levelWithID(this.zones as any) : null) || new BuildingLevel({});\n }\n\n /**\n * Return the new recurrence_availability from settings\n */\n public get recurrence_availability(): RecurrenceAvailability[] {\n return this.settings?.recurrence_availability || [];\n }\n\n public get availableOccurrences(): number {\n if(this?.recurrence_availability) {\n return this?.recurrence_availability?.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this?.recurrence_availability.length;\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): Space {\n return new Space(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): Space {\n const space = { ...this };\n space.settings.bookings = []; // clear out bookings\n return new Space({ ...space, id: null, email: null });\n }\n\n /**\n * Generate the booking rules for space with given options\n * @param options Conditions for generating the space rules\n */\n public rulesFor(options: SpaceBookingRuleOptions): SpaceRules {\n if (!this._service || !this.level) {\n return { auto_approve: true, hide: false };\n }\n\n const building = this.is_concierge ? this.level.building_id : this.building\n\n if (!building) {\n return { auto_approve: true, hide: false };\n }\n const { dateTz, duration, host } = options;\n const rules: SpaceRules = rulesForSpace({\n time: dateTz.ms,\n duration,\n space: this,\n user: host,\n rules: building.booking_rules\n });\n return rules;\n }\n\n /**\n * Whether space can only be booked by request\n * @param options Conditions for checking the space rules\n */\n public byRequest(options: SpaceBookingRuleOptions) {\n const rules = this.rulesFor(options);\n return !rules.auto_approve;\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: Space): HashMap {\n return { ...super.toJSON(), settings: { ...this.settings, bookings: [] }, filters: { ...this.filters }, equipment: [ ...this.equipment] };\n }\n}\n","import { HashMap } from '@mckinsey-converge/base';\nimport {\n ISpaceAvailabilityOptions,\n Space\n} from './space.class';\nimport { Building } from '../organisation/building.class';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { handleRecurrenceFields, RecurrencePeriod } from '../recurrence/recurrence.utils';\n\nexport function availabilityOptionsToQuery(options: ISpaceAvailabilityOptions): HashMap {\n let query: HashMap = {};\n if (options) {\n query = { ...options };\n if (options.dateTz) {\n const date = options.dateTz.startOfValue('minute');\n query.available_from = date.seconds; // Add one second or API will not allow end to end booking\n query.available_to = date.addValue({ minutes: options.duration || 60 }).subtractValue({ seconds: 1 }).seconds;\n\n if (options.setup) query.setup = options.setup ;\n if (options.breakdown) query.breakdown = options.breakdown;\n \n delete query.dateTz;\n delete query.duration;\n }\n\n if (!options.capacity_max) delete query.capacity_max\n\n if (options.hide_declined) query.hide_declined = options.hide_declined;\n query = handleRecurrenceFields(query)\n }\n return query;\n}\n\n/**\n * Compare two spaces to determine order\n * @param first\n * @param second\n */\nexport function sort(first: Space, second: Space, blds: Building[] = []) {\n const bld = blds.find(bld => first.zones.includes(bld.id));\n const bld_b = blds.find(bld => second.zones.includes(bld.id));\n if (bld) {\n if (bld !== bld_b) {\n return (bld.name).localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = first.zones.indexOf(zone_id) >= 0;\n const b_has_zone = second.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n }\n return first.name.localeCompare(second.name);\n}\n","import { Injectable } from '@angular/core';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { BaseAPIService } from '../base.service';\nimport { ISpaceAvailabilityOptions, Space } from './space.class';\nimport { ApplicationLoadingState, HashMap } from '@mckinsey-converge/base';\nimport { availabilityOptionsToQuery } from './space.utilities';\nimport { ServiceManager } from '../service-manager.class';\nimport { OrganisationService } from '../organisation';\nimport { ApplicationService } from '../app.service';\nimport { SettingsService } from '../settings.service';\nimport { DateNow } from '@mckinsey-converge/date-tz';\nimport { Observable } from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\n\nlet SPACE_LIST = [];\n\nexport function findSpace(id: string) {\n return SPACE_LIST.find((_) => _.id === id || _.email === id);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SpacesService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n private _org: OrganisationService,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n \n super(_composer, settingsService);\n ServiceManager.setService(Space, this);\n this._name = 'Space';\n this._api_route = 'rooms';\n this._compare = (a, b) =>\n !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this._list_filter = (a: Space) => {\n const bld = this._org.building;\n return a.level.building_id === bld.id;\n };\n this._org.initialised\n .pipe(first((_) => _))\n .subscribe(() => this.init());\n }\n\n public async query(query: HashMap = {}, setList:boolean = false) {\n const list = await super.query(query);\n if ( (query.hasOwnProperty('cache') && query.cache === false) || !Object.keys(query).length || setList) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n return list;\n }\n\n public filterAvailableSpaces(list: Space[]) {\n return list.filter((i) => {\n if (i.recurrence_availability?.length) return i; //if recurrence, send the space regardless of availability (needed for edit and cloning series)\n return i.available;\n });\n }\n\n /**\n * Get available spaces\n * @param options\n */\n public available(\n options: ISpaceAvailabilityOptions,\n uniqueId?: string,\n filter: boolean = true\n ): Promise {\n if (!options) {\n throw new Error('Space avilability requires request options');\n }\n\n const now = DateNow(new Date());\n if (!options.dateTz) {\n options.dateTz = now.startOfValue('minute');\n }\n\n if (options.hide_declined === undefined) {\n options.hide_declined = true;\n }\n\n const key = `available|${options.id ? options.id : ''}|${\n uniqueId ?? ''\n }`;\n if (!this._promises[key]) {\n this._promises[key] = new Promise((resolve, reject) => {\n const respond = (list: Space[]) => {\n delete this._promises[key];\n resolve(filter ? this.filterAvailableSpaces(list) : list);\n };\n const error = (e) => {\n reject(e);\n delete this._promises[key];\n };\n const query = availabilityOptionsToQuery(options);\n if (options.id) {\n this.show(options.id, query).then(\n (i) => respond([i]),\n error\n );\n } else {\n this.query(query).then(respond, error);\n }\n });\n }\n\n return this._promises[key];\n }\n\n /**\n * Load initial data for the service\n */\n protected async load(): Promise {\n const loading: ApplicationLoadingState =\n this._service.get('loading') || {};\n if (!loading.spaces) {\n loading.spaces = {\n message: 'Loading space data',\n state: 'loading',\n };\n this._service.set('loading', loading);\n }\n // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n const option = {\n zone_ids: this._org.building.id\n }\n await this.query(option, true).catch(() => {\n loading.spaces = { message: 'Loading space data', state: 'failed' };\n this._service.set('loading', loading);\n });\n loading.spaces = { message: 'Loading space data', state: 'complete' };\n this._service.set('loading', loading);\n }\n\n /**\n * Convert raw data into API object\n * @param raw_data Raw API data\n */\n public process(raw_data: HashMap): Space {\n return new Space(raw_data);\n }\n /**\n * \n * Special observable function to make http call for rooms\n * @param query \n * @returns observable\n */\n public queryRooms = (query: HashMap = {}): Observable => super.queryRoomsForQR(query);\n\n public setSpaceList(list) {\n this.set('list', list);\n SPACE_LIST = list;\n }\n\n public queryBooking = (query: HashMap = {}) : Observable | Observable => super.queryObsr(query);\n public updateSpace = (id: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.updateObsr(id, form_data, should_inject_concierge, query_params);\n public uploadSpacePhotos = (apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}) : Observable | Observable => super.uploadSpacePhotos(apiSubRoute, form_data, should_inject_concierge, query_params);\n \n public updateRoomList() {\n this.load().then((_) => null)\n }\n}\n","import {\n BehaviorSubject,\n of\n} from 'rxjs';\nimport {\n Building,\n Organisation\n} from './organisation';\nimport { BaseDataClass } from './base-api.class';\nimport { MapLocation } from './location';\nimport { User } from './users';\nimport { Booking } from './bookings';\nimport {\n RoomSettings,\n Space,\n SpaceFeatures\n} from './spaces';\nimport { ServiceManager } from './service-manager.class';\nimport {\n CateringCategory,\n CateringItem\n} from './catering';\nimport {\n HashMap,\n padZero,\n predictableRandomInt,\n unique\n} from '@mckinsey-converge/base';\n\nimport * as faker from 'faker';\n\nimport {\n SETTINGS_TOKEN,\n SettingsData,\n SettingsObject,\n SettingsService\n} from './settings.service';\nimport { Report } from './reports';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nfaker.seed(2560);\n\nlet SERVICE: any;\n\ndeclare global {\n interface Jest {\n fn: () => any\n }\n}\n\n\ndeclare let jest: Jest;\n\n/* istanbul ignore file */\n\nexport function generateMockOrganisationService(): HashMap {\n return {\n levelWithID: jest.fn(),\n listen: jest.fn(),\n loadOrganisation: jest.fn(),\n initialised: of(true),\n building: new Building(generateMockBuilding({ id: 'bld-01' })),\n loadBuildingsWithOrg: jest.fn(),\n getOrganizationFiltersByRoomType: jest.fn(),\n getRoomTypeSubsetDDOptions: jest.fn(),\n getRoomFilterOptionsPerLocation: jest.fn(),\n ...generateMockDataService('OrganisationService')\n };\n}\n\nexport const generateMockSpacesService = (): HashMap => ({\n available: jest.fn(),\n ...generateMockDataService('SpacesService')\n});\n\nexport const generateMockUsersService = (): HashMap => ({\n loadCurrentUser: jest.fn(),\n ...generateMockDataService('UsersService')\n});\n\nexport const bookingState = () => ({\n bookings: of([]),\n filtered: of([]),\n filtered_week: of([]),\n filtered_month: of([]),\n setZone: jest.fn(),\n setDate: jest.fn(),\n setFilters: jest.fn(),\n add: jest.fn(),\n replace: jest.fn(),\n remove: jest.fn(),\n startPolling: jest.fn(),\n startPollingMonth: jest.fn(),\n startPollingWeek: jest.fn(),\n startPollingEveryFiveMin: jest.fn(),\n _noOfMeetings: of([])\n});\n\nconst test_app = {\n title: 'McKinsey & Company',\n description: 'McKinsey & Company Staff UI written with Angular Framework',\n short_name: 'STAFF',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: ''\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: ''\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/staff/'\n }\n};\n\nexport const TEST_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/test',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false\n },\n app: test_app,\n mock: false,\n frontend: 'staff'\n};\n\nexport const generateMockSettingsService = (overrides: Partial> = {}) => new SettingsService({ getTitle: () => jest.fn() } as any,\n new SettingsObject({\n ...TEST_SETTINGS,\n ...overrides\n }));\n\n/**\n * Provides an injectable instance for settings.\n */\nexport const provideMockSettingsObject = (settings: Partial> = {}) => ({\n provide: SETTINGS_TOKEN,\n useValue: new SettingsObject({\n ...TEST_SETTINGS,\n ...settings\n })\n});\n\n/**\n * Generate a mocked version of the application service\n */\nexport function generateMockAppService(settingsOverrides: Partial> = {}) {\n SERVICE = {\n setting: jest.fn(),\n notify: jest.fn(),\n notifyInfo: jest.fn(),\n notifyWarn: jest.fn(),\n notifySuccess: jest.fn(),\n notifyError: jest.fn(),\n log: jest.fn(),\n navigate: jest.fn(),\n navigateBack: jest.fn(),\n get: jest.fn(),\n listen: jest.fn(),\n set: jest.fn(),\n Composer: { auth: { token: 'test' } },\n Hotkeys: { listen: jest.fn() },\n Users: generateMockUsersService(),\n Organisation: generateMockOrganisationService(),\n Locations: generateMockDataService('LocationsService'),\n Base: generateMockDataService('BaseService'),\n Menu: generateMockDataService('CateringMenuService'),\n Spaces: generateMockSpacesService(),\n Bookings: generateMockDataService('BookingsService'),\n Reports: generateMockDataService('ReportsService'),\n CateringItems: generateMockDataService('CateringItemsService'),\n CateringCategories: generateMockDataService('CateringCategoriesService'),\n Settings: generateMockSettingsService(settingsOverrides),\n initialised: of(true)\n };\n ServiceManager.setService(BaseDataClass, SERVICE.Base);\n ServiceManager.setService(Organisation, SERVICE.Organisation);\n ServiceManager.setService(Building, SERVICE.Organisation);\n ServiceManager.setService(User, SERVICE.Users);\n ServiceManager.setService(Booking, SERVICE.Bookings);\n ServiceManager.setService(Space, SERVICE.Spaces);\n ServiceManager.setService(MapLocation, SERVICE.Locations);\n ServiceManager.setService(Report, SERVICE.Reports);\n ServiceManager.setService(CateringItem, SERVICE.CateringItems);\n ServiceManager.setService(CateringCategory, SERVICE.CateringCategories);\n SERVICE.Organisation.buildings = [SERVICE.Organisation.building];\n SERVICE.Users.current = new User(generateMockUser());\n SERVICE.Users.initialised = of(true);\n SERVICE.Bookings.booking_list = new BehaviorSubject(new Array(10).fill(0).map(_ => new Booking(generateMockBooking())));\n SERVICE.listen.mockReturnValue(of(null, []));\n return SERVICE;\n}\n\nexport function generateMockDataService(name: string) {\n const service = {\n find: jest.fn(),\n filter: jest.fn(),\n listen: jest.fn(),\n get: jest.fn(),\n set: jest.fn(),\n setting: jest.fn(),\n query: jest.fn(),\n show: jest.fn(),\n add: jest.fn(),\n save: jest.fn(),\n remove: jest.fn(),\n delete: jest.fn(),\n update: jest.fn(),\n addFrom: jest.fn(),\n removeFrom: jest.fn(),\n task: jest.fn(),\n available: jest.fn(),\n process: jest.fn(),\n updateList: jest.fn(),\n clearList: jest.fn(),\n removeFromList: jest.fn(),\n accept: jest.fn(),\n decline: jest.fn(),\n checkin: jest.fn(),\n is_logged_in: false,\n initialised: of(true),\n getHoldingBay: jest.fn(),\n name,\n queryRooms: of(true),\n queryRoomsForQR: of([]),\n queryObsr: of([]),\n queryBooking: of(true),\n checkinIndividualVisitor: jest.fn(),\n taskObsr: of(true),\n updateSpace: jest.fn(),\n updateObsr: of([]),\n uploadSpacePhotos: of([])\n\n };\n\n service.getHoldingBay.mockImplementation(_ => Promise.resolve([new Booking({})]));\n service.save.mockImplementation(_ => Promise.resolve(new Booking({})));\n\n service.listen.mockReturnValue(of(null));\n service.filter.mockReturnValue([]);\n return service;\n}\n\nlet SPACE_COUNT: number = 0;\n\nexport function generateMinimalRoomDetails(count: number) {\n return {\n name: `space-0${count}`,\n email: `space-0${count}@test.com`,\n settings: {\n name: `localname-0${count}`,\n catering: true\n }\n }\n}\n\nexport function generateMockSpace(overrides: HashMap = {}, space_id: number = null, recurring_search: boolean = false ): Space {\n const id = `space-${space_id || SPACE_COUNT++}`;\n const name = overrides.name || `${faker.name} ${faker.name.lastName()} Space`;\n const startOfDay = DateNow(new Date()).startOfValue('day');\n let settings: RoomSettings = {\n available: true,\n available_until: startOfDay.addValue({ days: 1 }).seconds, // (Date.now() / 1000) + (60 * 60 * 24), // now plus 24 hrs\n bookings: Array(10).fill(0).map(i => generateMockBooking()),\n catering: true,\n charge_code: true,\n extra_features: \"meeting_room boardroom\",\n internal_or_external: \"internal\",\n map_id: \"1\",\n natural_light: false,\n room_booking_screen: true,\n room_name: `${name} - Local Name`,\n vc: false,\n }\n if (overrides.settings) {\n settings = { ...settings, ...overrides.settings };\n delete overrides.settings;\n }\n if (recurring_search) {\n settings.recurrence_availability = [\n {\n date: startOfDay.seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 1 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 2 }).seconds,\n available: false,\n },\n {\n date: startOfDay.addValue({ days: 3 }).seconds,\n available: false,\n },\n ]\n }\n\n const linked = Math.floor(predictableRandomInt(99999)) % 2 === 0 && SPACE_COUNT > 1;\n return new Space({\n id,\n name: `${name} - Global Name`,\n map_id: `${space_id || SPACE_COUNT}`,\n type: faker.commerce.productName(),\n searchable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n controlable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n hourly_rate: Math.floor(predictableRandomInt(300)) * 100,\n bookable: Math.floor(predictableRandomInt(99999)) % 2 === 0,\n capacity: 15,\n sort_priority: 0,\n setup: Math.floor(predictableRandomInt(6)) * 5,\n breakdown: Math.floor(predictableRandomInt(6)) * 5,\n support_url: `/control/#/${id}`,\n image: faker.image.business(),\n zones: ['zone_lvl-0'],\n features: `${SpaceFeatures.BoardRoom} ${SpaceFeatures.ElectronicWhiteboard}`,\n email: `${name.toLowerCase().split(' ').join('.')}@${USER_DOMAIN}`,\n settings,\n ...overrides\n });\n}\n\nlet BOOKING_COUNT = 0;\nlet BOOKING_DATE = DateNow(new Date()).setValue({ hour: 6 }).setValue({minute: 0}).subtractValue({ days: 10 }).startOfValue('minute');\n\n/**\n * Set the initial time used for generating mock bookings\n * @param time New initial time as ms from UTC epoch\n */\nexport function setMockBookingStartDatetime(time: number) {\n const date = new DateTZ({date: time})\n BOOKING_DATE = date.startOfValue('minute');\n}\n\n/**\n * Create mock raw API data for a booking\n * @param override Overrides the properties of the generated booking with it's own\n */\nexport function generateMockBooking(override: HashMap = {}) {\n const id = `booking-${BOOKING_COUNT++}`;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4) + 2) * 15 });\n const start = BOOKING_DATE.ms;\n const duration = Math.floor(predictableRandomInt(4) + 2) * 15;\n BOOKING_DATE = BOOKING_DATE.addValue({ minutes: Math.floor(predictableRandomInt(4)) * 15 });\n const organiser = generateMockUser({ external: false, visitor: false });\n const orders = Array(Math.floor(predictableRandomInt(5)))\n .fill(0)\n .map(_ => generateMockCateringOrder({ booking_date: start }, override.room_ids, override.menu));\n const hasCatering = Math.floor(predictableRandomInt(34567)) % 3 === 0;\n const date_start = new DateTZ({date: start})\n return {\n id,\n title: `${faker.commerce.productName()} Meeting`,\n attendees: Array(Math.floor(predictableRandomInt(5) + 2))\n .fill(0)\n .map((_, i) => generateMockUser(override.users)),\n organiser,\n start_epoch: date_start.seconds,\n end_epoch: date_start.addValue({ minutes: duration }).seconds,\n body: faker.lorem.paragraph(),\n notes: [{ type: 'other', message: faker.lorem.paragraph() }],\n location: faker.address.city(),\n // Mckinsey only has internal or external meetings\n booking_type: ['internal', 'external'][predictableRandomInt(2)],\n setup: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n breakdown: { 'space-01': Math.max(0, (predictableRandomInt(12) - 6) * 5) },\n status: 'accepted',\n catering: hasCatering ? orders : [],\n room: new Space(generateMinimalRoomDetails(1)), // returns space-01 type values\n equipment_codes: {},\n company:[],\n ...override\n };\n}\n\nlet BLD_COUNT = 0;\nlet LVL_COUNT = 0;\n\n/**\n * Generate raw mock data for creating a building\n * @param id Forced ID for the mock\n * @param overrides Supply object value overrides in place. Supports a levelGenerator function\n * to stabilize level ids for testing.\n */\nexport function generateMockBuilding(overrides: HashMap = {}): HashMap {\n const id = `zone_bld-${BLD_COUNT++}`;\n const levels = Array(10)\n .fill(0)\n .map((_, i) => generateMockLevel(undefined, overrides.levelGenerator?.(i)));\n const features: any = {};\n for (const lvl of levels) {\n const count = Math.floor(predictableRandomInt(3) + 2);\n features[lvl.level_id] = {};\n for (let i = 0; i < count; i++) {\n features[lvl.level_id][faker.commerce.productName()] = `feature-${i + 1}`;\n }\n }\n return {\n id,\n zone_id: id,\n extras: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n code: 'NYO',\n name: faker.name.firstName(),\n address: 'building address field',\n city: 'building city',\n loan_items: Array(10)\n .fill(0)\n .map(i => {\n const name = faker.commerce.productName();\n return {\n extra_id: name\n .split(' ')\n .join('-')\n .toLowerCase(),\n extra_name: name\n };\n }),\n levels,\n roles: {\n 'first-aiders': Array(10)\n .fill(0)\n .map(i => generateMockUser())\n },\n neighbourhoods: features,\n settings: {\n test: {\n nested: {\n level2: true,\n org: false\n }\n },\n city: faker.address.city()\n },\n timezone: 'America/Chicago',\n ...overrides\n };\n}\n\n/**\n * Generate raw mock data for a building level\n * @param id Forced ID for the mock\n * @param overrides value overrides\n */\nexport function generateMockLevel(id?: string, overrides: HashMap = {}): HashMap {\n if (!id) {\n id = `zone_lvl-${LVL_COUNT++}`;\n }\n return {\n id,\n level_id: id,\n level_name: `Level ${LVL_COUNT}`,\n short_name: `L ${LVL_COUNT}`,\n ...overrides\n };\n}\n\nlet USER_COUNT = 0;\n\nexport let USER_DOMAIN = 'acaprojects.com';\n\nconst USER_EMAILS: string[] = [];\n\n/**\n * Generate raw mock data for a user\n * @param id Forced ID for the mock\n * @param name Forced name for the user\n * @param external Whether user is external of the organisation\n */\nexport function generateMockUser(override: HashMap = {}): HashMap {\n const id = `user-${USER_COUNT++}`;\n const name = `${faker.name.firstName()} ${faker.name.lastName()}`;\n const external = override.external || !(predictableRandomInt(99999) % 2);\n const organisation = external ? faker.company.companyName() : USER_DOMAIN.split('.')[0];\n let delegates: {email: string, opt_out: boolean}[] = [];\n const delegate_count = Math.min(predictableRandomInt(4) + 1, USER_EMAILS.length);\n for (let i = 0; i < delegate_count; i++) {\n delegates.push({email: USER_EMAILS[Math.floor(predictableRandomInt(USER_EMAILS.length))], opt_out: false});\n }\n delegates = unique(delegates);\n const email = `${name\n .split(' ')\n .join('.')\n .toLowerCase()}@${external ? 'not-' : ''}${USER_DOMAIN}`;\n USER_EMAILS.push(email);\n return {\n id,\n name,\n first_name: name.split(' ')[0],\n last_name: name.split(' ')[1],\n email,\n phone: faker.phone.phoneNumber(),\n visitor: external,\n organisation: {\n id: organisation\n .split(' ')\n .join('.')\n .toLowerCase(),\n name: organisation\n },\n department: faker.commerce.department(),\n staff_code: padZero(Math.floor(predictableRandomInt(99999)), 5),\n delegates,\n image: faker.image.avatar(),\n ...override\n };\n}\n\nexport function generateMockCateringOrder(overrides: HashMap = {}, room_id: string = '', menu: HashMap = {}) {\n return {\n id: `order-${predictableRandomInt(9999_9999)}`,\n delivery_time: predictableRandomInt(6) * 5,\n location_id: room_id, // R--- could be undefined\n items: new Array(predictableRandomInt(5, 1)).fill(0).map(i => pickMenuItem(menu)),\n ...overrides\n };\n}\n\nfunction pickMenuItem(menu_map: HashMap = {}) {\n const zones = Object.keys(menu_map);\n const menu = menu_map[zones[predictableRandomInt(zones.length)]] || [];\n const category = menu[predictableRandomInt(menu.length)] || { items: [] };\n const group = { ...(category.items[predictableRandomInt(category.items.length)] || {}) };\n if (!group.package && group.items?.length) {\n const item = { ...group.items[predictableRandomInt(group.items.length)] };\n item.amount = predictableRandomInt(5, 1);\n return item;\n }\n group.amount = predictableRandomInt(5, 1);\n return group;\n}\n\nexport function generateMockLocation(overrides: HashMap, fixed_locations: string[], maps: string[]): HashMap {\n const fixed = predictableRandomInt(999_999_999) % 2 === 0;\n if (fixed && (!overrides || overrides.fixed)) {\n return {\n map_id: fixed_locations[predictableRandomInt(fixed_locations.length)],\n level: maps[predictableRandomInt(maps.length)],\n ...overrides\n };\n } else {\n return {\n x: predictableRandomInt(900, 100),\n x_max: 1000,\n y: predictableRandomInt(500, 100),\n level: maps[predictableRandomInt(maps.length)],\n confidence: predictableRandomInt(30),\n ...overrides\n };\n }\n}\n\nlet ORG_COUNT = 0;\n\nexport function generateMockOrganisation(): HashMap {\n const buildings = Array(3).fill(0).map(i => generateMockBuilding());\n return {\n id: `zone_org-${ORG_COUNT++}`,\n name: `Organisation ${ORG_COUNT}`,\n buildings,\n settings: {\n discovery_info: {\n buildings\n },\n test: {\n nested: {\n org: true\n }\n }\n }\n };\n}\n\n\nexport const generateMockBuildingSetByCity = () => {\n const buildings: Building[] = Array(10).fill(0)\n .map(() => new Building(generateMockBuilding()));\n buildings.push(...Array(2).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'Auckland'\n },\n city: 'Auckland'\n }))));\n buildings.push(...Array(5).fill(0).map(() => new Building(generateMockBuilding({\n settings: {\n city: 'NYC'\n },\n city: 'NYC'\n }))));\n return buildings;\n};\n\nexport function generateMockModalData(data: HashMap = null) : HashMap {\n if (data) {\n return data;\n }\n return {\n pendingDate: new Date(1603087100 + (1000 * 60 * 15)),\n pendingDuration: 60,\n date: 1603087100,\n duration: 30,\n }\n}\n\nexport const mockDateToBuildingTz = (date?: number) =>{\n return new DateTZ({date, building_tz: 'America/Chicago', is_local_tz: false})\n}","export * from './user.class'\nexport * from './user.utilities'\nexport * from './users.service'\n","import { BaseDataClass } from '../base-api.class';\nimport {\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { MapLocation } from '../location';\nimport { ServiceManager } from '../service-manager.class';\n\nexport class User extends BaseDataClass {\n \n /** Currently logged in user */\n public static get active_user(): User {\n const service = ServiceManager.serviceFor(User);\n return service ? service.current : null;\n }\n\n /** First name of the user */\n public readonly first_name: string;\n /** Last name of the user */\n public readonly last_name: string;\n /** Windows user ID */\n public readonly windows_id: string;\n /** FMNO */\n public readonly fmno: string;\n /** Type of user */\n public readonly type: 'partner' | 'external' | 'internal';\n /** Contact phone number of the user */\n public readonly phone: string;\n /** Organisational department the user is part of */\n public readonly business_unit: string;\n /** Whether user is external from the application's organisation */\n public readonly external: boolean;\n /** Whether user is a visitor */\n public readonly visitor: boolean;\n /** Organisational Identifier for the user */\n public readonly staff_code: string;\n /** Basic location descriptor for the user */\n public readonly location: string;\n /** List of users that this user can act on behalf */\n public readonly delegates: readonly {email: string, opt_out: boolean}[];\n /** URL of the user's avatar image */\n public readonly image: string;\n /** List of user groups associated with this user */\n public readonly groups: readonly string[];\n /** Organisation the user is associated with */\n private _organisation: Identity;\n\n /** Map location of the user */\n private _location: MapLocation;\n /** List of desk bookings */\n // private _desk_bookings: HashMap = {}; // R--- can't explain why this is here.\n /** Host/Organisawe email notification opt out/in setting */\n public opt_out: boolean;\n\n constructor(raw_data: HashMap = {}) {\n super(raw_data);\n this.first_name = raw_data.first_name || '';\n this.last_name = raw_data.last_name || '';\n this.windows_id = raw_data.email || '';\n this.fmno = raw_data.fmno;\n this.external = raw_data.external || false;\n this.visitor = raw_data.visitor || false;\n\n\n this.type = this.visitor ? 'external' : 'internal';\n this.phone = raw_data.phone || raw_data.mobile || '';\n this.business_unit = raw_data.business_unit || raw_data.department || '';\n this._organisation = raw_data.organisation || {\n id: raw_data.organisation_id,\n name: raw_data.organisation_name\n };\n\n this._location = null;\n this.image = raw_data.image || '';\n this.staff_code = raw_data.staff_code || raw_data.fmno || '';\n this.delegates = raw_data.delegates || [];\n this._location = new MapLocation(\n raw_data.location && raw_data.location instanceof Object\n ? raw_data.location\n : { name: raw_data.location }\n );\n this.groups = raw_data.groups || [];\n this.location = raw_data.location || raw_data.officeLocation || '';\n this.opt_out = raw_data.opt_out;\n }\n\n /** Organisation the user is associated with */\n public get organisation() {\n return this._organisation;\n }\n\n /** Map location of the user */\n public get last_location(): MapLocation {\n return new MapLocation(this._location || {});\n }\n\n /**\n * Ask the server for the users current location\n */\n public locate(): Promise {\n const service: any = ServiceManager.serviceFor(MapLocation);\n return new Promise((resolve, reject) => {\n if (service) {\n service.show(this.id, { desk: this.email }).then(\n l => {\n this._location = l;\n resolve(l);\n },\n e => reject(e)\n );\n } else {\n resolve(null);\n }\n });\n }\n\n /**\n * Whether user is available during the given period\n * @param start Start time as a unix timestamp with milliseconds\n * @param end End time as a unix timestamp with milliseconds\n */\n public available(start?: number, end?: number): Promise {\n return new Promise(resolve => {\n this._service.query({ email: this.email, start, end }).then(\n l => resolve(l && l.length > 0),\n _ => resolve(false)\n );\n });\n }\n\n /**\n * Make a copy of this object\n */\n public clone(): User {\n return new User(this);\n }\n\n /**\n * Make a copy of this object without identification data\n */\n public duplicate(): User {\n return new User({ ...this, id: null, email: null });\n }\n\n /**\n * Convert object into plain object\n */\n public toJSON(this: User): HashMap {\n const data = super.toJSON();\n delete data.location;\n return data;\n }\n}\n\n// R--- Might need an toApiJSON due to visitor field.","import {\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\n\nimport { HashMap } from '@mckinsey-converge/base';\nimport { User } from './user.class';\n\n/**\n * Generate form fields for the given user\n * @param user User to generate form for\n */\nexport function generateUserForm(user: User): FormGroup {\n if (!user) {\n throw Error('No user passed');\n }\n const fields: HashMap = {\n id: new FormControl(user.id || ''),\n name: new FormControl(user.name || ''),\n first_name: new FormControl(user.first_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n last_name: new FormControl(user.last_name || '', [Validators.required, Validators.pattern(/^(?![\\d\\s]+$)[^\\d]+$/), Validators.maxLength(50)]),\n email: new FormControl(user.email || '', [Validators.email])\n };\n // Generate form group for booking item\n return new FormGroup(fields);\n}\n","import { Injectable } from '@angular/core';\nimport { Location } from '@angular/common';\nimport {\n HttpClient,\n HttpHeaders\n} from '@angular/common/http';\nimport { ComposerService } from '@placeos/composer';\nimport { first } from 'rxjs/operators';\n\nimport { Md5 } from 'ts-md5/dist/md5';\n\nimport { BaseAPIService } from '../base.service';\nimport { User } from './user.class';\nimport {\n ApplicationLoadingState,\n HashMap,\n unique\n} from '@mckinsey-converge/base';\n\nimport { ApplicationService } from '../app.service';\nimport { ServiceManager } from '../service-manager.class';\nimport { SettingsService } from '../settings.service';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ILoginOptions {\n /** URL to post login request to */\n url?: string;\n /** Whether form data is passed in the body of the request */\n form?: boolean;\n /** Custom headers to pass into the post request */\n headers?: HashMap;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService extends BaseAPIService {\n constructor(\n protected _composer: ComposerService,\n protected uhttp: HttpClient,\n protected location: Location,\n private _service: ApplicationService,\n settingsService: SettingsService\n ) {\n super(_composer, settingsService);\n ServiceManager.setService(User, this);\n this._name = 'Users';\n this._api_route = 'users';\n this._compare = (a, b) => !a.id.localeCompare(b.id) || !a.email.localeCompare(b.email);\n this.set('list', []);\n this.set('current_user', new User({ id: 'local_user', name: 'Local User' }));\n this.set('delegates', null);\n this._composer.initialised.pipe(first((_) => _)).subscribe(() => this.init());\n }\n\n /** Currently logged in user */\n public get current(): User {\n return this.get('current_user');\n }\n\n /** Whether the user has properly logged in */\n public get is_logged_in(): boolean {\n return this.current && this.current.id !== 'local_user';\n }\n\n /* istanbul ignore next */\n /**\n * Sets the access token and expiry for the user\n * @param token OAuth bearer token\n * @param expiry Expiry epoch timestamp in ms\n * @param reload Whether to reload the page after setting tokens\n */\n public setToken(token: string, expiry?: number, reload: boolean = true) {\n if (!expiry) {\n const now = DateNow(new Date())\n expiry = now.addValue({ days: 7 }).endOfValue('day').ms;\n }\n const path = `${location.origin}${\n this._service.setting('composer.route') || ''\n }/oauth-resp.html`;\n const client_id = Md5.hashStr(path);\n if (sessionStorage) {\n sessionStorage.setItem(`${client_id}_access_token`, token);\n sessionStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (localStorage) {\n localStorage.setItem(`${client_id}_access_token`, token);\n localStorage.setItem(`${client_id}_expires_at`, `${expiry}`);\n }\n if (reload) {\n this.location.go(this.location.path());\n }\n return path;\n }\n\n /**\n * Post login request to the API\n * @param query_params Key value pairs to pass into\n * @param options Options for the login request\n */\n public async login(query_params: HashMap, options: ILoginOptions = {}): Promise {\n if (this.settingsService.concierge) {\n if (!this._promises['login']) {\n this._promises['login'] = new Promise((resolve, reject) => {\n this.set('status', 'loading');\n let headers = new HttpHeaders();\n if (!options || options.form !== false) {\n headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');\n }\n const url = (options ? options.url : '') || '/auth/signin';\n this.uhttp.post(url, query_params, { headers }).subscribe(\n (_) => null,\n (e) => reject(e),\n () => {\n this._composer.auth.authorise();\n resolve();\n }\n );\n });\n }\n return this._promises['login'];\n }\n }\n\n\n /**\n * Logout of user and redirect to logout URL\n */\n public logout() {\n this._composer.auth.logout();\n }\n\n /**\n * Loads current user from API. This diverges from {@link load} in order to simply return\n * the user object instead of setting it on the service.\n */\n public async loadCurrentUser(): Promise {\n return this.show('current')\n }\n\n /**\n * Load initial data for the service\n */\n protected load(tries: number = 0): Promise {\n const loading: ApplicationLoadingState = this._service.get('loading') || {};\n loading.user = { message: 'Loading user credentials', state: 'loading' };\n this._service.set('loading', loading);\n this.set('status', 'loading');\n return new Promise((resolve) => {\n // this is due to unclear nature of the merge between concierge and staff\n // concierge has the retries enabled, while staff continuously retries.\n if (this.settingsService.concierge && tries > 4) {\n this.set('status', 'invalid');\n loading.user = { message: 'Loading user credentials', state: 'failed' };\n this._service.set('loading', loading);\n return resolve();\n }\n this.show('current').then(\n async (current_user) => {\n this.set('status', 'available');\n this.set('current_user', current_user);\n this._initialised.next(true);\n if (this._service && this._service.setting('app.user.grab_api_details')) {\n this.show(current_user.email).then(\n async (user) => {\n this.set('current_user', user);\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = {\n message: 'Loading user credentials',\n state: 'complete'\n };\n this._service.set('loading', loading);\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n } else {\n \n // is after process\n if (this._service.setting('app.user.update_location')) {\n this.interval('location', () => current_user.locate(), 5000);\n }\n await this.loadDelegates().catch(_ => null);\n resolve();\n loading.user = { message: 'Loading user credentials', state: 'complete' };\n this._service.set('loading', loading);\n }\n },\n () => this.timeout('load', () => this.load(++tries).then(() => resolve()), Math.min(3000, 300 * tries))\n );\n });\n }\n\n private async loadDelegates() {\n const delegates = this.current.delegates;\n if (!delegates || !delegates.length) {\n return [];\n }\n const promises: Promise[] = [];\n for (const del of delegates) {\n promises.push(this.show(del.email));\n }\n const list = await Promise.all(promises);\n this.set('delegates', list);\n this.set('list', unique((this.get('list') || []).concat(list)));\n return list;\n }\n\n /**\n * Convert raw API data into a valid User Object\n * @param raw_item Raw API data\n */\n protected process(raw_data: any): User {\n return new User(raw_data);\n }\n}","import { AbstractControl } from '@angular/forms';\n\nimport { User } from './users';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\nconst HAS_ERROR = true;\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n */\nexport function buildValidateDate(date?: number) {\n const from = new DateTZ({ date });\n return (c) => validateDate(c, date);\n}\n\n/**\n * Check that control value is a date that is the same or after from date\n * @param control Angular form control\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateDate(control: AbstractControl, is_from?: number) {\n const from = new DateTZ({date: is_from})\n const date = new DateTZ({date: control.value})\n return date.isBeforeDate(from) ? { date: HAS_ERROR, message: 'Booking needs to be made in the future' } : null;\n}\n\n/**\n * Build start time validation function\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function buildValidateStartTime(date: number, is_from?: number) {\n const from = new DateTZ({date: is_from})\n return (c) => validateStartTime(c, date, from.ms);\n}\n\n/**\n * Check that control value time is after the comparison date time\n * @param control Angular form control\n * @param date Date of the time to check\n * @param is_from Comparison date(ms from UTC epoch). Defaults to the current time\n */\nexport function validateStartTime(control: AbstractControl, date: number, is_from?: number) {\n const now = new DateTZ({date: is_from});\n const parts = control.value.split(':');\n const date_obj = new DateTZ({date});\n return date_obj.setValue({ hour: +parts[0], minute: +parts[1] }).isBeforeDate(now) ? {\n start: HAS_ERROR,\n message: 'Booking time needs to be made in the future'\n } : null;\n}\n\nexport function buildValidateDuration(min: number = 30, max: number = 240) {\n return (c) => validateDuration(c, min, max);\n}\n\nexport function validateDuration(control: AbstractControl, min: number = 30, max: number = 240) {\n if (control.value < (min || 30)) {\n return { duration: HAS_ERROR, message: `Minimum booking duration is ${min} minute${min === 1 ? 's' : ''}` };\n } else if (control.value > (max || 480)) {\n return { length: HAS_ERROR, message: `Maximum booking duration is ${max} minute${max === 1 ? 's' : ''}` };\n }\n return null;\n}\n\nexport function buildValidateAttendees(host: User, min: number = 0) {\n return (c) => validateAttendees(c, host, min);\n}\n\nexport function validateAttendees(control: AbstractControl, host: User, min: number = 0) {\n if (!control || !(control.value instanceof Array)) {\n return min > 0\n ? { invalid: true, message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you` }\n : null;\n }\n const list: User[] = control.value;\n if (host) {\n const result = list.find(a => a.email === host.email);\n if (result) {\n list.splice(list.indexOf(result), 1);\n }\n }\n return list.length >= min ? null : {\n count: true,\n message: `Minimum of ${min} attendee${min === 1 ? ' is' : 's are'} required other than you`\n };\n}\n\nexport function validateEndTime(dateControlTz: AbstractControl) {\n return (control: AbstractControl) => {\n // const date = new DateTZ({date: date_control ? date_control.value : undefined})\n const now = DateNow(new Date())\n return dateControlTz.value.addValue({ minutes: control.value || 60 }).isBeforeDate(now)? { end_time: true } : null;\n };\n}\n\nexport function noWhitespaceValidator(control: AbstractControl) {\n const value = control?.value;\n if ( value === '') {\n return null; // Return null if control value is undefined or null\n }\n const isWhitespace = value.trim().length === 0;\n // const isValid = !isWhitespace;\n return !isWhitespace ? null : { whitespace: true };\n}\n\n","export * from './lib/date-tz.class'","import { DateObjectUnits, DateTime, DateTimeUnit, DurationLike, DurationUnits } from 'luxon';\nimport { getTimezoneOffset } from 'date-fns-tz';\n\nfunction padZero(value: number, length: number): string {\n let str = `${value}`;\n while (str.length < length) str = `0${str}`;\n return str;\n}\n\ninterface DateTZParams {\n date?: number | DateTime\n building_tz?: string\n is_local_tz?: boolean\n all_day?: boolean\n}\n\nconst now = new Date()\n\nexport class DateTZ {\n date: DateTime\n date_org: DateTime\n building_tz: string\n is_local_tz: boolean = true\n all_day: boolean\n local_tz: string\n valid: boolean\n\n constructor(data?: DateTZParams) { \n this.date_org = typeof data?.date === 'number' ? DateTime.fromMillis(data?.date) : data?.date ? data?.date : DateTime.fromMillis(now.valueOf())\n this.is_local_tz = data?.is_local_tz === false ? data?.is_local_tz : true\n this.all_day = data?.all_day || false\n this.local_tz = DateTime.now().zoneName\n this.building_tz = data?.building_tz || this.local_tz\n this.date = !this.is_local_tz ? this.date_org.setZone(this.building_tz) : this.date_org\n this.valid = this.date.isValid\n }\n\n //get epoch milliseconds\n public get ms(): number {\n return this.date.valueOf()\n }\n\n //get epoch seconds\n public get seconds(): number {\n return Math.trunc(this.date.toSeconds())\n }\n\n //get the second of the minute\n public get second(): number {\n return this.date.second\n }\n\n //get the minutes of the hour\n public get minutes(): number {\n return this.date.minute\n }\n\n //get the minutes of the hour\n public get hours(): number {\n return this.date.hour\n }\n\n public get utc(): number {\n const newDate = new DateTZ({...this, date: this.date.toUTC()})\n return newDate.seconds\n }\n\n public get dateDay(): number {\n return this.date.day\n }\n\n public get dateHour(): number {\n return this.date.hour\n }\n\n public get dateYear(): number {\n return this.date.year\n }\n\n public get dateWeekday(): number {\n try {\n return this.date.weekday;\n } catch (e) {\n return this.date.toJSDate().getDay();\n }\n }\n\n public get dateMonth(): number {\n return this.date.month\n }\n\n public dateDiff (compare_to: DateTZ, unit: DurationUnits, ans_unit = 'minutes'): number {\n return this.date.diff(compare_to.date, unit)[ans_unit]\n }\n\n //set the date to the begining of the given unit\n public startOfValue (unit: DateTimeUnit) {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 7) {\n // Don't change, we want sunday as the start of the week even though luxon thinks it is Monday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 1) {\n // If this.date is monday, just subtract one more day to make it Sunday\n const monday = new DateTZ({ ...this, date: this.date })\n newDate = monday.subtractValue({ days: 1 });\n } else {\n // If later than monday, startOfWeek back to monday and then subtact another day to get to Sunday.\n const monday = new DateTZ({...this, date: this.date.startOf(unit)})\n newDate = monday.subtractValue({ days: 1 })\n }\n }\n\n return newDate\n }\n\n //set the date to the end of the given unit\n public endOfValue (unit: DateTimeUnit) : DateTZ {\n // All the luxon start of values work as needed except for week\n let newDate = new DateTZ({...this, date: this.date.startOf(unit)})\n // Special week logic\n if (unit === 'week') {\n if (this.dateWeekday === 6) {\n // Don't change, we want saturday as the end of the week even though luxon thinks it is Sunday\n newDate = new DateTZ({ ...this, date: this.date })\n } else if (this.dateWeekday === 7) {\n // If this.date is Sunday, this alone is the luxon end of week so add a day\n // to get to monday, then endOfWeek to Sunday, and subtract 1 day to Saturday\n const sunday = new DateTZ({ ...this, date: this.date }).addValue({ days: 1 })\n newDate = sunday.endOfValue(unit).subtractValue({ days: 1 }); // return next saturday\n } else {\n // If not saturday or sunday\n // endOfWeek to Sunday and then subtact a day to get to Saturday.\n const later = new DateTZ({...this, date: this.date.endOf(unit)})\n newDate = later.subtractValue({ days: 1 })\n }\n } else {\n newDate = new DateTZ({...this, date: this.date.endOf(unit)})\n }\n\n return newDate\n }\n \n public startEpoch (): number {\n const org = new DateTZ({date: this.date_org})\n return this.all_day\n ? this.startOfValue('day').ms - this.dateDiff(org, 'minutes')\n : this.ms\n }\n\n //clone the given value and unit to the date\n public clone (): DateTZ {\n // return new DateTZ({...this})\n return this.addValue({ seconds: 0 })\n }\n\n //adds the given value and unit to the date\n public addValue (duration: DurationLike, isLastDayOfMonth?: boolean): DateTZ {\n return new DateTZ({...this, date: isLastDayOfMonth ? this.date.plus(duration).endOf('month') : this.date.plus(duration)});\n }\n\n //subtracts the given value and unit to the date\n public subtractValue (duration: DurationLike): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.minus(duration)})\n return newDate\n }\n\n public setValue (obj: DateObjectUnits): DateTZ {\n const newDate = new DateTZ({...this, date: this.date.set(obj)})\n return newDate\n }\n\n public formatDate (format: string): string {\n // Return new immuatable via \"plus\" to prevent \n // TypeError: Cannot assign to read only property 'weekData' of object\n // https://github.com/moment/luxon/issues/601\n return this.date.plus({ seconds: 0 }).toFormat(format)\n }\n\n public formatLocalDate (format: string): string {\n // setZone already returns new immutable so it doesn't have the formatDate issue.\n return this.date.plus({ seconds: 0 }).setZone(this.local_tz).toFormat(format)\n }\n\n public isSameDate(compare_to: DateTZ, value: DateTimeUnit): boolean {\n return this.date.hasSame(compare_to.date, value)\n }\n\n public isAfterDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear > compare_to.dateYear\n case 'month':\n if(this.isAfterDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth > compare_to.dateMonth\n }\n case 'day':\n if(this.isAfterDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay > compare_to.dateDay\n }\n case 'hour':\n if(this.isAfterDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour > compare_to.dateHour\n }\n case 'minute':\n if(this.isAfterDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes > compare_to.minutes\n }\n default:\n return this.ms > compare_to.ms;\n }\n }\n\n public isBeforeDate(compare_to: DateTZ, unit?: DateTimeUnit): boolean {\n switch (unit) {\n case 'year':\n return this.dateYear < compare_to.dateYear\n case 'month':\n if(this.isBeforeDate(compare_to, 'year')){\n return true\n }else if(!this.isSameDate(compare_to, 'year')){\n return false\n }else{\n return this.dateMonth < compare_to.dateMonth\n }\n case 'day':\n if(this.isBeforeDate(compare_to, 'month')){\n return true\n }else if(!this.isSameDate(compare_to, 'month')){\n return false\n }else{\n return this.dateDay < compare_to.dateDay\n }\n case 'hour':\n if(this.isBeforeDate(compare_to, 'day')){\n return true\n }else if(!this.isSameDate(compare_to, 'day')){\n return false\n }else{\n return this.dateHour < compare_to.dateHour\n }\n case 'minute':\n if(this.isBeforeDate(compare_to, 'hour')){\n return true\n }else if(!this.isSameDate(compare_to, 'hour')){\n return false\n }else{\n return this.minutes < compare_to.minutes\n }\n default:\n return this.ms < compare_to.ms;\n }\n }\n\n public toZone(tz: string): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: this.date.setZone(tz), \n building_tz: tz, \n is_local_tz: false\n })\n return newDate\n }\n\n public setTimestamp(timestamp: number): DateTZ {\n const newDate = new DateTZ({\n ...this, \n date: timestamp,\n })\n return newDate\n }\n\n public get JSDate(): Date {\n return this.date.toJSDate()\n }\n\n // helper to log out the dateTZ values\n public logDateTz (label: string = ''): void {\n console.log(`${label} local tz/date/time`, this.addValue({ seconds: 0 }).formatLocalDate(\"cccc d MMMM,yyyy h:mma\"), this.local_tz)\n console.log(`${label} building tz/date/time`, this.addValue({ seconds: 0 }).formatDate(\"cccc d MMMM,yyyy h:mma\"), this.building_tz)\n }\n}\n\nexport const DateNow = (date: Date = new Date()) => {\n return new DateTZ({date: date.valueOf()})\n} \n\n// input the local time and the building timezone\nexport const convertLocalTimestampToTimezonedDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const date = new Date(timestamp);\n return new DateTZ({ date: timestamp, building_tz: buildingTimezone, is_local_tz: false }).setValue({\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes()\n });\n}\n\n// input the building time and the building timezone\nexport const convertTimezonedTimestampToLocalDateTz = (timestamp: number, buildingTimezone: string): DateTZ => {\n const local_tz = DateTime.now().zoneName;\n const localOffset = getTimezoneOffset(local_tz, new Date(timestamp));\n const desiredOffset = getTimezoneOffset(buildingTimezone, new Date(timestamp));\n if (localOffset > desiredOffset) {\n const eleA = timestamp + (localOffset - desiredOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n } else {\n const eleA = timestamp + (desiredOffset - localOffset);\n return new DateTZ({date: eleA, building_tz: buildingTimezone, is_local_tz: false});\n }\n}\n\nexport const localTimezone = () => {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n}\n\nexport const getTimezoneOffsetString = (tz: string) => {\n const offset_minutes = Math.floor(getTimezoneOffset(tz) / 1000 / 60);\n const hours = Math.floor(offset_minutes/60);\n const minutes = offset_minutes % 60;\n return `${offset_minutes > 0 ? '+' : '-'}${padZero(Math.abs(hours), 2)}${padZero(minutes, 2)}`;\n}\n\nexport function toMiddayUTC(value: DateTZ = DateNow()) {\n // exclude Auckland from rouding up timezone as it has 12+ hours UTC timezone difference\n return value.building_tz.includes('Auckland') ? value : new DateTZ({\n date: value.setValue({ hour: 12, minute: 0 }).ms,\n is_local_tz: false,\n building_tz: 'UTC',\n }).setValue({ hour: 12, minute: 0 });\n}\n\n/**returns the offset between two timezones in minutes and hours */\nexport function timezoneOffset(tz: string){\n const nowTz = DateNow(new Date())\n const offset = nowTz.date.offset - nowTz.toZone(tz).date.offset\n return {minutes: offset, hours: offset/60}\n}\n\nexport function isToday (date, timezone) {\n\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: timezone\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: timezone,\n }),\n 'day'\n );\n}\n","export * from './lib/environment.module';\nexport * from './lib/version';\nexport * from './lib/environment.service'\nexport * from './lib/types'\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n providers: []\n})\nexport class EnvironmentModule {\n}\n","import {\n Inject,\n Injectable\n} from '@angular/core';\nimport { EnvironmentData } from './types';\n\nexport const ENVIRONMENT_TOKEN = 'environments_service_data';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EnvironmentService {\n\n public get production(): boolean {\n return this.environment.production;\n }\n\n public get heap_io_id(): number {\n return this.environment.heap_io_id;\n }\n\n constructor(@Inject(ENVIRONMENT_TOKEN) private environment: EnvironmentData) {\n }\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"dirty\": false,\n \"raw\": \"f96712b73\",\n \"hash\": \"f96712b73\",\n \"distance\": null,\n \"tag\": null,\n \"semver\": null,\n \"suffix\": \"f96712b73\",\n \"semverString\": null,\n \"version\": \"0.0.0\",\n \"time\": 1733977368186\n};\n/* tslint:enable */\n","export * from './lib/legacy-overlays.module';\nexport * from './lib/space-select-modal/space-select-modal.component';\nexport * from './lib/new-user-modal/new-user-modal.component';\nexport * from './lib/confirm-modal/confirm-modal.component';\nexport * from './lib/catering-confirm-modal/catering-confirm-modal.component';\nexport * from './lib/catering-details-modal/catering-details-modal.component';\nexport * from './lib/requirement-details-modal/requirement-details-modal.component';\nexport * from './lib/booking-confirm/booking-confirm.component';\nexport * from './lib/user-form/user-form.component'\nexport * from './lib/booking-form/booking-form.component'\nexport * from './lib/no-catering-modal/no-catering-modal.component'\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport { Router } from '@angular/router';\n\nimport {\n ApplicationService,\n Booking,\n BookingsService,\n BookingStateService,\n CateringOrder,\n getFirstDateFromList,\n OrganisationService,\n rulesForSpace,\n recurrenceDetails,\n SeriesAction,\n SettingsService,\n Space,\n SpacesService,\n User,\n UsersService,\n formatWhen,\n BOOKING_STATUS,\n CloseDialogService,\n DialogIds\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent,\n HashMap,\n humaniseDuration\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ConflictsModalComponent, ConflictsModalComponentData } from '@mckinsey-converge/ui';\n\n\nexport interface BookingConfirmModalData {\n old_booking: Booking;\n booking: Booking;\n action?: SeriesAction\n}\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n\n@Component({\n selector: 'a-booking-confirm-modal',\n templateUrl: './booking-confirm.component.html',\n styleUrls: ['./booking-confirm.component.scss']\n})\nexport class BookingConfirmComponent extends BaseDirective implements OnInit{\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for changes are being processed */\n public loading: string;\n /** Whether space availability is being checked */\n public checking_available: boolean;\n /** Whether to show all attendees */\n public show_attendees: boolean = false;\n /** Whether to show all locations */\n public show_locations: boolean;\n /** Whether to show all catering orders */\n public show_orders: boolean;\n /** Whether booking has succeeded */\n public success: boolean;\n /** Whether booking needs to be accepted */\n public readonly is_request: boolean;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n lastMomentConflict: boolean = false;\n \n @ViewChild('attendeesListRef') attendeesListRef: ElementRef;\n @ViewChild('locationsListRef') locationsListRef: ElementRef;\n @ViewChild('cateringListRef') cateringListRef: ElementRef;\n\n /** Booking to confirm changes to */\n public get old_booking(): Booking {\n return this._data.old_booking;\n }\n\n /** Booking to confirm changes to */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Active user */\n public get user(): User {\n return this._users.current;\n }\n\n /** Title of the displayed event */\n public get title(): string {\n return this.booking.title;\n }\n\n /** Comapny names */\n public get company(): string[] {\n return this.booking.company;\n }\n \n\n /** Display string of when the event will occur */\n public get when(): string {\n const duration_value = this.booking.duration;\n const all_day = this.booking.all_day && duration_value < 25 * 60;\n if(this.booking.is_recurrent && this.booking.recurrence_starts && this.booking.recurrence_starts.length){\n return formatWhen({all_day, ...this.recurrenceDates })\n }\n return formatWhen({\n all_day,\n startTZ: this.booking.startDateTz,\n endTZ: this.booking.endDateTz,\n displayEndTZ: this.booking.displayEndDateTz})\n }\n\n public get recurrenceDates(){\n const startTZ = getFirstDateFromList(this.booking.recurrence_starts)\n const endTZ = startTZ.addValue({minutes: this.booking.duration})\n return {startTZ, endTZ, displayEndTZ: endTZ}\n }\n\n /** Display string for the recurrence value of the booking */\n public get recurrence(): string {\n return recurrenceDetails({\n period: this.booking.recurrence_period,\n end: this.booking.recurrence_endTz,\n list: this.booking.recurrence_starts,\n interval: this.booking.recurrence_interval\n });\n }\n\n /** Display string for the event's duration */\n public get duration(): string {\n const duration_value = this.booking.duration;\n return this.booking.all_day ? 'All Day' : humaniseDuration(duration_value);\n }\n\n /** List of spaces associated with the event */\n public get spaces(): Space[] {\n return this.booking.multi_rooms;\n }\n\n /** List of attendees associated with the event not including the host */\n public get attendees(): User[] {\n const attendees = this.booking.attendees;\n return attendees.filter((i) => i.email !== this.organiser.email);\n }\n\n /** Host of the event */\n public get organiser(): User {\n return this.booking.organiser || this._users.current;\n }\n\n /** Host of the event */\n public get equipment_codes(): HashMap {\n return this.booking.equipment_codes || {};\n }\n\n /** Host of the event */\n public get catering_codes(): HashMap {\n const catering = this.catering;\n const codes = {};\n for (const order of this.catering) {\n codes[order.location_id] = order.charge_code;\n }\n return codes;\n }\n\n /** Host of the event */\n public get equipment_notes(): HashMap {\n return this.booking.notes\n .filter((note) => note.type === 'equipment')\n .reduce((map, notes) => {\n map[notes.space] = notes.message;\n return map;\n }, {});\n }\n\n /** Details about the event */\n public get notes(): string {\n return this.booking.body;\n }\n\n /** List of catering orders in the booking */\n public get catering(): CateringOrder[] {\n return (this.booking.catering || []).map((order) => {\n const space: any = this.spaces.find(\n (a_space) => a_space.email === order.location_id\n ) || {\n level: {}\n };\n const building: any =\n this._org.buildings.find((bld) => bld.id === space.level.building_id) || {};\n return new CateringOrder({\n ...order,\n location: space.local_name,\n symbol: building.currency,\n booking_date: this.booking.startDateTz.ms,\n booking_timezone: this.booking.timezone,\n });\n });\n }\n\n /** Map of changes to the booking */\n public get changes(): HashMap {\n return {};\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _org: OrganisationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private _router: Router,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingConfirmModalData,\n public settings: SettingsService,\n private closeDialogService: CloseDialogService, \n private renderer: Renderer2,\n ) {\n super();\n this.booking.time_changed =\n this.old_booking &&\n (this.old_booking.startDateTz.ms !== this.booking.startDateTz.ms ||\n this.old_booking.duration !== this.booking.duration);\n // in concierge, all bookings are acceptable without explicit approval.\n\n const rules = rulesForSpace({ user: this.user, space: this.booking.room, duration: 60 });\n this.is_request = this.settings.concierge ? false : rules.auto_approve;\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined; \n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && (booker_concierge !== null && booker_concierge !==undefined ) && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && (booker_concierge['email'] && organiser.email !==booker_concierge['email']) ) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n /**\n * Save booking changes\n */\n public saveChanges() {\n this.loading = 'Checking availability of selected spaces';\n this._dialog_ref.disableClose = true;\n this.checkSpaceAvailability().then(\n () => {\n this.loading = 'Processing booking request...';\n // Change the unchanged settings to the selected room\n const newEmail = this.booking.space.email;\n const replaceObjects = ['setup', 'breakdown', 'approval_status']\n replaceObjects.forEach(key => {\n const obj = this.booking[key];\n if (obj && obj.constructor === Object) {\n const keys = Object.keys(obj);\n if (keys.length > 0) {\n const replacement = {};\n keys.forEach(nk => {\n replacement[newEmail] = obj[nk];\n })\n this.booking[key] = replacement;\n }\n }\n });\n\n const buffer = {};\n this.booking.multi_rooms.map(room => room.email).forEach(elem => buffer[elem] = 900);\n\n // // if no setup or breakdown time already added and notes or catering exist? add 15 min buffer setup and breakdown to booking\n // if(this.booking.setup === null || this.booking.breakdown === null){\n // const has_note_buffer = (this.booking.notes && this.booking.notes?.length) || (this.booking.catering && this.booking.catering?.length) ? \n // buffer : null; // 900 seconds = 15 min\n // if (has_note_buffer) {\n // this.booking.setup = has_note_buffer;\n // this.booking.breakdown = has_note_buffer; \n // this.booking.room_setup = has_note_buffer; \n // this.booking.room_breakdown = has_note_buffer; \n // }\n // }\n\n // if no setup time already added and notes or catering exist? add 15 min buffer setup time to booking\n if (this.booking.setup === null || this.booking.setup === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.setup = has_note_buffer;\n this.booking.room_setup = has_note_buffer;\n }\n }\n\n // if no breakdown time already added and notes or catering exist? add 15 min buffer breakdown time to booking\n if (this.booking.breakdown === null || this.booking.breakdown === undefined) {\n const has_note_buffer = (this.booking.notes && this.booking.notes.length) || \n (this.booking.catering && this.booking.catering.length) ? \n buffer : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n this.booking.breakdown = has_note_buffer;\n this.booking.room_breakdown = has_note_buffer;\n }\n }\n\n\n this._bookings.save(this.booking, this._data.action === SeriesAction.EDIT).then(\n async (bkn) => {\n this.loading = null;\n this.success = true;\n this._dialog_ref.disableClose = false;\n const updated = new Booking({ ...this.booking, ...bkn.toApiJSON() });\n this._booking_state_service.replace(updated);\n \n /**\n * update the master booking in case of recurring to have latest updated in the system\n */\n if(updated.recurrence_master_id !== null)\n { \n const master_booking = await this._bookings.show(updated.recurrence_master_id);\n this._booking_state_service.replace(master_booking);\n }\n\n if (bkn.is_recurrent && bkn.recurrence_type === 'master') {\n this._booking_state_service.pollOnce();\n this.closeDialogService.closeDialog(DialogIds.MeetingDetails);\n }\n\n localStorage.removeItem('ACA_STAFF.booking_form_data');\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess(\n `Successfully ${this.booking.id ? 'updated' : 'created'} booking`\n );\n },\n (err) => {\n\n this._dialog_ref.disableClose = false;\n let erroMessage: string = '';\n switch(err.status){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 400:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, the booking cannot be finalized because the current time has exceeded the scheduled start time for this booking. Please try again.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.lastMomentConflict = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n },\n (err) => {\n\n this.lastMomentConflict = true;\n this._dialog_ref.disableClose = false;\n const erroMessage = 'Apologies, this room has been booked recently by another user, please try another one.';\n this.loading = erroMessage;\n this._service.notifyError(\n `Error ${this.booking.id ? 'updating' : 'creating'} booking: ${erroMessage}`\n );\n setTimeout(()=> {\n this.loading = null;\n this.event.emit({ reason: 'last-moment-conflict' });\n }, 4000) ;\n }\n );\n }\n\n /**\n * Staff only\n */\n public newBooking() {\n this._router.navigate(['/book', 'spaces']);\n this._dialog_ref.close();\n }\n\n /**\n * Staff only\n */\n public toSchedule() {\n this._router.navigate(['/schedule'], {\n queryParams: { email: this.booking.organiser.email }\n });\n this._dialog_ref.close();\n }\n\n /**\n * Check whether the selected spaces are available for the selected time period\n */\n public checkSpaceAvailability(): Promise {\n const spaces: Space[] = this.spaces;\n if (\n (this.booking.id &&\n (this.booking.startDateTz.ms === this.old_booking.startDateTz.ms &&\n this.booking.duration === this.old_booking.duration)) ||\n (spaces && spaces.length <= 0)\n ) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n // Use of this.booking.timezone is unreliable, use booking space instead.\n const all_day = this.booking.all_day;\n // R--- should be nothing to do with date as a timestamp getter\n this._spaces\n .available({\n room_ids: spaces.map((space) => space.id).join(','),\n dateTz: this.booking.startDateTz,\n duration: all_day ? 24 * 60 : this.booking.duration,\n ignore: this.booking.icaluid,\n recurrence_count: this.booking.recurrence_count,\n recurrence_period: this.booking.recurrence_period,\n recurrence_endTz: this.booking.recurrence_endTz,\n recurrence_interval: this.booking.recurrence_interval,\n recurrence_starts: this.booking.recurrence_starts,\n is_recurrent: this.booking.is_recurrent,\n recurrence_days: this.booking.recurrence_days\n })\n .then(\n (space_list) => {\n for (const space of space_list) {\n if (!space.bookable) {\n this.lastMomentConflict = true;\n return reject(\n `${space.name} is not available at the select time period.`\n );\n }\n }\n if (space_list.length < spaces.length) {\n this.lastMomentConflict = true;\n return reject(\n `${spaces[0].name} is not available at the select time period.`\n );\n }\n resolve();\n },\n (err) => reject(err)\n );\n });\n }\n\n public openConflictsModal(){\n const ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.booking.local_room_name,\n conflicts: this.booking.recurrence_exceptions,\n copy_conflicts: true,\n timezone: this.booking.timezone\n }\n });\n\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(event.reason === 'close'){\n ref.close();\n }else if(event.reason === 'action'){\n navigator.clipboard.writeText(this.conflictsText)\n }\n \n })\n );\n ref.afterClosed().subscribe(() => this.unsub('modal_events'));\n }\n\n public get conflictsText(){\n let text = ''\n this.booking.recurrence_exceptions.map((date)=>{\n const dateTZ = new DateTZ({date: date*1000});\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n text = `${text}\\n${display}${dateTZ.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n })\n return text\n }\n\n public toggleList(listType: 'attendees' | 'locations' | 'catering') {\n if (listType === 'attendees') {\n this.show_attendees ? this.collapseList(this.attendeesListRef) : this.expandList(this.attendeesListRef);\n this.show_attendees = !this.show_attendees;\n } else if (listType === 'locations') {\n this.show_locations ? this.collapseList(this.locationsListRef) : this.expandList(this.locationsListRef);\n this.show_locations = !this.show_locations;\n } else if (listType === 'catering') {\n this.show_orders ? this.collapseList(this.cateringListRef) : this.expandList(this.cateringListRef);\n this.show_orders = !this.show_orders;\n }\n }\n\n public expandList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n const listItems = listElement.getElementsByClassName('list-item');\n let totalHeight = 0;\n\n for (let i = 0; i < listItems.length; i++) {\n totalHeight += listItems[i].offsetHeight;\n }\n\n this.renderer.setStyle(listElement, 'max-height', `${totalHeight}px`);\n this.renderer.addClass(listElement, 'shown');\n }\n\n public collapseList(listRef: ElementRef) {\n const listElement = listRef.nativeElement;\n this.renderer.setStyle(listElement, 'max-height', '4.5em');\n this.renderer.removeClass(listElement, 'shown');\n }\n}\n","\n
\n \n
\n \n
\n Booking Details\n Confirmed!\n Requested!\n
\n
Please await confirmation of room
\n
\n
\n \n
{{ title || 'No title' }}
\n
\n
\n \n
{{ when }}
\n
\n
\n \n
{{ recurrence }}
\n 0\"\n (click)=\"openConflictsModal()\"\n >\n Conflicts\n
\n \n
\n \n
{{ duration }}
\n
\n
\n Locations({{ spaces.length || '0' }})*:\n
\n
\n
\n
{{ item?.local_name }}
\n \n Notes\n
\n \n Code\n
\n
\n
No Locations
\n
\n 1\"\n (click)=\"toggleList('locations')\"\n >\n {{ show_locations ? 'Hide' : 'Show more' }} Locations\n \n \n \n
\n \n
{{ organiser?.name || organiser?.email }}
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n
\n\n
\n \n \n \n \n
\n
\n\n
\n
\n
\n \n
\n
\n {{ loading }}\n
\n
\n
\n
\n\n \n \n \n
My Day\n \n\n","import {\n Component,\n Input,\n OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Output, EventEmitter \n} from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { distinctUntilChanged, first, skip } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n arrayWithValues,\n BookingAction,\n CateringOrder,\n SeriesAction,\n SettingsService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\n\nimport { NewUserModalComponent } from '../new-user-modal/new-user-modal.component';\nimport {\n SpaceSelectModalComponent,\n SpaceSelectModalData\n} from '../space-select-modal/space-select-modal.component';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\nimport { MatChipsModule} from '@angular/material/chips';\n\n\n@Component({\n selector: 'a-booking-form',\n templateUrl: './booking-form.component.html',\n styleUrls: ['./booking-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BookingFormComponent extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** List of available users to host bookings */\n public user_list: User[] = [];\n public nowTz: DateTZ = DateNow(new Date());\n /** From date input for date field */\n public fromDateTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n /** Last bookable date, concierge only */\n public readonly untilDateTz = DateNow(new Date()).addValue({ days: 365 }).endOfValue('day');\n public isConcierge: boolean;\n public localTimezone = DateNow(new Date()).building_tz;\n public localStart = \"\";\n public localEnd = \"\";\n // Define an array to store selected company options\n public chipOptions: any[] = [];\n public showTimeCateringWarning: boolean = false;\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _dialog: MatDialog,\n private settingsService: SettingsService,\n private cdRef: ChangeDetectorRef\n ) {\n super();\n this.isConcierge = this.settingsService.concierge;\n }\n\n public ngOnInit(): void {\n // Trim title \n // this.form.get('title').setValue(this.form.get('title').value.trim());\n\n this.chipOptions = [...this.form.controls.company.value];\n\n this.localTimezone = DateNow(new Date()).building_tz;\n const building_tz = (\n this.form.controls.action &&\n (\n this.form.controls.action.value === 'booking_clone' ||\n this.form.controls.action.value === 'clone' ||\n this.form.controls.action.value === 'edit' ||\n this.form.controls.action.value === 'booking_edit'\n ) &&\n this.form.controls.dateTz &&\n this.form.controls.dateTz.value\n ) ? this.form.controls.dateTz.value.building_tz : this.localTimezone;\n\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz });\n this.fromDateTz = closestToTimeSlotTz(this.nowTz, 15);\n\n this._users.initialised.pipe(first((_) => _)).subscribe(() => {\n const user: User = this._users.current;\n const delegates = user.delegates.map(\n (del) => this._users.find(del.email) || new User({ email: del.email, name: del.email.split('@')[0] })\n );\n this.user_list = [user].concat(delegates);\n });\n\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n this.subscription('formChanges', this.form.valueChanges\n .pipe(\n skip(1), // initial form changes\n distinctUntilChanged())\n .subscribe(() => {\n this.timeout('update_coachmark', () => {\n this.updateCoachmarkTimes(this.form.controls.timezone.value);\n }, 500);\n })\n );\n\n this.subscription('isRecurrentChanges', this.form.controls.is_recurrent.valueChanges\n .subscribe(() => {\n const recurrenceStarts = this.form.controls.recurrence_starts\n if(!this.form.controls.is_recurrent.value){\n recurrenceStarts.clearValidators() \n }else{\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n recurrenceStarts.setValidators(arrayValidators);\n }\n recurrenceStarts.updateValueAndValidity()\n })\n ); \n\n /**Disable Inputs */\n this.disableInputs();\n\n /**turn is_recurrent to false if editing or cloning a stand-alone/occurrence */\n if(this.form.controls.id?.value && !this.form.controls.action?.value){\n this.form.controls.is_recurrent.setValue(false)\n }\n\n // Subscribe to changes in dateTz, duration, and has_catering\n this.subscription('dateTz_changes', this.form.controls.dateTz.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n this.subscription('duration_changes', this.form.controls.duration.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // No need to subscribe to catering_changes since we're now handling has_catering\n this.subscription('has_catering_changes', this.form.controls.has_catering.valueChanges.subscribe(() => {\n this.checkTimeCateringWarning();\n }));\n\n // Initial check\n this.checkTimeCateringWarning();\n}\n\n /**\n * \n * @param key : formcontrol name \n * Function trim value being submitted with only spaces/beginning/end \n */\n public trim(key: string): void {\n this.form.get(key).setValue(this.form.get(key).value.trim());\n }\n\n /** Whether notes and description should use the HTML editor */\n public get use_html(): boolean {\n return this._service.setting('app.booking.html_body') || false;\n }\n\n /** List of available types for bookings */\n public get booking_types(): Identity[] {\n return this._service.setting('app.booking.booking_types') || [];\n }\n\n /** Display string for the list of active spaces */\n public get spaces(): string {\n const spaces = this.form.controls.space_list.value;\n return spaces.length === 1\n ? spaces[0].local_name\n : spaces.length > 1\n ? `${spaces.length} spaces selected`\n : 'No Spaces selected';\n }\n\n public disableInputs() {\n const { id, action, needs_space, is_recurrent } = this.form.value;\n const has_id = !!id;\n const is_edit = action === BookingAction.EDIT;\n if (has_id) {\n this.form.get('is_recurrent')?.disable();\n }\n\n if(is_edit){\n this.form.get('is_multiroom')?.disable();\n }\n\n if (!this.isConcierge && !needs_space) {\n this.form.get('has_catering')?.disable();\n }\n if(has_id && is_edit && is_recurrent){\n this.form.get('dateTz')?.disable()\n this.form.patchValue({ action: null });\n }\n }\n\n /**\n * Open modal to change the space details for the booking\n */\n public openSpacesModal(): void {\n const ref = this._dialog.open(\n SpaceSelectModalComponent,\n {\n width: 'auto',\n height: 'auto',\n maxWidth: '95vw',\n data: {\n spaces: this.form.controls.space_list.value,\n dateTz: this.form.controls.dateTz.value,\n duration: this.form.controls.duration.value,\n host: this.form.controls.organiser.value,\n multiple: true,\n needsCatering: !!this.form.controls.catering?.value?.length,\n }\n }\n );\n this.subscription(\n 'new_spaces',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n let space_list = this.form.controls.space_list.value;\n space_list = event.metadata;\n this.form.controls.space_list.setValue(unique(space_list, 'id'));\n if (event.noCatering) {\n // Set has_catering to false and clear the catering list\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n } else {\n const catering = this.form.controls?.catering?.value.map((order: CateringOrder) => {\n order.location = space_list[0].name;\n order.location_id = space_list[0].email;\n return order;\n });\n this.form.controls.catering?.setValue(catering || []);\n }\n ref.close();\n this.unsub('new_spaces');\n }\n if (event.reason === 'close') {\n ref.close();\n this.unsub('new_spaces');\n }\n })\n );\n }\n\n /**\n * Open modal to change the recurrence details for the booking\n */\n public openNewUserModal() {\n const ref = this._dialog.open(NewUserModalComponent, {\n width: 'auto',\n height: 'auto'\n });\n this.subscription(\n 'new_user',\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const attendees = this.form.controls.attendees?.value;\n attendees.push(event.metadata);\n this.form.controls.attendees.setValue(unique(attendees, 'email'));\n ref.close();\n this.unsub('new_user');\n this.cdRef.detectChanges();\n }\n })\n );\n }\n\n // Add & Remove chip and set the value of the form control accordingly\n addCompany(event, company): void {\n if (company) {\n this.chipOptions.push(company);\n this.form.controls.company.setValue(this.chipOptions);\n }\n event.preventDefault();\n }\n\n removeOption(option: any): void {\n const index = this.chipOptions.indexOf(option);\n if (index >= 0) {\n this.chipOptions.splice(index, 1);\n }\n this.form.controls.company.setValue(this.chipOptions);\n }\n\n private updateCoachmarkTimes(timezone: string) {\n if (!timezone) timezone = this.localTimezone;\n // Resolve the problem that locally I might have the same TZ offset but the names don't match.\n const localTzOffset = DateTime.now().setZone(this.localTimezone).offset;\n const buildingTzOffset = DateTime.now().setZone(timezone).offset;\n const dateTz = this.form.controls.dateTz.value;\n if (dateTz && localTzOffset !== buildingTzOffset) {\n const startDate = dateTz.clone();\n this.localStart = startDate.formatLocalDate(\"h:mma\");\n this.localEnd = startDate.addValue({ minutes: this.form.value.duration }).formatLocalDate(\"h:mma\");\n } else {\n // No location is selected so coachmark is hidden\n this.localStart = \"\";\n this.localEnd = \"\";\n }\n this.cdRef.detectChanges();\n }\n\n public get isSeriesAction(){\n return this.form.value.action === SeriesAction.CLONE || this.form.value.action === SeriesAction.EDIT\n }\n\n onToggleChange(toggledControlName: string, is_multiroom: boolean): void {\n if (toggledControlName === 'is_recurrent') {\n // If the is_recurrent toggle is being activated, deactivate is_multiroom\n if (this.form.controls.is_recurrent?.value) {\n this.form.controls.is_multiroom?.setValue(false);\n this.form.controls.merged?.setValue(false);\n this.form.get('merged')?.disable();\n\n }\n } else if (toggledControlName === 'is_multiroom') {\n // If the is_multiroom toggle is being activated, deactivate is_recurrent\n if (this.form.controls.is_multiroom?.value) {\n this.form.controls.is_recurrent?.setValue(false);\n }\n if(is_multiroom) { \n this.form.get('merged').setValue(false);\n this.form.get('merged')?.enable() \n } else {\n this.form.get('merged').setValue(false); \n this.form.get('merged')?.disable(); }\n }\n }\n \n private checkTimeCateringWarning() {\n const dateTz = this.form.controls.dateTz.value;\n const duration = this.form.controls.duration.value;\n const hasCatering = this.form.controls.has_catering?.value;\n const cateringOrders = this.form.controls.catering?.value;\n \n if (dateTz && duration && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n\n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n\n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n // Booking is outside of catering hours and has catering selected\n this.showTimeCateringWarning = true;\n } else {\n this.showTimeCateringWarning = false;\n }\n } else {\n this.showTimeCateringWarning = false;\n }\n\n // Inform Angular that the component needs to be checked\n this.cdRef.markForCheck();\n }\n\n}\n","
\n \n \n \n
\n
\n \n Title*:\n \n \n \n\n \n {{ ( form?.get('title').errors && form?.get('title').hasError('pattern')) \n ? 'Some special characters (^=`~!@#$%*{};:\\'_\\\",.\\<>) are not allowed' : 'Title is required'}} \n \n \n
\n\n
\n \n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n
\n \n \n
\n Date and time must be in the future\n
\n
\n
\n
\n \n \n
\n \n
\n Duration is invalid. End time must be in the future\n
\n
\n
\n
\n Please be aware that this booking starts at {{localStart}} and ends at {{localEnd}} in your local timezone.\n
\n
\n Warning: Changing the booking time outside of catering hours will drop your catering order.\n
\n
\n
\n
\n
\n Recurring booking\n
\n \n
\n Multiroom\n
\n
\n \n
\n
Merged
\n
\n \n
\n
\n \n \n
\n \n \n \n \n \n {{ user.name || user.email }}\n \n \n \n
\n
\n \n \n \n {{ form?.get('attendees').errors?.customError }}\n \n
\n
\n \n
\n \n
\n \n
\n \n \n {{ ( form?.get('company').errors && form?.get('company').hasError('pattern'))\n ? 'Some special characters (^=`~@#$%*{};:_\\\",.\\<>) are not allowed' : ''}}\n \n
\n \n
\n \n \n {{ selected }}\n
\n
\n
\n
\n\n
1\">\n \n \n \n \n {{ type.name }}\n \n \n \n
\n
\n Need a meeting space?\n \n
\n
\n \n \n Need catering?\n \n
\n
\n \n \n \n \n \n \n \n
\n\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\nimport {\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringItem,\n OrganisationService,\n Space,\n SpacesService\n} from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringConfirmModalData {\n all_day: boolean;\n form: FormGroup;\n dateTz: DateTZ;\n}\n\n@Component({\n selector: 'a-catering-confirm-modal',\n templateUrl: './catering-confirm-modal.component.html',\n styleUrls: ['./catering-confirm-modal.component.scss']\n})\nexport class BookingCateringConfirmModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n /** List of selected items for the order */\n public item_list: CateringItem[] = [];\n\n /** Space selected for delivery */\n public get space(): Space {\n return this._spaces.find(this._data.form?.controls?.location_id?.value);\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n let date = this._data.dateTz;\n if (this._data.form && this._data.form.controls.delivery_time) {\n date = date.addValue({ minutes: this._data.form.controls.delivery_time.value });\n }\n return date.formatDate('h:mma').toLocaleLowerCase();\n }\n\n /** Form field for order items */\n public get item_field(): FormControl {\n return this._data.form.controls.items as any;\n }\n\n /** Total cost of the order */\n public get order_cost(): number {\n return this.item_list.reduce((amount, item) => {\n const price = item.price\n return amount + item.amount * price\n }, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n /* istanbul ignore else */\n if (!this.space || !this.space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find(\n (bld) => bld.id === this.space.level.building_id\n ) || { currency: 'USD' };\n return building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringConfirmModalData\n ) {\n super();\n if (!this._data.form) {\n this._service.notifyError('No form data for order');\n this._dialog_ref.close();\n }\n }\n\n public ngOnInit(): void {\n /* istanbul ignore else */\n if (this._data.form.controls.items) {\n this.subscription(\n 'item_list',\n this._data.form.controls.items.valueChanges.subscribe((items) => {\n /* istanbul ignore else */\n if (!items || items.length <= 0) {\n this._dialog_ref.close();\n }\n })\n );\n }\n this.item_list = this._data.form.controls.items.value.map((item) => new CateringItem(item.toJSON()));\n }\n}\n","
\n
Confirm Catering Order
\n \n
\n\n
\n
\n Delivering to {{ space?.local_name || space?.simple_name || space?.settings?.room_name }} at {{ delivery_time }}\n
\n
\n \n
\n
\n \n
{{ order_cost / 100 | currency:symbol }}
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n OrganisationService,\n BookingNote,\n CateringOrder,\n Space,\n UsersService,\n CateringNotesService,\n Booking\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface CateringDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n catering: AbstractControl;\n booking: Booking\n}\n\n@Component({\n selector: 'a-catering-details-modal',\n templateUrl: './catering-details-modal.component.html',\n styleUrls: ['./catering-details-modal.component.scss']\n})\nexport class CateringDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: HashMap = {};\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return (this._data.spaces || []).filter((space) =>\n this._data.catering.value.find((order) => order.location_id === space.email)\n );\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.pattern || this.active_form.controls.code.errors?.minlength;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n return this.space_list.reduce(\n (valid, space) => valid && this.form[space.email].valid,\n true\n );\n }\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _cateringNotesService: CateringNotesService,\n @Inject(MAT_DIALOG_DATA) private _data: CateringDetailsModalData\n ) {\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type === 'catering'\n );\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = this._data.catering.value.reduce((map, order: CateringOrder) => {\n map[order.location_id] = order.charge_code;\n return map;\n }, {});\n this.generateFormFields();\n }\n\n public submit(): void {\n this.space_list.forEach((space) => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes\n const notes = this._data.notes_field.value.filter(\n (note: BookingNote) => note.type !== 'catering'\n );\n const new_notes = this.space_list.map(\n (space) =>\n ({\n author: this._data.booking.booked_by ? this._data.booking.booked_by['name'] : this._users.current.name,\n type: 'catering',\n message: this.form[space.email].controls.notes.value,\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote)\n );\n this._cateringNotesService.setNotes(new_notes);\n this._data.notes_field.setValue(notes.concat(new_notes).filter((note) => note.message));\n // Save the notes\n const orders = this._data.catering.value.map(\n (order) =>\n new CateringOrder({\n ...order,\n charge_code: this.form[order.location_id]\n ? this.form[order.location_id].controls.code.value\n : ''\n })\n );\n\n this._data.catering.setValue(orders);\n // This should go to the next\n this.event.emit({ reason: 'done' });\n } else {\n this._scrollToBottom();\n }\n }\n\n /** Generate form fields for each space */\n private generateFormFields(): void {\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space.level.building_id\n );\n \n this.needs_charge_code[space.email] = space?.filters?.charge_code || space?.settings?.charge_code || false;\n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(this.codes[space.email] || '',\n this.needs_charge_code[space.email] ?\n [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4), Validators.required ] : [Validators.pattern(/^[a-zA-Z0-9]{4,}$/), Validators.minLength(4)])\n });\n }\n }\n\n /** Scroll the content container to the bottom */\n private _scrollToBottom(): void {\n this._content_el?.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n}\n","
\n
\n \n \n \n
\n \n
\n\n
\n
\n \n
Please specify any allergies or gluten intolerances
\n
\n
\n
\n \n \n \n \n
\n
\n \n Charge Code\n *\n \n \n \n \n Note: Your booking will be confirmed before you are charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef\n} from '@angular/material/dialog';\n\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\nexport interface ConfirmModalData {\n /** Title of the modal */\n title: string;\n /** Contents of the modal */\n content: string;\n /** Text displaed on the confirmation button */\n action?: string;\n /** Icon to display on the modal */\n icon: ApplicationIcon;\n}\n\nexport const CONFIRM_METADATA = {\n height: 'auto',\n width: '24em',\n maxHeight: 'calc(100vh - 2em)',\n maxWidth: 'calc(100vw - 2em)'\n};\n\n@Component({\n selector: 'confirm-modal',\n templateUrl: './confirm-modal.component.html',\n styleUrls: ['./confirm-modal.component.scss']\n})\nexport class ConfirmModalComponent extends BaseDirective {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: string;\n\n /** Title of the confirm modal */\n public get title(): string {\n return (this._data ? this._data.title : null) || 'Confirm';\n }\n\n /** Body of the confirm modal */\n public get content(): string {\n return (this._data ? this._data.content : null) || 'Are you sure?';\n }\n\n /** Display text on the confirm button */\n public get action(): string {\n return (this._data ? this._data.action : null) || 'Ok';\n }\n\n /** Display icon properties */\n public get icon(): ApplicationIcon {\n return (this._data ? this._data.icon : null) || null;\n }\n\n constructor(\n private _dialog: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: ConfirmModalData\n ) {\n super();\n }\n\n /**\n * User confirmation of the content of the modal\n */\n public accept() {\n this.event.emit({ reason: 'done' });\n }\n}\n","
\n

{{ title || 'Confirm' }}

\n
\n\n
\n \n
\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { SpaceSelectModalComponent } from './space-select-modal/space-select-modal.component';\nimport { NewUserModalComponent } from './new-user-modal/new-user-modal.component';\nimport { ConfirmModalComponent } from './confirm-modal/confirm-modal.component';\nimport { NoCateringModalComponent } from './no-catering-modal/no-catering-modal.component';\nimport { BookingCateringConfirmModalComponent } from './catering-confirm-modal/catering-confirm-modal.component';\nimport { CateringDetailsModalComponent } from './catering-details-modal/catering-details-modal.component';\nimport { RequirementDetailsModalComponent } from './requirement-details-modal/requirement-details-modal.component';\nimport { BookingConfirmComponent } from './booking-confirm/booking-confirm.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UserFormComponent } from './user-form/user-form.component';\nimport { BookingFormComponent } from './booking-form/booking-form.component';\nimport { EditorModule } from '@tinymce/tinymce-angular';\n\nconst DECLARATIONS = [\n SpaceSelectModalComponent,\n NewUserModalComponent,\n ConfirmModalComponent,\n NoCateringModalComponent,\n BookingCateringConfirmModalComponent,\n CateringDetailsModalComponent,\n RequirementDetailsModalComponent,\n BookingConfirmComponent,\n UserFormComponent,\n BookingFormComponent,\n];\n\n@NgModule({\n imports: [\n LegacyUiModule,\n FormsModule,\n ReactiveFormsModule,\n CommonModule,\n UiModule,\n BaseModule,\n EditorModule,\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ...DECLARATIONS,\n BaseModule\n ]\n})\nexport class LegacyOverlaysModule {\n}\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { BaseDirective, DialogEvent } from '@mckinsey-converge/base';\nimport { generateUserForm, User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'new-user-modal',\n templateUrl: './new-user-modal.component.html',\n styleUrls: ['./new-user-modal.component.scss'],\n})\nexport class NewUserModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for the new user */\n public form: FormGroup;\n /** New user data store */\n public user: User;\n /** Whether user details are being saved */\n public loading: boolean;\n\n public ngOnInit(): void {\n this.user = new User();\n this.form = generateUserForm(this.user);\n }\n\n public saveChanges() {\n this.form.markAllAsTouched();\n if (this.form.valid) {\n if (!this.form.controls.email.value) {\n this.form.controls.email.setValue(\n `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`\n );\n }\n const firstName = this.form.value.first_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n const lastName = this.form.value.last_name.split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n \n const new_user = new User({\n ...this.form.value,\n name: `${firstName} ${lastName}`,\n type: 'external',\n external: true,\n visitor: true,\n });\n this.event.emit({ reason: 'done', metadata: new_user });\n }\n }\n}\n","
\n

Add External Attendee

\n \n
\n
\n \n
\n
\n \n \n
\n\n
\n
\n
\n \n
\n
\n Saving attendee...\n
\n
\n
\n
\n\n","import {\n Component,\n Output,\n EventEmitter\n} from '@angular/core';\nimport {\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n BaseDirective,\n DialogEvent\n} from '@mckinsey-converge/base';\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'no-catering-modal',\n templateUrl: './no-catering-modal.component.html',\n styleUrls: ['./no-catering-modal.component.scss']\n})\nexport class NoCateringModalComponent extends BaseDirective {\n constructor(\n private _dialog_ref: MatDialogRef,\n ) {\n super();\n }\n\n // /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n\n // Submit the Survey in it's current state.\n public confirm() {\n this.event.emit({ reason: 'done', noCatering: true });\n this._dialog_ref.close();\n }\n\n // Close the modal\n public cancel() {\n this.event.emit({ reason: 'close' });\n this._dialog_ref.close();\n }\n}\n","
\n \n
\n
\n
\n \n

Catering is not available for your new room selection. \n
Are you sure you want to drop order and change rooms?

\n
\n
\n \n \n \n
\n
\n
","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n Validators\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n BookingNote,\n OrganisationService,\n SettingsService,\n Space,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\n\nimport { DateNow } from '@mckinsey-converge/date-tz';\n\n\nexport interface RequirementDetailsModalData {\n spaces: Space[];\n notes_field: AbstractControl;\n codes_field: AbstractControl;\n head_counts_field: AbstractControl;\n standalone?: boolean;\n}\n\n@Component({\n selector: 'a-requirement-details-modal',\n templateUrl: './requirement-details-modal.component.html',\n styleUrls: ['./requirement-details-modal.component.scss']\n})\nexport class RequirementDetailsModalComponent implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n /** Mapping of spaces to notes */\n public notes: HashMap = {};\n /** Mapping of spaces to cost codes */\n public codes: HashMap = {};\n /** Mapping of spaces to estimated head count */\n public head_counts: HashMap = {};\n /** Mapping of spaces to form fields */\n public form: HashMap = {};\n /** Map of spaces to whether they need a charge code */\n public needs_charge_code: boolean;\n /** Index of the active space */\n public active_space: number = 0;\n\n @ViewChild('content', { static: true }) private _content_el: ElementRef;\n\n /** List of selected spaces */\n public get space_list(): Space[] {\n return this._data.spaces;\n }\n\n public get has_recurrence(): boolean {\n return false\n }\n\n public get active_form(): FormGroup {\n return this.form[this.space_list[this.active_space].email];\n }\n\n public get invalid_charge_code(): boolean {\n return this.active_form.controls.code.errors?.minlength || this.active_form.controls.code.errors?.pattern;\n }\n\n /** Whether form fields are valid */\n public get is_valid(): boolean {\n // return this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n return this.space_list.length > 0 && this.space_list.reduce((valid, space) => valid && this.form[space.email].valid, true);\n }\n\n public isConcierge: boolean;\n public frontend: string;\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n @Inject(MAT_DIALOG_DATA) private _data: RequirementDetailsModalData,\n private _settings: SettingsService,\n ) {\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n const note_list = this._data.notes_field.value\n .filter((note: BookingNote) => note.type === 'equipment');\n this.notes = note_list.reduce((map, note) => {\n map[note.space] = note.message;\n return map;\n }, {});\n this.codes = { ...this._data.codes_field.value };\n this.head_counts = { ...this._data.head_counts_field.value };\n this.generateFormFields();\n }\n\n public submit(): void {\n // Get the email of the first space\n const firstSpaceEmail = this.space_list[0].email;\n\n // Copy values from the first space's form controls to all other spaces\n this.space_list.forEach(space => {\n if (space.email !== firstSpaceEmail) {\n this.form[space.email].controls.notes.setValue(this.form[firstSpaceEmail].controls.notes.value);\n this.form[space.email].controls.code.setValue(this.form[firstSpaceEmail].controls.code.value);\n this.form[space.email].controls.head_count.setValue(this.form[firstSpaceEmail].controls.head_count.value);\n }\n });\n\n this.space_list.forEach(space => this.form[space.email].markAllAsTouched());\n /* istanbul ignore else */\n if (this.is_valid) {\n // Update notes \n const notes = this._data.notes_field.value\n .filter((note: BookingNote) => note.type !== 'equipment');\n const new_notes = this.space_list.map(space => ({\n author: this._users.current.name,\n type: 'equipment',\n message: this.form[space.email].controls.notes.value.trim(),\n space: space.email,\n date: DateNow(new Date()).ms\n } as BookingNote));\n this._data.notes_field.setValue(notes.concat(new_notes).filter(note => note.message));\n this._data.codes_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.code.value;\n return map;\n }, {}));\n this._data.head_counts_field.setValue(this.space_list.reduce((map, space) => {\n map[space.email] = this.form[space.email].controls.head_count.value;\n return map;\n }, {}));\n this.event.emit({ reason: 'done' });\n } else {\n this._content_el.nativeElement.scrollTo({\n top: this._content_el.nativeElement.scrollHeight,\n left: 0,\n behavior: 'smooth'\n });\n }\n }\n\n /** Generate form fields for each space */\n // private generateFormFields(): void {\n // for (const space of this.space_list) {\n // const building = this._org.buildings.find(\n // bld => bld.id === space[0]?.level.building_id\n // );\n // // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n // const { filters, settings } = space;\n // const roomBasedEqCode = filters?.equipment_code || settings?.equipment_code;\n // const officeBasedEqCode = building?.required?.equipment_code;\n // this.needs_charge_code[space.email] = roomBasedEqCode !== undefined ? roomBasedEqCode : officeBasedEqCode !== undefined ? officeBasedEqCode: false;\n\n // this.form[space.email] = new FormGroup({\n // notes: new FormControl(this.notes[space.email] || ''),\n // code: new FormControl(\n // this.codes[space.email] || '',\n // this.needs_charge_code[space.email] ?\n // [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] : [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n // ),\n // head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n // });\n // }\n // }\n \n private generateFormFields(): void {\n // Initialize a variable to determine if any space needs a charge code\n let anySpaceNeedsChargeCode = false;\n \n // First pass to determine if any space needs a charge code\n for (const space of this.space_list) {\n const building = this._org.buildings.find(\n bld => bld.id === space?.level.building_id\n );\n const { filters, settings } = space;\n const roomBasedEqCode = filters?.equipment_code;\n const officeBasedEqCode = building?.required?.equipment_code;\n \n // this.needs_charge_code[space.email] = space?.settings?.equipment_code || building?.required?.equipment_code || false;\n if (roomBasedEqCode || officeBasedEqCode) {\n anySpaceNeedsChargeCode = true;\n this.needs_charge_code = true;\n break;\n } else{\n this.needs_charge_code = false;\n }\n }\n \n // Second pass to create form groups with the determined charge code requirement.\n // We show only the first space, but if one of the selected spaces needs a mandatory charge code,\n // then all spaces need a mandatory charge code\n for (const space of this.space_list) { \n this.form[space.email] = new FormGroup({\n notes: new FormControl(this.notes[space.email] || ''),\n code: new FormControl(\n this.codes[space.email] || '',\n anySpaceNeedsChargeCode ?\n [Validators.pattern(/^[a-zA-Z0-9]*$/), Validators.minLength(4), Validators.required] :\n [Validators.minLength(4), Validators.pattern(/^[a-zA-Z0-9]*$/)]\n ),\n head_count: new FormControl(this.head_counts[space.email] || '', [Validators.required, Validators.pattern(/^(?!0+$)/)])\n });\n }\n }\n}\n","
\n
\n \n \n \n \n {{\n this.space_list.length > 1 ? this.space_list.length + ' spaces selected' :\n this.space_list[0]?.local_name || 'No spaces selected'\n }}\n \n \n \n \n
\n \n
\n\n
\n
\n \n
\n {{\n has_recurrence && !isConcierge\n ? 'To update headcount information, add equipment or catering, please edit individual meeting occurences in My Day'\n : \"Would you like to add equipment to your booking's spaces?\"\n }}\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n Charge Code*\n \n \n \n \n Note: Your booking will be confirmed before you are\n charged.\n \n \n {{ invalid_charge_code ? 'Valid Charge Code Required' : 'Charge Code is required'}}\n \n \n
\n
\n \n Headcount Estimate*\n \n \n \n \n Note: This estimate is used to calculate catering and/or\n assign rooms. Please keep updated of any changes.\n \n \n Headcount Estimate is required\n \n \n
\n \n
\n
\n
\n\n
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n Inject,\n OnInit,\n Output,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {\n BehaviorSubject,\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n first,\n map,\n switchMap,\n take,\n withLatestFrom\n} from 'rxjs/operators';\nimport {\n Building,\n mapBuildingToSelectOption,\n mapCityToAllSelectOption,\n OrganisationService,\n SettingsService,\n Space,\n SpaceBookingRuleOptions,\n SpacesService,\n toggleSelectedByGroup,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n DialogEvent,\n HashMap,\n Identity,\n unique\n} from '@mckinsey-converge/base';\nimport { NoCateringModalComponent } from '../no-catering-modal/no-catering-modal.component'\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\nexport interface SpaceSelectModalData {\n /** List of selected spaces */\n spaces: Space[];\n /** Start time for availability of spaces */\n dateTz: DateTZ;\n /** Duration of the availability block to look for */\n duration: number;\n /** Host of the booking being made */\n host: User;\n /** Whether multiple spaces can be selected */\n multiple: boolean;\n /** Force zone ids */\n zone_ids?: string;\n /** Booking needs catering */\n needsCatering?: boolean,\n}\n\ninterface CustomDialogEvent extends DialogEvent {\n noCatering?: boolean;\n}\n\n@Component({\n selector: 'a-space-select-modal',\n templateUrl: './space-select-modal.component.html',\n styleUrls: ['./space-select-modal.component.scss']\n})\nexport class SpaceSelectModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether space list is being loaded */\n public loading: boolean;\n /** List of available spaces to select from */\n public spaces: Space[] = [];\n /** Active building to filter spaces on */\n public active_building: Building;\n /** Active building to filter spaces on */\n public active_type: Identity;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n /** List of currently selected spaces */\n public selected_spaces: Space[] = [];\n /** Mapping as to whether a space is by request */\n public request_map: HashMap = {};\n /** Whether selected list should be shown on mobile */\n public show_list: boolean;\n\n /** host to load (only in staff) **/\n public host: User;\n\n /** List of available buildings */\n public types: Identity[] = [];\n\n public isConcierge: boolean;\n public frontend: string;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n /** Whether multiple spaces can be selected */\n public get multiple(): boolean {\n return false;\n }\n\n public get has_zone(): boolean {\n return !!this._data.zone_ids;\n }\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n\n public noCateringDialogRef: MatDialogRef;\n\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public savedSelection\n\n constructor(\n private _org: OrganisationService,\n private _users: UsersService,\n private _spaces: SpacesService,\n private _settings: SettingsService,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: SpaceSelectModalData\n ) {\n super();\n this.isConcierge = _settings.concierge;\n this.frontend = _settings.frontend;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld) => {\n this.loading = true;\n const zone_ids: string[] = [];\n /* istanbul ignore else */\n if (this.active_building) {\n zone_ids.push(this.active_building.id);\n }\n\n if (bld?.includes('|')) {\n bld = this.savedSelection\n }\n\n const id = request_id;\n return this._spaces.available({\n zone_ids: bld?.length ? bld : this._data.spaces[0].building.id || zone_ids.join(','),\n dateTz: this._data.dateTz,\n duration: this._data.duration\n }).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _ })),\n map((resp: { id: number, list: Space[] }) => {\n this.loading = false;\n const filtered_list = resp.list.filter((space: Space) => {\n // if concierge skip rules check.\n if (this._settings.concierge) {\n return (this.active_type && this.active_type.id ? space.zones.includes(`${this.active_type.id}`) : true) &&\n !this.selected_spaces.find((s) => s.id === space.id);\n }\n\n const rules = space.rulesFor({\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this.host || this._data.host\n });\n return (\n rules.hide !== true &&\n (this.active_type && this.active_type.id\n ? space.zones.includes(`${this.active_type.id}`)\n : true) &&\n !this.selected_spaces.find((_space) => _space.id === space.id)\n );\n });\n return resp.id === request_id ? filtered_list : this.spaces;\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.spaces = list.filter((space) => {\n if (!space.available) {\n return false;\n }\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n });\n this.spaces.sort((a, b) => this.sort(a, b));\n if (!this.selectedOptions.value.length) {\n this.setDefaultBuilding()\n }\n })\n );\n this.active_building = this._data.spaces?.length\n ? this._org.buildings.find((i) => i.id === this._data.spaces[0].level.building_id)\n : this._org.building;\n this.types = [{ id: '', name: 'Any Space Type' } as any].concat(\n this._org.space_types || []\n );\n this.active_type = this.types[0];\n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: { name: city, timezone },\n value: bld_list?.filter((bld) => bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld) => mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ]\n this.options.next(buildings)\n }));\n\n }\n\n /** Add space to selected list */\n public addSpace(space: Space) {\n this.selected_spaces.push(space);\n this.selected_spaces = unique(this.selected_spaces, 'id');\n }\n\n /** Remove space from selected list */\n public removeSpace(space: Space) {\n this.selected_spaces = this.selected_spaces.filter((a_space) => a_space.id !== space.id);\n }\n\n /** Emit current state of the selected list */\n public save(list: Space[]) {\n if (!this._data.needsCatering) {\n // No catering order to warn about\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // Check if the room has catering \n if (list[0].has_catering) {\n this.event.emit({ reason: 'done', metadata: list });\n return;\n }\n // If not warn that the room doesn't have catering\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.event.emit({ reason: 'done', metadata: list, noCatering: event.noCatering });\n }\n if (event.reason === 'close') {\n this.event.emit({ reason: 'close' });\n }\n })\n );\n }\n\n private update() {\n const map = {};\n const options: SpaceBookingRuleOptions = {\n dateTz: this._data.dateTz,\n duration: this._data.duration,\n host: this._data.host\n };\n this.selected_spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.spaces.forEach((space) => (map[space.id] = space.byRequest(options)));\n this.request_map = map;\n }\n\n public setDefaultBuilding() {\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id)) || { name: '', sort_order: [] };\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld) => bld.value)\n\n });\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n public selectSpace(space: Space) {\n const list = this.spaces;\n if (list.find((item) => item.id === space.id)) {\n this.spaces = list.filter((item) => item.id !== space.id);\n } else {\n this.spaces = [space];\n }\n }\n\n public clearList() {\n this.spaces = []\n this.savedSelection = []\n }\n\n public triggerSearch = () => {\n if (this.savedSelection.length) {\n this.change$.next(this.savedSelection)\n } else {\n this.spaces = []\n }\n }\n\n}\n","
\n
Select meeting space{{ multiple ? 's' : '' }}
\n \n
\n\n
\n
\n \n \n 1\">Type\n 1\">\n \n \n {{ type?.name }}\n \n \n \n \n
\n \n \n
\n
\n
{{ space.local_name }}
\n
{{ space.level.name }}
\n
\n
\n \n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n {{ (!isConcierge && request_map[space.id]) ? 'Request' : 'Select' }}\n \n
\n
\n
\n
\n
\n
\n
\n

Selected spaces

\n
\n \n
\n \n \n
\n
\n
{{ space.name }}
\n
{{ space.level.name }}
\n
\n
\n \n
{{ space.capacity || '0' }}
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n
Loading available spaces...
\n
\n
\n\n
\n
\n \n
\n
No results available, please select another office.
\n
\n
\n\n
\n
\n \n
\n
No selected spaces
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'user-form',\n templateUrl: './user-form.component.html',\n styleUrls: ['./user-form.component.scss']\n})\nexport class UserFormComponent {\n /** Group of form fields used for creating the system */\n @Input() public form: FormGroup;\n}\n","
\n
\n
\n First Name:\n \n \n First name is required\n \n \n
\n
\n Last Name:\n \n \n Last name is required\n \n
\n
\n Email:\n \n \n A valid email is required\n \n
\n
\n
\n","export * from './lib/legacy-ui.module';\nexport * from './lib/custom-fields';\nexport * from './lib/icon/icon.component';\nexport * from './lib/feedback/feedback.component';\nexport * from './lib/action-icon/action-icon.component';\nexport * from './lib/user-avatar/user-avatar.component';\nexport * from './lib/bookings/catering/item/item.component';\nexport * from './lib/cng-search-bar/cng-search-bar.component';\n","import { Component, OnInit, Input } from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'action-icon',\n templateUrl: './action-icon.component.html',\n styleUrls: ['./action-icon.component.scss']\n})\nexport class ActionIconComponent implements OnInit {\n /** Icon to display */\n @Input() public icon: ApplicationIcon;\n /** Whether action is being processed */\n @Input() public loading: boolean;\n /** State of the action */\n @Input() public state: 'success' | 'error' | '' = '';\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","
\n \n
\n \n
\n
\n \n
\n
\n","import {\n Component,\n Input,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\n\nimport {\n ApplicationService,\n CateringCategory,\n CateringItem,\n SettingsService\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { PackageOptionsModalComponent } from '../package-options-modal/package-options-modal.component';\n\nfunction hasSelectionRequirements(category: CateringCategory) {\n return (\n category.must_select < category.items.length ||\n (category.must_select === category.items.length &&\n category.items.find((item: any) => item.items && item.must_select < item.items.length))\n );\n}\n\nfunction getActiveList(category: CateringCategory) {\n const items = category.items || [];\n let list = items.filter((item) => item.amount > 0).map((item) => item.id);\n for (const item of items) {\n if ((item as any).items && (item as any).items.length) {\n list = list.concat(getActiveList(item as any));\n }\n }\n return list;\n}\n\n@Component({\n selector: 'a-catering-menu-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringMenuItemComponent extends BaseDirective implements OnChanges {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Field for storing items */\n @Input() public field: FormControl;\n /** Current symbol for the selected space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n public initial_state = null;\n\n /** List of contents of the package */\n public get contents(): string {\n return this.item.items\n ? this.item.items.reduce((list, item) => {\n /* istanbul ignore else */\n if (list) {\n list += '\\n\\n';\n }\n return (list += `${item.name}${\n (item as any).items\n ? (item as any).items.reduce(\n (a_list, an_item) =>\n (a_list += `\\n ${an_item.amount ? '✓' : '•'} ${an_item.name} `),\n ''\n )\n : ''\n } ${item.amount ? '✓' : ''}`);\n }, '')\n : '';\n }\n\n constructor(private _service: ApplicationService, private _dialog: MatDialog,\n public settings: SettingsService) {\n super();\n // on the item selection set the revert/close state\n this.initial_state = this.item;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.field && this.field) {\n const list = this.field.value;\n // check the category\n let item = list.find((an_cat) => an_cat.id === this.item.id);\n if (item) {\n // update the category level amount\n this.item.setAmount(item ? item.amount : 0);\n } else {\n // find a category item\n for (var cat of list) {\n item = cat?.items.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(item ? item.amount : 0);\n break;\n }\n }; \n } \n\n // On the confirm catering order modal set the revert/close state\n if (!this.initial_state && this.item.amount) {\n this.initial_state = this.item;\n }\n\n this.subscription(\n 'field_change',\n this.field.valueChanges.subscribe((list) => {\n const item = list.find((an_item) => an_item.id === this.item.id);\n this.item.setAmount(item ? item.amount : 0);\n this.updatePackageSelection();\n })\n );\n }\n }\n\n /**\n * Update the amount of the item in the order\n * @param value New amount\n */\n public updateAmount(value: number) {\n /* istanbul ignore else */\n if (this.field) {\n const list: CateringItem[] = this.field.value;\n const item = list.find((an_item) => an_item.id === this.item.id);\n if (item) {\n this.item.setAmount(value);\n item.setAmount(value);\n // MCK-1550 fix\n const price = this.item.price;\n item.setPrice(price)\n } else {\n const amount = this.item.amount;\n this.item.setAmount(value);\n if (\n this.item.package &&\n amount < value &&\n this.item.items &&\n this.item.items.length &&\n hasSelectionRequirements(this.item)\n ) {\n this.selectPackageOptions().then(\n (confirmed_item) => {\n list.push(new CateringCategory(confirmed_item));\n this.field.setValue(list.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n } else {\n list.push(new CateringItem(this.item));\n }\n }\n this.field.setValue(list.filter((an_item) => an_item.amount));\n }\n }\n\n public updatePackageSelection() {\n const cart_item = this.field.value.find((item) => item.id === this.item.id);\n if (cart_item) {\n const active_items = getActiveList(cart_item);\n this.timeout(\n 'update_package',\n () => {\n this.item.items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n if ((item as any).items) {\n (item as any).items.forEach((item) => {\n item.setAmount(active_items.includes(item.id) ? 1 : 0);\n });\n }\n });\n },\n 5\n );\n }\n }\n\n /** Reselect package options */\n public updatePackageOptions(): void {\n let updatedList: CateringItem[] = [];\n this.selectPackageOptions().then(\n (confirmed_item) => {\n // Update the existing category package\n this.field.value.forEach((category: CateringCategory) => {\n if (category.id === confirmed_item.id) {\n updatedList.push(new CateringCategory(confirmed_item))\n } else {\n updatedList.push(category)\n }\n })\n this.field.setValue(updatedList.filter((an_item) => an_item.amount));\n },\n () => {\n this.item.setAmount(999);\n this.timeout('amount', () => this.item.setAmount(0), 5);\n this._service.notifyWarn(\n 'Package options not selected. Item removed from order'\n );\n }\n );\n }\n\n /**\n * Open modal for user to select package options\n */\n private selectPackageOptions(): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(PackageOptionsModalComponent, {\n maxWidth: '95vw',\n data: {\n item: new CateringCategory(this.item)\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n let done = false;\n ref.componentInstance.event.subscribe((event) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n done = true;\n resolve(ref.componentInstance.item);\n this.initial_state = this.item;\n ref.close();\n }\n });\n ref.afterClosed().subscribe(() => {\n /* istanbul ignore else */\n if (!done) {\n if (this.initial_state) {\n resolve(this.initial_state);\n } else {\n reject();\n }\n }\n });\n });\n }\n}\n","\n \n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n { item.availableItems.length, plural, =1 { Contains {{ item.availableItems.length }} item } other {\n Contains {{ item.availableItems.length }} items } }\n
\n 0\"\n [matTooltip]=\"contents\"\n >\n {{ item.must_select }}\n \n Selected\n \n
\n 0\"\n (click)=\"updatePackageOptions()\"\n i18n=\"Catering order item options change action\"\n >\n Customise\n \n \n \n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n","import {\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport {\n DialogEvent,\n HashMap\n} from '@mckinsey-converge/base';\nimport {\n CateringCategory,\n CateringItem\n} from '@mckinsey-converge/data-common';\n\nexport interface PackageOptionsModalData {\n item: CateringCategory;\n}\n\nexport function checkItemRequirements(category: CateringCategory): boolean {\n const items = category.items || [];\n return category.must_select >= items.length\n ? items.reduce((valid, item) => valid && checkItemRequirements(item as any), true)\n : items.reduce((amount, item) => amount + (item.amount ? 1 : 0), 0) ===\n category.must_select;\n}\n\nexport function getActiveItems(category: CateringCategory): HashMap {\n let map = {};\n if (category.items) {\n const item = category.items.find(item => item.amount > 0);\n if (item) {\n map[category.id] = item.id;\n }\n category.items.forEach(item => map = { ...map, ...getActiveItems(item as any) });\n }\n return map;\n}\n\n@Component({\n selector: 'a-package-options-modal',\n templateUrl: './package-options-modal.component.html',\n styleUrls: ['./package-options-modal.component.scss']\n})\nexport class PackageOptionsModalComponent {\n /** Emitter for user actions on the modal */\n @Output() public event = new EventEmitter();\n\n /** Item to select options for */\n public get item(): CateringCategory {\n return this._data.item;\n }\n\n /** Whether package requirements have been met */\n public get requirements_met(): boolean {\n return checkItemRequirements(this.item);\n }\n\n public get active_items(): HashMap {\n return getActiveItems(this.item);\n }\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: PackageOptionsModalData) {\n }\n\n /**\n * Update the list of selected items\n */\n public updateAmount(a_package: CateringCategory, option: CateringItem, state: boolean) {\n if (state) {\n const needed = a_package.must_select;\n const active = a_package.items.filter(an_item => an_item.amount > 0).length;\n if (active >= needed) {\n const item = a_package.items.find(an_item => an_item.amount > 0);\n item.setAmount(0);\n }\n option.setAmount(1);\n } else {\n option.setAmount(0);\n }\n }\n}\n","
\n

Package Options

\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n \n \n
\n \n 1\"\n [checked]=\"!!option.amount\"\n (change)=\"updateAmount(package, option, $event.checked)\"\n >\n {{ option.name }}\n \n \n {{ option.name }}\n \n \n = package.items.length || option.must_select\">\n {{ option.name }}\n \n \n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\n\n// Interface to define the structure of the configuration object for the search bar\nexport interface SearchBarConfig {\n placeholder?: string;\n totalFoundItem?: number;\n showSrchWarning?: boolean;\n}\n\n@Component({\n selector: 'cng-search-bar',\n templateUrl: './cng-search-bar.component.html',\n styleUrls: ['./cmg-search-bar.component.scss']\n})\nexport class CngSearchBarComponent implements OnChanges {\n // Input property to accept configuration for the search bar\n @Input() config: SearchBarConfig = {\n placeholder: 'Search ...',\n totalFoundItem: 0,\n showSrchWarning: false\n };\n\n // Output event emitter to emit search strings to parent components\n @Output() search = new EventEmitter();\n\n // Local variable to store the search string entered by the user\n searchStr: string = '';\n\n // Lifecycle hook that is called when any data-bound property of a directive changes\n ngOnChanges(changes: SimpleChanges): void {\n // Check if the config property has changed\n if (changes.config) {\n const configChanges = changes.config.currentValue;\n // Update the config with new values or fallback to defaults\n this.config = {\n placeholder: configChanges.placeholder || 'Search ...',\n totalFoundItem: configChanges.totalFoundItem || 0,\n showSrchWarning: configChanges.showSrchWarning || false\n };\n }\n }\n\n // Method to handle the search action\n onSearch(value: string): void {\n // Emit the search string if it's not empty\n if (value) {\n this.search.emit(value);\n } else {\n this.clearSearch();\n }\n }\n\n // Method to clear the search input and reset related configurations\n clearSearch(box: HTMLInputElement | null = null): void {\n this.searchStr = '';\n if (box) {\n box.value = '';\n }\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n this.search.emit('');\n }\n\n // Method to reset the search-related warnings and item count\n resetSearch(): void {\n this.config.showSrchWarning = false;\n this.config.totalFoundItem = 0;\n }\n}\n","
\n \n \n
{{ config.totalFoundItem }}
\n \n \n \n
\n \n No search found!\n
\n
\n ","import { Directive, ElementRef, HostListener, Input } from '@angular/core';\n\n@Directive({\n selector: '[hover-class]'\n})\nexport class HoverClassDirective {\n @Input('hover-class') hoverClass: string;\n\n constructor(private elementRef: ElementRef) {}\n\n @HostListener('mouseenter') onMouseEnter() {\n this.update('add');\n }\n\n @HostListener('mouseleave') onMouseLeave() {\n this.update('remove');\n }\n\n @HostListener('blur') onBlur() {\n this.update('remove');\n }\n\n private update(action: string): void {\n this.hoverClass.split(' ').forEach(item => this.elementRef.nativeElement.classList[action](item));\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'an-action-field',\n templateUrl: './action-field.component.html',\n styleUrls: ['./action-field.component.scss']\n})\nexport class ActionFieldComponent extends BaseDirective {\n /** Name of the field */\n @Input() public name: string;\n /** Value to display on the field */\n @Input() public placeholder: string;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Emitter for user interaction events */\n @Output('onAction') public on_action = new EventEmitter();\n /** Whether to show tooltip */\n public show_tooltip = false;\n\n /**\n * Emit that the user has performed an action on the field\n */\n public performAction() {\n this.show_tooltip = !this.show_tooltip;\n this.on_action.emit();\n }\n}\n","\n
{{ placeholder }}
\n
\n \n
\n\n","import { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'a-counter',\n templateUrl: './counter.component.html',\n styleUrls: ['./counter.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n /* istanbul ignore next */\n useExisting: forwardRef(() => CounterComponent),\n multi: true,\n },\n ],\n})\nexport class CounterComponent implements ControlValueAccessor {\n /** Maximum amount for the counter */\n @Input() public max: number = 10;\n /** Minimum amount for the counter */\n @Input() public min: number = 0;\n\n @Input() public useInput = false;\n\n /** Current value of the counter */\n public value: number;\n public previous_value: number = 0;\n /** Whether shift key is being held by the user */\n public shift_key: boolean;\n /** Whether control key is being held by the user */\n public ctrl_key: boolean;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /**\n * Add the `step` to the current value\n */\n public add() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value += step;\n if (this.value > this.max) {\n this.value = this.max || 10;\n }\n this.setValue(this.value);\n }\n\n /** Remove the `step` from the current value */\n public remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }\n\n public handleTimeout = null;\n\n public onInputChange(new_value: string) {\n if (this.handleTimeout) {\n clearTimeout(this.handleTimeout);\n this.handleTimeout = null;\n }\n this.handleTimeout = setTimeout(() => this.changeInput(new_value), 500);\n }\n\n public changeInput(new_value: string) {\n let value = Number(new_value);\n if (isNaN(value)) {\n value = this.previous_value;\n }\n if (value < this.min) {\n value = this.min || 0;\n }\n if (value > this.max) {\n value = this.max || 10;\n }\n this.setValue(value);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.previous_value = new_value;\n this.value = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.value = value;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","\n \n \n
\n {{value || '0'}}\n
\n \n\n","import { Component, OnInit, forwardRef, Input, ViewChild, Output, EventEmitter } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-date-field',\n templateUrl: './date-field.component.html',\n styleUrls: ['./date-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateFieldComponent),\n multi: true\n }\n ]\n})\nexport class DateFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n /** Optional event emitter for changes */\n @Output() public onChange = new EventEmitter();\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Currently selected date */\n public date: number;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n /** Display value for the current date */\n public get date_string(): string {\n // R--- Needs TZ aware inputs\n const date = new DateTZ({date: this.date})\n return date.formatDate('dd MMM yyyy');\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public ngOnInit() {\n this.date = DateNow(new Date()).ms;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = new DateTZ({date: this.date });\n const new_d = new DateTZ({date: new_value})\n let new_date = new_d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n this.date = new_date;\n if (this._onChange) {\n this._onChange(new_date);\n this.onChange.emit(new_date);\n }\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","\n
{{ date_string }}
\n
\n \n
\n\n\n
\n \n
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport {\n humaniseDuration,\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-duration-field',\n templateUrl: './duration-field.component.html',\n styleUrls: ['./duration-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ]\n})\nexport class DurationFieldComponent extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor {\n /** Maximum duration option available */\n @Input() public max: number = 240;\n /** Minimum duration option available */\n @Input() public min: number = 15;\n /** Step value between options */\n @Input() public step: number = 15;\n /** Reference time for displaying next to durations */\n @Input() public time: number;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Special case prepopulation i.e. out of step options */\n @Input() public specialPreprops: Array = [];\n /** Whether form all_day is enabled. */\n @Input() public all_day: boolean = false;\n\n public duration: number = 60;\n /** List of available duration options */\n public duration_options: Identity[];\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n public ngOnInit(): void {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.max || changes.min || changes.step || changes.time || changes.all_day) {\n this.duration_options = this.generateDurationOptions(this.max, this.min, this.step, this.all_day);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.duration = new_value;\n /* istanbul ignore else */\n if (this._onChange) {\n this._onChange(+new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.duration = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n private generateDurationOptions(max: number, min: number, step: number, all_day: boolean = false): Identity[] {\n const blocks: Identity[] = [];\n let time = min;\n // R--- Change input to dateTz\n let date = this.time ? new DateTZ({date: this.time}) : null;\n\n // Add special case for 10min duration/prepropulation\n for (const option of this.specialPreprops) {\n blocks.push({\n id: option,\n name: date\n ? `${date.addValue({ minutes: option }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(option)})`\n : `${humaniseDuration(option)}`\n });\n }\n\n\n while (time <= max) {\n blocks.push({\n id: time,\n name: date\n ? `${date.addValue({ minutes: time }).formatDate(timeFormatString()).toLocaleLowerCase()} (${humaniseDuration(time)})`\n : `${humaniseDuration(time)}`\n });\n time += step;\n }\n if (all_day) {\n blocks.push({ id: 24 * 60, name: 'All Day' }); \n }\n blocks.push({ id: 7 * 24 * 60, name: '1 week' });\n return blocks;\n }\n}\n","
\n \n \n \n {{ option.name }}\n \n \n \n
\n","export * from './action-field/action-field.component'\nexport * from './counter/counter.component'\nexport * from './date-field/date-field.component'\nexport * from './duration-field/duration-field.component'\nexport * from './time-field/time-field.component'\nexport * from './user-search-field/user-search-field.component'\nexport * from './user-list-field/user-list-field.component'\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n Identity,\n timeFormatString\n} from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-time-field',\n templateUrl: './time-field.component.html',\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ]\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n /** Time step between each allowed time option */\n @Input() public step: number = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public no_past_times: boolean = true;\n /** String representing the currently set time */\n public date: number = DateNow(new Date()).ms;\n /** String representing the currently set time */\n public time: string = DateNow(new Date()).formatDate('HH:mm');\n /** Available time blocks for the selected date */\n public _time_options: Identity[];\n /** Whether select field should be shown */\n public show_select: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n // R--- This is the form input that needs to be TZ active.\n public ngOnInit(): void {\n this.show_select = true;\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n this.timeout('hide', () => this.show_select = false);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step) {\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n }\n\n public get date_(){\n return new DateTZ({date: this.date})\n }\n\n /** Available time blocks for the selected date */\n public get time_options() {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] });\n if (date.minutes % 15 !== 0 && !this._time_options.find(time => time.id === date.formatDate('HH:mm'))) {\n this._time_options.push({\n name: `${date.formatDate(timeFormatString())}`,\n id: date.formatDate('HH:mm')\n });\n this._time_options.sort((a, b) => `${a.id}`.localeCompare(`${b.id}`));\n }\n return this._time_options;\n }\n\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.time = new_value;\n if (this._onChange) {\n const time = (this.time || '00:00').split(':');\n const date = this.date_.setValue({ hour: +time[0], minute: +time[1] }).startOfValue('minute');\n this._onChange(date.ms);\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n if (!value) {\n return;\n }\n this.date = value;\n let date = this.date_.startOfValue('minute');\n date = date.setValue({ minute: Math.ceil(date.minutes / 5) * 5 });\n this.time = date.formatDate('HH:mm');\n this._time_options = this.generateAvailableTimes(this.date, !this.no_past_times, this.step);\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Show select field for time options\n */\n public showSelect() {\n this.show_select = true;\n this.timeout('on_shown', () => {\n if (this.select_field) {\n this.select_field.focus();\n this.select_field.open();\n this.subscription('listen_close', this.select_field.openedChange.subscribe((state) => {\n if (!state) {\n this.show_select = false;\n }\n }));\n }\n });\n }\n\n /**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n private generateAvailableTimes(datestamp: number, show_past: boolean, step: number = 15): Identity[] {\n let date = new DateTZ({date: datestamp});\n const blocks = [];\n if (show_past || date.isAfterDate(DateNow(new Date()))) {\n date = date.startOfValue('day');\n } else if (date.isAfterDate(DateNow(new Date()))) {\n date = DateNow(new Date());\n }\n date = date.setValue({ minute: Math.ceil(date.minutes / step) * step });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n name: `${date.formatDate(timeFormatString()).toLocaleLowerCase()}`,\n id: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n }\n}\n","\n
\n \n
\n
\n \n
\n\n\n \n \n {{ option.name }}\n \n \n\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n tap,\n map,\n switchMap,\n finalize\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n ApplicationService,\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n csvToJson,\n downloadFile,\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-list-field',\n templateUrl: './user-list-field.component.html',\n styleUrls: ['./user-list-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserListFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserListFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Number of characters needed before a search will start */\n @Input() public limit: number = 3;\n /** Emitter for action to make a new user */\n @Output('newUser') public new_user = new EventEmitter();\n\n /** User list to display */\n public user_list: User[];\n /** List of active selected users on the list */\n public active_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** String */\n public search_str: string;\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User[]) => void;\n /** Form control on touch handler */\n private _onTouch: (_: User[]) => void;\n\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n\n constructor(private _service: ApplicationService, private _users: UsersService, private cdRef: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit() {\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(100),\n distinctUntilChanged(),\n switchMap((query) => {\n this.loading = true;\n return query.length >= this.limit\n ? this._users.query({\n q: query.slice(0, Math.max(this.limit, 3)),\n cache: 60 * 1000\n })\n : Promise.resolve([]);\n }),\n catchError((_) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.user_list = list;\n this.user_list.forEach((i: any) => {\n i.match_name = matchToHighlight(i.match_name);\n i.match_email = matchToHighlight(i.match_email);\n return i;\n });\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n })\n );\n }\n\n /**\n * Add user to the user list\n * @param user\n */\n public addUser(user: User) {\n /* istanbul ignore else */\n if (!this.active_list) {\n this.active_list = [];\n }\n const index = this.active_list.findIndex((a_user) => a_user.id === user.id);\n /* istanbul ignore else */\n if (index < 0) {\n this.active_list = [...this.active_list, user];\n }\n this.setValue(this.active_list);\n this.search_str = '';\n }\n\n /**\n * Remove user from the user list\n * @param user\n */\n public removeUser(user: User) {\n this.active_list = this.active_list.filter((a_user) => a_user.id !== user.id);\n this.setValue(this.active_list);\n }\n\n /**\n * Load CSV file and populate the user list with the contents\n * @param event File input field event\n */\n public addUsersFromFile(event) {\n /* istanbul ignore else */\n if (event.target) {\n const file = event.target.files[0];\n /* istanbul ignore else */\n if (file) {\n const reader = new FileReader();\n reader.readAsText(file, 'UTF-8');\n reader.addEventListener('load', (evt) => {\n this.processCsvData((evt.srcElement as any).result);\n event.target.value = '';\n this.cdRef.detectChanges();\n });\n reader.addEventListener('error', (_) =>\n this._service.notifyError('Error reading file.')\n );\n }\n }\n }\n\n /**\n * Process raw CSV data and save user data to attendee list\n * @param data CSV data\n */\n private processCsvData(data: string) {\n const list = csvToJson(data) || [];\n const id = this._users.current.staff_code; \n list.forEach((el) => {\n const firstName = el.first_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n const lastName = el.last_name.split(' ').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');\n\n el.name = el.name || `${firstName} ${lastName}`;\n const display = (el.name || `${Math.floor(Math.random() * 9999_9999)}`)\n .split(' ')\n .join('_')\n .toLowerCase();\n /* istanbul ignore else */\n if (!el.email) {\n el.email = `${display}+${id}@guest.mckinsey.com`;\n }\n el.type = 'external';\n el.external = !el.email.endsWith(\"@mckinsey.com\") && !el.email.endsWith(\"@external.mckinsey.com\");\n this.addUser(new User(el));\n });\n }\n\n /* istanbul ignore next */\n /** Download template CSV file */\n public downloadCSVTemplate() {\n const template = `Organisation Name,First Name,Last Name,Email,Phone\\nFake Org,John,Smith,john.smith@example.com,01234567898`;\n downloadFile('template.csv', template);\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User[]): void {\n this.active_list = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User[]) {\n this.active_list = value;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User[]) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: User[]) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n \n \n \n
\n
\n \n \n {{ user.name }}\n \n \n \n
\n
\n\n
No attendees
\n
\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n Observable,\n of,\n Subject\n} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n switchMap\n} from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport {\n User,\n UsersService\n} from '@mckinsey-converge/data-common';\nimport {\n filterList,\n matchToHighlight\n} from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'a-user-search-field',\n templateUrl: './user-search-field.component.html',\n styleUrls: ['./user-search-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserSearchFieldComponent),\n multi: true\n }\n ]\n})\nexport class UserSearchFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Limit available options to these */\n @Input() public options: User[];\n /** Currently selected user */\n public active_user: User;\n /** User list to display */\n public user_list: User[];\n /** Whether user list is loading */\n public loading: boolean;\n /** Current display value of the search input field */\n public search_str: string = '';\n /** List of users from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public search$ = new Subject();\n\n /** Form control on change handler */\n private _onChange: (_: User) => void;\n /** Form control on touch handler */\n private _onTouch: () => void;\n @ViewChild(MatAutocompleteTrigger, {read: MatAutocompleteTrigger}) inputAutoComplete: MatAutocompleteTrigger;\n \n constructor(private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n\n // Listen for input changes\n this.search_results$ = this.search$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap(query => {\n this.loading = true;\n return this.options && this.options.length > 0\n ? Promise.resolve(this.options)\n : query.length >= 3\n ? (this._users.query({ q: query, cache: 60 * 1000 }) as Promise)\n : Promise.resolve([]);\n }),\n catchError((err) => of([])),\n map((list: User[]) => {\n this.loading = false;\n return filterList(this.search_str, list, ['name', 'email']);\n })\n );\n // Process API results\n this.subscription('search_results', this.search_results$.subscribe(list => {\n this.user_list = list;\n this.user_list.length ? this.inputAutoComplete.openPanel() : this.inputAutoComplete.closePanel();\n }));\n }\n\n /** Handle input changes */\n public onInputChange(value: string): void {\n this.search_str = value;\n this.search$.next(value);\n }\n\n /**\n * Reset the search string back to the name of the active user\n */\n public resetSearchString(): void {\n if (this.active_user) {\n this.search_str = this.active_user.name;\n } else {\n this.search_str = '';\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: User): void {\n this.active_user = new_value;\n if (this._onChange) {\n this._onChange(new_value);\n }\n this.resetSearchString();\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: User): void {\n this.active_user = value;\n this.search_str = value ? value.name : '';\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: User) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouch = fn;\n }\n\n /** Function to display the user's name in the input field */\n public displayFn(user?: User): string {\n return user ? user.name : '';\n }\n}\n","
\n \n \n
\n \n
\n
\n \n
\n
\n \n \n
{{ option.name }}
\n
{{ option.email }}
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'feedback',\n templateUrl: './feedback.component.html',\n styleUrls: ['./feedback.component.scss'],\n})\nexport class FeedbackComponent extends BaseDirective implements OnInit {\n /** Name of the currently active page */\n public current_page: string;\n\n constructor(private _router: Router) {\n super();\n }\n\n public ngOnInit(): void {\n this.timeout('Getting Title', () => this.updateRoute(document.title), 1000);\n this._router.events.subscribe((event: NavigationEnd) => {\n /* istanbul ignore else */\n if (event instanceof NavigationEnd) {\n this.timeout('Getting Title', () => this.updateRoute(document.title));\n }\n });\n }\n\n public updateRoute(location) {\n location = location.substr(0, location.indexOf(' |'));\n this.current_page = location;\n }\n}\n","\n
\n Feedback\n \n \n \n
\n
\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent extends BaseDirective {\n @Input() public icon: ApplicationIcon;\n}\n","
\n {{ icon.content }}\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ActionFieldComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserListFieldComponent,\n UserSearchFieldComponent\n} from './custom-fields';\nimport { IconComponent } from './icon/icon.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ACA_PIPES_MODULE } from '@acaprojects/ngx-pipes';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { FeedbackComponent } from './feedback/feedback.component';\nimport { ActionIconComponent } from './action-icon/action-icon.component';\nimport { PopoutMenuComponent } from './popout-menu/popout-menu.component';\nimport { SearchbarComponent } from './searchbar/searchbar.component';\nimport { UserAvatarComponent } from './user-avatar/user-avatar.component';\nimport { CateringMenuItemComponent } from './bookings/catering/item/item.component';\nimport { PackageOptionsModalComponent } from './bookings/catering/package-options-modal/package-options-modal.component';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { CngSearchBarComponent } from './cng-search-bar/cng-search-bar.component';\nimport { HoverClassDirective } from './cng-search-bar/hover-class.directive';\n\nconst DECLARATIONS = [\n ActionFieldComponent,\n IconComponent,\n CounterComponent,\n DateFieldComponent,\n DurationFieldComponent,\n TimeFieldComponent,\n UserSearchFieldComponent,\n UserListFieldComponent,\n FeedbackComponent,\n ActionIconComponent,\n PopoutMenuComponent,\n SearchbarComponent,\n UserAvatarComponent,\n CateringMenuItemComponent,\n PackageOptionsModalComponent,\n CngSearchBarComponent,\n HoverClassDirective\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ACA_PIPES_MODULE,\n FormsModule,\n ReactiveFormsModule,\n ...MATERIAL_MODULES,\n BaseModule,\n UiModule\n ],\n declarations: [\n ...DECLARATIONS\n ],\n exports: [\n ACA_PIPES_MODULE,\n ...DECLARATIONS,\n ...MATERIAL_MODULES,\n BaseModule,\n ]\n})\nexport class LegacyUiModule {\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nexport interface PopoutAction extends ApplicationIcon {\n /** ID of the action */\n id: string;\n}\n\n@Component({\n selector: 'a-popout-menu',\n templateUrl: './popout-menu.component.html',\n styleUrls: ['./popout-menu.component.scss']\n})\nexport class PopoutMenuComponent extends BaseDirective {\n /** List of available actions */\n @Input() public actions: PopoutAction[] = [];\n /** Emitter for user actions */\n @Output() public action = new EventEmitter();\n /** Whether actions should show */\n public show: boolean;\n\n public close() {\n this.timeout('close', () => {\n this.show = false;\n });\n }\n}\n","\n \n\n\n","import { Component, OnInit, Input, EventEmitter, Output, ViewChild, ElementRef, SimpleChanges, OnChanges } from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-searchbar',\n templateUrl: './searchbar.component.html',\n styleUrls: ['./searchbar.component.scss']\n})\nexport class SearchbarComponent extends BaseDirective implements OnChanges {\n /** Current contents of the searchbar input */\n @Input('value') public value: string;\n /** Current contents of the searchbar input */\n @Input() public placeholder: string;\n /** Whether external changes are being processed */\n @Input() public loading: boolean;\n /** Whether external changes are being processed */\n @Input() public autofocus: boolean;\n /** Emitter for changes to the searchbar value */\n @Output() public valueChange = new EventEmitter();\n /** Input field reference */\n @ViewChild('input', { static: true }) private input_field: ElementRef;\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.autofocus && this.autofocus) {\n this.focusField()\n }\n }\n\n public focusField() {\n /* istanbul ignore else */\n if (this.input_field && this.input_field.nativeElement) {\n this.input_field.nativeElement.focus();\n }\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component, Input } from '@angular/core';\nimport { User } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-user-avatar',\n templateUrl: './user-avatar.component.html',\n styleUrls: ['./user-avatar.component.scss']\n})\nexport class UserAvatarComponent {\n /** User to display avatar for */\n @Input() public user: User;\n\n public get initials(): string {\n if (!this.user) {\n return 'NA';\n }\n const parts = this.user.name.split(' ');\n return parts.length > 1\n ? `${parts[0][0]}${parts[parts.length - 1][0]}`\n : this.user.name.slice(0, 2);\n }\n}\n","
\n
{{ initials }}
\n
\n\n \n\n","export * from './lib/loading.actions'\nexport * from './lib/loading.model'\nexport * from './lib/loading.effects'\nexport * from './lib/loading.selectors'\nexport * from '../testing'\n","import {\n createAction,\n createSelector,\n on,\n On,\n props\n} from '@ngrx/store';\nimport {\n LoadingModel,\n wrapLoading\n} from './loading.model';\nimport {\n selectIsLoading,\n selectOptionalError,\n selectOptionalSuccess,\n selectSuccess\n} from './loading.selectors';\nimport { MemoizedSelector } from '@ngrx/store/src/selector';\nimport {\n ActionCreator,\n NotAllowedCheck,\n TypedAction\n} from '@ngrx/store/src/models';\nimport { HashMap } from '@mckinsey-converge/base';\n\nexport interface Payload {\n payload: T\n}\n\nexport type LoadingAction = T & TypedAction\nexport type LoadingActionCreator = T extends null | undefined ?\n ActionCreator TypedAction>\n : ActionCreator) => LoadingAction>\n\ntype ClearAction = ActionCreator TypedAction>\n\ninterface Selectors {\n success: MemoizedSelector\n optionalSuccess: MemoizedSelector\n error: MemoizedSelector\n loading: MemoizedSelector\n model: (TState) => LoadingModel\n}\n\nexport interface LoadingActionObject {\n request: LoadingActionCreator\n success: LoadingActionCreator>\n error: LoadingActionCreator>\n clear: ClearAction,\n ons: On[],\n selectors: Selectors\n}\n\n/**\n * Creates a {@link LoadingActionObject} that contains a set of ActionCreators\n * for request, success, error, loading, and clear data. Also, it contains\n * the necessary On reducers and selectors in order to properly connect them in\n * a standardized way to data in the application.\n *\n * `TState` is the type of data on your reducer, not global store.\n * `TRequest` is an object type to use in request methods.\n * `TSuccess` is the object type of the T parameter on `LoadingModel`.\n *\n * This assumes you have state represented by:\n * ```typescript\n * interface SomeState {\n * stateKey: LoadingModel\n * }\n * ```\n *\n * To dispatch an action:\n * ```typescript\n *\n * // request parameters depend on the object type used as second type parameter\n * // in createLoadingAction\n * this.store.dispatch(someLoadingAction.request())\n *\n * // action created with createLoadingAction\n * this.store.dispatch(someLoadingAction.request({\n * name: 'Andrew G',\n * age: 24\n * }))\n *\n * ```\n *\n * The generated selectors only select data from its fractured state, not the global\n * store. In order to use them, make sure you {@link select} the global state\n * before using them:\n *\n * ```typescript\n *\n * this.store.pipe(\n * select(selectSomeState),\n * select(someLoadingAction.selectors.success)\n * ).subscribe(next => {\n *\n * })\n *\n * ```\n *\n * @param actionPrefix - Prefixes actions to uniquely identify them.\n * @param stateKey - The field within the reducer state to set data on.\n */\nexport const createLoadingAction = (\n actionPrefix: string,\n stateKey: keyof TState\n): LoadingActionObject => {\n const buildAction = (postfix: string) => `[${actionPrefix}] ${postfix}`;\n // @ts-ignore\n const request = createAction(buildAction('request'), props());\n const success = createAction(buildAction('success'), props>());\n const error = createAction(buildAction('error'), props>());\n const clear = createAction(buildAction('clear'));\n const ons: On[] = [\n on(request, (state: TState & HashMap>, action: LoadingAction) =>\n ({\n ...state,\n [stateKey]: wrapLoading(state[stateKey]).loading()\n })),\n on(success, (state: TState & HashMap>, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.success(action.payload)\n })),\n // some reason specifying state like in success and request does not work.\n on(error, (state: any, action: LoadingAction>) => ({\n ...state,\n [stateKey]: LoadingModel.error(action.payload)\n })),\n on(clear, () => ({\n ...this.state,\n [stateKey]: LoadingModel.empty()\n }))\n ];\n const selectData = (state: TState) => {\n if (!state) {\n console.warn('[LoadingActions] State is empty for key', stateKey);\n }\n return wrapLoading(state?.[stateKey] as unknown as LoadingModel);\n };\n const selSuccess = createSelector, TSuccess>(\n selectData,\n selectSuccess\n );\n const selOptionalSuccess = createSelector(\n selectData,\n selectOptionalSuccess\n );\n const selError = createSelector(\n selectData,\n selectOptionalError\n );\n const selLoading = createSelector(\n selectData,\n selectIsLoading\n );\n return {\n request,\n success,\n error,\n clear,\n ons,\n selectors: {\n success: selSuccess,\n optionalSuccess: selOptionalSuccess,\n error: selError,\n loading: selLoading,\n model: selectData\n }\n };\n};\n","import {\n Actions,\n ofType\n} from '@ngrx/effects';\n\nimport { \n LoadingAction,\n LoadingActionObject\n} from '../../../loading/src/lib/loading.actions';\n\nimport {\n catchError,\n flatMap,\n map\n} from 'rxjs/operators';\nimport {\n Observable,\n of\n} from 'rxjs';\nimport { TypedAction } from '@ngrx/store/src/models';\n\n/**\n * This creates an effect to use in Effects classes. This coordinates a simple\n * success and error payload effect.\n * @param actions - The actions object\n * @param actionObject - The created createLoadingAction object.\n * @param caller - Define what API method or asynchronous operation is needed to\n * run this. Return TSuccess.\n */\nexport const createLoadingEffect = (\n actions: Actions, actionObject: LoadingActionObject,\n caller: (action: LoadingAction) => Promise): Observable> => actions.pipe(\n ofType(actionObject.request),\n flatMap((action) => caller(action as LoadingAction)),\n map((response: TSuccess) => actionObject.success({ payload: response })),\n catchError(err => {\n return of(actionObject.error({ payload: err }));\n })\n);\n","/* eslint-disable no-underscore-dangle,no-useless-constructor */\n/**\n * Wraps around the typical data objects we write for success, error, loading, and empty state. This convenience\n * wrapper consolidates all of that logic into a handy wrapper.\n */\nexport class LoadingModel {\n static empty = () => new LoadingModel(false, false, false, undefined);\n\n static success = (success?: T): LoadingModel =>\n new LoadingModel(false, false, true, success);\n\n static error = (error?: Error, optionalSuccess?: T): LoadingModel =>\n new LoadingModel(false, true, false, optionalSuccess, error);\n\n /**\n * Mutates the model with a success state, preserving other state fields.\n * @param success - override success state.\n */\n mutate = (\n success: T2 | null) => new LoadingModel(\n this.isLoading,\n this.hasError,\n !!success,\n !success ? undefined : success\n );\n\n loading = (success: T | null = this.success) =>\n new LoadingModel(\n true,\n false,\n !!success && this.hasSuccess,\n !success ? undefined : success\n );\n\n public get success(): T {\n return this._success as T;\n }\n\n public get optionalSuccess(): T | undefined {\n return this._success;\n }\n\n constructor(\n public isLoading: boolean,\n private hasError: boolean,\n private hasSuccess: boolean,\n private _success?: T,\n public error?: Error\n ) {\n }\n\n isEmpty = () => !this.isSuccess() && !this.isError();\n\n hasLoaded = () => !this.isEmpty() && !this.isLoading;\n\n isSuccess = () => this.hasSuccess;\n\n isError = () => this.hasError;\n\n shouldLoad = () => !this.isSuccess() && !this.isLoading;\n\n public toString = () =>\n `Loading: ${this.isLoading}, Success: ${this.hasSuccess}:**${this._success}**, ` +\n `Error: ${this.hasError}:${this.error}`;\n}\n\n/**\n * Wraps an object that conforms to LoadingModel to restore object loss from\n * hydrating state during development.\n */\nexport const wrapLoading = (loading: any): LoadingModel => {\n if (loading instanceof LoadingModel) {\n return loading;\n } else {\n if (!loading) {\n return LoadingModel.empty();\n } else {\n return new LoadingModel(\n loading.isLoading || false,\n loading.hasError || false,\n loading.hasSuccess || false,\n loading._success,\n loading.error\n );\n }\n }\n};\n","import { LoadingModel, wrapLoading } from './loading.model';\n\nexport const selectSuccess = (state: LoadingModel) =>\n wrapLoading(state).success;\nexport const selectOptionalSuccess = (state: LoadingModel) =>\n wrapLoading(state).optionalSuccess;\nexport const selectIsLoading = (state: LoadingModel) =>\n wrapLoading(state).isLoading;\nexport const selectIsSuccess = (state: LoadingModel) =>\n wrapLoading(state).isSuccess();\nexport const selectOptionalError = (state: LoadingModel) =>\n wrapLoading(state).error;\nexport const selectIsError = (state: LoadingModel) =>\n wrapLoading(state).isError();\nexport const selectHasLoaded = (state: LoadingModel) =>\n wrapLoading(state).hasLoaded();\nexport const selectIsEmpty = (state: LoadingModel) =>\n wrapLoading(state).isEmpty();\n\n","import {\n Observable,\n Subject\n} from 'rxjs';\nimport { Action } from '@ngrx/store';\nimport { Actions } from '@ngrx/effects';\nimport { TypedAction } from '@ngrx/store/src/models';\nimport { take } from 'rxjs/operators';\nimport {\n LoadingActionObject\n} from '../src/lib/loading.actions';\n\nexport const generateMockActions = () => {\n const dispatcher = new Subject();\n return {\n dispatcher,\n actions: new Actions(dispatcher)\n };\n};\n\n/**\n * Simple verifier that checks if the request action results in a success returned.\n */\nexport const verifyActionSuccess = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n data: TSuccess,\n payload?: TRequest,\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.success({ payload: options.data }));\n};\n\n/**\n * Simple verifier that checks if the request action results in a failure returned.\n */\nexport const verifyActionError = (\n action: LoadingActionObject,\n effect: Observable>,\n dispatcher: Subject,\n options: {\n error: Error,\n payload?: TRequest\n }) => {\n let result: TypedAction;\n effect\n .pipe(take(1))\n .subscribe(next => {\n result = next;\n });\n // payload has type issues, just ignore them since we specify TRequest as type param already.\n dispatcher.next(action.request((options.payload || {}) as never));\n\n expect(result).toBeDefined();\n expect(result).toStrictEqual(action.error({ payload: options.error }));\n};\n","export * from './effects.testing'\n","import { createLoadingAction } from '../../../loading/src/lib/loading.actions';\nimport { Space } from '../../../data-common/src/lib/spaces/space.class';\nimport {\n RoomQueryOptions,\n RoomState,\n RoomStoreState\n} from './rooms.types';\nimport {\n createAction,\n createSelector,\n props\n} from '@ngrx/store';\n\nexport const roomStateSelector = (state: RoomStoreState) => state.rooms;\n\nexport const loadRoomsWithQuery = createAction('[Rooms] Load Rooms with query', props());\n\nexport const loadRoomsForResults = createLoadingAction('Rooms', 'query');\n\nexport const loadRoomsForResultsMap = createLoadingAction('Rooms for map', 'query');\n\n\nexport const loadLaterThatDayResults = createLoadingAction('Later Rooms', 'later');\n\nexport const loadNextDayResults = createLoadingAction('Next Day Rooms', 'next');\n\nexport const loadByIdResults = createLoadingAction('By Id Rooms', 'byid');\n\nexport const selectRoomResultsSuccess = createSelector(roomStateSelector,\n loadRoomsForResults.selectors.optionalSuccess);\n\nexport const loadDiffSizeResults = createLoadingAction('Different Size Rooms', 'size');\n","export * from './lib/storage.module';\nexport * from './lib/localstorage.wrapper'\n","export class LocalStorageWrapper {\n\n constructor(private prefix: string) {\n }\n\n protected setValue(key: string, value: string) {\n localStorage.setItem(`${this.prefix}.${key}`, value);\n }\n\n protected getValue(key: string): string | null {\n return localStorage.getItem(`${this.prefix}.${key}`) as string | null;\n }\n\n protected removeValue(key: string) {\n localStorage.removeItem(`${this.prefix}.${key}`);\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({\n imports: []\n})\nexport class StorageModule {\n}\n","export * from './lib/ui.module';\nexport * from './lib/types';\nexport * from './lib/base-template.component';\nexport * from './lib/recurrence-pattern-form/recurrence-pattern-form.component';\nexport * from './lib/recurrence-booking-form/recurrence-booking-form.component';\nexport * from './lib/conflicts-modal/conflicts-modal.component'\nexport * from './lib/override-changes-modal/override-changes-modal.component'\nexport * from './lib/date-tz-calendar-widget/date-tz-calendar-widget.component';\nexport * from './lib/date-tz-date-picker/date-tz-date-picker.component';\nexport * from './lib/date-tz-duration-field/date-tz-duration-field.component';\nexport * from './lib/date-tz-time-field/date-tz-time-field.component';\nexport * from './lib/aca-date-picker/aca-date-picker.component';\nexport * from './lib/conflict-alert-modal/conflict-alert-modal.component';\nexport * from './lib/tooltip/tooltip.enums';\nexport * from './lib/zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nexport * from './lib/catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n","import { Component, OnInit, Input, Output, OnChanges, SimpleChanges, forwardRef, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDatePickerOptions {\n /** Unix timestamp with millisecond. First selectable date */\n from?: number;\n /** Unix timestamp with millisecond. Last selectable date */\n to?: number;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: number;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'aca-date-picker',\n templateUrl: './aca-date-picker.component.html',\n styleUrls: ['./aca-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AcaDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class AcaDatePickerComponent implements OnInit, OnChanges, ControlValueAccessor {\n /** CSS class to add to the root element of the component */\n @Input() public klass = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDatePickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n /** Display the last selected day as active */\n @Input() public show_last_selection?: boolean = true\n\n public date: number = DateNow(new Date()).ms;\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private from: DateTZ;\n /** Last selectable date */\n private to: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n /** ID of the timer used for changing the month */\n private _change_timer: number;\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.date = item.value;\n if (this._onChange) {\n this._onChange(this.date);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date\n */\n public updateDate(): void {\n \n if (!this.date) {\n return;\n }\n const now = DateNow(new Date()).startOfValue('month');\n const date_ = new DateTZ({date: this.date})\n const date = date_.startOfValue('month');\n if (date.valid) {\n const difference = date.dateDiff(now, 'months', 'months');\n if (this.offset !== difference) {\n this.offset = difference;\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.from) {\n const date_ = new DateTZ({date: this.options.from})\n this.from = date_.startOfValue('day');;\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.from.startOfValue('month');\n this.min_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.from) {\n this.from = null;\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.to) {\n const date_ = new DateTZ({date: this.options.to})\n this.to = date_.startOfValue('day');\n const today = DateNow(new Date()).startOfValue('month');\n const date = this.to.startOfValue('month');\n this.max_offset = date.dateDiff(today, 'months', 'months');\n } else if (this.to) {\n this.to = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n if (!this.date) {\n return;\n }\n const date = DateNow(new Date()).addValue({ months : this.offset });\n const active = new DateTZ({date: this.date});\n let start = date.setValue({ day: 1 }).setValue({ weekday: 7 }).subtractValue({ weeks: 1 });\n const end_ = new DateTZ({date: start.ms})\n const end = end_.addValue({ weeks: 1 }).endOfValue('month').addValue({ days: 2 }).endOfValue('week');\n this.date_list = [];\n while (start.isBeforeDate(end) || start.isSameDate(end, 'day')) {\n this.date_list.push({\n value: start.ms,\n display: start.formatDate('d'),\n active: this.show_last_selection && active.isSameDate(start, 'day'),\n non_month: !date.isSameDate(start, 'month'),\n count: this.counters ? this.counters[start.formatDate('yyyy-MM-dd')] || 0 : 0,\n disabled: (this.from ? start.isBeforeDate(this.from, 'day') : false) || (this.to ? start.isAfterDate(this.to, 'day') : false),\n today: DateNow(new Date()).isSameDate(start, 'day')\n });\n start = start.addValue({ days : 1 });\n }\n this.month_name = date.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = DateNow(new Date()).startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days : 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n if (this._change_timer) {\n clearTimeout(this._change_timer);\n }\n this._change_timer = setTimeout(() => {\n const new_offset = this.offset + value;\n const now = DateNow(new Date())\n const date = now.addValue({ months : new_offset, days: now.dateMonth === 2 ? 2 : 0 }); //add 2 days if month is february to avoid calc errors\n if (this.from && date.isBeforeDate(this.from, 'month')) { return; }\n if (this.to && date.isAfterDate(this.to, 'month')) { return; }\n this.offset = new_offset;\n this.month.emit(this.offset);\n this.generateMonth();\n this._change_timer = null;\n }, 100);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const date = new DateTZ({date: this.date});\n const offset = this.offset;\n this.offset = DateNow(new Date()).dateDiff(date, 'months', 'months');\n if (offset !== this.offset) {\n this.generateMonth();\n }\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n this.date = value;\n this.updateDate();\n this.generateMonth();\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","
\n
\n
\n
\n
\n
{{month_name}}
\n
= max_offset\" (click)=\"changeMonth(1)\" (touchend)=\"changeMonth(1)\">\n
\n
\n
\n
\n
{{item}}
\n
\n
\n
\n
\n {{item.display}}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n
\n
\n
\n
","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges\n} from '@angular/core';\n\nexport enum AlertMode {\n Warning = 'warning',\n Coachmark = 'coachmark',\n BlueCoachmark = 'blue-coachmark',\n Error = 'error'\n}\n\nexport enum AlertBannerDisplay {\n /**\n * New UI\n */\n V2 = 'v2',\n\n /**\n * Default, legacy ui.\n */\n V1 = 'v1',\n}\n\n@Component({\n selector: 'mck-alert-banner',\n template: `\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n \n
\n `,\n styleUrls: ['./alert-banner.component.scss']\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n\n @Input()\n public mode: AlertMode = AlertMode.Warning;\n\n @Output()\n public close = new EventEmitter();\n\n @Output()\n public action = new EventEmitter();\n\n @Input()\n public message: string;\n\n @Input()\n public buttonText: string;\n\n @Input()\n public showClose = true;\n\n @Input()\n public display: AlertBannerDisplay = AlertBannerDisplay.V1;\n\n public iconPath: string = 'assets/icon/warning-yellow.svg';\n public materialColor: string = 'black';\n public closeIcon: string = 'close_outline.svg';\n\n public ngOnInit(): void {\n this._onModeChange();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.mode) {\n this._onModeChange();\n }\n }\n\n private _onModeChange() {\n this.iconPath = 'assets/icon/warning-yellow.svg';\n this.closeIcon = 'close_outline.svg';\n switch (this.mode) {\n case AlertMode.Warning:\n this.materialColor = 'black';\n break;\n case AlertMode.Coachmark:\n this.materialColor = 'coachmark';\n this.closeIcon = 'close_outline_coachmark.svg';\n break;\n case AlertMode.BlueCoachmark:\n this.iconPath = 'assets/icon/info-bg-dark.svg'\n this.materialColor = 'blue-coachmark'\n break;\n case AlertMode.Error:\n this.iconPath = 'assets/img/error-icon.svg'\n this.materialColor = 'white'\n break;\n default:\n this.materialColor = 'black';\n }\n }\n\n}\n","import {\n Component,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NgControl\n} from '@angular/forms';\nimport { SelectOption } from '../types';\nimport {\n BehaviorSubject,\n combineLatest,\n from,\n Subject\n} from 'rxjs';\nimport {\n COMMA,\n ENTER\n} from '@angular/cdk/keycodes';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport {\n distinctUntilChanged,\n map,\n take\n} from 'rxjs/operators';\nimport { MatCheckboxChange } from '@angular/material/checkbox';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\n@Component({\n selector: 'mck-autocomplete-chip-select-item',\n template: `\n
\n \n {{label}}\n \n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n \n \n \n {{selected.shortDisplay}}\n close\n \n \n \n \n
\n \n \n {{option.dropdownOverride || option.display}}\n \n \n
\n
\n \n Clear\n \n \n Confirm\n \n
\n \n \n {{errorMessage}}\n
\n `,\n styleUrls: ['./auto-complete-chip-select-item.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class AutoCompleteChipSelectItemComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor, OnDestroy {\n\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n @ViewChild('componentInput')\n componentInput: HTMLInputElement;\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n feedbackInput?: boolean;\n\n @Input()\n loading?: boolean;\n\n @Input()\n placeHolder: string;\n\n @Input()\n options: Subject[]>;\n\n @Input()\n selectedOptions: Subject[]>;\n\n @Input()\n useCTAs?: boolean;\n\n @Output()\n optionSelected = new EventEmitter>();\n\n @Output()\n feedbackOutput = new EventEmitter();\n\n @Output()\n chipsCleared: EventEmitter = new EventEmitter();\n\n @Output()\n onClickConfirm: EventEmitter = new EventEmitter();\n\n /**\n * If true, only allow 1 group at a time to get selected. Show others as disabled.\n */\n @Input()\n selectOnlyOneGroup = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input() public localFilter: boolean = true;\n\n /**\n * If error exists, a message.\n */\n @Input()\n errorMessage?: string;\n\n @Input()\n hideDropdownCarret?: boolean;\n\n @Input()\n displayCTA?: boolean;\n\n private selectOnlyOneGroupChange = new BehaviorSubject(false);\n\n separatorKeysCodes = [ENTER, COMMA];\n\n public filterFormControl: FormControl = new FormControl();\n\n public focused = false;\n public mobileFullScreen = false;\n\n public autocompleteOptions = new BehaviorSubject[]>([]);\n public filteredAutocompleteOptions = new BehaviorSubject[]>([]);\n\n /** List shown to user, filters children if a group header is added **/\n public chipOptions = new BehaviorSubject[]>([]);\n\n /** Form control on change handler */\n private _onChange?: (_: SelectOption[]) => void;\n /** Form control on touch handler */\n private _onTouch?: (_: string) => void;\n\n private value = new BehaviorSubject[]>([]);\n\n public enableCTAs: boolean = false\n\n public hasChips: boolean = false;\n\n constructor(@Self() @Optional() private control: NgControl) {\n super();\n if (this.control) {\n this.control.valueAccessor = this;\n }\n }\n\n public get invalid(): boolean {\n return this.control ? this.control.invalid : false;\n }\n\n public get showError(): boolean {\n if (!this.control) {\n return false;\n }\n\n const { dirty, touched } = this.control;\n\n return this.invalid ? (dirty && touched) : false;\n }\n\n public iconFillClass(color?: string): string {\n return color === 'external' ? 'mck-icon-fill-gray' : 'mck-icon-fill-white'\n }\n\n ngOnInit() {\n this.subscription('autoCompleteOptions', combineLatest([\n this.options,\n this.selectedOptions,\n this.selectOnlyOneGroupChange\n ])\n .pipe(\n map(([options, selectedOptions, selectOnlyOneGroup]) => {\n this.hasChips = !!selectedOptions.length;\n return options.map(option => {\n const selected = !!selectedOptions.find(s => s.value === option.value);\n let enabled = true;\n if (selectOnlyOneGroup) {\n // find first group item in selection\n const selectedGroupHeader = selectedOptions.find(s => s.groupHeader || s.groupId === option.groupId);\n\n // if no options chosen, enable it, otherwise only allow selections from other options.\n enabled =\n selectedOptions.length === 0 ||\n (selectedGroupHeader ? selectedGroupHeader.groupId === option.groupId : false);\n this.enableCTAs = selectedOptions.length !== 0\n }\n\n return {\n ...option,\n enabled,\n selected\n } as SelectOption;\n });\n })\n ).subscribe(next => {\n const options = next.sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n this.autocompleteOptions.next(options);\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(this.filterFormControl.value?.trim()));\n }));\n this.subscription('filterFormControlChanges',\n this.filterFormControl.valueChanges.subscribe(value => {\n if (this.localFilter && value.length) {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions(value));\n } else {\n this.filteredAutocompleteOptions.next(this.getFilteredAutocompleteOptions());\n }\n }));\n this.subscription('chipOptions', this.selectedOptions\n .pipe(map(selectedOptions => {\n // find group headers and check if children are part of that group.\n // if part of group, filter them out as redundant.\n const groupHeaders = selectedOptions.filter(s => s.groupHeader) || [];\n return selectedOptions.filter(s => s.groupHeader || s.groupChild && !(groupHeaders.find(g => g.groupId === s.groupId)));\n }))\n .subscribe(next => {\n this.chipOptions.next(next);\n }));\n\n this.subscription('formData', this.selectedOptions\n .pipe(map(selected => {\n // group headers always contain children, so only pick out children for data\n return selected;\n }))\n .subscribe(next => {\n this.value.next(next);\n }));\n\n // tie value changes to change.\n this.subscription('valueChanges', this.value\n .pipe(distinctUntilChanged())\n .subscribe(next => {\n if (this._onChange) {\n // rewrote this to avoid read only error\n const values = [];\n next.forEach((v, i) => {\n const value = { ...v };\n if (v.meta?.user) {\n value.display = v.meta.user.name;\n }\n values.push(value);\n });\n this._onChange(values);\n }\n }));\n\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n getFilteredAutocompleteOptions(searchString: string = '') {\n // Exact matches of the groupId or display value\n const exactMatches = this.autocompleteOptions.value.filter(o => {\n if (searchString && searchString.length) {\n return o.groupId.toLowerCase().indexOf(searchString.toLowerCase()) === 0 || o.display.toLowerCase().indexOf(searchString.toLowerCase()) === 0;\n }\n return o.groupId && o.display;\n });\n // Fuzzier search of the dropdownOverride field\n const moreOptions = this.autocompleteOptions.value.filter(o => {\n if (o?.dropdownOverride?.length && searchString) {\n const match = o.dropdownOverride?.toLowerCase().indexOf(searchString.toLowerCase()) > -1;\n // only return found locations that don't exist in exactMatches.\n return match && !exactMatches.find(e => {\n return e.value === o.value\n });\n }\n return false;\n });\n\n // Merge the two result sets\n let joinedOptions = exactMatches.concat(moreOptions).sort((a, b) => {\n if (a.groupId === b.groupId) {\n return b.display > a.display ? -1 : 1;\n }\n return b.groupId > a.groupId ? -1 : 1;\n });\n\n // Create a 1D array of the groupId\n const groupIds = joinedOptions.map(o => o.groupId);\n // Get a deduped list of the group parents\n const parents = this.autocompleteOptions.value.filter(o => {\n return o?.groupHeader && groupIds.indexOf(o.groupId) !== -1;\n });\n\n // Remove the parents from the joinedOptions and merge with the reduced parents set, and then sort by groupId.\n // Resulting array sets the parents first in order so the widget renders properly.\n const filteredAutocompleteOptions = parents.concat(joinedOptions.filter(jo => !!jo.dropdownOverride)).sort((a, b) => {\n return b.groupId > a.groupId ? -1 : 1;\n });\n return filteredAutocompleteOptions;\n }\n\n loseFocus(): void {\n this.mobileFullScreen = false;\n this.focused = false;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectOnlyOneGroup) {\n this.selectOnlyOneGroupChange.next(this.selectOnlyOneGroup);\n }\n }\n\n keyedInput(matInput: string) {\n if (this.feedbackInput) {\n this.feedbackOutput.emit(matInput);\n }\n }\n\n selectOption(value: string) {\n this.options.pipe(\n take(1),\n map((options: SelectOption[]) => options.find(o => o.value === value))\n ).subscribe(next => {\n if (next) {\n this.optionSelected.emit(next);\n }\n });\n }\n\n removeOption(value: SelectOption) {\n this.optionSelected.emit(value);\n if (this.useCTAs) {\n this.onClickConfirm.emit();\n }\n\n }\n\n clearSelections() {\n this.selectedOptions.next([]);\n this.chipsCleared.emit();\n }\n\n onClickArrow() {\n // only close events we allow arrow to close panel.\n if (this.focused) {\n this.onFocus(false);\n }\n }\n\n onPanelFocusChange(focusIn: boolean) {\n this.onFocus(focusIn, true);\n }\n\n onFocus(focusIn: boolean, fromPanel?: boolean) {\n if (!focusIn && this.useCTAs) {\n this.onClickConfirm.emit();\n }\n // Only for location input???\n if (this.localFilter && fromPanel && focusIn) {\n // open on focus, mobile needs a refocus\n this.mobileFullScreen = true;\n this.timeout('showDefaults', () => {\n // All results do not show as expected unless I focus again.\n // Something about the mobile styles.\n this.onFocus(true);\n }, 100)\n }\n\n if (this.feedbackInput && !fromPanel) {\n // clear input when input creates options\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n this.feedbackOutput.emit('');\n }\n\n if (this.focused !== focusIn) {\n this.focused = focusIn;\n // clear on close\n if (!focusIn) {\n this.componentInput.value = '';\n this.filterFormControl.setValue('');\n }\n if (!fromPanel) {\n if (focusIn) {\n this.trigger.openPanel();\n } else {\n this.trigger.closePanel();\n // close the mobile full screen\n this.loseFocus();\n }\n }\n }\n }\n\n onChanged(value: SelectOption, event: MatCheckboxChange) {\n this.optionSelected.emit(value);\n }\n\n add(event: MatChipInputEvent) {\n // reset\n if (event.input) {\n event.input.value = '';\n }\n this.filterFormControl.setValue('');\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n // TODO: disabled not implemented yet.\n this.disabled = isDisabled;\n }\n\n writeValue(obj: SelectOption[] | undefined): void {\n // update selected options when this value is written\n this.options?.pipe(\n take(1),\n map((options: SelectOption[]) => {\n return options.filter(o => obj ? !!obj.find(spl => o.value === spl.value) : false );\n })\n ).subscribe(next => {\n this.selectedOptions.next(next);\n });\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null && !event.srcElement.classList.contains('mat-form-field-autofill-control')) {\n this.onFocus(false);\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\nimport { SelectOption } from '../types';\n\n/**\n * Patch orphaned SelectOption children into acting as their own group headers.\n *\n * This intends to help in the common scenario where filters have (for whatever\n * reason) prevented the child's usual group header from appearing.\n */\n@Pipe({\n name: 'groupHeaderPatch',\n})\nexport class GroupHeaderPipe implements PipeTransform {\n transform(items: SelectOption[]): SelectOption[] {\n if (!items) {\n return [];\n }\n\n return items.map(v => {\n const hasHeader = !!items.find(i => i.groupHeader && i.groupId === v.groupId);\n return {\n ...v,\n displayAsHeader: !hasHeader,\n }\n })\n }\n\n}\n","import { Component, Input, Output, forwardRef, SimpleChanges, OnChanges, OnInit, EventEmitter, ViewChild, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\nimport {\n BehaviorSubject\n} from 'rxjs';\n\n/**\n * @title Autocomplete filtering select of a single option via text search.\n */\n@Component({\n selector: 'mck-autocomplete-select-option',\n templateUrl: 'auto-complete-select-option.component.html',\n styleUrls: ['auto-complete-select-option.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutoCompleteSelectOptionComponent),\n multi: true\n }\n ],\n})\nexport class AutoCompleteSelectOptionComponent implements OnInit, OnChanges, ControlValueAccessor, OnDestroy{\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n @Input()\n public resetInput: number | undefined;\n\n @Input()\n public placeholder: string;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Output()\n public filteredOptionsChange = new EventEmitter[]>();\n\n @Output()\n public inputTextChange = new EventEmitter();\n\n @Output() emptyBoxEvent = new EventEmitter();\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n filterFormControl = new FormControl();\n filteredOptions: Observable[]>;\n\n /** The selected value */\n public value = new BehaviorSubject('');\n\n /** Available options to search / select from */\n public _options = new BehaviorSubject[]>(this.options);\n @ViewChild('trigger')\n trigger: MatAutocompleteTrigger;\n\n ngOnInit() {\n this.updateFilteredOptions();\n window.addEventListener('scroll', this.scrollEvent, true);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n // Watch and apply changes from the parent component.\n if (changes.options || changes.selectedValue) {\n if (changes.options && !changes.selectedValue) {\n this.filterFormControl.setValue('')\n }\n this.updateFilteredOptions();\n }\n if (changes.resetInput) {\n this.filterFormControl.setValue('');\n this.updateFilteredOptions();\n }\n \n }\n\n private updateFilteredOptions() {\n this.filteredOptions = this.filterFormControl.valueChanges\n .pipe(\n startWith(''),\n map(value => typeof value === 'string' ? value : value && value?.display ? value.display : ''),\n map(name => name ? this._filter(name) : this.options.slice())\n );\n }\n\n displayFn(data: SelectOption): string {\n return data && data?.display ? data.display : '';\n }\n\n private _filter(display: string): SelectOption[] {\n const filterValue = display.toLowerCase();\n // return all the matches found\n const filtered = this.options.filter(option => {\n // split this input and index both, if both\n // match return true.\n if (filterValue.includes(' ')) {\n const filterValues =filterValue.split(' ');\n let matchesAll = true;\n for (let x = 0; x < filterValues.length; x++) {\n if (option.display.toLowerCase().indexOf(filterValues[x]) === -1) {\n matchesAll = false;\n }\n }\n if (matchesAll) {\n return true;\n }\n }\n // match the whole string\n return option.display.toLowerCase().indexOf(filterValue) > -1;\n });\n this.inputTextChange.emit(filterValue);\n this.filteredOptionsChange.emit(filtered);\n return filtered;\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: SelectOption): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value.value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n public onChangeInput() {\n if (this.filterFormControl.value === '') {\n this.emptyBoxEvent.emit(true);\n }\n }\n\n private scrollEvent = (event): void => {\n if (this.trigger === null) {\n return;\n }\n /**\n * IF - to confirm user not scrolling from autocomplete opened panel and close panel if scroll event triggers from outside of panel\n */\n if (this.trigger.panelOpen && event.target.closest('.mat-autocomplete-panel') === null ) {\n this.trigger.closePanel();\n this.trigger['_element'].nativeElement.blur();\n }\n }\n public ngOnDestroy(): void {\n window.removeEventListener('scroll', this.scrollEvent, true);\n }\n\n}","
\n {{label}}\n \n \n \n \n {{option.shortDisplay || option.display}}\n \n \n \n
","import {\n AfterViewInit,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\n/**\n * A helper class for rendering embedded views (ng-template) as standalone components.\n *\n * If the view is lazy and does not render upon initialization,\n * it attempts embedding view again later.\n *\n * When testing a component directly that extends this class, its best to wrap the component\n * in a wrapper component for testing so that it can render itself.\n */\nexport class BaseTemplateComponent extends BaseDirective implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild(TemplateRef, { static: true })\n public template: TemplateRef;\n\n private isRendered = false;\n\n constructor(private vcRef: ViewContainerRef) {\n super();\n }\n\n public ngOnInit(): void {\n // try early rendering\n this.attemptViewEmbed();\n }\n\n public attemptViewEmbed() {\n if (this.template && !this.isRendered) {\n this.isRendered = true;\n this.vcRef.createEmbeddedView(this.template);\n return true;\n }\n return false;\n }\n\n public ngAfterViewInit(): void {\n if (!this.isRendered) {\n console.log('View not rendered yet, attempting to post initialization');\n setTimeout(() => {\n console.log('Timeout ended, trying again', this.template);\n if (!this.attemptViewEmbed()) {\n console.log('Attempting render in after view initialization');\n setTimeout(() => {\n if (!this.attemptViewEmbed()) {\n console.error('FAILED TO LOAD TEMPLATE');\n }\n }, 1000);\n }\n });\n }\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n this.isRendered = false;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'catering-drop-modal',\n templateUrl: './catering-drop-modal.component.html',\n styleUrls: ['./catering-drop-modal.component.scss']\n})\nexport class CateringDropComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onConfirm(): void {\n this.dialogRef.close(true);\n}\n\nonCancel(): void {\n this.dialogRef.close(false);\n}\n}\n","
\n

Catering conflict

\n
\n\n
\n
\n

Proceed without catering?

\n
\n
\n
\n\n
\n \n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input\n } from \"@angular/core\";\n import { DropdownPanel } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select-options\",\n templateUrl: \"./cng-select-options.component.html\",\n styleUrls: [\"./cng-select-options.component.scss\"]\n })\n export class CngSelectOptionsComponent implements DropdownPanel {\n @ViewChild(TemplateRef) templateRef: TemplateRef;\n @Output() closed = new EventEmitter();\n @Input() ddWidth: string;\n \n constructor() {}\n }\n ","\n
\n \n
\n
","import {\n Component,\n Output,\n TemplateRef,\n ViewChild,\n EventEmitter,\n Input,\n OnInit\n } from \"@angular/core\";\n import { DropdownPanel, DropdownOpion } from \"./dropdown-panel\";\n \n @Component({\n selector: \"cng-select\",\n templateUrl: \"./cng-select.component.html\",\n styleUrls: [\"./cng-select.component.scss\"]\n })\n export class CngSelectComponent implements OnInit {\n @Input() data: any;\n public isClosed: boolean = false;\n public selected: DropdownOpion;\n constructor() {\n\n }\n ngOnInit(): void {\n this.selected = this.data.defaultSelected;\n }\n\n public optionSelected(item: DropdownOpion) {\n // this.selected = item;\n this.data.defaultSelected = item;\n this.data?.onChangeCallback && this.data?.onChangeCallback(item);\n }\n }\n ","\n\n
\n {{data?.defaultSelected?.display}}\n
\n \n
\n
\n\n
{{item?.display}}
\n
","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n ViewContainerRef\n } from '@angular/core';\n import { DropdownPanel } from './dropdown-panel';\n import { Overlay, OverlayRef } from '@angular/cdk/overlay';\n import { TemplatePortal } from '@angular/cdk/portal';\n import { merge, Observable, Subscription } from 'rxjs';\n \n @Directive({\n selector: '[dropdownTriggerFor]',\n host: {\n '(click)': 'toggleDropdown()'\n }\n })\n export class DropdownTriggerForDirective implements OnDestroy, AfterViewInit, OnInit {\n private isDropdownOpen = false;\n private overlayRef: OverlayRef;\n private dropdownClosingActionsSub = Subscription.EMPTY;\n \n @Input('dropdownTriggerFor') public dropdownPanel: DropdownPanel;\n @Output() isPanelOpened = new EventEmitter();\n constructor(\n private overlay: Overlay,\n private elementRef: ElementRef,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {\n \n }\n ngOnInit(): void {\n // const cngSelectEl = this.elementRef.nativeElement.nextElementSibling; \n // const parentWidth = this.elementRef.nativeElement.offsetWidth; \n // this.renderer.setStyle(cngSelectEl, 'width', `${parentWidth}px`);\n }\n ngAfterViewInit(): void {\n \n }\n\n \n toggleDropdown(): void {\n this.isDropdownOpen ? this.destroyDropdown() : this.openDropdown();\n \n }\n \n openDropdown(): void {\n let {ddWidth} = this.dropdownPanel;\n this.dropdownPanel.ddWidth = ddWidth !=='' ? ddWidth : `${this.elementRef.nativeElement.offsetWidth}px`;\n this.isDropdownOpen = true;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8\n }\n ])\n });\n \n const templatePortal = new TemplatePortal(\n this.dropdownPanel.templateRef,\n this.viewContainerRef\n );\n this.overlayRef.attach(templatePortal);\n \n this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(\n () => this.destroyDropdown()\n );\n }\n \n private dropdownClosingActions(): Observable {\n const backdropClick$ = this.overlayRef.backdropClick();\n const detachment$ = this.overlayRef.detachments();\n const dropdownClosed = this.dropdownPanel.closed;\n \n return merge(backdropClick$, detachment$, dropdownClosed);\n }\n \n private destroyDropdown(): void {\n if (!this.overlayRef || !this.isDropdownOpen) {\n return;\n }\n \n this.dropdownClosingActionsSub.unsubscribe();\n this.isDropdownOpen = false;\n this.isPanelOpened.emit(this.isDropdownOpen);\n this.overlayRef.detach();\n }\n \n ngOnDestroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n }\n }\n ","import {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ViewChild,\n AfterViewInit,\n Output,\n EventEmitter\n} from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { CollapseService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'mck-collapse-header',\n template: `\n \n \n {{title}} \n
\n
\n \n
\n \n
\n
\n {{description}}\n \n \n \n \n `,\n styleUrls: ['./collapse-header.component.scss'],\n})\nexport class CollapseHeaderComponent implements OnInit, OnDestroy {\n\n @Input() title: string;\n @Input() description: string;\n @Input() isLoading = false;\n @Input() expandedIds: string[] = [];\n @Output() updateSectionIdOnOpen = new EventEmitter<{ status: string, id: string }>(); // Emit the id of the opened result section\n\n @ViewChild('expansionPanel') expansionPanel: MatExpansionPanel;\n\n public isExpanded = new BehaviorSubject(false);\n private collapseSubscription: Subscription;\n\n constructor(private collapseService: CollapseService) {}\n\n ngOnInit(): void {\n this.collapseSubscription = this.collapseService.collapse$.subscribe(() => {\n if (this.expansionPanel) {\n this.expansionPanel.close(); // Close the panel\n }\n });\n }\n\n // Update opened section id and emit the id of the opened result section to the parent component \n public updateOpenedSectionId(isOpen: string) {\n this.updateSectionIdOnOpen.emit({ status: isOpen, id: this.expandedTitleId });\n }\n\n\n \n /**\n * Gets the expanded title as an id by removing parentheses and replacing spaces with underscores.\n * @returns The expanded title.\n */\n public get expandedTitleId(): string {\n return this.title?.split('(')[0]?.split(' ')?.join('_') ;\n }\n\n ngOnDestroy(): void {\n this.collapseSubscription.unsubscribe();\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nexport interface RoomAvaibilityModalData {\n\theaderText: string,\n\tmessage: string,\n\tbuttonLabel: string,\n\tcallback: Function,\n shouldClose: boolean\n}\n\n@Component({\n selector: 'conflict-alert-modal',\n templateUrl: 'conflict-alert-modal.component.html',\n styleUrls: ['./conflict-alert-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConflictAlertModalComponent implements OnInit {\n constructor(public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public dialogData: RoomAvaibilityModalData) {\n }\n ngOnInit(): void {}\n\n public done() {\n this.dialogData?.callback(); this.dialogRef.close()\n }\n}\n","
\n \n
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{{dialogData?.headerText}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{dialogData?.message}}
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t\t \n\t\t\t\n
","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport {DialogEvent} from '@mckinsey-converge/base';\nimport {DateTZ, isToday} from '@mckinsey-converge/date-tz';\n\nexport interface ConflictsModalComponentData {\n room_name: string;\n conflicts: number[];\n copy_conflicts?: boolean;\n timezone: string;\n status?: string;\n}\n\n@Component({\n selector: 'app-conflicts-modal',\n templateUrl: './conflicts-modal.component.html',\n styleUrls: ['./conflicts-modal.component.scss']\n})\nexport class ConflictsModalComponent implements OnInit{\n public room_name: string;\n public conflicts: number[];\n public copy_conflicts: boolean;\n public timezone;\n public status: string;\n\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: ConflictsModalComponentData){\n\n }\n\n public ngOnInit(){\n this.timezone = this._data.timezone;\n this.room_name = this._data.room_name\n this.conflicts = this._data.conflicts\n this.copy_conflicts = this._data.copy_conflicts\n this.status = this._data.status\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone});\n const dateIsToday = isToday(dateTZ, this.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n\n public copy(): void {\n this.event.emit({ reason: 'action' });\n }\n\n\n}\n","
\n \n
\n\n
\n

Conflicts ({{conflicts.length}})

\n
\n The {{room_name}} room is not available on the following dates.\n Do you want to proceed without booking these days?\n
\n
\n The {{room_name}} room is not available on the following dates.\n You need to make individual bookings to cover these days, please.\n
\n
\n
\n
\n Date\n
\n
\n
\n {{formatDate(conflict)}}\n
\n
\n
\n
\n\n \n {{copy_conflicts ? 'Copy to clipboard' : 'Close'}}\n \n \n {{copy_conflicts ? 'Close' : 'Continue'}}\n \n\n","import { Component, OnInit, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'custom-snackbar',\n templateUrl: './custom-snackbar-component.component.html',\n styleUrls: ['./custom-snackbar-component.component.scss'],\n})\nexport class CustomSnackbarComponent implements OnInit {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) {\n }\n\n ngOnInit() {}\n\n get getIcon() {\n switch (this.data.snackType) {\n case 'success':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-success.svg',\n };\n case 'error':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-failure.svg',\n };\n case 'warn':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-warning.svg',\n };\n case 'info':\n return {\n type: this.data.snackType,\n iconPath: 'assets/icon/toast-info.svg',\n };\n default:\n return { type: 'info', iconPath: 'assets/icon/toast-info.svg' };\n }\n }\n\n closeSnackbar() {\n this.data.snackBar.dismiss();\n }\n}\n","
\n
\n
\n \"{{getIcon.type}}\n
\n
\n {{data.message}}\n
\n
\n
\n
close
\n
\n
","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CustomSnackbarComponent } from './custom-snackbar-component.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackBarService {\n messageText: string[];\n constructor(public snackBar: MatSnackBar) {}\n\n public openSnackBar(\n message,\n type,\n duration?,\n verticalPosition?,\n horizontalPosition?\n ) {\n const _snackType = type !== undefined ? type : 'success';\n this.snackBar.openFromComponent(CustomSnackbarComponent, {\n duration: duration || 4000,\n horizontalPosition: horizontalPosition || 'end',\n verticalPosition: verticalPosition || 'top',\n data: {\n message: message,\n snackType: _snackType,\n snackBar: this.snackBar,\n },\n });\n }\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n OnChanges,\n SimpleChanges,\n forwardRef,\n EventEmitter,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseClass } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface IDateTzPickerOptions {\n /** DateTZ object. First selectable date */\n fromDateTz?: DateTZ;\n /** DateTZ object. Last selectable date */\n untilDateTz?: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `DDD` */\n day_format?: string;\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n month_format?: string;\n}\n\ninterface IDateBlock {\n /** Timestamp value of the date */\n value: DateTZ;\n /** Day of the month to display */\n display: string;\n /** Whether block is the selected date */\n active: boolean;\n /** Whether block not selectable */\n disabled: boolean;\n /** Whether block outside the active month */\n non_month: boolean;\n /** Whether the block is today */\n today: boolean;\n /** Number of events on this block */\n count?: number;\n}\n\n@Component({\n selector: 'date-tz-calendar-widget',\n templateUrl: './date-tz-calendar-widget.component.html',\n styleUrls: ['./date-tz-calendar-widget.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzCalendarWidgetComponent),\n multi: true,\n },\n ],\n})\nexport class DateTzCalendarWidgetComponent\n extends BaseClass\n implements OnInit, OnChanges, ControlValueAccessor\n{\n /** CSS class to add to the root element of the component */\n @Input() public className = 'default';\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n @Input() public counters: { [date: string]: number };\n /** Settings for the date picker component */\n @Input() public options: IDateTzPickerOptions;\n /** Offset of the display month from the current month */\n @Output() public month = new EventEmitter();\n\n public readonly weeks = new Array(6).fill(0);\n public selectedDateTz: DateTZ = DateNow();\n\n // R--- this is the date picker that needs to be TZ aware\n /** Offset of the month displayed from the current month */\n public offset = 0;\n /** Minimum offset for changing the month */\n public min_offset = -999999;\n /** Maximum offset for changing the month */\n public max_offset = 999999;\n /** Blocks representing the rendering details of the display days of the month */\n public date_list: IDateBlock[] = [];\n /** Name of the actively displayed month */\n public month_name = DateNow(new Date()).formatDate('MMMM yyyy');\n /** Name of the days of the week to display */\n public days_of_week = [];\n /** First selectable date */\n private fromTz: DateTZ;\n /** Last selectable date */\n private toTz: DateTZ;\n /** Luxon format string for formatting days of the week. Defaults to `dd` */\n private day_format = 'EEE';\n /** Luxon format string for formatting active month. Defaults to `MMMM yyyy` */\n private month_format = 'MMMM yyyy';\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n private _today = DateNow();\n\n public get timezone() {\n return this.selectedDateTz?.building_tz || '';\n }\n\n public ngOnInit(): void {\n this.generateMonth();\n this.generateDaysOfTheWeek();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this.updateOptions();\n }\n if (changes.counters) {\n this.generateMonth();\n }\n }\n\n /** Change date using the given block */\n public setDate(item: IDateBlock) {\n this.selectedDateTz = item.value;\n if (this._onChange) {\n this._onChange(this.selectedDateTz);\n }\n this.generateMonth();\n }\n\n /**\n * Update offset to show the selected date 2\n */\n public updateDate(): void {\n if (!this.selectedDateTz) {\n return;\n }\n const now = this._today.startOfValue('month');\n const startOfMonthDateTz = this.selectedDateTz.startOfValue('month');\n if (startOfMonthDateTz.valid) {\n const difference = startOfMonthDateTz.dateDiff(\n now,\n 'months',\n 'months'\n );\n if (this.offset !== difference) {\n this.offset = Math.round(difference);\n this.month.emit(this.offset);\n }\n this.generateMonth();\n }\n }\n\n /**\n * Update local properties based off changes to settings\n */\n public updateOptions(): void {\n if (this.options) {\n // Setup from date\n if (this.options.fromDateTz) {\n const today = this._today.startOfValue('month');\n this.fromTz = this.options.fromDateTz.startOfValue('day');\n this.min_offset = Math.round(\n this.fromTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months')\n );\n } else if (this.fromTz) {\n this.fromTz = null; // R-- check if ok\n this.min_offset = -999999;\n }\n // Setup to date\n if (this.options.untilDateTz) {\n const today = this._today.startOfValue('month');\n this.toTz = this.options.untilDateTz.startOfValue('day');\n this.max_offset = this.toTz\n .startOfValue('month')\n .dateDiff(today, 'months', 'months');\n } else if (this.toTz) {\n this.toTz = null;\n this.max_offset = 999999;\n }\n if (this.options.month_format) {\n this.month_format = this.options.month_format || 'MMMM yyyy';\n }\n if (this.options.day_format) {\n this.day_format = this.options.day_format || 'EEE';\n this.generateDaysOfTheWeek();\n }\n // Update date blocks\n this.generateMonth();\n }\n }\n\n /**\n * Generate the display blocks for the days of the active month\n */\n private generateMonth(): void {\n this._today = new DateTZ({ date: Date.now(), is_local_tz: !this.timezone, building_tz: this.timezone });\n const startOfMonthDateTz = this._today.addValue({ months: this.offset });\n const active = this.selectedDateTz || DateNow();\n let startDate = startOfMonthDateTz\n .setValue({ day: 1 })\n .setValue({ weekday: 7 })\n .subtractValue({ weeks: 1 });\n this.date_list = [];\n for (let i = 0; i < 42; i++) {\n this.date_list.push({\n value: startDate,\n display: startDate.formatDate('d'),\n active: active.isSameDate(startDate, 'day'),\n non_month: !startOfMonthDateTz.isSameDate(startDate, 'month'),\n count: this.counters\n ? this.counters[startDate.formatDate('yyyy-MM-dd')] || 0\n : 0,\n disabled:\n (this.fromTz ? startDate.ms < this.fromTz.ms : false) ||\n (this.toTz ? startDate.ms > this.toTz.ms : false),\n today: this._today.isSameDate(startDate, 'day'),\n });\n startDate = startDate.addValue({ days: 1 });\n }\n this.month_name = startOfMonthDateTz.formatDate(this.month_format);\n }\n\n /**\n * Generate this weekdays to display in the header of the calendar\n */\n private generateDaysOfTheWeek() {\n let date = this._today.startOfValue('week');\n this.days_of_week = [];\n for (let i = 0; i < 7; i++) {\n this.days_of_week.push(date.formatDate(this.day_format));\n date = date.addValue({ days: 1 });\n }\n }\n\n /**\n * Changes the month offset by the given value.\n * Does nothing if the new month is not available to be selected\n * @param value Number of months to change the offset by\n */\n public changeMonth(value: number): void {\n const new_offset = Math.min(\n this.max_offset,\n Math.max(this.min_offset, this.offset + value)\n );\n this.offset = Math.round(new_offset);\n this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Reset the month offset to the month of the selected date\n */\n public reset() {\n const offset = this.offset;\n this.offset = Math.round(\n this._today.dateDiff(this.selectedDateTz, 'months', 'months')\n );\n if (offset !== this.offset) this.generateMonth();\n this.month.emit(this.offset);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: DateTZ) {\n if (value) {\n this.selectedDateTz = value;\n this.updateDate();\n this.generateMonth();\n }\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n}\n","
\n
\n \n
\n \n
{{ month_name }}
\n = max_offset\"\n (click)=\"changeMonth(1)\"\n >\n
\n \n
\n \n \n \n \n \n \n \n \n \n
{{ item }}
\n \n {{ item.display }}\n
\n
{{item.count > 9 ? '+9' : item.count}}
\n \n
\n
\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTzCalendarWidgetComponent } from '../date-tz-calendar-widget/date-tz-calendar-widget.component';\n\n@Component({\n selector: 'date-tz-date-picker',\n template: `\n \n {{label}}\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./date-tz-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class DateTzDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n @Input() public label?: string;\n /** Earliest date available the user is allowed to pick */\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n /** Latest date available the user is allowed to pick */\n @Input() public untilDateTz: DateTZ = DateNow(new Date()).endOfValue('day').addValue({ years: 1 });\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n // R-- possible TODO, address all_day that disables this input and displays \"Add Day for the value like the time picker\"\n @Input() public all_day: boolean = false;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public counters: any;\n\n @Input() public initialDateSelectionTz?: DateTZ;\n\n @Output() public onSelect = new EventEmitter();\n\n @Input() public invalid?: boolean;\n\n @Input() public timezone?: string;\n\n @Input() public can_pick_today: boolean = true;\n\n /** Whether form control is invalid, touched and contains errors */\n @Input() public error?: boolean;\n\n public ngOnInit(): void {\n if (this.initialDateSelectionTz) {\n this.writeValue(this.initialDateSelectionTz)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(DateTzCalendarWidgetComponent, {static: true }) private _acaDatePicker: DateTzCalendarWidgetComponent;\n /** Currently selected date */\n public selectedDateTzValue = new BehaviorSubject(DateNow(new Date()));\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(new DateTZ({ is_local_tz: false, building_tz: d.building_tz }), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n // date\n public get dateTzObservable(): Observable {\n return this.selectedDateTzValue.pipe(map(d => {\n return d \n }));\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(newValueTz: DateTZ) {\n // Keep hours and minutes of the old date\n const old_date = this.selectedDateTzValue.value;\n let newDateTz = newValueTz.setValue({ hour: old_date.dateHour, minute: old_date.minutes, second: old_date.second });\n\n // Check that new date is before from\n if (newDateTz.ms < this.fromDateTz.ms) {\n newDateTz = this.fromDateTz;\n }\n\n this.selectedDateTzValue.next(newDateTz);\n if (this._onChange) {\n this._onChange(newDateTz);\n }\n\n this.onSelect.emit(newDateTz);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n const building_tz = this.timezone || this.fromDateTz.building_tz\n const is_local_tz = DateNow(new Date()).building_tz === building_tz\n this.setValue(new DateTZ({ is_local_tz, building_tz }));\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(selectedDateTz: DateTZ) {\n this.selectedDateTzValue.next(selectedDateTz);\n this.show_tooltip = false;\n }\n\n public readonly registerOnChange = (fn: (_: DateTZ) => void) => this._onChange = fn;\n public readonly registerOnTouched = (fn: (_: DateTZ) => void) => this._onTouch = fn;\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n DurationGroup,\n nearestDurationToInput,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators'; \nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { convertLocalTimestampToTimezonedDateTz, convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'date-tz-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzDurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DateTzDurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input() public label?: string;\n @Input() public required: boolean;\n @Input() max_length?: number;\n\n // /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDateTz: DateTZ;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Whether form all_day is enabled. */\n // R-- need to address all_day that disables this input and displays \"Add Day for the value\"\n @Input() public all_day: boolean = false;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** Component will return a number of minutes */\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDateTz = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDateTz]).pipe(\n \n map(([value, currentStartDate]) => { \n /**\n * convert current start date/time to building time zone first\n * \n */\n const ms = convertTimezonedTimestampToLocalDateTz(currentStartDate.ms, currentStartDate.building_tz).ms;\n return nearestDurationToInput(this.durationGroups, ms, value); \n }\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDateTz.pipe(\n map(d => generateDurationOptionsFromGroups(d, this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDateTz.value, this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDateTz) {\n this.currentStartDateTz.next(changes.startDateTz.currentValue);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlotTz,\n nearestStepToInput,\n timeWithGmtOffsetFormatString,\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n generateAvailableTimes,\n generateAvailableTimesTz,\n} from '../utils/time.utils';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\nimport { filter, map, withLatestFrom } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'date-tz-time-field',\n template: `\n
\n {{\n label\n }}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./date-tz-time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateTzTimeFieldComponent),\n multi: true,\n },\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DateTzTimeFieldComponent\n extends BaseDirective\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Input() public label?: string;\n @Input() public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n // @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the DateTZ object datetime to start time options from **/\n @Input() public fromDateTz: DateTZ = DateNow(new Date());\n // Disables this input and displays R--- \"All Day\" for the value\n @Input() public all_day: boolean = false;\n @Input() public show_current: boolean = false;\n @Input() public startFromDateTz: boolean = false;\n\n /** Form control on change handler */\n private _onChange: (_: DateTZ) => void;\n /** Form control on touch handler */\n private _onTouch: (_: DateTZ) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n /** DateTZ object representing the currently set datetime */\n public selectedDateTz = new BehaviorSubject(\n closestToTimeSlotTz(DateNow(new Date()), this.step)\n );\n\n /** string representing the currently set datetime display value, needed for the input to display the slected value */\n public selectedTimeString = new BehaviorSubject(\n timeWithGmtOffsetFormatString(this.selectedDateTz.value)\n );\n\n public filterFormControl: FormControl = new FormControl();\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(\n generateAvailableTimesTz(\n DateNow(),\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(DateNow())]\n : [],\n this.startFromDateTz\n )\n );\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // Subscribe to selected option changes\n this.subscription(\n 'dateTimeChanges',\n combineLatest([this.selectedDateTz])\n .pipe(\n map(([selectedDateTz]) => {\n /**\n * The selectedDateTz should already be pegged to the closest time slot, but\n * if the selected time rolls into the past this can correct it. // R--- verify this statement\n */\n return closestToTimeSlotTz(selectedDateTz, this.step);\n }),\n withLatestFrom(this.options),\n filter(\n ([date, timeOptions]: [\n DateTZ,\n SelectOption[]\n ]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(\n (t) => t.value === date.formatDate('HH:mm')\n );\n }\n ),\n map(([dateTz, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz,\n });\n\n // Sort the time options\n timeOptions.sort((a, b) =>\n `${a.value}`.localeCompare(`${b.value}`)\n );\n return timeOptions;\n })\n )\n .subscribe((next) => {\n return this.options.next(next);\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n changes.no_past_times ||\n changes.step ||\n changes.fromDateTz ||\n changes.all_day\n ) {\n // If there's a new date value then update the time options\n this.options.next(\n generateAvailableTimesTz(\n this.selectedDateTz.value,\n !this.noPastTimes,\n this.step,\n this.timezone,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(this.selectedDateTz.value)]\n : [],\n this.startFromDateTz\n )\n );\n // If today and all day goes from on to off the selected value isn't going to be available.\n if (\n changes.all_day &&\n !changes.all_day.currentValue &&\n changes.all_day.previousValue\n ) {\n this.setValue(this.options.value[0].display);\n }\n }\n }\n\n /**\n * Getter if the time picker options are visiable or not\n */\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n /**\n * Getter to return the current form timestamp from the from date object\n */\n public get timezone(): string {\n return this.fromDateTz.building_tz;\n }\n\n /**\n * A filter for finding a matching value when using the input text search\n */\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.selectedDateTz,\n ]).pipe(\n map(([value, selectedDateTz]) => {\n return nearestStepToInput(\n this.step,\n value,\n DateTime.now().valueOf()\n );\n })\n );\n\n /**\n * Default text displayed in the search field when the component initializes\n */\n public placeHolderOption = this.options.pipe(\n map((os) => os.length > 0 && os[0])\n );\n\n /**\n * Returns the selected option object by matching the selectedDateTz formated string with the option.display string\n */\n public selectedOption = combineLatest([\n this.options,\n this.selectedDateTz,\n ]).pipe(\n map(([options, selectedDateTz]) =>\n options.find(\n (o) =>\n o.display === timeWithGmtOffsetFormatString(selectedDateTz)\n )\n )\n );\n\n /**\n * Determines the visually selected value when the options list is visible.\n *\n * @param option DateTZ\n * @returns boolean\n */\n public isSelected(option: SelectOption) {\n return this.selectedTimeString.value === option.display;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: DateTZ) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: DateTZ) => void): void {\n this._onTouch = fn;\n }\n\n /**\n * Method just used in unit tests to test disabling the input\n * @param disabled\n */\n // public setDisabledState(disabled: boolean) {\n // this.disabled = disabled;\n // }\n\n /**\n * Update the selected values\n * @param dateTz the DateTz object for the new time\n */\n public setSelectedValues(dateTz: DateTZ) {\n // Update the selected DateTz and string representations\n this.selectedTimeString.next(timeWithGmtOffsetFormatString(dateTz));\n this.selectedDateTz.next(dateTz);\n if (this._onChange) {\n this._onChange(dateTz);\n }\n }\n\n /**\n * Update the form field value\n * @param displayString The \"display\" value of this.options set by the time picker\n */\n public setValue(displayString: string): void {\n // Convert the display time string to the actual option object via an array find.\n const newTimeTz = this.options.value.find(\n (opt) => opt.display === displayString\n ).value;\n // Update the selected DateTz and string representations\n this.setSelectedValues(newTimeTz);\n // Send the\n if (newTimeTz) {\n if (this._onChange) {\n this._onChange(newTimeTz);\n }\n }\n }\n\n /**\n * Fires when the form control value is changed\n * @param dateTz The new value for the component\n */\n public writeValue(dateTz: DateTZ | null) {\n // Init is null ?\n if (dateTz != null) {\n // Update the selected DateTz and string representations\n this.setSelectedValues(dateTz);\n // Update the available options\n this.options.next(\n generateAvailableTimesTz(\n dateTz,\n !this.noPastTimes,\n this.step,\n dateTz.building_tz,\n this.all_day,\n this.show_current\n ? [generateOptionForDateTz(dateTz)]\n : [],\n this.startFromDateTz\n )\n );\n }\n }\n}\n\nfunction generateOptionForDateTz(dateTz: DateTZ): SelectOption {\n return {\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseDirective,\n nearestDurationToInput,\n DurationGroup,\n} from '@mckinsey-converge/base';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport {\n map\n} from 'rxjs/operators';\nimport {\n DEFAULT_DURATION,\n defaultDurationGroups,\n generateDurationOptionsFromGroups\n} from '../utils/time.utils';\nimport { MatSelect } from '@angular/material/select';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'mck-duration-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n `,\n styleUrls: ['./duration-field.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DurationFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class DurationFieldComponent extends BaseDirective implements OnInit, ControlValueAccessor, OnChanges {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n @Input() max_length?: number;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Start date value to count from */\n @Input() public startDate: number;\n /** Set to limit the duration options */\n @Input() public extended?: boolean;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n /**\n * Specify the slice of durations to use when generating options.\n */\n @Input() public durationGroups: DurationGroup[] = defaultDurationGroups;\n\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n public value = new BehaviorSubject(DEFAULT_DURATION);\n\n public currentStartDate = new BehaviorSubject(DateNow(new Date()));\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([this.filterFormControl.valueChanges, this.currentStartDate]).pipe(\n map(([value, currentStartDate]) => nearestDurationToInput(this.durationGroups, currentStartDate.ms, value)\n ));\n\n public options = new BehaviorSubject[]>([]);\n\n public placeHolderOption = this.options.pipe(\n map(options => options.find(o => o.value === DEFAULT_DURATION))\n );\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public isDisabled(option: SelectOption) {\n return this.max_length ? option.value > this.max_length : false;\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n ngOnInit(): void {\n this.subscription('OptionsCalculation',\n this.currentStartDate.pipe(\n map(d => generateDurationOptionsFromGroups(d.toZone(this.timezone), this.durationGroups, this.extended))\n ).subscribe(next => {\n this.options.next(next);\n }));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.timezone) {\n const dopt = generateDurationOptionsFromGroups(this.currentStartDate.value.toZone(this.timezone), this.durationGroups, this.extended);\n this.options.next(dopt);\n }\n if (changes.startDate) {\n // R--- refactor input param\n const date = new DateTZ({date: this.startDate})\n this.currentStartDate.next(date);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number): void {\n this.writeValue(new_value);\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n writeValue(obj: number): void {\n this.value.next(obj);\n if (this._onChange) {\n this._onChange(obj);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mck-error-message',\n template: `\n
\n
\n
\n \n \n \n
\n
\n `,\n styleUrls: ['./error-message.component.scss']\n})\nexport class ErrorMessageComponent {\n\n constructor() {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-calendar-icon',\n template: `\n \n \n \n \n \n `,\n})\nexport class CalendarIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../../base-template.component';\n\n@Component({\n selector: 'mck-chevron-icon',\n template: `\n \n \n
\n \n \n \n
\n
\n \n
\n `\n})\nexport class ChevronIconComponent extends BaseTemplateComponent {\n\n @Input()\n fillClass?: string;\n\n @Input()\n up?: boolean;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit\n} from '@angular/core';\n\n@Component({\n selector: 'mck-close-icon',\n template: `\n \n \n \n \n `\n})\nexport class CloseIconComponent implements OnInit {\n\n @Input()\n fillClass?: string;\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component(\n {\n selector: 'mck-informational-image',\n template: `\n \n
\n
\n
\n \n
\n
\n
\n
\n `,\n styleUrls: ['./informational-image.component.scss'],\n encapsulation: ViewEncapsulation.None\n }\n)\nexport class InformationalImageComponent extends BaseTemplateComponent {\n\n @Input()\n public src: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-label',\n template: `\n \n \n \n *\n \n \n `,\n styleUrls: ['./label.component.scss']\n})\nexport class LabelComponent extends BaseTemplateComponent implements OnInit {\n\n @Input()\n required = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { MatSelect } from '@angular/material/select';\nimport { SelectOption } from '../options/select-option';\n\n@Component({\n selector: 'mck-legend-dropdown',\n template: `\n
\n \n \n \n \n
\n \n \n \n {{ buildPlaceholder() }}\n \n
\n \n
\n \n
\n `,\n styleUrls: ['./legend-dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LegendDropdownComponent {\n\n @Input()\n public placeholder: string;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public placeholderOpen?: string\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public buildPlaceholder(){\n return this.isOpen && this.placeholderOpen ? this.placeholderOpen : this.placeholder\n }\n}\n","import {\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n ViewChild,\n OnInit\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AcaDatePickerComponent } from '../aca-date-picker/aca-date-picker.component';\n\n@Component({\n selector: 'mck-date-picker',\n template: `\n \n Date\n \n
{{ dateString | async }}
\n
\n \n
\n \n \n \n
\n \n Today\n \n
\n
\n \n `,\n styleUrls: ['./mck-date-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MckDatePickerComponent),\n multi: true\n }\n ]\n})\nexport class MckDatePickerComponent extends BaseDirective implements OnInit, ControlValueAccessor {\n /** Earliest date available the user is allowed to pick */\n @Input('from') public _from: number = DateNow(new Date()).ms;\n /** Latest date available the user is allowed to pick */\n @Input('to') public _to: number;\n /** Position of the tooltip */\n @Input() public position: 'right' | 'left' = 'right';\n /** Offset of the tooltip */\n @Input() public offset: 'top' | 'bottom' = 'bottom';\n /** Whether form control is disabled */\n @Input() public disabled: boolean;\n /** Whether to show the calendar tooltip */\n @Input() public icon_only: boolean = false;\n\n @Input() public initialDateSelection?: number;\n\n @Input() public invalid?: boolean;\n\n @Output() public onSelect = new EventEmitter();\n\n // R--- or is this the date picker to refactor. too tired.\n public ngOnInit(): void {\n if (this.initialDateSelection) {\n this.writeValue(this.initialDateSelection)\n }\n }\n\n /** Whether to show the calendar tooltip */\n public show_tooltip: boolean;\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n @ViewChild(AcaDatePickerComponent, {static: true }) private _acaDatePicker: AcaDatePickerComponent;\n\n /** Currently selected date */\n public dateValue = new BehaviorSubject(DateNow(new Date()));\n\n /** First allowed date on the calendar */\n public get from(): number {\n return this._from || DateNow(new Date()).startOfValue('day').ms;\n }\n\n /** Current date value */\n public get until(): number {\n return this._to || DateNow(new Date()).endOfValue('day').addValue({ years: 1 }).ms;\n }\n\n /** Display value for the current date */\n public get dateString(): Observable {\n return this.dateValue.pipe(map(d => {\n const display = d.formatDate('ccc dd MMM yyyy');\n return `${display}${d.isSameDate(DateNow(new Date()), 'day') ? ' (Today)' : ''}`;\n }));\n }\n\n /** Whether date picker is open */\n public get is_open(): boolean {\n return this._trigger.menuOpen;\n }\n\n public get date(): Observable {\n return this.dateValue;\n\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: number) {\n // Keep hours and minutes of the old date\n const old_date = this.dateValue.value;\n const d = new DateTZ({date: new_value})\n let new_date = d\n .setValue({ hour: old_date.dateHour, minute: old_date.minutes })\n .ms;\n // Check that new date is before from\n if (new_date < this.from) {\n new_date = this.from;\n }\n const new_d = new DateTZ({ date: new_date })\n this.dateValue.next(new_d);\n if (this._onChange) {\n this._onChange(new_date);\n }\n this.onSelect.emit(new_date);\n this.show_tooltip = false;\n }\n\n public goToToday() {\n this.setValue(DateNow(new Date()).ms);\n }\n\n public resetToLastSelection = () => this._acaDatePicker.updateDate();\n\n public onDatePickerClose() {\n this.resetToLastSelection();\n }\n\n /* istanbul ignore next */\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number) {\n const date = new DateTZ({date: value})\n this.dateValue.next(date);\n this.show_tooltip = false;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /* istanbul ignore next */\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /** Set the state of the tooltip to closed after delay */\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n /** Set the state of the tooltip to closed after delay */\n public openDatePicker() {\n this._trigger.openMenu();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\n@Component({\n selector: 'mck-modal-button-row',\n template: `\n \n \n \n \n
\n \n {{secondaryLabel}}\n \n \n {{primaryLabel}}\n\n \n
\n \n
\n `,\n styleUrls: ['./modal-button-row.component.scss']\n})\nexport class ModalButtonRowComponent extends BaseTemplateComponent {\n\n @Input()\n primaryLabel?: string;\n\n /**\n * Specify if you want to disable the primary button\n */\n @Input()\n primaryDisabled?: boolean = false;\n\n /**\n * Used only if primaryLabel is specified.\n */\n @Output()\n public primarySubmit = new EventEmitter();\n\n /**\n * Specify if you want to show a secondary label button\n */\n @Input()\n secondaryLabel?: string;\n\n @Input()\n disableFixed: boolean = false;\n\n /**\n * Specify if you want to disable the secondary button\n */\n @Input()\n secondaryDisabled?: boolean = false;\n\n /**\n * Used only if secondaryLabel is specified.\n */\n @Output()\n public secondarySubmit = new EventEmitter();\n\n @Input()\n smallButtons?: boolean = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n Input\n} from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-modal',\n template: `\n \n
\n
\n \n
\n
\n

{{header}}

\n
\n
\n \n
\n `,\n styleUrls: ['./modal.component.scss']\n})\nexport class ModalComponent {\n\n @Input()\n header?: string;\n @Input() shouldClose?: boolean = true;\n\n constructor(private dialogRef: MatDialogRef) {\n }\n\n public close() {\n this.dialogRef.close();\n }\n}\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { DateTZ, isToday } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'override-changes-modal',\n templateUrl: './override-changes-modal.component.html',\n styleUrls: ['./override-changes-modal.component.scss']\n})\nexport class OverrideChangesModalComponent implements OnInit{\n\n public edits;\n public timezone;\n\n @Output() public event = new EventEmitter();\n\n constructor(@Inject(MAT_DIALOG_DATA) private _data: OverrideChangesModalComponent){\n\n }\n\n public ngOnInit(){\n // this.edits = this._data.edits.sort((a, b) => a - b);\n\n // Function to convert epoch to 'YYYY-MM-DD' format\n const getDateString = (epoch) => {\n return new Date(epoch * 1000).toISOString().split('T')[0];\n };\n\n // Set to store unique date strings\n const uniqueDates = new Set();\n\n // Filter the edits array\n const filteredEdits = this._data.edits.filter(epoch => {\n const dateString = getDateString(epoch);\n if (!uniqueDates.has(dateString)) {\n uniqueDates.add(dateString);\n return true;\n }\n return false;\n });\n\n this.edits = filteredEdits;\n }\n\n public formatDate(date: number) {\n const dateTZ = new DateTZ({date: date*1000, is_local_tz: false, building_tz: this._data.timezone });\n const dateIsToday = isToday(dateTZ, this._data.timezone);\n const display = dateTZ.formatDate('ccc dd MMM yyyy');\n return `${display}${dateIsToday ? ' (Today)' : ''}`;\n }\n\n public continue(): void {\n this.event.emit({ reason: 'done' });\n }\n\n public close(): void {\n this.event.emit({ reason: 'close' });\n }\n}","
\n \n \n
\n\n \n \n \n\n

Overriding Changes

\n

Editing the series here will override all previous changes made to individual occurrences. Are you sure you want to proceed?

\n\n \n \n \n \n \n \n \n \n \n \n \n
Dates
{{formatDate(edit)}}
\n
\n\n\n \n \n","import {\n Pipe,\n PipeTransform\n} from '@angular/core';\n\n/**\n * Transforms input by returning a subset of items based on if the\n * any items include the search text based on passed objectKey.\n *\n * objectKey can be pipe separated keys. e.g: 'name|age'. Then it will check against all.\n */\n@Pipe({\n name: 'filter'\n})\nexport class FilterPipe implements PipeTransform {\n transform(items: any[], searchText: string, objectKey?: string): any[] {\n if (!items) return [];\n if (!searchText) return items;\n searchText = searchText.toLowerCase();\n const splitKeys = objectKey?.split('|') ?? [];\n return items.filter(it => {\n let included = false;\n splitKeys.forEach((key) => {\n if (it[key]?.toLowerCase().includes(searchText)) {\n included = true;\n }\n });\n if (splitKeys.length === 0) {\n return it.toLowerCase().includes(searchText);\n }\n return included;\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n DomSanitizer,\n SafeHtml,\n SafeResourceUrl,\n SafeScript,\n SafeStyle,\n} from '@angular/platform-browser';\n\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n@Pipe({\n name: 'sanitize',\n})\nexport class SanitizePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n type: 'resource' | 'url' | 'script' | 'style' | 'html' = 'html'\n ): SafeHtml | SafeResourceUrl | SafeScript | SafeStyle {\n switch (type) {\n case 'resource':\n return (\n this.sanitizer.sanitize(\n SecurityContext.RESOURCE_URL,\n value\n ) || ''\n );\n case 'url':\n return (\n this.sanitizer.sanitize(SecurityContext.URL, value) || ''\n );\n case 'script':\n return (\n this.sanitizer.sanitize(SecurityContext.SCRIPT, value) || ''\n );\n case 'style':\n return (\n this.sanitizer.sanitize(SecurityContext.STYLE, value) || ''\n );\n }\n return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { SelectOption } from '../types';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'mck-radio-select',\n template: `\n \n
\n {{label}}\n \n {{option.display}}\n \n
\n
\n `,\n styleUrls: ['./radio-select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioSelectComponent),\n multi: true\n }\n ]\n})\nexport class RadioSelectComponent extends BaseTemplateComponent implements OnInit, ControlValueAccessor {\n\n @Input()\n label: string;\n\n @Input()\n required?: boolean;\n\n @Input()\n options: SelectOption[];\n\n public value = new BehaviorSubject | undefined>(undefined);\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n public setValue(value: string) {\n const obj = this.options.find(o => o.value === value);\n this.writeValue(obj);\n if (this._onChange) {\n this._onChange(obj)\n }\n }\n\n writeValue(obj: SelectOption): void {\n this.value.next(obj);\n }\n}\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { OrganisationService, RecurrencePeriod, RecurrenceType, removeExpiredOcurrences, RepeatsOn } from \"@mckinsey-converge/data-common\";\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { first } from \"rxjs/operators\";\nimport { RecurrencePatternForm } from \"../recurrence-pattern-form/recurrence-pattern-form.component\";\n\n@Component({\n selector: 'recurrence-booking-form',\n templateUrl: './recurrence-booking-form.component.html',\n styleUrls: ['./recurrence-booking-form.component.scss']\n})\n\nexport class RecurringBookingForm implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n\n public current_type: RecurrenceType; \n public recurrence_types: Array = [\n {type: RepeatsOn.PATTERN, label: 'Repeats on'},\n {type: RepeatsOn.DATE, label: 'Repeats on specific date'}\n ]\n\n public building_tz = \"\";\n\n @ViewChild(RecurrencePatternForm) pattern_form: RecurrencePatternForm;\n\n constructor(\n private _org: OrganisationService,\n ) {}\n\n public get recurrencePeriod(){\n return this.form.get('recurrence_period')\n }\n\n public ngOnInit(): void {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.building_tz = this._org?.building?.timezone || 'America/Chicago';\n })\n if(this.recurrencePeriod.value === RecurrencePeriod.LIST){\n this.current_type = this.recurrence_types[1];\n removeExpiredOcurrences(this.form)\n }else{\n this.current_type = this.recurrence_types[0];\n }\n }\n\n public onChangeType(value: string) {\n this.current_type = this.recurrence_types.filter((type) => type.type === value)[0]\n if(this.current_type.type === RepeatsOn.PATTERN){\n this.recurrencePeriod.setValue(this.pattern_form.recurrencePatternFormControl.value)\n }else{\n this.recurrencePeriod.setValue(RecurrencePeriod.LIST)\n }\n }\n\n public dateToBuildingTz(date?: number){\n return new DateTZ({date, building_tz: this.building_tz, is_local_tz: false})\n }\n\n public get error(){\n const recurrence_starts = this.form.controls.recurrence_starts\n const recurrence_days = this.form.controls.recurrence_days\n return recurrence_starts.invalid || recurrence_days.invalid\n }\n\n}\n","
\n \n
\n \n \n {{recurrence_types[0].label}}\n \n \n \n
\n
\n \n \n {{recurrence_types[1].label}}\n \n \n \n
\n
\n
\nThe recurrence pattern is not valid.","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { MatMenuTrigger } from \"@angular/material/menu\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { OrganisationService } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ,toMiddayUTC } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-date-form',\n templateUrl: './recurrence-date-form.component.html',\n styleUrls: ['./recurrence-date-form.component.scss']\n})\n\nexport class RecurrenceDateForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n @ViewChild(MatMenuTrigger, { static: true }) private _trigger: MatMenuTrigger;\n\n public selected_dates: Array = []\n public timezone: string = '';\n public nowTz: DateTZ = DateNow(new Date());\n public fromDateTz: DateTZ = this.nowTz.clone();\n public untilDateTz: DateTZ = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n public dateTz: DateTZ = DateNow(new Date());\n\n public get recurrenceStarts(){\n return this.form.get('recurrence_starts');\n }\n\n public get formDateTz(){\n return this.form.get('dateTz');\n }\n\n constructor (private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The fromDateTz is curious, would it make sense to be based on the form dateTz?\n this.fromDateTz = this.nowTz.clone()\n this.untilDateTz = this.fromDateTz.endOfValue('day').addValue({ years: 1 });\n\n if(this.recurrenceStarts.value){\n const tempForSort = [...this.recurrenceStarts.value]; // due to cannot assign to read only property '0' of object '[object Array]'\n this.selected_dates = tempForSort.sort((d1: DateTZ, d2: DateTZ) => d1.ms - d2.ms);\n }\n this.subscription('ocurrenceChanges', this.recurrenceStarts.valueChanges\n .subscribe(() => {\n this.selected_dates = [...this.recurrenceStarts.value]\n })\n ); \n }\n\n /**\n * Add value to the list of selected dates\n * @param newDateTz\n */\n public addDate(newDateTz: DateTZ) {\n const d = newDateTz.clone();\n const start_date = this.formDateTz.value;\n let new_date = d.setValue({hour: start_date.dateHour, minute: start_date.minutes})\n \n /** Prevent user from selecting past dates */\n if (new_date.isBeforeDate(this.fromDateTz)) {\n new_date = this.fromDateTz;\n }\n\n /** Prevent user from selecting the same date more than once */\n const is_selected = this.selected_dates.filter((date: DateTZ)=> new_date.isSameDate(date, 'day'))\n if(is_selected.length){\n return\n }\n \n this.selected_dates.push(new_date);\n this.recurrenceStarts.setValue(this.selected_dates.sort((d1, d2) => d1.ms - d2.ms));\n this.setDateTzForm();\n }\n\n /**\n * \n * @param dateMsValue: number\n * @returns \n */\n public setPickerToGivenDate(dateTsValue: DateTZ) {\n this.fromDateTz = dateTsValue.clone();\n }\n\n /**\n * Function calls on close of date picker without date selection\n */\n public onDatePickerClose = () => {\n this.setPickerToGivenDate(this.nowTz)\n };\n\n public goToToday() {\n this.addDate(this.nowTz);\n this.setPickerToGivenDate(this.nowTz);\n }\n\n public closeDatePicker() {\n this._trigger.closeMenu();\n }\n\n public openDatePicker() {\n this._trigger.openMenu();\n }\n\n public deleteDate(date: DateTZ) {\n const index = this.selected_dates.map((d: DateTZ) => d.ms).indexOf(date.ms)\n this.selected_dates.splice(index, 1)\n this.recurrenceStarts.setValue(this.selected_dates)\n this.setDateTzForm()\n }\n\n public isToday(date) {\n return new DateTZ({\n date: toMiddayUTC(date).ms,\n is_local_tz: false,\n building_tz: this.timezone,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone,\n }),\n 'day'\n );\n }\n\n public formatDate(date: DateTZ){\n const isToday = this.isToday(date);\n const display = date.formatDate('ccc dd MMM yyyy');\n\n return `${display}${isToday ? ' (Today)' : ''}`;\n }\n\n private setDateTzForm(): void {\n if (this.selected_dates.length === 0)\n return;\n\n const tz = this._org.building.timezone;\n const date_now = DateNow(new Date()).toZone(tz);\n let dateTz = this.selected_dates[0].clone();\n\n dateTz = dateTz.setValue({\n hour: (this.formDateTz.value as DateTZ).hours,\n minute: (this.formDateTz.value as DateTZ).minutes\n });\n\n if (this.selected_dates[0].isSameDate(this.nowTz, \"day\") && dateTz.hours < date_now.hours) {\n const { minutes: minute, hours: hour } = closestToTimeSlotTz(this.nowTz, 15);\n dateTz = dateTz.setValue({ minute, hour, second: 0 });\n }\n\n this.formDateTz.setValue(dateTz);\n }\n}\n","
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
DateAction
{{formatDate(date)}}Delete
\n
[+] Add another date
\n \n
\n \n Today\n \n
\n
\n
\n
","import { Component, Input, OnInit } from \"@angular/core\";\nimport { FormGroup, Validators } from \"@angular/forms\";\nimport { BaseDirective, closestToTimeSlotTz } from \"@mckinsey-converge/base\";\nimport { arrayWithValues, generateWeekDays, RecurrencePeriod, recurrencePeriodToDurationType, RepeatPeriod, validDateTZ, WeekDays } from \"@mckinsey-converge/data-common\";\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\n\n@Component({\n selector: 'recurrence-pattern-form',\n templateUrl: './recurrence-pattern-form.component.html',\n styleUrls: ['./recurrence-pattern-form.component.scss']\n})\n\nexport class RecurrencePatternForm extends BaseDirective implements OnInit {\n /** Form fields for booking */\n @Input() public form: FormGroup;\n @Input() disabled: boolean;\n\n /** Range of dates for the Start Date Picker*/\n public nowTz: DateTZ = DateNow(new Date());\n public fromStartTz: DateTZ = this.nowTz.setValue({ minute: Math.ceil(this.nowTz.minutes / 5) * 5 });\n public untilTz: DateTZ = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n public timezone: string = '';\n \n\n /** Range of dates for the End Date Picker*/\n public fromEndTz: DateTZ;\n\n public repeat_period_options: Array = [\n {label: 'Day', id: RecurrencePeriod.DAILY},\n {label: 'Week',id: RecurrencePeriod.WEEKLY},\n {label: 'Month', id: RecurrencePeriod.ABSOLUTE_MONTHLY}\n ]\n public week_days: Array = []\n\n public repeat_every_options\n\n\n public get recurrenceDateStartTzFormControl() {\n return this.form.get('dateTz')\n }\n\n public get recurrenceEndFormControl(){\n return this.form.get('recurrence_endTz')\n }\n\n public get recurrencePeriodFormControl(){\n return this.form.get('recurrence_period')\n }\n\n public get recurrenceIntervalFormControl(){\n return this.form.get('recurrence_interval')\n }\n\n public get recurrencePatternFormControl(){\n return this.form.get('recurrence_pattern')\n }\n\n public get recurrenceDaysFormControl(){\n return this.form.get('recurrence_days')\n }\n\n public ngOnInit(): void {\n // Setup some data to only run once, the previous giters were hogs\n this.timezone = this.form.get('timezone').value;\n this.nowTz = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.timezone });\n // R--- The from date is curious, why isn't it based on the form dateTz?\n this.repeat_every_options = new Array(1)\n this.fromStartTz = closestToTimeSlotTz(this.nowTz, 15)\n this.untilTz = this.nowTz.addValue({ years: 1 }).endOfValue('day');\n this.fromEndTz = this.fromStartTz.addValue({days: 1})\n\n this.setEndDateFromStartDate(this.recurrenceDateStartTzFormControl.value) //make sure end date is after start date\n\n if(!this.recurrencePeriodFormControl.value){\n this.recurrencePeriodFormControl.setValue(RecurrencePeriod.WEEKLY)\n }\n\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.recurrencePatternFormControl.setValue(this.recurrencePeriodFormControl.value)\n }\n\n this.week_days = generateWeekDays(this.recurrenceDateStartTzFormControl.value.ms, { building_tz: this.fromStartTz.building_tz })\n this.generateMaxIntervals()\n\n if(this.recurrenceDaysFormControl.value.length > 0){\n this.week_days = this.week_days.map((day) => \n ({...day, active: this.recurrenceDaysFormControl.value.includes(day.full_name)})\n )\n }\n\n if(!this.recurrenceDaysFormControl.value.length && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n const current_days = this.week_days.filter((day) => day.active).map((day)=>day.full_name)\n this.recurrenceDaysFormControl.setValue(current_days)\n }\n\n this.generateOcurrenceList()\n\n this.subscription('startTimeChanges', this.recurrenceDateStartTzFormControl.valueChanges\n .subscribe((next) => {\n this.setEndDateFromStartDate(next) \n })\n );\n\n this.subscription('endTimeChanges', this.recurrenceEndFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n );\n \n this.subscription('recurrencePeriodFormControlChanges', this.recurrencePeriodFormControl.valueChanges\n .subscribe(() => {\n this.generateMaxIntervals();\n })\n ); \n }\n\n public setEndDateFromStartDate(startDateTz: DateTZ){\n let end_date = this.recurrenceEndFormControl.value.setValue({hour: startDateTz.dateHour, minute: startDateTz.minutes})\n\n /**Update the End date picker range */\n this.fromEndTz = startDateTz.isSameDate(this.untilTz,'day') ? startDateTz : startDateTz.addValue({days: 1})\n\n if(end_date.isBeforeDate(this.fromEndTz)){\n end_date = this.fromEndTz\n }\n\n this.recurrenceEndFormControl.setValue(end_date)\n\n this.generateMaxIntervals()\n this.updateActiveWeekday() \n }\n\n public setRepeatPeriod(value: RecurrencePeriod){\n this.updateValidators(value)\n this.recurrencePeriodFormControl.setValue(value);\n this.recurrencePatternFormControl.setValue(value);\n this.recurrenceIntervalFormControl.setValue(1)\n this.generateOcurrenceList();\n }\n\n public setRepeatEvery(value: number){\n this.recurrenceIntervalFormControl.setValue(value)\n this.generateOcurrenceList()\n }\n\n public repeatTimeString(value: string){\n return this.recurrenceIntervalFormControl.value !== 1 ? `${value}(s)` : value\n }\n\n public get displayWeekdays(){\n return this.recurrencePatternFormControl.value === RecurrencePeriod.WEEKLY\n }\n\n /* Check if selected interval is valid and reset to 1 if not*/\n private validateRecurrenceInterval = () => {\n if(this.repeat_every_options.length < this.recurrenceIntervalFormControl.value){\n this.recurrenceIntervalFormControl.setValue(1)\n } \n };\n\n /**\n * Generate max value for dorpdown interval\n */\n public generateMaxIntervals(){\n const start = this.recurrenceDateStartTzFormControl.value;\n const date_diff = this.recurrenceEndFormControl.value.dateDiff(start, this.periodToDurationType, this.periodToDurationType)\n //If no diff default to 1\n this.repeat_every_options = new Array(Math.round(date_diff) || 1)\n this.validateRecurrenceInterval();\n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.LIST){\n this.generateOcurrenceList()\n }\n }\n\n /**\n * Generate ocurrence list base on the selected interval\n */\n public generateOcurrenceList() {\n\n /**If selected period is list then we don't want \n * to generate a list based on the repeats on selections*/\n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.LIST){\n return\n }\n\n const occurrence = []\n const first_date = this.recurrenceDateStartTzFormControl.value;\n let start = first_date\n const end = this.recurrenceEndFormControl.value;\n const interval = this.recurrenceIntervalFormControl.value\n const recurr_days = this.week_days.filter(day => day.active)\n /**\n * isLastDayOfMonth : Boolean\n * flag - to generate last day of every month in case of day or month reccuring booking if start date is last day of month\n */\n // const isLastDayOfMonth = first_date.date.day === first_date.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY;\n const isLastDayOfMonth = first_date.dateDay === 31 && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY ;\n \n if(this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n start = start.startOfValue('week')\n }\n\n while (end.dateDiff(start.startOfValue('day'), this.periodToDurationType, this.periodToDurationType) >= 0) {\n \n if(this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n occurrence.push(start) \n start = start.addValue({[this.periodToDurationType]: interval}, isLastDayOfMonth);\n /**\n * IF - should only consider resetting start under mentioned condition of ticket - https://acaprojects.atlassian.net/browse/MCK-2085\n * In summery - If user select any date except 31st, other months in the series (no matter 30 or 31 day month) should have same date select as start date.\n * If user select 31st as an start date, other month in the seleries should have select last day of the month (30th/31st/28th/29th).\n * Exception for February - February should select 28th or 29th If in above both selection includes date between 28th - 31st.\n * \n */\n if(start.dateDay !== first_date.dateDay && start.dateDay !== start.date.daysInMonth && this.recurrencePeriodFormControl.value === RecurrencePeriod.ABSOLUTE_MONTHLY) {\n start = start.setValue({day: first_date.dateDay});\n } \n }else {\n recurr_days.forEach((day)=>{\n const date = start.addValue({days: day.day_index})\n if((date.isAfterDate(first_date) || date.isSameDate(first_date, 'day')) && \n (date.isBeforeDate(end) || date.isSameDate(end, 'day'))){\n occurrence.push(date)\n }\n })\n start = start.addValue({[this.periodToDurationType]: interval})\n }\n }\n\n this.form.controls.recurrence_count.setValue(occurrence.length)\n this.form.controls.recurrence_starts.setValue(occurrence.sort((d1, d2) => d1.ms - d2.ms))\n \n }\n\n public get periodToDurationType(){\n const period = this.recurrencePeriodFormControl.value\n return recurrencePeriodToDurationType(period)\n }\n\n /**\n * Update active weekday in the weekdays array\n */\n private updateActiveWeekday() {\n const _week_days = this.week_days.map((day)=>{\n if(this.recurrenceDaysFormControl.value.includes(day.full_name)){\n return {...day, active: true}\n }else{\n return {...day, active: false}\n }\n })\n this.week_days = [..._week_days] \n }\n\n public setWeekDays(new_day: WeekDays){\n const days = this.recurrenceDaysFormControl.value\n if(this.disabled){\n return\n }\n\n if(!new_day.active){\n days.push(new_day.full_name)\n }else{\n const current_index = days.indexOf(new_day.full_name)\n days.splice(current_index,1)\n }\n this.recurrenceDaysFormControl.setValue([...days])\n this.updateActiveWeekday()\n this.generateOcurrenceList()\n }\n\n /**Update the recurrence days validator if period changes */\n public updateValidators(value: RecurrencePeriod){\n if(value === RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value !== RecurrencePeriod.WEEKLY){\n const arrayValidators = [Validators.required];\n arrayValidators.push(arrayWithValues);\n this.recurrenceDaysFormControl.setValidators(arrayValidators);\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }else if(value !== RecurrencePeriod.WEEKLY && this.recurrencePeriodFormControl.value === RecurrencePeriod.WEEKLY){\n this.recurrenceDaysFormControl.clearValidators();\n this.recurrenceDaysFormControl.updateValueAndValidity();\n }\n }\n}\n","
\n
\n \n \n \n Date and time must be in the future\n
\n
\n \n \n \n Date and time must be in the future\n
\n
\n
\n \n
\n \n \n \n {{ i + 1}}\n \n \n \n \n \n \n {{ repeatTimeString(option.label) }}\n \n \n \n
\n
\n
\n \n
\n
\n {{day.id}}\n
\n
\n
\n
\n
","import {\n Component,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\nimport { SelectOption } from '../types';\n\n@Component({\n selector: 'mck-select-option',\n template: `\n \n \n \n \n {{ option.display }}\n \n \n `,\n styleUrls: ['./select-option.component.css']\n})\nexport class SelectOptionComponent extends BaseTemplateComponent {\n\n @Input()\n option: SelectOption;\n\n @Input()\n selected: boolean;\n\n /**\n * If true, we still display as if it wasn't disabled.\n */\n @Input()\n ignoreDisabled = false;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { map } from 'rxjs/operators';\nimport { MatSelect } from '@angular/material/select';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\n@Component({\n selector: 'mck-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class SelectComponent implements OnInit, OnChanges, ControlValueAccessor {\n\n @Input()\n public label: string;\n\n @Input()\n public required: boolean;\n\n @Input()\n public options: SelectOption[] = [];\n\n @Input()\n public selectedValue: SelectOption | undefined;\n\n /**\n * When true, can filter by searching on the input.\n */\n @Input()\n public searchEnabled = false;\n\n @Input()\n public splitDisplay = false;\n\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n\n @Input()\n public noEntriesFoundLabel: string;\n\n @Input()\n public showDivider: boolean = false\n\n /** Form control on change handler */\n private _onChange: (_: SelectOption) => void;\n /** Form control on touch handler */\n private _onTouch: (_: SelectOption) => void;\n\n public filterFormControl: FormControl = new FormControl();\n\n public value = new BehaviorSubject(this.selectedValue || this.options[0]?.value);\n\n /** Available time blocks for the selected date */\n public _options = new BehaviorSubject[]>(this.options);\n\n /** Select field for selecting the value */\n @ViewChild('select') private select_field: MatSelect;\n\n public selectedOption = combineLatest([this._options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this._options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n\n constructor() {\n }\n\n public ngOnInit(): void {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.options) {\n this._options.next(this.options);\n this.value.next(this.selectedValue || this.options?.[0]?.value);\n }\n if (changes.selectedValue) {\n this.value.next(this.selectedValue?.value);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n this.value.next(new_value);\n if (this._onChange) {\n this._onChange(this.options.find(f => f.value === new_value));\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: SelectOption | null) {\n if (value != null) {\n this.value.next(value.value);\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: SelectOption) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: SelectOption) => void): void {\n this._onTouch = fn;\n }\n\n}\n","
\n {{label}}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mck-selected-chip-count',\n template: `\n \n {{count}}\n \n \n `,\n styleUrls: ['./selected-chip-count.component.scss']\n})\nexport class SelectedChipCountComponent {\n\n @Input()\n count: number;\n\n @Output()\n close = new EventEmitter();\n\n}\n","import {\n Component,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { BaseTemplateComponent } from '../base-template.component';\n\nexport enum SpacerMode {\n /**\n * If vertical, it expands in the vertical direction. Size is width.\n */\n Vertical = 'vertical',\n /**\n * If horizontal, it expands in the horizontal direction. Size is height.\n */\n Horizontal = 'horizontal',\n}\n\n@Component({\n selector: 'mck-spacer',\n template: `\n \n
\n
\n
\n
\n
\n `,\n styleUrls: ['./spacer.component.css'],\n})\nexport class SpacerComponent extends BaseTemplateComponent implements OnInit {\n SpacerMode = SpacerMode;\n\n @Input()\n size: string;\n\n @Input()\n mode: SpacerMode = SpacerMode.Horizontal;\n\n @Input()\n autoSize?: boolean;\n\n @Input()\n spacerClass?: string;\n\n constructor(vcRef: ViewContainerRef) {\n super(vcRef);\n }\n\n\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-switch-group',\n template: `\n
\n {{title}}\n {{option.display}}\n
\n `,\n styleUrls: ['./switch-group.component.scss']\n})\nexport class SwitchGroupComponent implements OnInit {\n\n @Input()\n title: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selectedOptions: SelectOption[] = [];\n\n @Output()\n optionChecked = new EventEmitter>();\n\n constructor() {\n }\n\n ngOnInit(): void {\n }\n\n public onCheckedChange(option: SelectOption) {\n this.optionChecked.emit(option);\n }\n\n public isSelected(option: SelectOption) {\n return !!this.selectedOptions.find(s => s.value === option.value);\n }\n}\n","import {\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\nimport { MatSelect } from '@angular/material/select';\n\nimport {\n BaseDirective,\n closestToTimeSlot,\n nearestStepToInput,\n timeWithGmtOffsetFormatString\n} from '@mckinsey-converge/base';\n\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { generateAvailableTimes } from '../utils/time.utils';\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs';\nimport {\n filter,\n map,\n withLatestFrom\n} from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'mck-time-field',\n template: `\n
\n {{label}}\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n `,\n styleUrls: ['./time-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeFieldComponent),\n multi: true\n }\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class TimeFieldComponent extends BaseDirective implements OnInit, OnChanges, ControlValueAccessor {\n @Input()\n public label: string;\n @Input()\n public required: boolean;\n /** Time step between each allowed time option */\n @Input() public step = 15;\n /** Whether form field is disabled */\n @Input() public disabled: boolean;\n /** Whether past times are allowed */\n @Input() public noPastTimes = true;\n /** Representing the date from start **/\n @Input() public from: number;\n /** Representing desired timezone **/\n @Input() public timezone?: string = new DateTZ({ date: Date.now() }).local_tz;\n\n // R-- Which time field is going to be used, there's too many\n /** Form control on change handler */\n private _onChange: (_: number) => void;\n /** Form control on touch handler */\n private _onTouch: (_: number) => void;\n\n /** Select field for selecting the time */\n @ViewChild('select') private select_field: MatSelect;\n\n /** String representing the currently set date */\n public date = new BehaviorSubject(DateNow(new Date()).ms);\n\n public filterFormControl: FormControl = new FormControl();\n\n public nearestStep = combineLatest([\n this.filterFormControl.valueChanges,\n this.date]).pipe(\n map(([value, date]) => nearestStepToInput(this.step, value, DateTime.now().valueOf()))\n );\n\n /** String representing the currently set time */\n public value = new BehaviorSubject(closestToTimeSlot(DateTime.now(), this.step).toFormat('HH:mm'));\n\n /** Available time blocks for the selected date */\n public options = new BehaviorSubject[]>(generateAvailableTimes(DateNow(new Date()).ms, !this.noPastTimes, this.step, this.timezone));\n\n public selectedOption = combineLatest([this.options, this.value]).pipe(\n map(([options, value]) => options.find(o => o.value === value))\n );\n\n public placeHolderOption = this.options.pipe(\n map(os => os.length > 0 && os[0])\n );\n\n public isSelected(option: SelectOption) {\n return this.value.pipe(map(t => t === option.value));\n }\n\n public get isOpen() {\n return this.select_field?.panelOpen ?? false;\n }\n\n public ngOnInit(): void {\n // Generate the time input options for the booking date\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n\n // Subscribe to selected option changes\n this.subscription('dateTimeChanges',\n combineLatest([\n this.date\n ]).pipe(\n map(([date]) => {\n // R--- The time input needing to be TZ aware.\n const closestTimeSlot = closestToTimeSlot(DateTime.fromMillis(date.valueOf()), this.step);\n // Need to return the date with building timezone or the HH:mm representation will no match the option values\n return new DateTZ({date: closestTimeSlot.valueOf(), is_local_tz:false, building_tz: this.timezone});\n }),\n withLatestFrom(this.options),\n filter(([date, timeOptions]: [DateTZ, SelectOption[]]) => {\n // if new time slot opened up when date / time changes, add it here.\n return !timeOptions.find(t => t.value === date.formatDate('HH:mm'));\n }),\n map(([date, timeOptions]) => {\n // TODO probably an issue here with going from a future date and time earlier than now back to day showing null\n // Push the current date option in\n timeOptions.push({\n display: timeWithGmtOffsetFormatString(date),\n value: date.formatDate('HH:mm')\n });\n // Sort the time options\n timeOptions.sort((a, b) => `${a.value}`.localeCompare(`${b.value}`));\n return timeOptions;\n })\n ).subscribe(next => this.options.next(next)));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.no_past_times || changes.step || changes.timezone) {\n // If there's a new date value then update the time options\n this.options.next(generateAvailableTimes(this.date.value, !this.noPastTimes, this.step, this.timezone));\n const buildingDate = new DateTZ({date: this.from, is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.value.next(buildingDate.formatDate('HH:mm'));\n }\n if (changes.from) {\n // When the from input param changes update the date value\n this.date.next(this.from);\n }\n }\n\n /**\n * Update the form field value\n * @param new_value New value to set on the form field\n */\n public setValue(new_value: string): void {\n // value comes in as a HH:mm string\n const newTime = (new_value.indexOf(':') > 0 ? new_value : '00:00').split(':');\n // need the date with the building timezone so the hour set is relative to there and not local.\n const d = new DateTZ({ date: this.date.value, is_local_tz: false, building_tz: this.timezone });\n const date = d.setValue({ hour: parseInt(newTime[0]), minute: parseInt(newTime[1]) });\n if (date) {\n if (this._onChange) {\n this._onChange(date.ms);\n }\n }\n }\n\n /**\n * Update local value when form control value is changed\n * @param value The new value for the component\n */\n public writeValue(value: number | null) {\n if (value != null) {\n // Time input value in building time milliseconds\n this.date.next(value);\n // Get the closest time to slot in case the browser was idle and elapse the valid times\n const date = closestToTimeSlot(DateTime.fromMillis(value).startOf('minute'), this.step);\n // Need the building time so HH:mm is correct\n const buildingDate = new DateTZ({date: date.valueOf(), is_local_tz: false, building_tz: this.timezone}).startOfValue('minute');\n this.options.next(generateAvailableTimes(buildingDate.ms, !this.noPastTimes, this.step, this.timezone));\n }\n }\n\n public setDisabledState(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Registers a callback function that is called when the control's value changes in the UI.\n * @param fn The callback function to register\n */\n public registerOnChange(fn: (_: number) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback function is called by the forms API on initialization to update the form model on blur.\n * @param fn The callback function to register\n */\n public registerOnTouched(fn: (_: number) => void): void {\n this._onTouch = fn;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport { SelectOption } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'mck-toggle',\n template: `\n
\n \n
\n `,\n styleUrls: ['./toggle.component.scss']\n})\nexport class ToggleComponent {\n\n @Input()\n options: SelectOption[];\n\n @Input()\n selected: SelectOption;\n\n @Output()\n selectedChange = new EventEmitter>();\n\n public onTapOption(option: SelectOption) {\n this.selectedChange.emit(option);\n }\n\n isSelected(option: SelectOption) {\n return this.selected === option;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Component({\n selector: 'app-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss']\n})\nexport class TooltipComponent {\n isVisible: boolean = false; // To control the visibility of the tooltip\n position: TooltipPosition = TooltipPosition.DEFAULT;\n theme: TooltipTheme = TooltipTheme.DEFAULT;\n tooltip = '';\n left = 0;\n top = 0;\n visible = false;\n}","
\n
\n
\n {{string}}\n
\n
\n
","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n HostListener,\n Injector,\n Input,\n ViewContainerRef\n} from '@angular/core';\nimport {TooltipComponent} from \"./tooltip.component\";\nimport {TooltipPosition, TooltipTheme} from \"./tooltip.enums\";\n\n@Directive({\n selector: '[tooltip]'\n})\nexport class TooltipDirective {\n\n @Input() tooltip = '';\n @Input() position: TooltipPosition = TooltipPosition.DEFAULT;\n @Input() theme: TooltipTheme = TooltipTheme.DEFAULT;\n @Input() trigger: ('hover' | 'click' | 'touch')[] = ['hover']; // Now an array of trigger types\n @Input() showDelay = 0;\n @Input() hideDelay = 0;\n @Input() show: boolean = true;\n\n private componentRef: ComponentRef | null = null;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n constructor(\n private elementRef: ElementRef, \n private appRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver, \n private injector: Injector) {\n }\n\n // Helper function to check if the tirgger type is present \n private hasTrigger(triggerType: 'hover' | 'click' | 'touch'): boolean {\n return this.trigger.includes(triggerType);\n }\n\n //Mouse and hover events\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.hasTrigger('hover') ) {\n this.initializeTooltip();\n }\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.hasTrigger('hover') ) {\n this.setHideTooltipTimeout();\n }\n }\n\n // Click event\n @HostListener('click')\n onClick(): void {\n if (this.hasTrigger('click') ) {\n if (this.componentRef === null) {\n this.initializeTooltip();\n } else {\n this.destroy(); // Hide tooltip if it is already shown\n }\n }\n }\n\n // Touch event\n\n\n @HostListener('touchstart', ['$event'])\n onTouchStart($event: TouchEvent): void {\n // Prevent default to avoid click event fire immedieatly \n // $event.preventDefault();\n if(this.hasTrigger('touch')) {\n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 150); // show the tooltip after short delay\n }\n \n }\n\n @HostListener('touchend')\n onTouchEnd(): void {\n // Hide the tooltip when touch end \n if(this.hasTrigger('touch') ){\n window.clearTimeout(this.touchTimeout);\n // this.setHideTooltipTimeout();\n setTimeout(() => {\n this.setHideTooltipTimeout();\n }, 500); \n }\n \n }\n\n // Initialization of the tooltip\n private initializeTooltip() {\n if (this.componentRef === null) {\n window.clearInterval(this.hideDelay);\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);\n this.componentRef = componentFactory.create(this.injector);\n\n this.appRef.attachView(this.componentRef.hostView);\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef).rootNodes;\n\n this.setTooltipComponentProperties();\n\n document.body.appendChild(tooltipDOMElement);\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\n }\n }\n\n private setTooltipComponentProperties() {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.position = this.position;\n this.componentRef.instance.theme = this.theme;\n\n const {left, right, top, bottom} = this.elementRef.nativeElement.getBoundingClientRect();\n\n switch (this.position) {\n case TooltipPosition.BELOW: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(bottom);\n break;\n }\n case TooltipPosition.ABOVE: {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(top);\n break;\n }\n case TooltipPosition.RIGHT: {\n this.componentRef.instance.left = Math.round(right);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n case TooltipPosition.LEFT: {\n this.componentRef.instance.left = Math.round(left);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n\n private showTooltip() {\n if (this.componentRef !== null) {\n this.componentRef.instance.visible = this.show ? true : false;\n }\n }\n\n private setHideTooltipTimeout() {\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n destroy(): void {\n if (this.componentRef !== null) {\n window.clearInterval(this.showTimeout);\n window.clearInterval(this.hideDelay);\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","export enum TooltipPosition {\n ABOVE = 'above',\n BELOW = 'below',\n LEFT = 'left',\n RIGHT = 'right',\n DYNAMIC = 'dynamic',\n DEFAULT = 'below'\n}\n\nexport enum TooltipTheme {\n DARK = 'dark',\n LIGHT = 'light',\n DEFAULT = 'dark'\n}\n","export { AlertMode, AlertBannerDisplay } from './alert-banner/alert-banner.component';\nexport { SelectOption } from './options/select-option';\nexport * from './cng-select/dropdown-panel';","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSelectModule } from '@angular/material/select';\nimport { AutoCompleteChipSelectItemComponent } from './auto-complete-chip-select-item/auto-complete-chip-select-item.component';\nimport { AutoCompleteSelectOptionComponent } from './auto-complete-select-option/auto-complete-select-option.component';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { RadioSelectComponent } from './radio-select/radio-select.component';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FilterPipe } from './pipes/filter.pipe';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TimeFieldComponent } from './time-field/time-field.component';\nimport { DateTzTimeFieldComponent } from './date-tz-time-field/date-tz-time-field.component';\nimport { SpacerComponent } from './spacer/spacer.component';\nimport { DurationFieldComponent } from './duration-field/duration-field.component';\nimport { DateTzDurationFieldComponent } from './date-tz-duration-field/date-tz-duration-field.component';\nimport { AcaDatePickerComponent } from './aca-date-picker/aca-date-picker.component'; // the old widget\nimport { MckDatePickerComponent } from './mck-date-picker/mck-date-picker.component'; // the old form field \nimport { DateTzCalendarWidgetComponent } from './date-tz-calendar-widget/date-tz-calendar-widget.component'; // the new widget\nimport { DateTzDatePickerComponent } from './date-tz-date-picker/date-tz-date-picker.component'; // the new form field \nimport { CalendarIconComponent } from './icons/calendar/calendar-icon.component';\nimport { ChevronIconComponent } from './icons/calendar/chevron-icon.component';\nimport { SelectOptionComponent } from './select-option/select-option.component';\nimport { CloseIconComponent } from './icons/close/close-icon.component';\nimport { SelectedChipCountComponent } from './selected-chip-count/selected-chip-count.component';\nimport { AlertBannerComponent } from './alert-banner/alert-banner.component';\nimport { ErrorMessageComponent } from './error-message/error-message.component';\nimport { ToggleComponent } from './toggle/toggle.component';\nimport { LabelComponent } from './label/label.component';\nimport { ModalComponent } from './modal/modal.component';\nimport { CollapseHeaderComponent } from './collapse-header/collapse-header.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { SwitchGroupComponent } from './switch-group/switch-group.component';\nimport { ModalButtonRowComponent } from './modal-button-row/modal-button-row.component';\nimport { InformationalImageComponent } from './informational-image/informational-image.component';\nimport { GroupHeaderPipe } from './auto-complete-chip-select-item/groupHeader.pipe';\nimport { SelectComponent } from './select/select.component';\nimport { LegendDropdownComponent } from './legend-dropdown/legend-dropdown.component';\nimport { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';\nimport { RecurrencePatternForm } from './recurrence-pattern-form/recurrence-pattern-form.component'; \nimport { RecurrenceDateForm } from './recurrence-date-form/recurrence-date-form.component';\nimport { ConflictsModalComponent } from './conflicts-modal/conflicts-modal.component';\nimport { RecurringBookingForm } from './recurrence-booking-form/recurrence-booking-form.component';\nimport { OverrideChangesModalComponent } from './override-changes-modal/override-changes-modal.component';\nimport { SanitizePipe } from './pipes/sanitise.pipe';\nimport { ConflictAlertModalComponent } from './conflict-alert-modal/conflict-alert-modal.component';\nimport { CngSelectComponent } from './cng-select/cng-select.component';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { DropdownTriggerForDirective } from './cng-select/dropdown-trigger-for.directive';\nimport { CngSelectOptionsComponent } from './cng-select/cng-select-options.component';\nimport { TooltipComponent } from './tooltip/tooltip.component';\nimport { TooltipDirective } from './tooltip/tooltip.directive';\nimport { ZoomWarningComponent } from './zoom-warning-modal/components/zoom-warning/zoom-warning.component';\nimport { CustomSnackbarComponent } from './custom-snackbar-component/custom-snackbar-component.component';\nimport { SnackBarService } from './custom-snackbar-component/custom-snackbar-component.service';\nimport { CateringDropComponent } from './catering-drop-modal/components/catering-drop/catering-drop-modal.component';\n\nexport const MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule,\n MatExpansionModule,\n OverlayModule\n];\n\n@NgModule({\n imports: [CommonModule,\n ...MATERIAL_MODULES,\n ReactiveFormsModule,\n FormsModule,\n NgxMatSelectSearchModule, \n NgxSkeletonLoaderModule,\n MatSnackBarModule],\n declarations: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n GroupHeaderPipe,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n SelectOptionComponent,\n CloseIconComponent,\n SelectedChipCountComponent,\n AlertBannerComponent,\n ErrorMessageComponent,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n CustomSnackbarComponent,\n CateringDropComponent\n ],\n exports: [\n AutoCompleteChipSelectItemComponent,\n AutoCompleteSelectOptionComponent,\n AcaDatePickerComponent,\n MckDatePickerComponent,\n DateTzCalendarWidgetComponent,\n DateTzDatePickerComponent,\n TimeFieldComponent,\n DateTzTimeFieldComponent,\n DurationFieldComponent,\n DateTzDurationFieldComponent,\n RadioSelectComponent,\n FilterPipe,\n SanitizePipe,\n SpacerComponent,\n CalendarIconComponent,\n ChevronIconComponent,\n AlertBannerComponent,\n ReactiveFormsModule,\n FormsModule,\n ToggleComponent,\n LabelComponent,\n ModalComponent,\n CollapseHeaderComponent,\n SwitchGroupComponent,\n ModalButtonRowComponent,\n InformationalImageComponent,\n SelectComponent,\n LegendDropdownComponent,\n RecurrencePatternForm,\n RecurrenceDateForm,\n RecurringBookingForm,\n ConflictsModalComponent,\n OverrideChangesModalComponent,\n ConflictAlertModalComponent,\n CngSelectComponent, \n DropdownTriggerForDirective,\n CngSelectOptionsComponent,\n TooltipComponent,\n TooltipDirective,\n ZoomWarningComponent,\n ],\n entryComponents: [\n CustomSnackbarComponent,\n CateringDropComponent\n ]\n \n})\nexport class UiModule {\n}\n","/**\n * Generate a list of time options for the given date\n * @param datestamp Date to generate options for\n * @param show_past Whether past times should be options\n */\n\nimport {\n closestToTimeSlot,\n closestToTimeSlotTz,\n DurationGroup,\n durationHumanized,\n timeFormatString,\n timeWithGmtOffsetFormatString,\n unique\n} from '@mckinsey-converge/base';\nimport { SelectOption } from '../types';\nimport { DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { DateTime } from 'luxon';\n\n// 24 hours\nexport const ALL_DAY_BOOKING_VALUE = 60 * 24;\n\nexport const DEFAULT_DURATION = 30;\n\n// R--- depreciate.\nexport const generateAvailableTimes = (\n datestamp: number,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz\n): SelectOption[] => {\n // R--- refactor to only used dateTz input and drop timezone param.\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let date = new DateTZ({ date: datestamp, is_local_tz: false, building_tz: timezone });\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || date.isAfterDate(now, 'day')) {\n // later than today\n date = date.startOfValue('day');\n } else {\n // today\n date = now;\n }\n // Get the closest timeslot to the start time\n const inputDate = DateTime.fromMillis(date.ms);\n const closestDate = closestToTimeSlot(inputDate, step);\n // Date changed to the closest time\n date = new DateTZ({ date: closestDate.valueOf(), is_local_tz: false, building_tz: timezone });\n const end = date.endOfValue('day');\n // Add options for the rest of the day\n while (date.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(date),\n shortDisplay: date.formatDate('hh:mma'),\n value: date.formatDate('HH:mm')\n });\n date = date.addValue({ minutes: step });\n }\n return blocks;\n};\n\n\nexport const generateAvailableTimesTz = (\n fromDateTz: DateTZ,\n showPast: boolean,\n step: number = 15,\n timezone: string = new DateTZ({ date: Date.now() }).local_tz,\n all_day: boolean = false,\n extras: SelectOption[] = [],\n startFromDateTz: boolean = false\n): SelectOption[] => {\n // now needs the building timezone for isAfter to work correctly\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: timezone });\n // date needs the building timezone for isAfter to work correctly\n let dateTz = fromDateTz.clone();\n // Check if we're today or a future date\n const blocks: SelectOption[] = [];\n if (showPast || dateTz.isAfterDate(now, 'day')) {\n // later than today\n dateTz = dateTz.startOfValue('day');\n } else {\n // today/fromDateTz using the flag\n dateTz = startFromDateTz ? dateTz : now;\n }\n // Get the closest timeslot to the start time\n dateTz = closestToTimeSlotTz(dateTz, step);\n // Date changed to the closest time\n const end = dateTz.endOfValue('day');\n // Add the all day option for today\n if (all_day && dateTz.isSameDate(now, 'day')) {\n const startOfDay = dateTz.startOfValue('day');\n blocks.push({\n display: timeWithGmtOffsetFormatString(startOfDay),\n shortDisplay: startOfDay.formatDate('hh:mma'),\n value: startOfDay\n })\n }\n // Add options for the rest of the day\n while (dateTz.isBeforeDate(end)) {\n blocks.push({\n display: timeWithGmtOffsetFormatString(dateTz),\n shortDisplay: dateTz.formatDate('hh:mma'),\n value: dateTz, \n });\n \n dateTz = dateTz.addValue({ minutes: step });\n }\n\n return unique(extras.concat(blocks), 'shortDisplay');\n};\n\n/**\n * Generates list of duration options for new booking flow.\n * @param date - The start dateTime\n * @param max - The max number of minutes to go to from the date param.\n * @param min - The min number of minutes to display first time from.\n * @param step - The number of minutes to step up by for timeslots.\n */\nexport const generateDurationOptions = (\n date: DateTZ,\n max: number,\n min: number,\n step: number,\n extended: boolean): SelectOption[] => {\n const blocks: SelectOption[] = [];\n let value = min;\n while (value <= max) {\n let duration: string;\n if (extended) {\n const d = durationHumanized(value - min, true);\n duration = d ? `+${d}` : 'Current';\n } else {\n duration = durationHumanized(value, true);\n }\n\n blocks.push({\n value,\n display: `${date.addValue({ minutes: value }).formatDate(timeFormatString()).toLocaleLowerCase()} (${duration})`,\n });\n value += step;\n }\n return blocks;\n};\n\nexport const allDayOption: SelectOption = ({\n value: ALL_DAY_BOOKING_VALUE,\n display: 'All Day'\n});\n\nexport const oneWeekOption: SelectOption = ({\n value: 60 * 24 * 7, // 1 week\n display: 'One Week'\n});\n\nexport const defaultDurationGroups: DurationGroup[] = [\n {\n start: 15,\n step: 15,\n max: 60 * 24\n }\n // , {\n // start: 60,\n // step: 30,\n // max: (60 * 8) - 1 // 8 hours\n // }, {\n // start: 60 * 8,\n // step: 60,\n // max: 60 * 24 // 24 hours\n // }\n];\n\n/**\n * Maps the {@link DurationGroup} to {@link SelectOption} and appends the default all day and week options.\n */\nexport const generateDurationOptionsFromGroups = (date: DateTZ, durationGroups: DurationGroup[], extended: boolean): SelectOption[] => [\n ...(durationGroups.map(duration => generateDurationOptions(date, duration.max, duration.start, duration.step, extended)).reduce(((previousValue, currentValue) => {\n previousValue.push(...currentValue);\n return previousValue;\n }), [])),\n // allDayOption,\n // oneWeekOption\n ];\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'mck-zoom-warning',\n templateUrl: './zoom-warning.component.html',\n styleUrls: ['./zoom-warning.component.scss']\n})\nexport class ZoomWarningComponent {\n\n constructor(private dialogRef: MatDialogRef) {}\n\n onCloseClick(): void {\n this.dialogRef.close();\n }\n}\n","
\n

Excessive zoom warning

\n
\n\n
\n
\n

\n
\n
\n
\n\n
\n \n
\n
","export * from './lib/user.module';\nexport * from './lib/user.actions'\nexport * from './lib/user.types'\nexport * from './lib/user.reducer'\n","import { \n createLoadingAction\n } from '../../../loading/src/lib/loading.actions';\nimport {\n UserState,\n UserStoreState\n} from './user.types';\nimport { User } from '../../../data-common/src/lib/users/user.class';\nimport { createSelector } from '@ngrx/store';\n\nexport const loadUser = createLoadingAction('CurrentUser', 'current');\n\nexport const selectUserState = ({ user }: UserStoreState) => user;\n\nexport const selectHasUserData = createSelector(createSelector(selectUserState, loadUser.selectors.model), (state) => !!state.optionalSuccess);\n\nexport const selectCurrentUser = createSelector(selectUserState, loadUser.selectors.optionalSuccess);\n","import { Injectable } from '@angular/core';\nimport {\n Actions,\n Effect\n} from '@ngrx/effects';\nimport { createLoadingEffect } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\nimport { UsersService } from '../../../data-common/src/lib/users/users.service';\n\n\n@Injectable()\nexport class UserEffects {\n\n constructor(private actions: Actions,\n private userService: UsersService) {\n }\n\n @Effect()\n loadUser = createLoadingEffect(this.actions, loadUser, () => this.userService.loadCurrentUser());\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StoreModule } from '@ngrx/store';\nimport { userReducer } from './user.reducer';\nimport { EffectsModule } from '@ngrx/effects';\nimport { UserEffects } from './user.effects';\n\n@NgModule({\n imports: [\n CommonModule,\n StoreModule.forFeature('user', userReducer),\n EffectsModule.forFeature([UserEffects])\n ]\n})\nexport class UserModule {\n}\n","import { createReducer } from '@ngrx/store';\nimport { UserState } from './user.types';\nimport { LoadingModel } from '@mckinsey-converge/loading';\nimport { loadUser } from './user.actions';\n\n\nexport const initialUserState: UserState = {\n current: LoadingModel.empty()\n};\n\nexport const userReducer = createReducer(initialUserState,\n ...loadUser.ons);\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./$$_lazy_route_resource lazy recursive\";","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { ShellWrapperComponent } from './shell/shell.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ShellWrapperComponent,\n children: [\n {\n path: 'day-view',\n loadChildren: () =>\n import('./calendar/day-view/day-view.module').then(m => m.DayViewModule)\n },\n {\n path: 'week-view',\n loadChildren: () =>\n import('./calendar/week-view/week-view.module').then(m => m.WeekViewModule)\n },\n {\n path: 'catering',\n loadChildren: () =>\n import('./catering/catering.module').then(m => m.CateringModule)\n },\n {\n path: 'visitors',\n loadChildren: () =>\n import('./visitors/visitors.module').then(m => m.VisitorsModule)\n },\n {\n path: 'reports',\n loadChildren: () =>\n import('./reports/reports.module').then(m => m.ReportsModule)\n },\n {\n path: 'room-admin',\n loadChildren: () =>\n import('./room-admin/room-admin.module').then(m => m.RoomAdminModule)\n },\n { path: '**', redirectTo: 'day-view' }\n ]\n },\n { path: '**', redirectTo: 'day-view' }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { useHash: true })],\n exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n","import { Component, HostListener, ViewEncapsulation } from '@angular/core';\nimport { UploadManager, Amazon, Md5Workers } from '@acaprojects/ngx-uploads';\nimport { ComposerService } from '@placeos/composer';\n\nimport { detectIE } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ZoomWarningComponent } from '@mckinsey-converge/ui';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: [\n './styles/app.component.scss',\n './styles/custom-element.styles.scss',\n './styles/native-element.styles.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent extends BaseDirective {\n constructor(\n private _composer: ComposerService,\n private _uploads: UploadManager,\n private _md5_workers: Md5Workers,\n private _service: ApplicationService,\n private _dialog: MatDialog\n ) {\n super();\n /* istanbul ignore if */\n if (detectIE() && detectIE() < 12) {\n location.href = `${location.origin}${location.pathname}assets/not-supported.html`;\n return;\n }\n // CONCIERGE.date: If invalid, reset the localstorage date and timezone when reloading pages.\n const timezoneString = localStorage.getItem('CONCIERGE.timezone') || null;\n localStorage.removeItem('CONCIERGE.date');\n if (!timezoneString) {\n localStorage.removeItem('CONCIERGE.timezone'); \n }\n\n this._md5_workers.setup('assets/md5_worker.js');\n this.initUploads();\n }\n\n ngOnInit() {\n this.adjustZoom();\n }\n\n private adjustZoom() {\n const clientWidth = document.body.clientWidth;\n if (this.isMobileOrTablet()) { // Do not show the warning if it's a mobile or tablet device\n return;\n }\n if (clientWidth < 1300) {\n this._dialog.open(ZoomWarningComponent);\n }\n }\n private isMobileOrTablet(): boolean {\n const userAgent = navigator.userAgent || navigator.vendor;\n const maxTouchPoints = navigator.maxTouchPoints || 0; // Check for touch points \n if (maxTouchPoints > 0 && window.innerWidth <= 1024) {\n return true;\n } // Check for common mobile/tablet user agent strings \n const mobileAgents = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'IEMobile', 'Opera Mini'];\n for (const agent of mobileAgents) {\n if (userAgent.indexOf(agent) > -1) {\n return true;\n }\n }\n return false;\n }\n\n private initUploads() {\n this.subscription(\n 'composer',\n this._service.initialised.subscribe((state) => {\n /* istanbul ignore else */\n if (state) {\n this.timeout('init_uploads', () => {\n const token = this._composer.auth.token;\n if (!token) {\n return setTimeout(() => this.initUploads(), 300);\n }\n this._uploads.token = token;\n this._uploads.autoStart = true;\n this._uploads.endpoint = '/api/staff/uploads';\n UploadManager.addProvider(Amazon);\n });\n this.unsub('composer');\n }\n })\n );\n }\n}\n","
\n \n
\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { FormsModule } from '@angular/forms';\nimport { MAT_LABEL_GLOBAL_OPTIONS } from '@angular/material/core';\n\nimport { ComposerModule } from '@placeos/composer';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { environment } from '../environments/environment';\nimport { SharedContentModule } from './shared/shared.module';\nimport {\n ActionReducer,\n MetaReducer,\n StoreModule\n} from '@ngrx/store';\nimport { localStorageSync } from 'ngrx-store-localstorage';\nimport { ShellWrapperComponent } from './shell/shell.component';\nimport { provideMockSettingsObject } from '@mckinsey-converge/data-common';\nimport { DEFAULT_SETTINGS } from 'src/environments/settings';\nimport { ENVIRONMENT_TOKEN } from '@mckinsey-converge/environment';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BookingsModule } from 'src/app/bookings/bookings.module';\nimport { BookingsModule as BookingModuleStaff } from '@mckinsey-converge/bookings';\nimport { CalendarModule } from 'src/app/calendar/calendar.module';\nimport { EffectsModule } from '@ngrx/effects';\n\ndeclare global {\n interface Window {\n app_loaded: boolean;\n }\n}\n\n/**\n * Cache some state in local storage. Not for use in production.\n */\n export function localStorageSyncReducer(reducer: ActionReducer): ActionReducer {\n // Keys needed to fix prod reloading. MCK-1229\n let keys = [\n 'buildings',\n 'bookingForm',\n 'rooms',\n ];\n\n if (!environment.production) {\n keys = [\n 'bookings',\n 'buildings',\n 'organisation',\n 'bookingForm',\n 'rooms',\n 'user'\n ];\n }\n\n return localStorageSync({\n keys,\n rehydrate: true,\n })(reducer);\n}\n\nconst metaReducers: Array> = [localStorageSyncReducer];\n\n@NgModule({\n declarations: [\n AppComponent,\n ShellWrapperComponent\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n AppRoutingModule,\n HttpClientModule,\n FormsModule,\n ComposerModule,\n BookingsModule,\n CalendarModule,\n LegacyOverlaysModule,\n SharedContentModule,\n StoreModule.forRoot({}, { metaReducers }),\n BookingModuleStaff,\n EffectsModule.forRoot(),\n ],\n providers: [\n { provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'nevet' } },\n provideMockSettingsObject(DEFAULT_SETTINGS),\n { provide: ENVIRONMENT_TOKEN, useValue: environment }\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule {\n constructor() {\n window.app_loaded = true;\n }\n}\n","import {Component, OnInit, Inject, Output, EventEmitter} from '@angular/core';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {first} from 'rxjs/operators';\nimport {BaseDirective, closestToTimeSlotTz} from '@mckinsey-converge/base';\nimport {\n Booking,\n BookingAction,\n generateBookingForm, OrganisationService, RecurrencePeriod, removeExpiredOcurrences, SeriesAction, validDateTZ\n} from '@mckinsey-converge/data-common';\nimport {AvailableBookingFields} from '@mckinsey-converge/data-common';\nimport {ApplicationService} from '@mckinsey-converge/data-common';\nimport {HashMap, DialogEvent} from '@mckinsey-converge/base';\nimport {CateringDetailsModalComponent, CateringDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {BookingConfirmComponent} from '@mckinsey-converge/legacy-overlays';\nimport {RequirementDetailsModalComponent, RequirementDetailsModalData} from '@mckinsey-converge/legacy-overlays';\nimport {SpacesService} from '@mckinsey-converge/data-common';\nimport { ConflictsModalComponent, ConflictsModalComponentData, OverrideChangesModalComponent } from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\";\nimport { I } from '@angular/cdk/keycodes';\n\n\nexport interface BookingFlowEvent {\n /** Type of flow event */\n type: 'previous' | 'next' | 'reset' | 'close' | 'error';\n /** Step which the event was emitted from */\n step: string;\n /** Additional metadata for the event */\n metadata?: HashMap;\n}\n\nexport interface BookingModalData {\n /** Booking to create/edit */\n booking: Booking;\n /** Whether to edit only catering */\n only_catering?: boolean;\n /** Pass in timezone for new bookings */\n timezone?: string;\n /**Type of action on a series */\n action?: SeriesAction | BookingAction;\n //** If Booking request from day view grid click */\n isFromGrid?: boolean;\n}\n\n@Component({\n selector: 'a-booking-modal',\n templateUrl: './booking-modal.component.html',\n styleUrls: ['./booking-modal.component.scss'],\n})\nexport class BookingModalComponent extends BaseDirective implements OnInit {\n\n /** Range of dates for the Start Date Picker*/\n public from_start: DateTZ;\n public to: DateTZ;\n\n /** Range of dates for the Start Date Picker*/\n public from_end: DateTZ;\n\n /** Form fields */\n public form: FormGroup;\n /** Form data store */\n public booking: Booking;\n /** Step of the booking flow that is currently active */\n public flow_step: string;\n public modalTitle: string;\n\n public iscloning: SeriesAction | BookingAction | null = null;\n\n public edit_recurrence: boolean\n\n /** Whether to edit only catering */\n public get only_catering(): boolean {\n return !!this._data.only_catering;\n }\n\n @Output() public event = new EventEmitter();\n\n /** List of available booking fields for the form */\n public get available_fields(): AvailableBookingFields[] {\n return this._service.setting('app.booking.show_fields') || [];\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: BookingModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.getModalTitle();\n this._dialog_ref.disableClose = true;\n this._spaces.initialised.pipe(first(_ => _)).subscribe(() => {\n this.flow_step = this._data.only_catering ? 'catering' : 'form';\n this.loadFormData();\n });\n }\n\n public getModalTitle() {\n switch (this._data.action) {\n case BookingAction.EDIT:\n this.modalTitle = 'Edit Booking';\n break;\n case SeriesAction.CLONE:\n this.modalTitle = 'Clone Recurring Series';\n break;\n case BookingAction.CLONE:\n this.modalTitle = 'Clone Booking';\n break;\n case SeriesAction.EDIT:\n this.modalTitle = 'Edit Series';\n break;\n default:\n this.modalTitle = 'New Booking';\n break;\n }\n }\n\n /**\n * Handle events from child components\n * @param event Booking flow event\n */\n public handleFlowEvent(event: BookingFlowEvent) {\n /* istanbul ignore else */\n if (event.type === 'next') {\n this.toNextFlowStep(event);\n } else if (event.type === 'previous') {\n this.toPreviousFlowStep(event);\n } else if (event.type === 'reset') {\n this.resetForm();\n }\n }\n\n public close() {\n this._dialog_ref.close();\n }\n\n\n private toNextFlowStep(event: BookingFlowEvent) {\n const space_list = this.form.controls.space_list.value;\n switch (event.step) {\n case 'recurrence':\n this.openRecurrenceConflictsModal();\n break\n case 'search':\n if (\n space_list &&\n space_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'equipment')\n ) {\n this.openEquipmentDetailsModal();\n } else {\n if (this.form.controls.has_catering && this.form.controls.has_catering.value) {\n this.navigate('catering');\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n }\n break;\n case 'catering':\n const order_list = this.form.controls.catering.value;\n if (\n order_list.find(order => this.form.controls.space_list.value.find(space => space.email === order.location_id)) &&\n order_list &&\n order_list.length &&\n (!event.metadata || !event.metadata.ref || event.metadata.ref !== 'details')\n ) {\n this.openCateringDetailsModal();\n } else {\n this.navigate('form');\n this.confirmBooking();\n }\n break;\n case 'changes':\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n break;\n default:\n this.form.markAsDirty();\n //const is_recurr_series_edit = this.booking.id && this.form.controls.is_recurrent.value && this._data.action\n const is_recurr_series_edit = this.booking.id && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT || this._data.action === BookingAction.CLONE\n )\n if (!space_list || !space_list.length || !this.booking.id || is_recurr_series_edit || this.booking.is_multiroom) {\n this.navigate('search');\n } else if (this.booking.id && space_list && space_list.length) {\n this.openEquipmentDetailsModal();\n } else {\n this.confirmBooking();\n }\n break;\n }\n }\n\n private toPreviousFlowStep(event: BookingFlowEvent) {\n switch (event.step) {\n case 'search':\n this.navigate('form');\n break;\n case 'catering':\n /* istanbul ignore else */\n if (!this._data.only_catering) {\n this.navigate('search');\n }\n else {\n this.close();\n }\n break;\n }\n }\n\n private navigate(route: string) {\n this.flow_step = route;\n }\n\n /** Clear user changes to the form data */\n private resetForm() {\n delete this.form;\n // Pass in the desired location timezone\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone,\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n }\n\n /**\n * Load existing form data or generate a new booking form\n *\n * It fires when the modal first opens.\n * this._data.booking is an empty {} when creating a booking but set when editing\n */\n private loadFormData(): void {\n const form_data: HashMap = this._data.booking ? this._data.booking.toJSON() : {};\n form_data.duration = form_data.duration || form_data?.startDateTz?.dateDiff(form_data?.endDateTz, 'minutes') || 0\n //\n /**\n * Set the desired timezone in the booking creation.\n * this._data?.timezone is when creating a new booking\n * this._data.booking?.timezone is when editing a booking\n *\n * R-- refactor to make consistent atm _data.timezone is defined everywhere\n * but generateBookingForm could use form_data.timezone\n */\n form_data.timezone = this._data.booking?.timezone || this._data?.timezone;\n // start a new booking out with a start end time.\n\n const is_cloning_or_edit = this._data.action === SeriesAction.CLONE ||\n this._data.action === BookingAction.CLONE ||\n this._data.action === BookingAction.EDIT ||\n this._data.action === SeriesAction.EDIT;\n\n if (\n ( !this._data?.isFromGrid && ( !form_data.startDateTz || form_data.startDateTz.isBeforeDate(DateNow()) ) )\n && !this._data.only_catering && !is_cloning_or_edit\n ) {\n form_data.startDateTz = closestToTimeSlotTz(new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: form_data.timezone }), 15);\n form_data.start_epoch = form_data.startDateTz.seconds;\n form_data.endDateTz = form_data.startDateTz.addValue({ minutes: form_data.duration });\n form_data.end_epoch = form_data.endDateTz.seconds;\n }\n this.booking = new Booking(form_data);\n\n if(this.booking.is_recurrent && (\n this._data.action === SeriesAction.CLONE || this._data.action === SeriesAction.EDIT\n )){ //if it's series get the recurrence_end from the occurences\n this.booking.recurrence_endTz = this.booking.recurrenEndFromOcurrences(this.booking.occurrence_details)\n }\n\n\n // An empty booking here is when creating a new booking, edit booking will populate all the values\n this.form = generateBookingForm(\n this.booking,\n this.available_fields,\n true,\n this._data?.timezone, // MUST be defined in dialog.open(BookingModalComponent or booking will revert to a local timezone\n this._data.action\n );\n\n this.form.addControl('action', new FormControl(this._data.action))\n\n // localize the booking form start time\n /* istanbul ignore else */\n if (form_data && form_data.room_ids && this.form.controls.space_list) {\n this.form.controls.space_list.setValue(\n form_data.room_ids.map(id => this._spaces.find(id) || {id, name: id})\n );\n }\n\n this.edit_recurrence = this.booking?.id\n && (this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === SeriesAction.CLONE);\n\n if (this._data.action === SeriesAction.CLONE || this._data.action === BookingAction.CLONE) {\n\n this.iscloning = this._data.action === SeriesAction.CLONE ? SeriesAction.CLONE : BookingAction.CLONE;\n\n this._data.action === BookingAction.CLONE\n ? this.form.get('title').setValue(`Clone ${this.booking.title}`)\n : this.form.get('title').setValue(`Series Clone ${this.booking.title}`);\n\n this.form.get('id').setValue('');\n this.form.get('organiser').enable();\n\n if (this._data.action === BookingAction.CLONE) {\n this.form.get('is_recurrent').setValue(false);\n this.form.get('is_recurrent').disable();\n }\n const tz = this._org.building.timezone;\n this.form.patchValue({ timezone: tz });\n\n // Check if the booking is a list, if so then updates the value for start and end date fields.\n if (form_data.recurrence_period === RecurrencePeriod.LIST) {\n removeExpiredOcurrences(this.form)\n }\n\n // cloning individual occurrence set tup\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n // case 1: past booking\n if (start_time.isBeforeDate(date_now, \"day\")) {\n if (form_data.recurrence_period !== RecurrencePeriod.LIST) {\n this.form.controls.dateTz.setValidators([\n Validators.required,\n validDateTZ\n ]);\n this.form.controls.dateTz.updateValueAndValidity();\n this.form.controls.dateTz.markAsTouched();\n this.form.controls.is_before_date.setValue(true);\n\n if(this._data.action === BookingAction.CLONE && this.form.controls.all_day.value === true) {\n this.form.get('dateTz').enable();\n }\n }\n }\n\n // case 2: booking is in the same day but but the start time has already passed\n if (\n start_time.isSameDate(date_now, \"day\") && start_time.startEpoch() < date_now.startEpoch()\n ) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n\n // case 3: future booking nothing to do\n //Nothing to do\n }\n\n if (\n this.form.controls.action?.value === SeriesAction.EDIT || this.form.controls.action?.value === BookingAction.EDIT\n ) {\n const tz = this._org.building.timezone;\n const start_time = form_data.recurrence_period === RecurrencePeriod.LIST ? this.form.controls.dateTz.value : new DateTZ({ date: this.booking.start_epoch * 1000, is_local_tz: false, building_tz: tz });\n const date_now = DateNow(new Date()).toZone(tz);\n\n if (\n start_time.isSameDate(date_now, \"day\") && (\n start_time.startEpoch() <= date_now.startEpoch() &&\n start_time.addValue({ minutes: this.booking.duration}).startEpoch() >= date_now.startEpoch())\n ) {\n this.form.controls.is_before_date.setValue(true);\n }\n\n if (start_time.isSameDate(date_now, \"day\") && start_time.addValue({ minutes: this.booking.duration}).startEpoch() < date_now.startEpoch()) {\n this.form.controls.dateTz.setValue(closestToTimeSlotTz(date_now, 15));\n }\n }\n\n if (!this.booking.catering.length) {\n const notes = this.booking.notes.filter(note => note.type !== 'catering');\n\n this.form.get('notes').setValue(notes);\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openEquipmentDetailsModal() {\n const equipment_ref = this._dialog.open(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n codes_field: this.form.controls.equipment_codes,\n head_counts_field: this.form.controls.expected_attendees\n }\n });\n this.subscription(\n 'equipments_modal_events',\n equipment_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n metadata: {ref: 'equipment'}\n });\n equipment_ref.close();\n }\n })\n );\n equipment_ref.afterClosed().subscribe(() => this.unsub('equipments_modal_events'));\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openCateringDetailsModal() {\n const catering_ref = this._dialog.open(\n CateringDetailsModalComponent,\n {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: this.form.controls.space_list.value,\n notes_field: this.form.controls.notes,\n catering: this.form.controls.catering,\n booking: this.booking\n }\n }\n );\n this.subscription(\n 'catering_modal_events',\n catering_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'catering',\n metadata: { ref: 'details' }\n });\n catering_ref.close();\n }\n })\n );\n catering_ref.afterClosed().subscribe(() => this.unsub('catering_modal_events'));\n }\n\n /*\n Open overriding changes modal - disabled for CNG-541\n */\n private overrideChanges() {\n const ref = this._dialog.open(OverrideChangesModalComponent, {\n width: '576px',\n data: {\n edits: this.booking.occurrence_edits,\n timezone: this.booking.timezone\n }\n });\n ref.componentInstance.event.subscribe(event => {\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n ref.close();\n } else if (event.reason === 'close') {\n ref.close();\n }\n });\n }\n\n /**\n * Open modal to confirm the booking details\n */\n private confirmBooking() {\n /* Clear recurrence validator if only catering is being edited */\n if(this.only_catering){\n this.clearRecurrenceValidators()\n }\n\n /* istanbul ignore else */\n if (this.form.valid || this.only_catering) {\n const formValues = this.form.value;\n // this.booking is the booking being edited, not much to it on a new booking\n // having an empty booking is used in determining changes I assume.\n const startDateTz = this.form.controls.dateTz.value\n const endDateTz = startDateTz.addValue({ minutes: formValues.duration })\n const booking = {\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(this.booking) : this.booking.toJSON()),\n ...(\n this._data.action === BookingAction.CLONE || this._data.action === BookingAction.EDIT || this._data.only_catering ? this.sanitizeBookingFromCloning(formValues) : formValues),\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: formValues.space_list[0],\n multi_rooms: formValues.space_list.map(room => room),\n };\n\n const dialog_ref = this._dialog.open(BookingConfirmComponent, {\n width: '32em',\n maxWidth: '95vw',\n maxHeight: '95vh',\n data: {\n old_booking: this.booking,\n booking: new Booking(booking),\n action: this._data.action\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n dialog_ref.componentInstance.event.subscribe(event => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.close();\n this.event.emit({ reason: 'done', metadata: this.form});\n } else if (event.reason === 'action') {\n this.resetForm();\n }\n else if(event.reason === 'last-moment-conflict') {\n this.form.patchValue({space_list: []}, {emitEvent: true});\n // this.handleFlowEvent({ type: 'reset', step: 'search' })\n dialog_ref.close();\n }\n });\n }\n }\n\n private sanitizeBookingFromCloning(booking: Booking | Object): Object {\n const obj = booking instanceof Booking ? booking.toJSON() : booking;\n return {...Object.keys(obj).reduce((acc, key) => {\n if(\n key.search(/^recurrence_/) === -1\n && key.search(/^occurrence_/) === -1\n ) {\n acc[key] = obj[key]\n };\n\n return acc;\n }, {}),\n is_recurrent: false\n }\n }\n\n /** Open modal for adding equipment requirements to booking */\n private openRecurrenceConflictsModal() {\n const recurr_ref = this._dialog.open(ConflictsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n room_name: this.form.controls.space_list.value[0].name,\n conflicts: this.form.controls.recurrence_exceptions.value,\n timezone: this.booking.timezone\n }\n });\n this.subscription(\n 'conflicts_modal_events',\n recurr_ref.componentInstance.event.subscribe((event: DialogEvent) => {\n if(this.booking.occurrence_edits && this.booking.occurrence_edits.length && event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'changes',\n });\n } else {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.toNextFlowStep({\n type: 'next',\n step: 'search',\n });\n }\n }\n recurr_ref.close();\n })\n );\n recurr_ref.afterClosed().subscribe(() => this.unsub('conflicts_modal_events'));\n }\n\n public get title(){\n const type = this.booking?.id ? 'Edit' : 'New'\n return `${type} ${this.edit_recurrence ? 'recurring' : ''} booking`\n }\n\n private clearRecurrenceValidators() {\n const recurrenceStarts = this.form.controls.recurrence_starts\n recurrenceStarts.clearValidators()\n recurrenceStarts.updateValueAndValidity()\n }\n}\n","
\n
\n \n {{ modalTitle }}\n
\n \n
\n\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'booking-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class BookingCateringComponent {\n /** Form fields for the booking */\n @Input() public form: FormGroup; // R-- maybe add booking timezone has hidden form field since the date timestamp is from here\n /** Whether catering is the only action in the flow */\n @Input() public only: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Active order to display details for */\n public active_order: CateringOrder;\n\n /** Field for storing catering details */\n public get catering_field() {\n return this.form && this.form.controls.catering ? this.form.controls.catering : null;\n }\n\n /** List of spaces selected for the booking */\n public get space_list(): Space[] {\n return this.form && this.form.controls.space_list\n ? this.form.controls.space_list.value\n : [];\n }\n\n /** Date of the booking */\n public get dateTz(): DateTZ {\n const now = DateNow(new Date())\n return this.form && this.form.controls.dateTz\n ? this.form.controls.dateTz.value\n : now.startOfValue('minute');\n }\n\n /** Duration of the booking */\n public get duration(): number {\n return this.form && this.form.controls.duration ? this.form.controls.duration.value : 60;\n }\n\n /** Whether booking is all day */\n public get all_day(): boolean {\n return this.form && this.form.controls.all_day && this.form.controls.all_day.value;\n }\n\n /** Create a new catering order */\n public newOrder(): void {\n const order = new CateringOrder({\n booking_timezone: this.dateTz.building_tz,\n });\n this.active_order = order;\n }\n\n /** Handle changes to catering order */\n public handleOrderEvent(order: CateringOrder) {\n // active_order = null\n if (!order) {\n this.active_order = null;\n }\n /* istanbul ignore else */\n if (order) {\n let orders = this.form.controls.catering.value;\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n // Tack on or replace the order\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n // Sort by delivery_time\n orders = orders.sort((a,b) => {\n if ( a.delivery_time < b.delivery_time) {\n return -1;\n }\n if ( a.delivery_time < b.delivery_time) {\n return 1;\n }\n return 0\n });\n this.form.controls.catering.setValue(orders);\n this.form.markAsDirty();\n }\n this.active_order = null;\n }\n}\n","
\n \n \n \n
\n\n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-category-display',\n templateUrl: './category.component.html',\n styleUrls: ['./category.component.scss']\n})\nexport class CateringMenuCategoryComponent {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Form control for the list of order items */\n @Input() public items: FormControl;\n /** Currency symbol for the active space */\n @Input() public symbol: string;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for close events */\n @Output() public close = new EventEmitter();\n}\n","
\n
\n \n
{{ category?.name }}
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n \n
\n
\n Category contains no available items\n
\n
\n
\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport {\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData,\n} from '@mckinsey-converge/legacy-overlays';\n\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\nimport { BehaviorSubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\ninterface StartEndResponse {\n timezone: string, \n start: DateTZ;\n end: DateTZ\n}\n\n@Component({\n selector: 'a-catering-order-details',\n templateUrl: './order-details.component.html',\n styleUrls: ['./order-details.component.scss'],\n})\nexport class BookingCateringOrderDetailsComponent extends BaseDirective implements OnInit {\n /** Catering order to edit details of */\n @Input() public order: CateringOrder;\n /** Booking date */\n @Input() public dateTz: DateTZ;\n /** Booking duration */\n @Input() public duration: number;\n /** Booking duration */\n @Input() public space_list: Space[];\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** Whether top header details should be shown */\n @Input() public hide_details: boolean;\n /** Whether to show smaller version of component */\n @Input() public compact: boolean;\n /** Emitter for changes to the catering order */\n @Output() public event = new EventEmitter();\n /** Form controls for order */\n public form: FormGroup;\n /** List of available catering item categories */\n public category_list: CateringCategory[] = [];\n /** Active category to display details for */\n public active_category: CateringCategory;\n /** List of available times for delivering catering */\n public available_times: Identity[] = [];\n /** Whether the menu is loading */\n public loading: boolean;\n /** Whether the search input should be shown */\n public show_search: boolean;\n /** Current search string for filtering */\n public readonly search$ = new BehaviorSubject('');\n /** List of menu items that match the search string */\n public matched_items: CateringItem[] = [];\n\n @ViewChild('input') private _input_el: ElementRef;\n\n /** Whether user is able to order from the currently selected space */\n public get can_order(): boolean {\n return (\n (this.active_building.has_catering || this.category_list.length) &&\n (this.has_available_items) &&\n !this.out_of_hours\n );\n }\n\n /** Whether booking is with the restricted ordering period */\n // R--- different in staff, but should it be?\n public get within_restricted_time(): boolean {\n return false;\n }\n\n /** Building associated with the selected space */\n public get active_building(): Building {\n const form = this.form || { controls: { location_id: { value: '' } } };\n const form_controls = (form).controls;\n const space: Space =\n this.space_list.find((space) => space.email == form_controls.location_id.value) ||\n ({ level: {} } as any);\n return (\n this._org.buildings.find((bld) => space.level.building_id === bld.id) ||\n ({ catering_restricted_from: 0 } as any)\n );\n }\n\n /** Currency code for the active building */\n public get symbol(): string {\n return this.active_building.currency || 'USD';\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n return this.form\n ? this.form?.controls?.items?.value.reduce((total, item) => total + item.amount, 0)\n : 0;\n }\n\n /* istanbul ignore next */\n /** Whether booking time is outside of catering hours */\n public get out_of_hours(): boolean {\n return this.form?.controls?.delivery_time.value < 0;\n }\n\n /** Whether items are available for order at anytime */\n public get has_available_items(): boolean {\n return this.category_list.reduce(\n (available, category) => available || category.can_order_anytime,\n true\n );\n }\n\n constructor(\n private _menu: CateringMenuService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.generateAvailableTimes();\n this.subscription(\n 'search',\n this.search$\n .pipe(\n map((str) => {\n const search = str.toLowerCase();\n const items = [];\n for (const category of this.category_list) {\n if (category.items) {\n for (const group of category.items) {\n if ((group as any).items.length) {\n if (\n (group as any).package &&\n (group.name.toLowerCase().includes(search) ||\n (group as any).items.find((item) =>\n item.name.toLowerCase().includes(search)\n ))\n ) {\n items.push(group);\n } else {\n for (const item of (group as any).items) {\n if (item.name.toLowerCase().includes(search)) {\n items.push(item);\n }\n }\n }\n } else {\n if (group.name.toLowerCase().includes(search)) {\n items.push(group);\n }\n }\n }\n }\n }\n return items;\n })\n )\n .subscribe((items) => (this.matched_items = items))\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.dateTz || changes.duration) {\n this.generateAvailableTimes();\n /* istanbul ignore else */\n if (\n this.form &&\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n /* istanbul ignore else */\n if (changes.space_list) {\n /* istanbul ignore else */\n if (this.form && this.space_list && !this.form.controls.location_id.value) {\n this.form.controls.location_id.setValue(this.space_list[0].email);\n }\n }\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.initForm();\n }\n }\n\n public focusSearch() {\n if (this._input_el && this.show_search) {\n this._input_el.nativeElement.focus();\n }\n }\n\n public flattenArray(arr: T[]): T[] {\n return arr.reduce((acc, val) => acc.concat(val), []);\n }\n\n public initForm() {\n if(Array.isArray(this.space_list[0])){\n // this.space_list = [...this.space_list[0]];\n this.space_list = this.flattenArray(this.space_list);\n }\n this.form = new FormGroup({\n id: new FormControl(this.order.id),\n booking_date: new FormControl(this.dateTz.ms), // R-- different in staff\n location_id: new FormControl(this.order.location_id || this.space_list[0].email),\n delivery_time: new FormControl(this.order.delivery_time || this.available_times[0]?.id),\n items: new FormControl(this.order.items.map((item) => new CateringItem(item))),\n });\n this.subscription(\n 'space_change',\n this.form.controls.location_id.valueChanges.subscribe((space) => {\n this.generateAvailableTimes();\n if (\n !this.available_times.find(\n (time) => time.id === this.form.controls.delivery_time.value\n )\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n this.form.controls.items.setValue([]);\n this.loadMenu();\n })\n );\n this.loadMenu();\n this.generateAvailableTimes();\n if (\n this.form &&\n !this.available_times.find((time) => time.id === this.form.controls.delivery_time.value)\n ) {\n this.form.controls.delivery_time.setValue(this.available_times[0]?.id);\n }\n }\n\n public confirmOrder() {\n const ref = this._dialog.open<\n BookingCateringConfirmModalComponent,\n CateringConfirmModalData\n >(BookingCateringConfirmModalComponent, {\n maxWidth: '95vw',\n data: {\n all_day: this.all_day,\n dateTz: this.dateTz,\n form: this.form,\n },\n });\n this.subscription(\n 'confirm_event',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n // R--- add booking_date and timezone\n // this.order bookingDateTz is missing correct timezone.\n const order = new CateringOrder({ ...this.order, ...this.form.value });\n this.event.emit(order);\n ref.close();\n }\n })\n );\n ref.afterClosed().subscribe(() => this.unsub('confirm_event'));\n }\n\n private loadMenu() {\n const space = this.space_list.find(\n (space) => space.email === this.form.controls.location_id.value\n );\n this.loading = true;\n this._menu\n .query({ zone_id: this._org.buildings.find((bld) => space.zones.includes(bld.id))?.id })\n .then(\n (list) => {\n this.loading = false;\n this.category_list = list\n .map((i) => new CateringCategory(i))\n .filter(c => !c.out_of_stock);\n },\n () => (this.loading = false)\n );\n }\n\n /** Generate a list of available delivery times for the given booking time */\n private generateAvailableTimes() {\n let { timezone, start, end } = this.generateStartAndEndTimes();\n start = start.setValue({ minute: Math.ceil(start.minutes / 5) * 5 });\n // will be different from staff in these commonly named methods.\n // R--- Form Controls TBD\n // R--- The timezone here doesn't seem legit, back to putting into a form hidden field\n let start_date = this.dateTz; // new DateTZ({ date: this.date, building_tz: timezone, is_local_tz: false});\n start_date.logDateTz('start date')\n this.available_times = [];\n while (start.isBeforeDate(end)) {\n this.available_times.push({\n id: Math.abs(start_date.dateDiff(start, 'minutes')),\n name: start.formatDate('h:mma').toLocaleLowerCase(),\n });\n start = start.addValue({ minutes : 5});\n }\n /* istanbul ignore else */\n if (this.available_times.length === 0) {\n this.available_times.push({ id: -1, name: 'Out of hours' });\n }\n }\n\n private generateStartAndEndTimes(): StartEndResponse {\n const now = DateNow(new Date())\n let timezone = now.local_tz;\n const space_email = this.space_list[0]?.email;\n let catering_hours = { start: 7, end: 20 };\n // R--- change date input to dateTz input.\n // R--- Same issue as the above generateAvailableTimes\n const date_ = this.dateTz; // new DateTZ({date: this.date, building_tz: timezone, is_local_tz: false})\n let building_time = date_.startOfValue('day');\n let cat_start_time = building_time.addValue({ hours: catering_hours.start });\n let cat_end_time = building_time.addValue({ hours: catering_hours.end });\n\n if (space_email) {\n // Fetch the Space and Building\n const space = this.space_list.find((space) => space.email === space_email);\n const building = this._org.buildings.find((bld) => space?.zones.includes(bld.id));\n if (building?.timezone) {\n // Update to the building timezone if defined.\n timezone = building.timezone;\n building_time = date_.toZone(timezone).startOfValue('day');\n }\n if (building?.catering_hours) {\n // Update to the building catering hours if defined.\n catering_hours = building?.catering_hours;\n }\n // Update the hours with the currently defined timezone.\n cat_start_time = building_time.addValue({ hours: catering_hours.start });\n cat_end_time = building_time.addValue({ hours: catering_hours.end });\n }\n\n // Start Time of the Booking\n let start = date_.toZone(timezone);\n let end = date_.toZone(timezone).addValue({ minutes: this.duration });\n\n // Do the booking start and end time coincide with the catering hours?\n if (start.isBeforeDate(cat_start_time)) {\n // booking start before catering opens'\n if (cat_end_time.isAfterDate(start)) {\n // catering closes after booking starts'\n start = cat_start_time.addValue({});\n } else {\n // were just closed, catering closes before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking starts after catering is open'\n if (cat_end_time.isBeforeDate(start)) {\n // were just closed, catering closed before booking start'\n start = cat_end_time.addValue({});\n end = cat_end_time.addValue({});\n return { timezone, start, end };\n }\n }\n\n if (end.isBeforeDate(cat_end_time)) {\n // booking ends before catering closes'\n \n if (cat_start_time.isAfterDate(end)) {\n // were just closed, catering opens is after booking ends'\n start = cat_start_time.addValue({});\n end = cat_start_time.addValue({});\n return { timezone, start, end };\n }\n } else {\n // booking ends after catering closes'\n // set the booking end to the catering close time.'\n end = cat_end_time.addValue({});\n }\n\n return { timezone, start, end };\n }\n}\n","
\n
\n
\n
\n \n \n \n \n {{ space.local_name }}\n \n \n \n
\n
\n \n \n \n \n {{ time.name }}\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n \n
\n
{{ item.name }}
\n \n
\n
\n
\n
\n
\n \n Back\n \n \n Confirm Order({{ item_count || '0' }})\n \n
\n
\n\n
\n
\n \"No\n
\n

\n Catering is not available for this booking.
\n Catering must be ordered within business hours at {{ active_building?.name }}.\n

\n
\n
\n\n
\n
\n
\n \n
\n
\n Loading menu for {{ active_building?.name }}...\n
\n
\n
\n
\n\n \n\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'catering-order-list-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class CateringOrderListItemComponent implements OnInit {\n /** Catering order to display */\n @Input() order: CateringOrder;\n /** */\n @Input() public space_list: Space[];\n /** Selected datetime */\n @Input() date: number;\n /** Emitter for edit events */\n @Output() public edit = new EventEmitter();\n /** Emitter for delete events */\n @Output() public delete = new EventEmitter();\n\n public room: Space;\n\n public ngOnInit(): void {\n this.room = (this.space_list || []).find(space => space.email === this.order.location_id);\n }\n\n public get space_in_booking(): boolean {\n return !!this.room;\n }\n\n /** Space selected for delivery */\n public get local_space_name(): string {\n return this.room?.local_name || '';\n }\n\n /** Delivery time for the order */\n public get delivery_time(): string {\n /* istanbul ignore else */\n if (!this.order) {\n return '';\n }\n return this.order.bookingDateTz.addValue({ minutes: this.order.delivery_time || 0}).formatDate('h:mma').toLocaleLowerCase();\n }\n\n\n /** Total cost of the order */\n public get order_cost(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount * item.unit_price, 0);\n }\n\n /** Number of items in the order */\n public get item_count(): number {\n const items = (this.order || { items: [] }).items as any;\n return items.reduce((amount, item) => amount + item.amount, 0);\n }\n\n /** Currency symbol for the selected space */\n public get symbol(): string {\n const space = this._spaces.find((this.order || {}).location_id);\n /* istanbul ignore else */\n if (!space || !space.level) {\n return 'USD';\n }\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n constructor(private _spaces: SpacesService, private _org: OrganisationService) {}\n}\n","
\n Deliver to {{ local_space_name }} at {{ delivery_time }}\n
\n
\n
\n {{ item_count }}\n { item_count, plural, =1 { item } other { items } }\n
\n
{{ order_cost / 100 | currency: symbol }}
\n
\n
\n \n \n\n \n
\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { BookingFlowEvent } from '../../booking-modal.component';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-list',\n templateUrl: './order-list.component.html',\n styleUrls: ['./order-list.component.scss']\n})\nexport class BookingCateringOrderListComponent implements OnInit{\n /** Form field for storing catering orders */\n @Input() public catering: FormControl;\n /** Selected datetime for the booking */\n @Input() public date: number;\n /** Whether booking is all day */\n @Input() public all_day: boolean;\n /** */\n @Input() public space_list: Space[];\n /** Whether catering is the only action in the flow */\n @Input() public only_catering: boolean;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n /** Emiiter for order events */\n @Output() public order = new EventEmitter();\n\n public ngOnInit(): void {\n if(this.space_list && this.space_list.length) {\n this.catering.value.forEach(catering => {\n catering.location = this.space_list[0].name; \n catering.location_id = this.space_list[0].email;\n catering.bookingDateTz = this.date;\n });\n }\n }\n\n /** List of orders in the booking */\n public get orders(): CateringOrder[] {\n /* istanbul ignore else */\n if (!this.catering) {\n return [];\n }\n return this.catering.value;\n }\n\n /** Emit event for a new catering order */\n public newOrder() {\n this.order.emit();\n }\n\n /** Emit event for editing existing order */\n public editOrder(order: CateringOrder) {\n this.order.emit(order);\n }\n\n /** Remove order from the list */\n public deleteOrder(order: CateringOrder) {\n const orders = this.orders;\n const index = orders.findIndex(an_order => order.id === an_order.id);\n /* istanbul ignore else */\n if (index >= 0) {\n orders.splice(index, 1);\n this.catering.setValue(orders);\n }\n }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n this.event.emit({ type: 'next', step: 'catering' });\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'catering' });\n }\n}\n","
\n
\n

Catering Orders

\n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n Back\n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders
\n \n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { unique } from '@mckinsey-converge/base';\n\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'booking-space-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class BookingSpaceFiltersComponent extends BaseDirective implements OnInit {\n /** Date selected for the booking */\n @Input() public date: FormControl;\n /** List of location IDs being filtered on */\n @Input() public locations: string[] = [];\n /** Preselected buildings */\n @Input() public initBuildings: string[] = [];\n /** Emitter for changes to location filter */\n @Output() public locationsChange = new EventEmitter();\n /** List of available buildings */\n public building_list: Building[] = [];\n /** Whether to show the location list */\n public show_locations: boolean;\n\n public get date_() {\n // R--- another instance, can the form control date be TZ aware\n return new DateTZ({date: this.date.value}) \n }\n\n /** Whether active date is current day */\n public get is_today(): boolean {\n const now = DateNow(new Date())\n return now.isSameDate(this.date_, 'day');\n }\n\n /** Display string for the selected date */\n public get date_display(): string {\n // R--- needs to be TZ aware because of day is relative\n return this.is_today ? 'Today' : this.date_.formatDate('dd MMM yyyy');\n }\n\n /** List of filtered location */\n public get location_list(): Building[] {\n return this.locations.map(id => this.building_list.find(bld => bld.id === id));\n }\n\n public get building_selected(): HashMap {\n const map = {};\n for (const id of this.locations) {\n map[id] = true;\n }\n return map;\n }\n\n constructor(private _org: OrganisationService) {\n super();\n }\n\n public changeDate(amount: number) {\n let date = this.date_.addValue({ 'days': amount });\n const now_ = DateNow(new Date())\n const now = now_.startOfValue('minute');\n if (date.isBeforeDate(now)) {\n date = now;\n }\n this.date.setValue(date.ms);\n }\n\n public ngOnInit(): void {\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n this.building_list = bld_list;\n if (Array.isArray(this.initBuildings)) {\n this.locations = unique(this.initBuildings);\n } \n }));\n }\n\n /**\n * Update location filter to include the given building\n * @param building Building to add\n */\n public addLocationFilter(building: Building): void {\n this.locations.push(building.id);\n this.locations = unique(this.locations);\n this.locationsChange.emit(this.locations);\n }\n\n /**\n * Remove location from the active filters\n * @param building Building to remove\n */\n public removeLocationFilter(building: Building) {\n this.locations.splice(\n this.locations.findIndex(id => building.id === id),\n 1\n );\n this.locationsChange.emit([...this.locations]);\n }\n}\n","
\n
\n
\n \n
{{ date_display }}
\n \n
\n
\n
\n \n
\n Select locations(s)\n
\n \n
\n
\n
\n
\n \n \n {{ building.name }}\n \n \n \n
\n
\n\n \n\n","import {\n Component,\n OnInit,\n Input,\n SimpleChanges,\n EventEmitter,\n Output,\n OnChanges\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport {\n debounceTime,\n distinctUntilChanged,\n switchMap,\n catchError,\n map,\n first,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\nimport { BehaviorSubject, Observable, of, Subject } from 'rxjs';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Booking, BookingAction, BookingStateService, ISpaceAvailabilityOptions, mapBuildingToSelectOption, mapCityToAllSelectOption, SeriesAction, toggleSelectedByGroup } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { randomInt } from '@mckinsey-converge/base';;\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { SelectOption } from '@mckinsey-converge/ui';\nimport { MatChipsModule} from '@angular/material/chips';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { NoCateringModalComponent } from '@mckinsey-converge/legacy-overlays';\n@Component({\n selector: 'booking-find-space',\n templateUrl: './find-space.component.html',\n styleUrls: ['./find-space.component.scss'],\n})\nexport class BookingFindSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** Form control for setting the active space */\n @Input() public spaces: FormControl;\n /** Form group for booking */\n @Input() public form: FormGroup;\n\n @Input() public isCloning: SeriesAction | BookingAction | null;\n\n @Input() public booking: Booking;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n /** List of spaces available during the required period */\n public space_list: Space[] = [];\n /** List of users from an API search */\n public search_results$: Observable;\n /** Whether space list is loading */\n public loading: boolean;\n /** List of zones to filter the spaces on */\n public zone_ids: string[] = [];\n /** Subject holding the value of the search */\n public readonly change$ = new Subject();\n\n public searchQuery: string = '';\n\n public formGroup = new FormGroup({\n location: new FormControl([]),\n });\n\n public options = new BehaviorSubject[]>([]);\n\n public selectedOptions = new BehaviorSubject[]>([]);\n\n public savedSelection = [];\n\n public selectedSpace: Array = [];\n\n public oldSpace = [];\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether multiple spaces are allowed to be selected */\n public get multiple(): boolean {\n return this._service.setting('app.booking.multiple_spaces');\n }\n\n public get has_valid_space() {\n if(!Array.isArray(this.spaces.value)){\n this.spaces.setValue([this.spaces.value]); \n }\n return this.spaces?.value?.some(_ => _.id && _.bookable);\n }\n\n public get initialBuildingIds(): string[] {\n return this._org.building ? [this._org.building.id] : [];\n }\n\n public OriginalSpaceList: any;\n\n public disableCondition: boolean = false;\n\n public noCateringDialogRef: MatDialogRef;\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n let request_id = 0;\n // Listen for input changes\n this.search_results$ = this.change$.pipe(\n debounceTime(400),\n distinctUntilChanged(),\n switchMap((bld = []) => {\n this.loading = true;\n request_id = randomInt(9999_9999);\n const dateTz = this.form.controls.dateTz.value;\n\n const ignore = this.form.controls.action?.value === SeriesAction.EDIT ? this.form.controls.id.value : null\n\n // R--- need to pass on the all day param and let libs/data-common/src/lib/spaces/spaces.service.ts \n // availability do the math.\n let query: ISpaceAvailabilityOptions = {\n dateTz: this.form.controls.all_day.value\n ? dateTz.startOfValue('day').startOfValue('minute').startOfValue('second')\n : dateTz.startOfValue('minute').startOfValue('second'),\n duration: this.form.controls.all_day.value\n ? 24 * 60\n : this.form.controls.duration.value,\n zone_ids: bld.length ? bld : this._org.building.id,\n bookable: true,\n recurrence_count: this.form.controls.recurrence_count.value,\n recurrence_period: this.form.controls.recurrence_period.value,\n recurrence_endTz: this.form.controls.recurrence_endTz.value,\n recurrence_interval: this.form.controls.recurrence_interval.value,\n recurrence_starts: this.form.controls.recurrence_starts.value,\n is_recurrent: this.form.controls.is_recurrent.value,\n recurrence_days: this.form.controls.recurrence_days.value,\n ignore\n };\n\n /* istanbul ignore else */\n if (this.zone_ids && this.zone_ids.length) {\n query.zone_ids = this.zone_ids.join(',');\n }\n const id = request_id;\n return this._spaces.available(query).then(async (list) => ({ id, list }));\n }),\n catchError((_) => of({ id: request_id, list: [], error: _})),\n map((resp: { id: number, list: Space[]}) => {\n this.loading = false;\n return resp.id === request_id ? resp.list : this.space_list;\n })\n );\n\n // Process API results\n this.subscription(\n 'search_results',\n this.search_results$.subscribe((list) => {\n this.space_list = list.filter((space) => {\n if (!space.available && !this.form.controls.action?.value) {\n return false;\n }\n\n for (const zone of this.zone_ids) {\n if (space.zones.includes(zone)) {\n return true;\n }\n }\n return !this.zone_ids.length;\n }).filter(space => space.available);\n\n this.space_list.sort((a, b) => this.sort(a, b));\n if(!this.selectedOptions.value.length){\n this.setDefaultBuilding()\n }\n // this.space_list.map((space)=>{\n // if(space.id === this.spaces.value?.id){\n // this.spaces.setValue([space])\n // const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n // this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n // }\n // })\n \n if(!this.form.controls.is_multiroom.value && this.spaces.value.length>=1){\n this.spaces.setValue([this.spaces.value[0]]);\n }\n\n this.space_list.forEach((space) => {\n this.spaces.value.forEach((savedSpace) => {\n if (space.id === savedSpace.id) {\n const updatedSpaces = this.spaces.value.map(sp => sp.id === space.id ? space : sp);\n this.spaces.setValue(updatedSpaces);\n \n const spaceConflicts = space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr) => recurr.date));\n }\n });\n });\n \n this.OriginalSpaceList = this.space_list;\n\n // when updating a booking, the selected spaces are not available, so add them \n if (this.form.controls.is_multiroom.value) {\n //[Deprecated]if a space is already selected, filter the available spaces by it's level id\n if (this.spaces.value[0]?.level.id.trim() !== '') {\n // const levelId = this.spaces.value[0].level.id;\n // this.space_list = this.space_list.filter((s) => s.level.id === levelId);\n this.space_list = [\n ...this.spaces.value,\n ...this.space_list.filter(\n (sv) => !this.spaces.value.some((sh) => sh.id === sv.id)\n ),\n ];\n }\n }\n \n if (\n this.isCloning === BookingAction.CLONE\n || this.isCloning === SeriesAction.CLONE\n ) {\n\n const space = this.space_list.find(space => space.id === this.booking.room.id);\n const bookable = space !== undefined;\n this.space_list = bookable && this.space_list.filter(space => space.id !== this.booking.room.id) || this.space_list;\n\n const original_space = new Space({\n ...this.booking.room,\n ...(space || {\n settings: {\n ...this.booking.room.settings,\n recurrence_availability: []\n }\n } as any),\n bookable\n });\n\n this.oldSpace = [original_space];\n this.spaces.value.some(space => space.id === original_space.id) && this.spaces.setValue([original_space]);\n this.selectedSpace = this.updateSelectedSpace(original_space, [...this.selectedSpace]); //.push(original_space);\n }\n\n if(this.form.controls.is_recurrent.value){\n this.sortByRecurrenceAvailability();\n }\n\n\n const booking_space_list = this.form.controls.space_list.value;\n\n const idsFromUpadatedSpaceList = this.space_list.map(item => item.id);\n // Check if previous selection exists in the updated list\n const isExists = booking_space_list.filter(item => idsFromUpadatedSpaceList.includes(item?.id));\n // const isExists = idsFromUpadatedSpaceList.includes(booking_space_list.id);\n\n if(booking_space_list.length !== 0 && isExists.length){\n this.spaces.setValue(booking_space_list);\n }else {\n this.spaces.setValue([]);\n }\n })\n );\n \n this.change$.next('');\n });\n\n this.subscription('buildings', this._org.listen('buildings').subscribe((bld_list) => {\n const city = this._org.building.city\n const timezone = this._org.building.timezone\n const grouped_by_city = {\n key: {name: city, timezone},\n value: bld_list?.filter((bld)=> bld.city === city) || []\n }\n const city_buildings = grouped_by_city.value.map(\n (bld)=>mapBuildingToSelectOption(grouped_by_city.key.name, bld)\n )\n const buildings = [\n mapCityToAllSelectOption(grouped_by_city.key),\n ...city_buildings\n ] \n this.options.next(buildings)\n }));\n\n }\n\n public updateSelectedSpace(originalSpace, selectedSpace) {\n // Check if originalSpace already exists in selectedSpace\n const index = selectedSpace.findIndex(space => space.id === originalSpace.id);\n\n if (index === -1) {\n // If originalSpace doesn't exist, push it into selectedSpace\n selectedSpace.push(originalSpace);\n } else {\n // If originalSpace already exists, remove it before pushing\n selectedSpace.splice(index, 1);\n selectedSpace.push(originalSpace);\n }\n\n return selectedSpace;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.form) {\n const onChange = (_) => this.change$.next(_);\n /* istanbul ignore else */\n if (this.form.controls.dateTz) {\n this.subscription(\n 'date_field',\n this.form.controls.dateTz.valueChanges.subscribe(onChange)\n );\n }\n /* istanbul ignore else */\n if (this.form.controls.duration) {\n this.subscription(\n 'duration_field',\n this.form.controls.duration.valueChanges.subscribe(onChange)\n );\n }\n }\n }\n\n /**\n * Update the selected space list\n * @param space Space to add/toggle in the selected list\n */\n\n // public selectSpace(space: Space) {\n // const list = this.spaces.value;\n // if (list.find((item) => item.id === space.id)) {\n // this.spaces.setValue(list.filter((item) => item.id !== space.id));\n // } else {\n // this.spaces.setValue([space]);\n // }\n // }\n\n public selectSpace(space: Space) {\n let list = this.spaces.value;\n\n if (this.form.controls.is_multiroom?.value) {\n // If multiroom is selected\n const index = list.findIndex((item) => item.id === space.id);\n if (index > -1) {\n // Remove the space if it's already selected\n list.splice(index, 1);\n // If no spaces selected now, insert original space_list\n if (list.length === 0) {\n this.space_list = this.OriginalSpaceList;\n }\n } else {\n // Add the space to the selection\n list.length < 10 ? list.push(space) : null;\n //[Deprecated]If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n }\n } else if (list.find((item) => item.id === space.id)) {\n this.spaces.setValue(list.filter((item) => item.id !== space.id));\n } else {\n this.spaces.setValue([space]);\n }\n }\n\n // public selectSpace(space: Space) {\n // let list = this.spaces?.value;\n \n // if (this.form.controls.is_multiroom?.value) {\n // // If multiroom is selected\n // const index = list.findIndex((item) => item.id === space.id);\n // if (index > -1) {\n // // Remove the space if it's already selected\n // list.splice(index, 1);\n // // If no spaces selected now, insert original space_list\n // if (list.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n // } else {\n // // Add the space to the selection\n // list.length < 10 ? list.push(space) : null;\n // // If this is the first space being selected, filter space_list based on building.id\n // if (list.length === 1) {\n // const levelId = space.level.id;\n // this.space_list = this.space_list.filter(s => s.level.id === levelId);\n // }\n // }\n // } else {\n // // Handle single space selection (as before)\n // list = list.some((item) => item.id === space.id) ? [] : [space];\n // }\n // this.spaces.setValue(list);\n // }\n\n /**\n * Proceed to the next step in the space booking flow\n */\n public next(): void {\n if (this.form.controls.is_recurrent.value && \n this.form.controls.recurrence_exceptions.value.length) {\n const id = this.form.controls.id.value;\n if (id && this.form.controls.action?.value === 'edit') { \n this.handleEditConflicts(id);\n } else {\n this.event.emit({ type: 'next', step: 'recurrence' });\n } \n } else {\n const space_list = this.form.value.space_list;\n const catering_order = this.form.controls.catering.value;\n const has_catering_order = catering_order && catering_order.length > 0;\n \n if (space_list && space_list.length === 1 && has_catering_order) {\n const selected_space = space_list[0];\n if (!selected_space.has_catering) {\n this.openNoCateringModal();\n return;\n }\n }\n \n this.emitNextEvent();\n }\n }\n \n private openNoCateringModal() {\n this.noCateringDialogRef = this._dialog.open(NoCateringModalComponent, {\n panelClass: 'mck-modal-mini',\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n this.subscription(\n 'no-catering-modal',\n this.noCateringDialogRef.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done') {\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n this.emitNextEvent();\n }\n if (event.reason === 'close') {\n }\n })\n );\n \n this.noCateringDialogRef.afterClosed().subscribe(() => this.unsub('no-catering-modal'));\n }\n \n private emitNextEvent() {\n if (this.booking && this.booking.occurrence_edits && this.booking.occurrence_edits.length) {\n this.event.emit({ type: 'next', step: 'changes' });\n } else {\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'search' });\n }\n\n /**\n * Compare two spaces to determine order\n * @param space_a\n * @param space_b\n */\n public sort(space_a: Space, space_b: Space) {\n const bld = this._org.buildings.find((bld) => space_a.zones.includes(bld.id));\n const bld_b = this._org.buildings.find((bld) => space_b.zones.includes(bld.id));\n if (bld && bld !== bld_b) {\n return bld.name.localeCompare(bld_b?.name);\n }\n const sort_order = [...bld.sort_order].reverse();\n for (const zone_id of sort_order) {\n if (zone_id === '*') {\n continue;\n }\n const a_has_zone = space_a.zones.indexOf(zone_id) >= 0;\n const b_has_zone = space_b.zones.indexOf(zone_id) >= 0;\n if (a_has_zone && !b_has_zone) {\n return 1;\n } else if (b_has_zone && !a_has_zone) {\n return -1;\n }\n }\n return space_a.name.localeCompare(space_b.name);\n }\n\n public sortByRecurrenceAvailability() {\n this.space_list.sort((a, b)=>{\n const a_availability = (a.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/a.recurrence_availability.length\n const b_availability = (b.recurrence_availability?.filter(recurr => recurr.available)?.length*100)/b.recurrence_availability.length\n return b_availability - a_availability\n })\n }\n public toggle(option: SelectOption) {\n // update the selected value\n this.selectedOptions.pipe(\n take(1),\n withLatestFrom(this.options),\n map(([selectedOptions, options]) => {\n return toggleSelectedByGroup(options, selectedOptions, option);\n })\n ).subscribe(next => {\n const formData = this.formGroup.value;\n this.formGroup.setValue({\n location: formData.location,\n });\n this.selectedOptions.next(next);\n this.savedSelection = next.map((bld)=>bld.value) \n \n });\n }\n\n public setDefaultBuilding(){\n const defaultBld = this.options.value.filter(opt => opt.value === this._org.building.id)\n this.selectedOptions.next(defaultBld)\n }\n\n public clearList(){\n this.space_list = [];\n this.savedSelection = [];\n this.spaces.setValue([]);\n }\n\n public triggerSearch = () =>{\n if(this.savedSelection.length){\n this.change$.next(this.savedSelection)\n }else{\n // disabled for CNG-645\n // this.space_list = []\n }\n }\n\n public handleEditConflicts = (id: string) =>{\n /** When editing, compare exceptions with the original ocurrence list */\n const recurrence_exceptions = this.form.controls.recurrence_exceptions;\n let occurrences_org: Array\n let booking_org: Booking;\n\n this._booking_state.bookings.subscribe(bookings => {\n booking_org = bookings.filter((booking) => booking.id === id)[0]\n occurrences_org = booking_org.occurrence_details.map((ocurr)=>\n ocurr.start_epoch\n )\n })\n\n const { hours, minutes } = new DateTZ({ date: booking_org.start_epoch * 1000, is_local_tz: false, building_tz: booking_org.timezone});\n const { hours: to_hours, minutes: to_minutes } = this.form.controls.dateTz.value;\n const new_conflicts = hours === to_hours && minutes === to_minutes\n ? recurrence_exceptions.value.filter((date: number)=> occurrences_org.includes(date))\n : recurrence_exceptions.value.filter((date: number)=> !occurrences_org.includes(date));\n\n if(new_conflicts.length){\n recurrence_exceptions.setValue([...new_conflicts])\n this.event.emit({ type: 'next', step: 'recurrence' });\n }else{\n this.event.emit({ type: 'next', step: 'search' });\n }\n }\n\n // Property to filter spaces based on the search query\n get filteredSpaces() {\n if (!this.space_list) {\n return [];\n }\n\n // Filter spaces based on the searchQuery\n return this.space_list.filter((space) => {\n let spaceName = space.simple_name || space.settings?.room_name || space.local_name;\n return spaceName.toLowerCase().includes(this.searchQuery.toLowerCase());\n });\n }\n\n removeSpace(spaceToRemove: Space): void {\n // Filter out the space to remove from the current list of selected spaces\n const updatedSpaces = this.spaces.value.filter(space => space.id !== spaceToRemove.id);\n this.spaces.setValue(updatedSpaces);\n //[Deprecated]If this is the last space being unselected, include spaces from all levels in space_list(available spaces)\n // if (this.spaces.value.length === 0) {\n // this.space_list = this.OriginalSpaceList;\n // }\n }\n \n}\n","
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n {{ space?.simple_name || space[0]?.simple_name }}\n \n \n \n \n \n
\n
\n \n
\n \n \n
\n

Original Selection

\n \n
\n \n
\n
\n\n\n

All Available Rooms

\n \n \n \n \n
\n
\n
\n \n Back\n \n \n Next\n \n
\n
\n
\n\n
\n
\n
\n \n
\n
\n Checking space availability...\n
\n
\n
\n
\n\n
\n
\n
\n \n
\n
\n No results available, please select another office\n
\n
\n
\n
\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { BookingAction, SeriesAction, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-booking-space-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class BookingSpaceItemComponent extends BaseDirective {\n /** Space to display */\n @Input() public space: Space;\n /** Form fields for booking */\n @Input() public form: FormGroup;\n /** Whether multiple spaces are able to be selected */\n @Input() public multi: boolean;\n\n @Input() isCloning: boolean;\n /** Emitter for select actions on the */\n @Output() public select = new EventEmitter();\n\n /** Whether space image should be displayed */\n public get show_image() {\n return this._service.setting('app.space_display.show_images');\n }\n\n /** Whether this space is selected */\n public get selected(): boolean {\n /* istanbul ignore else */\n if (!this.form && this.space) {\n return false;\n }\n\n return (this.form.controls.space_list && !!(this.form.controls.space_list.value || []).find((space) => space.id === this.space.id));\n // return (this.form.controls.space_list && !!(this.form.controls.space_list.value.id === this.space.id));\n }\n\n public get is_hidden(): boolean {\n return false;\n }\n\n /** Whether space is booked by request */\n public get is_request(): boolean {\n return false;\n }\n\n public get availableOccurrences(): number {\n if(this.space && this.space.recurrence_availability) {\n return this.space.recurrence_availability.filter(recurr => recurr.available).length;\n }\n }\n\n public get totalOccurrences(): number {\n return this.space.recurrence_availability.length;\n }\n\n /** Display location of the space */\n public get location(): string {\n /* istanbul ignore else */\n if (!this.space) {\n return 'Unable to determine location';\n }\n const level = this.space.level;\n const bld = this._org.buildings.find((building) => building.id === level.building_id);\n return `${bld ? bld.name + ', ' : ''}${level.name}`;\n }\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n public selectSpace() {\n if(this.form.controls.is_recurrent.value){\n const spaceConflicts = this.space.recurrence_availability.filter(recurr => !recurr.available);\n this.form.controls.recurrence_exceptions.setValue(spaceConflicts.map((recurr)=> recurr.date))\n }\n this.select.emit();\n }\n\n public disableSelect(): boolean {\n if (\n this.form.controls.action.value === SeriesAction.CLONE\n && this.availableOccurrences === 0\n ) {\n return true;\n }\n\n if (\n this.form.controls.action.value === BookingAction.CLONE\n && (this.space as any).bookable === false\n ) {\n return true;\n }\n\n return false;\n }\n}\n","
\n
\n
\n
\n
{{ space.local_name }}
\n
\n
{{ location }}
\n
\n \n {{ space.capacity || '0' }}\n
\n
\n \n Available for {{ availableOccurrences }} out of {{ totalOccurrences }} occurrences\n
\n \n
\n \n {{ multi ? (selected ? 'Remove' : 'Select') : is_request ? 'Request' : 'Book' }}\n \n
\n\n","import { Component, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { setRecurrenceStartsTime } from '@mckinsey-converge/data-common';\nimport { BookingFlowEvent } from '../booking-modal.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DateTime } from 'luxon';\nimport { CateringDropComponent } from '@mckinsey-converge/ui';\nimport { ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'booking-spaces-form',\n templateUrl: './form.component.html',\n styleUrls: ['./form.component.scss']\n})\nexport class BookingSpaceFlowFormComponent {\n /** Booking form fields */\n @Input() public form: FormGroup;\n /** Whether form is not the first page in the flow */\n @Input() public can_return: boolean = false;\n /** Emitter for flow update events */\n @Output() public event = new EventEmitter();\n\n @ViewChild('container', { static: true }) private container: ElementRef;\n\n constructor(private _dialog: MatDialog, private cdRef: ChangeDetectorRef) {}\n\n /** Move flow to next step */\n public next(): void {\n if (this.form.controls?.is_recurrent?.value) {\n setRecurrenceStartsTime(this.form);\n }\n \n this.form.markAllAsTouched();\n this.form.updateValueAndValidity();\n \n if (this.form.controls?.attendees?.value?.some(item => item.name.length > 50)) {\n const attendeesControl = this.form.get('attendees');\n attendeesControl.setErrors({\n customError: 'Attendee name cannot be more than 50 characters',\n });\n }\n \n // Check if booking is outside catering hours and 'Need catering?' is selected\n const isOutsideCateringHours = this.checkIfOutsideCateringHours();\n const hasCatering = this.form.controls?.has_catering?.value;\n const cateringOrders = this.form.controls?.catering?.value;\n \n if (isOutsideCateringHours && hasCatering && cateringOrders && cateringOrders.length > 0) {\n // Open the dialog\n const dialogRef = this._dialog.open(CateringDropComponent, {\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n \n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n // User confirmed to remove catering\n this.form.controls.has_catering.setValue(false);\n this.form.controls.catering?.setValue([]);\n // Update validity\n this.form.updateValueAndValidity();\n // Proceed to next step if form is valid\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n }\n } else {\n // User chose to go back, do not proceed\n // Optionally, scroll to the relevant field\n if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n });\n } else {\n // Proceed as usual\n if (this.form.valid) {\n this.event.emit({ type: 'next', step: 'form' });\n } else if (this.container) {\n this.container.nativeElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n });\n }\n }\n }\n \n\n private checkIfOutsideCateringHours(): boolean {\n const dateTz = this.form.controls?.dateTz?.value;\n const duration = this.form.controls?.duration?.value;\n \n if (dateTz && duration) {\n // Create DateTime object for the start time\n const startDateTime = DateTime.fromISO(dateTz.date, { zone: dateTz.building_tz });\n \n // Calculate the end time\n const endDateTime = startDateTime.plus({ minutes: duration });\n \n // Get the date part of the startDateTime\n const bookingDate = startDateTime.startOf('day');\n \n // Define 7 am and 8 pm on the booking date\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTime <= dayStartAt7am || startDateTime >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } else {\n // If date or duration is not set, assume not outside catering hours\n return false;\n }\n }\n \n /** Move flow to previous step */\n public previous(): void {\n this.event.emit({ type: 'previous', step: 'form' });\n }\n\n /** Reset form to initial state */\n public resetForm(): void {\n this.event.emit({ type: 'reset', step: 'form' });\n }\n}\n","
\n
\n
\n \n
\n
\n \n Back\n \n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { BookingSpaceFlowFormComponent } from './booking-modal/form/form.component';\nimport { BookingCateringComponent } from './booking-modal/catering/catering.component';\nimport { BookingFindSpaceComponent } from './booking-modal/find-space/find-space.component';\nimport { BookingSpaceFiltersComponent } from './booking-modal/find-space/filters/filters.component';\nimport { BookingSpaceItemComponent } from './booking-modal/find-space/item/item.component';\nimport { BookingCateringOrderListComponent } from './booking-modal/catering/order-list/order-list.component';\nimport { BookingModalComponent } from './booking-modal/booking-modal.component';\nimport { BookingCateringOrderDetailsComponent } from './booking-modal/catering/order-details/order-details.component';\nimport { CateringOrderListItemComponent } from './booking-modal/catering/order-list/item/item.component';\nimport { CateringMenuCategoryComponent } from './booking-modal/catering/order-details/category/category.component';\nimport { DeleteConfirmModalComponent } from './delete-confirm-modal/delete-confirm-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { UiModule } from '@mckinsey-converge/ui';\n\n\n@NgModule({\n declarations: [\n BookingSpaceFlowFormComponent,\n BookingCateringComponent,\n BookingFindSpaceComponent,\n BookingSpaceFiltersComponent,\n BookingSpaceItemComponent,\n BookingCateringComponent,\n BookingCateringOrderListComponent,\n BookingModalComponent,\n BookingCateringOrderDetailsComponent,\n CateringOrderListItemComponent,\n CateringMenuCategoryComponent,\n DeleteConfirmModalComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n UiModule\n ],\n exports: [\n BookingCateringOrderDetailsComponent\n ]\n})\nexport class BookingsModule {\n}\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'app-delete-confirm-modal',\n templateUrl: './delete-confirm-modal.component.html',\n styleUrls: ['./delete-confirm-modal.component.scss']\n})\nexport class DeleteConfirmModalComponent {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Loading state */\n public loading: boolean;\n /** Whether delete action succeeded */\n public success: boolean;\n}\n","\n
\n
\n \n
\n
\n

Are you sure you want to delete this meeting?

\n

\n This will permanently delete the booking and all details from the host and attendees\n calendars.\n

\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
Deleting meeting...
\n
\n
\n
\n\n
\n

Booking Permanently deleted

\n
\n
\n","import { NgModule } from '@angular/core';\nimport { MeetingDetailsModalComponent } from './meeting-details-modal/meeting-details-modal.component';\nimport { PrivateDetailsModalComponent } from './meeting-details-modal/private-details-modal/private-details-modal.component';\nimport { CommonModule } from '@angular/common';\nimport { SharedContentModule } from '../shared/shared.module';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsDisplayComponent } from './meeting-details-modal/details/details.component';\nimport { MeetingRecurringDetailsDisplayComponent } from './meeting-details-modal/recurring-details/recurring-details.component';\nimport { MeetingDetailsRequirementsComponent } from './meeting-details-modal/requirements/requirements.component';\nimport { MeetingCateringDetailsComponent } from './meeting-details-modal/catering/catering.component';\nimport { MeetingPrivateDetailsComponent } from './meeting-details-modal/private-details/private-details.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n declarations: [\n MeetingDetailsModalComponent,\n PrivateDetailsModalComponent,\n MeetingDetailsDisplayComponent,\n MeetingRecurringDetailsDisplayComponent,\n MeetingDetailsRequirementsComponent,\n MeetingCateringDetailsComponent,\n MeetingPrivateDetailsComponent,\n ],\n imports: [\n CommonModule,\n SharedContentModule,\n FormsModule,\n ReactiveFormsModule,\n LegacyOverlaysModule,\n ScrollingModule\n ],\n exports: []\n})\nexport class CalendarModule {\n}\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, NgZone, ChangeDetectorRef } from '@angular/core';\nimport { first, map, take, takeWhile } from 'rxjs/operators';\n\nimport { Booking, BookingStateService, BookingsPaginatedService, BookingsService, OrganisationService, User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { UserStoreState, selectCurrentUser } from '@mckinsey-converge/user';\nimport { Store } from '@ngrx/store';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { getListOfDateFormat, formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n@Component({\n\tselector: 'day-view-approvals-view',\n\ttemplateUrl: './approvals-view.component.html',\n\tstyleUrls: ['./approvals-view.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewApprovalsComponent extends BaseDirective implements OnInit, OnDestroy {\n\t/** List of spaces to check for pending approvals */\n\t// public space_list: string[] = [];\n\t/** Whether the pending bookings are being loaded */\n\tpublic loading: boolean = true;\n\t/** Whether an event action is in progress */\n\t// public waiting_on_event: boolean;\n\t/** Observable for tentative events */\n\n\tpublic inputText: string = '';\n\n\tpublic incommingRequests: Booking[] = [];\n\tpublic sortOrderByOptions: { display: string; value: string; meta: {}; }[];\n\tpublic selectedSort: { display: string; value: string; meta: {}; } = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\n\tpublic isClosed: boolean = false;\n\tpublic updatedRequest: Booking[] = [];\n\n\t/** Display value for the active date */\n\t// public get date_display(): string {\n\t// \treturn 'Today';\n\t// }\n\n\tpublic currentUser: User;\n\n\tconstructor(\n\t\tprivate _org: OrganisationService,\n\t\tprivate _bookings_service: BookingsPaginatedService,\n\t\tprivate store: Store,\n\t\tprivate _bookings: BookingsService,\n\t\tprivate _booking_state_service: BookingStateService,\n\t\tprivate _zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef) {\n\t\tsuper();\n\t}\n\n\tpublic ngOnInit(): void {\n\t\tthis.subscription('currentUser', this.store.select(selectCurrentUser)\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe((user: User) => {\n\t\t\t\t// Once we know we have the user loaded\n\t\t\t\tthis.currentUser = new User(user);\n\t\t\t\tthis.getHoldingBay();\n\t\t\t})\n\t\t);\n\n\t\tthis.subscription(\n\t\t\t'building',\n\t\t\tthis._org.listen('active_building').subscribe((_) => this.currentUser && this.getHoldingBay() )\n\t\t);\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis.interval('holdingBay', () => {\n\t\t\t\t// update every 30 seconds.\n\t\t\t\tthis.getHoldingBay();\n\t\t\t}, 30 * 1000);\n\t\t});\n\n\t\tthis.sortOrderByOptions = [\n\t\t\t{ display: 'Soonest booking', value: 'soonest', meta: {} },\n\t\t\t{ display: 'Latest booking', value: 'latest', meta: {} },\n\t\t\t{ display: 'Newest request creation date', value: 'newest_date', meta: {} },\n\t\t\t{ display: 'Oldest request creation date', value: 'oldest_date', meta: {} }\n\t\t];\n\n\t\tthis.selectedSort = { display: 'Soonest booking', value: 'Soonest booking', meta: {} };\n\t}\n\n\tpublic getHoldingBay() {\n\t\tif (!this._org.building || !this.currentUser) {\n\t\t\treturn;\n\t\t}\n\n\n\n\t\tthis.subscription('holdingBay', this._bookings_service.getHoldingBay(\n\t\t\t{\n\t\t\t\t'email': this.currentUser.email,\n\t\t\t\t'building_zone': this._org.building.id,\n\t\t\t}\n\t\t\t).subscribe((res) => {\n\t\t\t\t// Check if room object is missing 'room.building' for CNG-513\n\t\t\t\tconst isMissingRoom = res?.results?.some(bkng => !bkng.room?.building?.name) || false;\n\t\t\t\t\n\t\t\t\tconst hasInvalidEndDateInMasterBookings = res?.results\n\t\t\t\t?.filter(bkng => bkng.recurrence_type === 'master') \n\t\t\t\t.some(bkng => {\n\t\t\t\t// Check for invalid endDateString for CNG-503\n\t\t\t\t const date = new Date(bkng.endDateString);\n\t\t\t\t return isNaN(date.getTime());\n\t\t\t\t}) || false;\n\n\t\t\t\t// Run updateRoomList() to get room info\n\t\t\t\tif (isMissingRoom || hasInvalidEndDateInMasterBookings) {\n\t\t\t\t\t// this._booking_state_service.updateRoomList();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst masterIds = [];\n\t\t\t\tconst filterMasterBookings = res.results?.filter(bkng => {\n\n\t\t\t\t\tif(bkng.recurrence_type === 'master' ) {\n\t\t\t\t\t\tmasterIds.push(bkng.recurrence_master_id);\n\t\t\t\t\t}\n\t\t\t\t\treturn bkng.recurrence_type === null || bkng.recurrence_type === 'master';\n\t\t\t\t}) || [];\n\n\t\t\t\tconst filterStandardBookings = res.results?.filter(bkng => bkng.recurrence_type === 'occurrence' \n\t\t\t\t \t&& bkng.status === 'tentative' \n\t\t\t\t\t&& !masterIds.includes(bkng.recurrence_master_id) // edited from staff , need approval\n\t\t\t\t) || [];\n\n\t\t\t\tconst filterStandardAndMasterBookings = [...filterMasterBookings, ...filterStandardBookings ];\n\t\t\t\tlet expiredBkngs = [];\n\t\t\t\tconst pendingBkngs = filterStandardAndMasterBookings?.filter(bkng => (bkng.timeBasedStatusLabel !== 'expired_yesterday') ? true : !expiredBkngs.push(bkng) ) || [];\n\t\t\t\texpiredBkngs.length && this.declineExpiredBookings(expiredBkngs);\n\n\t\t\t\tthis.updatedRequest = cloneDeep(pendingBkngs);\n\t\t\t\t// const request = cloneDeep(this.updatedRequest);\n\t\t\t\tthis.searchRequest();\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.incommingRequests = [];\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t/* istanbul ignore next */\n\t/**\n\t * Track by function for ngFor optimisation\n\t * @param index Index of the item\n\t * @param item Data associated with the item at the given index\n\t */\n\tpublic trackByFn(index: number, item: Booking) {\n\t\treturn item.id || index;\n\t}\n\n\t/**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic selectOrderBy(sortingValue: { display: string; value: string; meta: {}; }) {\n\t\tthis.selectedSort = sortingValue;\n\t\tthis.searchRequest();\n\t}\n\n\t/**\n\t * Function apply order by sorting method to incomming requests for approval\n\t * @param requests\n\t */\n\tpublic applyOrderBy(requests: Booking[]): void {\n\t\tconst items = cloneDeep(requests);\n\t\tswitch (this.selectedSort.value) {\n\t\t\tcase 'soonest':\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t\tcase 'latest':\n\t\t\t\titems.sort((a, b) => b.start_epoch - a.start_epoch );\n\t\t\t\tbreak\n\t\t\tcase 'newest_date':\n\t\t\t\titems.sort((a, b) => b.created_epoch - a.created_epoch )\n\t\t\t\tbreak;\n\t\t\tcase 'oldest_date':\n\t\t\t\titems.sort((a, b) => a.created_epoch - b.created_epoch )\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\titems.sort((a, b) => a.start_epoch - b.start_epoch );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.incommingRequests = items;\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\tpublic totalCateringItems(booking: Booking) {\n\t\tlet num = 0;\n\t\tbooking.catering.forEach(el => el?.items.forEach(item => num += item.amount ) );\n\t\treturn num;\n\t}\n\n\tpublic searchRequest(value?: string) {\n\t\tconst searchText = this.inputText.toLowerCase();\n\n\t\t\tconst filtered = this.updatedRequest.filter( (el) => {\n\t\t\tconst { room, organiser, booked_by, booker, booking_type, attendees, date_string, startDateTz, start_time, end_time, creationDateTz } = el;\n\n\t\t\treturn room?.name?.toLowerCase().includes(searchText) || /// input text inlcudes room name\n\t\t\t\troom?.local_name?.toLowerCase().includes(searchText) || /// input text inlcudes room local name\n\t\t\t\troom?.street_and_city?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.building?.address?.toLowerCase().includes(searchText) || /// input text inlcudes room address\n\t\t\t\troom?.level.name?.toLowerCase().includes(searchText) || /// input text inlcudes room level\n\n\t\t\t\torganiser?.name?.toLowerCase().includes(searchText) || ///input text inlcudes host name\n\t\t\t\t(booked_by && booked_by['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booked by name\n\t\t\t\t(booker && booker['name']?.toLowerCase().includes(searchText)) || ///input text inlcudes booker name\n\t\t\t\tbooking_type?.toLowerCase().includes(searchText)\t||\n\t\t\t\tattendees?.some(att => att?.name?.toLowerCase().includes(searchText)) || ///input text inlcudes attendees name\n\n\t\t\t\tdate_string?.toLowerCase().includes(searchText) || /// date_string == '06 Mar 2023'\n\t\t\t\tformatDateWithSuffix(date_string).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\tformatDateWithSuffix(creationDateTz.formatDate('dd MMM yyyy')).toLowerCase().includes(searchText) || /// date_string == '06th Mar 2023'\n\t\t\t\t//searchText.includes(startDateTz?.date?.day?.toString()) || /// day 06/6\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthLong) || /// monthLong == 'March'\n\t\t\t\t//searchText.includes(startDateTz?.date?.monthShort) || /// monthShort == 'Mar'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayLong.toLowerCase()) || /// weekdayLong == 'Monday'\n\t\t\t\tsearchText.includes(startDateTz?.date?.weekdayShort.toLowerCase()) || /// weekdayShort == 'Mon'\n\n\n\t\t\t\tgetListOfDateFormat().some(format => startDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\t\t\t\tgetListOfDateFormat().some(format => creationDateTz?.formatDate(format).toLowerCase().includes(searchText) ) ||\n\n\t\t\t\tstart_time?.toLowerCase().includes(searchText) ||\n\t\t\t\tend_time?.toLowerCase().includes(searchText)\n\n\n\t\t\t});\n\n\t\t\tthis.applyOrderBy(filtered);\n\t}\n\n\tpublic declineExpiredBookings(expiredBkngs: Booking[] ) {\n\t\t// console.log(expiredBkngs);\n\t\tthis._bookings.declineMultiple(expiredBkngs).subscribe(resArray => this.cdRef.detectChanges(),\n\t\t(error) => {\n\t\t\tconsole.log(error);\n\t\t\tthis.cdRef.detectChanges();\n\t\t});\n\n\t}\n\n}\n","
\n
\n \n\n
\n Order by: {{selectedSort.display}}\n
\n \n
\n
\n\n \n
{{sorting.display}}
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n close\n
\n
No meetings pending approval
\n
\n
\n","import { Component, Input, Output, EventEmitter, NgZone, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, ViewEncapsulation, SimpleChanges, HostListener } from '@angular/core';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective, shorterBuildingDateFormatString } from '@mckinsey-converge/base';\nimport { Booking, CateringCategory, CateringItem, SpacesService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { formatDateWithSuffix } from '@mckinsey-converge/base';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\nimport { DatePipe } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TooltipPosition } from \"@mckinsey-converge/ui\";\n\nconst STATES: { [id: string]: string } = {};\n\n@Component({\n selector: 'approvals-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n // encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('show', [\n transition(':enter', [\n style({ opacity: 0, height: 0 }),\n animate(200, style({ opacity: 1, height: '*' })),\n ]),\n transition(':leave', [\n style({ opacity: 1, height: '*' }),\n animate(200, style({ opacity: 0, height: 0 })),\n ]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DatePipe],\n})\nexport class DayViewApprovalsEventComponent extends BaseDirective implements OnInit {\n /** Event to display */\n @Input() event: Booking;\n @Input() totalCateringItems: number;\n /** Event emitter for event actions */\n @Output() acting = new EventEmitter();\n\n /** Whether approval action is being processed */\n public loading: boolean;\n /** Whether event details are shown */\n public shown: boolean;\n /* Booking type : Internal, External, Interview... */\n public bookingType: string;\n /* Booking date */\n public date: string;\n /* Booking creation date */\n public creationDate: string;\n /* Office address */\n public officeAddress: string;\n\n public showCateringNote: boolean = false;\n\n public showEquipmentNote: boolean = false;\n\n /** Whether the meeting has catering attached */\n public has_catering: boolean;\n public cateringNote: string = '';\n public equipmentNote: string = '';\n public cateringOrderItems: number = 0;\n\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /* Reccurance period */\n public recurrence_period: string;\n\n /** Requested booking start time */\n public requestedDateTz: DateTZ;\n /** Requested booking end time */\n public requestedEndDateTz: DateTZ;\n public specific_occurances;\n public recurrenceExceptions: any[] = [];\n\n /** Type of event */\n public get start(): string {\n return this.event.startDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** Type of event */\n public get end(): string {\n return this.event.endDateTz.formatDate('h:mm a').toLocaleLowerCase();\n }\n\n /** View booking details */\n public view() {\n const room_id = Object.keys(this.event.approval_status)[0] || '';\n const space = this._spaces.find(room_id) || this.event.room;\n this.timeout(\n 'view',\n () => {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space,\n booking: new Booking({ ...this.event.toApiJSON(), room_id, room: space }),\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this._service.set('CONCIERGE.day_view.viewing', this.event);\n },\n 50\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_sevice: BookingStateService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _zone: NgZone,\n private cdRef: ChangeDetectorRef,\n private datePipe: DatePipe\n ) {\n super();\n }\n ngOnInit(): void {\n this.cateringOrderItems = 0;\n this.updateData();\n }\n\n public updateData() {\n const type = this.event.booking_type;\n this.bookingType = `${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n const catering: readonly CateringOrder[] = this.event.catering;\n this.has_catering = !!catering.find(\n (order) => this.event.space.email === order.location_id\n );\n this.cateringNote =\n this.event.notes.filter((el) => el.type === 'catering')[0]?.message || '';\n this.equipmentNote =\n this.event.notes.filter((el) => el.type === 'equipment')[0]?.message || '';\n\n const createdDate = this.event.creationDateTz.formatDate('dd MMM yyyy');\n const createdTime = this.event.creationDateTz.formatDate('h:mm a').toLocaleLowerCase();\n this.creationDate = `${formatDateWithSuffix(createdDate)}, ${createdTime}`;\n this.date = formatDateWithSuffix(this.event.date_string);\n this.officeAddress = `${this.event.room.building?.name} ${this.event.room.level.name}, ${this.event.space.building?.city}`;\n // `${this.event.room.building?.name} ${this.event.room.level.name} ${this.event.space.building?.city}`;\n this.isRecurrentBooking = this.event.is_recurrent && this.event.recurrence_type !== 'occurrence';\n this.recurrence_period = this.event.recurrence_period;\n this.specific_occurances = this.event.occurrence_details?.filter(ocurrence => ocurrence.id !== this.event.id).map((item)=>{\n let date = item.start_epoch * 1000;\n let specificDates = new DateTZ({date, is_local_tz: false, building_tz: this.event.timezone});\n return shorterBuildingDateFormatString(specificDates).slice(3);\n })\n this.recurrenceExceptions = this?.event?.recurrence_exceptions?.map((item)=>{\n let date = new Date(item * 1000);\n return this.datePipe.transform(date, 'dd MMM yyyy');\n }) || [];\n this.cdRef.detectChanges();\n }\n\n public get eventTitle() {\n return `${this.event.title}_${this.event.created_epoch}_${this.event.start_time}`\n }\n\n /**\n * Approve the meeting for the set room\n */\n public accept(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Approve Meeting',\n content: `Approve ${this.event.organiser.name}'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${this.event.length_string} on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const event = this.event.toJSON();\n const bookingOptions = {\n concierge: true,\n host: this.event.organiser.email,\n room_email: this.event.space?.email,\n icaluid: this.event.icaluid,\n start: event.start,\n end: event.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n } \n this._bookings\n .accept(this.event.id, bookingOptions)\n .then(\n (acceptedBooking) => {\n this._service.notifySuccess('Meeting approved.');\n this.event.status = BOOKING_STATUS.approved;\n STATES[this.event.id] = BOOKING_STATUS.approved;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error approving meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n /**\n * Decline meeting for the set room\n */\n public decline(event: Event) {\n event.stopPropagation();\n this.acting.emit(true);\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Decline Meeting',\n content: `Decline ${\n this.event.organiser.name || this.event.organiser\n }'s meeting in \"${this.event.space.name}\" at ${this.event.start_time} for ${\n this.event.length_string\n } on ${this.event.date_string}`,\n icon: { type: 'icon', class: 'material-icons', content: 'event_busy' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n this.loading = true;\n const booking = this.event.toJSON();\n this.loading = true;\n const bookingOptions = {\n booking_id: booking.id,\n organiser: booking.organiser.email,\n room_email: this.event.space?.email,\n icaluid: booking.icaluid,\n start: booking.start,\n end: booking.end,\n };\n if (this.isRecurrentBooking) {\n // Add series=true for recurrent bookings\n bookingOptions['series'] = true;\n }\n this._bookings\n .decline(booking.id, bookingOptions)\n .then(\n () => {\n this._service.notifySuccess('Meeting declined.');\n this.event.status = BOOKING_STATUS.declined;\n STATES[this.event.id] = BOOKING_STATUS.declined;\n this._booking_state_sevice.replace(this.event);\n this._service.set('BOOKING.states', STATES);\n this.loading = false;\n this.acting.emit(false);\n this.cdRef.detectChanges();\n },\n () => {\n this.acting.emit(false);\n this._service.notifyError('Error declining meeting.');\n this.loading = false;\n this.cdRef.detectChanges();\n }\n );\n }\n ref.close();\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // console.log('CHANGES: ',changes);\n this.updateData();\n this.cdRef.detectChanges();\n }\n\n public isConflictWithOccurences() {\n const conflicts = this.event?.room?.totalOccurrences - this.event?.room?.availableOccurrences;\n return { is_conflict: !!conflicts, total_Conflicts: conflicts };\n }\n\n public get dateString(): string {\n if (!this.event.dateString) return '';\n return this.event.dateBuildingString.slice(3);\n }\n\n /**\n */\n public get endDateString(): string {\n if (!this.event.endDateString) {\n return '';\n }\n else if(this.event.recurrence_period === 'list' && this.event.recurrence_type === 'master'){\n const occurrence_details = this.event.occurrence_details && this.event.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.event.id);\n const endDate = this.event.recurrenEndFromOcurrences(occurrence_details);\n return shorterBuildingDateFormatString(endDate).slice(3);\n } else\n return this.event.endDateString.slice(3);\n }\n\n public get timeString(): string {\n if(!this.event.start_time) return '';\n return `${this.event.start_time} - ${this.event.end_time} `;\n }\n\n getTooltipText() {\n return this.specific_occurances;\n }\n}\n","
\t\n\t
\n\t\t\n\t\t
{{ event.recurrence_type === 'occurrence' ? 'Occurrence from a recurring series ' : 'Recurring Series' }}
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
{{ event.space?.global_name ? event.space.local_name : '' }}
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
{{equipmentNote}}
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{totalCateringItems}} items in catering order\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t
{{ bookingType }}
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t {{ date }} \n\t\t\t\t {{ event.all_day ? 'All Day' : start + ' - ' + end }} \n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
Specific Dates
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{{ this.recurrence_period | titlecase }}\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
Conflict Dates
\n\t\t\t\t\t\t\t\t\t\t
{{date}}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{{dateString}} - {{endDateString}}\n\t\t\t\t\t
\n\t
{{timeString}}
\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{ officeAddress }}\n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t {{ event.organiser?.name }}\n\t\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t\t\t\t\n\t\t\t{{ event.attendees.length }} \n\t\t
\n\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
{{ item.name }}
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n\t\t
\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t {{ event.creator?.name }}\n\t\t\t\n\t\t
\n\n\t\t
\n\t\t\t Requested on {{ creationDate }}\n\t\t
\n\t
\n\t\n
\n\n","import {\n Component,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first, take } from 'rxjs/operators';\n\nimport {\n BaseDirective,\n HashMap,\n Identity\n} from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport {\n ApplicationService,\n BookingStateService,\n BookingStoreState,\n BuildingLevel,\n OrganisationService,\n selectBookingByIdResultsFromState,\n User,\n Booking,\n SpacesService,\n Space,\n isIncludes,\n searchRoomsAndBookings\n} from '@mckinsey-converge/data-common';\n\nimport {\n AlertMode, DropdownOpion,\n} from '@mckinsey-converge/ui';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { select, Store } from '@ngrx/store';\nimport { BuildingStoreState } from 'libs/buildings/src';\nimport { clearBookingByIdResults, loadBookingsWithQuery, MyBookingsStoreState } from '@mckinsey-converge/bookings';\nimport { Subscription } from 'rxjs';\n\nexport type RoomBookingStoreState = BookingStoreState & BuildingStoreState & MyBookingsStoreState & UserStoreState;\n\n@Component({\n selector: 'a-day-view',\n templateUrl: './day-view.component.html',\n styleUrls: ['./day-view.component.scss']\n})\nexport class DayViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected type */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n /** Whether to show only items with a setup and/or breakdown time */\n public only_overflow: boolean;\n /** List of legend keys to show */\n public legend: HashMap = {};\n /** List of legend keys to show */\n public legend_list: string[] = [];\n /** List of available legend keys */\n public legend_keys: Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true }\n ];\n\n public banner_mode = AlertMode.Warning\n public showBanner = true;\n public undo_banner_mode = AlertMode.Error;\n public has_access: boolean;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n\t\tprivate spaceTypesSubscription: Subscription;\n\n event_list: Booking[] = [];\n\tsearchStr: any;\n\tfoundSearchLength: number = 0;\n\tsearchedCounter: any = 1;\n\tshowSrchWarning: boolean;\n\ttotalFoundItem: number = 0;\n spaces: Space[] = [];\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute,\n private _booking_state_service: BookingStateService,\n private _spaces: SpacesService,\n private store: Store,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Day View';\n\n if( this._service.get('active_legends') !== null && this._service.get('active_legends').hasOwnProperty('length')) {\n this.legend_keys = this._service.get('active_legends');\n }\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n \n\n\t\t\t\tthis._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n\t\t\t\t\t\t\t\t\t\tthis.dateTz = new DateTZ({\n\t\t\t\t\t\t\t\t\t\t\tdate: this.dateTz.ms,\n\t\t\t\t\t\t\t\t\t\t\tis_local_tz: false,\n\t\t\t\t\t\t\t\t\t\t\tbuilding_tz: this.timezone,\n\t\t\t\t\t\t\t\t\t\t});\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.initSpace();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n\t\t\t\t\t\t\t\t\t\tthis.levels.sort((a, b) =>\n\t\t\t\t\t\t\t\t\t\tb.name.localeCompare(a.name, undefined, {\n\t\t\t\t\t\t\t\t\t\t\t\tnumeric: true,\n\t\t\t\t\t\t\t\t\t\t\t\tignorePunctuation: true,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t);\n\n \n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n \n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'day_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return;\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n\n this.configureIfLinksFromEmail();\n\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...this.filterEvents(list)];\n\n })\n );\n\n \n }\n\n public initSpace() {\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.active_level ? this._org.building.id : this.active_level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0 && _.bookable);\n\n })\n );\n }\n\n private filterEvents(list): Booking[] {\n const bookings = list;\n const filterd_booking = bookings.filter((event) => {\n const ignore = event.is_recurrent && event.recurrence_type === 'master';\n return ( !ignore );\n });\n\n return filterd_booking || [];\n }\n\n\n\n searchBooking(value) {\n\n // Resetting warning flag\n this.showSrchWarning = false;\n\n // Converting search value to lower case for case-insensitive comparison\n const searchValue = value.toLowerCase().trim();\n \n // Combining event list and space arrays into one arrya for searchig \n // const allItems = [...this.event_list, ...this.spaces];\n\n // Filter spaces based on active_type\n const filteredSpaces = this.spaces.filter(space => {\n if (!this.active_type) {\n return true; // Include all spaces if no active type is set\n }\n if (this.active_type.startsWith('zone')) {\n return space.zones.includes(this.active_type); // Check zones if active type starts with 'zone'\n }\n return space.room_type === this.active_type; // Otherwise, check room_type\n });\n \n // Combine filtered spaces and events into one array for searching\n const allItems = [...this.event_list, ...filteredSpaces];\n\n // Filtering the combine array to find matching room or booking \n const filteredItems = searchRoomsAndBookings(allItems, searchValue, true);\n \n // Updating the total number of found items in serach\n this.totalFoundItem = filteredItems.length;\n\n // Setting showSrchWarning flag if no result were found \n this.showSrchWarning = !this.totalFoundItem;\n\n // Updating lenght of found items for later use\n this.foundSearchLength = this.totalFoundItem - 1;\n\n\n if(this.searchStr !== value) {\n // Setting the first found as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[0]);\n // Resetting the search counter\n this.searchedCounter = 0;\n }\n else {\n // Handling case where seached string is the same as previou one \n // Incrementing search counter, loopoing back to 0 if it exceed the length of found items\n this.searchedCounter = ( this.searchedCounter < this.foundSearchLength ) ? this.searchedCounter + 1 : 0\n // Setting the next found items as the current viewing item\n this._service.set('CONCIERGE.day_view.viewing', filteredItems[this.searchedCounter]);\n }\n // Storing the current search string for future camparison\n this.searchStr = value;\n\n }\n\n\n public configureIfLinksFromEmail() {\n /**\n * https://acaprojects.atlassian.net/browse/MCK-2055\n * Load booking with id received from email link to concierge and setup configuration to open booking detail dialog on day view\n * Will work with both formatted URL's\n * http://localhost:4200/#/day-view?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n * http://localhost:4200/#/day-view/zone-1FUT0pxu12s?view=booking-1edd3a4f-45fa-43cd-960d-5ae6ee5b1e36\n */\n const bookingId = this._route.snapshot.queryParams['view'];\n if(bookingId) {\n this.subscription('currentUser', this.store.select(selectCurrentUser).pipe(take(1))\n .subscribe((user: User | undefined) => {\n // Once we know we have the user loaded.\n this.store.dispatch(loadBookingsWithQuery({ 'id': bookingId, 'target': 'bookingById', 'offset': 0 }));\n }));\n\n this.store.dispatch(clearBookingByIdResults())\n\n this.subscription('bookingResults', this.store.pipe( select(selectBookingByIdResultsFromState) ).pipe(first(_ => !!_ && !!_.success))\n .subscribe(next => {\n const booking = next.success ? next.success?.[0] : null;\n if (booking && booking.room) {\n const levelId = this._route.snapshot.params.hasOwnProperty('level');\n\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(booking.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n\n this.updateDateTz(booking.startDateTz)\n this._booking_state_service.setDate(booking.startDateTz);\n this._booking_state_service.setZone(booking.level_zone);\n if(!levelId ) {\n this._router.navigate(['/day-view', booking.level_zone], { queryParams: { view: bookingId }, replaceUrl: true });\n }\n }\n }));\n }\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n\t\t\t\tif (this.spaceTypesSubscription) {\n\t\t\t\t\tthis.spaceTypesSubscription.unsubscribe();\n\t\t\t\t}\n this._service.set('CONCIERGE.day_view.viewing', []);\n }\n\n\n // Fires for the big blue new booking button\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.initSpace();\n this._router?.url?.includes('/day-view') && this._router.navigate(['/day-view', this.active_level]);\n }\n\n public updateLegend(mobile: boolean = false) {\n if (mobile) {\n this.legend_list = this.legend_keys.reduce((list, key) => {\n if (key.active) list.push(key.id);\n return list;\n }, []);\n\t\t\tthis._service.set('active_legends', this.legend_keys);\n }\n this.legend = this.legend_keys.reduce((map, key) => {\n map[key.id] = this.legend_list.includes(`${key.id}`);\n return map;\n }, {});\n\n this._booking_state_service.setFilters({\n ...this._booking_state_service.filters,\n hide_type: Object.keys(this.legend).filter((i) => this.legend[i] === false) as any\n });\n }\n\n updateSpaceSelection(){ \n this._service.set('active_type', this.active_type);\n }\n\n public onOnlySetupBreakdownChanged(toggle: MatSlideToggleChange): void {\n this._service.set('APP.breakdown', toggle.checked)\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._service.get('undo').next(null);\n this._booking_state_service.attentToDelete(booking, action, true);\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public hideBanner() {\n this.showBanner = false;\n }\n\n public hideUndo() {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n
\n \n
\n \n 1\"\n appearance=\"outline\"\n >\n \n \n {{ level?.name }}\n \n \n \n \n \n \n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
{{ totalFoundItem }}
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tNo search found!\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\n\n
\n \n
\n \n
\n
\n
\n\n \n \n \n
\n \n Only Setup/Breakdown\n \n
\n
\n\n \n {{ level?.name }}\n \n\n\n \n {{ type?.name }}\n \n\n\n
\n \n
\n
{{ key?.name }}
\n
\n
\n
\n
\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { DayViewComponent } from './day-view.component';\nimport { DayViewTimelineComponent } from './timeline/timeline.component';\nimport { DayViewApprovalsComponent } from './approvals-view/approvals-view.component';\nimport { DayViewApprovalsEventComponent } from './approvals-view/event/event.component';\nimport { DayViewSpaceComponent } from './space/space.component';\nimport { DayViewSpaceEventComponent } from './space/event/event.component';\n\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { FormsModule } from '@angular/forms';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: DayViewComponent },\n { path: ':level', component: DayViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n DayViewComponent,\n DayViewTimelineComponent,\n DayViewApprovalsComponent,\n DayViewApprovalsEventComponent,\n DayViewSpaceComponent,\n DayViewSpaceEventComponent\n ],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class DayViewModule {}\n","import {\n Component,\n OnInit,\n Input,\n OnChanges,\n SimpleChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space, BOOKING_STATUS, CloseDialogService, DialogIds } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n/** Details about the associated event overlapping with other events */\nexport interface IEventOverlap {\n /** Index of this item with the overlapping items */\n index: number;\n /** Total number of items overlapping with this one */\n total: number;\n}\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'day-view-space-event',\n templateUrl: './event.component.html',\n styleUrls: ['./event.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewSpaceEventComponent extends BaseDirective implements OnInit, OnChanges {\n /** Event to display */\n @Input() public booking: Booking;\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Space associated with the booking */\n @Input() public space: Space;\n /** Whether the item is a fixed size */\n @Input() public fixed: boolean;\n /** Overlap details for the booking */\n @Input() public overlap: IEventOverlap;\n /** Whether an action is being processed for this booking */\n @Input() public loading: boolean;\n /** Emitter for the current position of the booking within the timeline */\n @Output() public position = new EventEmitter<{ top: number; height: number }>();\n\n /** Position of the booking start time in the day */\n public top: number;\n /** Position of the booking relative to overlapping bookings */\n public left: number;\n /** Height based of the duration of the booking */\n public height: number;\n /** Size of the booking when overlapping with other bookings */\n public width: number;\n /** Offset from the booking's top that the setup time starts */\n public overflow_top: number;\n /** Offset from the booking's bottom that the breakdown time ends */\n public overflow_bottom: number;\n\n public approved: boolean;\n public declined: boolean;\n public bookingDetails: BookingDetailInfo;\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _router: Router,\n private cdRef: ChangeDetectorRef,\n private closeDialogService: CloseDialogService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n // test comment\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public get local_id(): string {\n return this.booking.icaluid.substr(0, 6);\n }\n\n /** Type of booking */\n public get type(): string {\n return this.booking.getType();\n }\n\n /** Period that the booking will occur during the day */\n public get period(): string {\n // the booking time is being pass in as the local timezone version.\n return this.booking.time_period;\n }\n\n /** Number attendees expected to turn up to the booking */\n public get expected(): number {\n const expected = this.booking.expected_attendees;\n return this.space ? expected[this.space.email] || 0 : 0;\n }\n\n /** Whether the meeting has catering attached */\n public get has_catering(): boolean {\n return !!this.order;\n }\n\n public get order(): CateringOrder {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp.length && orders.push(_temp[0]);\n });\n return orders[0];\n // this.booking.catering.find((order) => order.location_id === this.space.email);\n }\n\n /** View booking details */\n public view(event: Event) {\n \n this.cdRef.detach(); // Detach change detection before the dialog opens. \n\n const dialogRef = this._dialog.open(MeetingDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.closeDialogService.registerDialog(DialogIds.MeetingDetails, dialogRef);\n dialogRef?.afterClosed().subscribe(_ => {\n this.cdRef.reattach(); // Reattach change detection after the dialog closes.\n\n this.calculatePosition();\n this.cdRef.detectChanges();\n });\n }\n\n /** Whether booking is active */\n public get active(): boolean {\n const booking = this._service.get('CONCIERGE.day_view.viewing');\n return !booking || booking.id === this.booking.id;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.booking || changes.overlap || changes.dateTz) {\n this.calculatePosition();\n this.approved = this.booking.status === BOOKING_STATUS.approved;\n this.declined = this.booking.status === BOOKING_STATUS.declined;\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking_details = this.booking.toApiJSON();\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking_details));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n\n /**\n * View catering order for the booking\n */\n public viewOrder(order: CateringOrder) {\n /* istanbul ignore else */\n if (this.booking && this.booking.catering) {\n /* istanbul ignore else */\n if (localStorage) {\n this.storeOrder(order);\n }\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: this.booking.id, view: order.id },\n });\n }\n }\n\n /** Calculate the position */\n private calculatePosition() {\n /* istanbul ignore else */\n if (this.booking) {\n const overlap = this.overlap || { index: 0, total: 1 };\n const shown_date = this.dateTz.startOfValue('day');\n const date = this.booking.startDateTz.startOfValue('minute');\n const end = this.booking.endDateTz.startOfValue('minute');\n const from_previous_day = !date.isSameDate(shown_date, 'day');\n if (end.isBeforeDate(shown_date, 'day')) { // Hide booking if not on shown date\n this.top = -100;\n this.height = 1;\n return;\n }\n\n //R-- Stragest thing, but one time this was logging bookings form different timezones?\n // this.dateTz.logDateTz('calculatePosition this.dateTz')\n // this.booking.startDateTz.logDateTz('calculatePosition this.booking.startDateTz')\n\n const start = from_previous_day ? 0 : Math.abs(+date.dateDiff(shown_date, 'hours', 'hours').toFixed(3));\n const duration = Math.min(\n this.booking.duration,\n Math.abs(shown_date.dateDiff(date.addValue({ minutes: this.booking.duration }), 'minutes'))\n );\n this.top = Math.max(0, (start / 24) * 100);\n this.height = Math.min(\n 100 - this.top,\n this.fixed ? duration / 60 : (duration / 60 / 24) * 100\n );\n this.position.emit({ top: this.top, height: (duration / 60 / 24) * 100 });\n this.width = Math.min(100, 100 / overlap.total + 5);\n this.left = Math.min(100 - this.width, this.width * overlap.index - 5 * overlap.index);\n this.overflow_top =\n ( (this.booking.room_setup || this.booking.setup[this.space.email])\n ? ( ( this.booking.room_setup || this.booking.setup[this.space.email]) / 60) / duration\n : -0.1) * 100;\n this.overflow_bottom =\n ( ( this.booking?.room_breakdown || this.booking.breakdown[this.space.email])\n ? ( (this.booking?.room_breakdown || this.booking.breakdown[this.space.email]) / 60) / duration\n : -0.1) * 100;\n if (this.booking.all_day) {\n this.top = 0;\n this.height = 100;\n }\n }\n }\n}\n","\n \n \n \n 50 ? ' low' : '')\"\n [style.z-index]=\"(overlap?.index || 0) + 2\"\n (click)=\"view($event)\"\n >\n
\n
{{ booking.all_day ? 'All Day' : period }}
\n
\n \n\n \n \n
\n
\n
\n
\n \n {{booking?.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
\n
Host: 
\n
\n {{ booking.organiser?.name || booking.organiser }}\n
\n
\n \n
Booked by: 
\n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n
\n \n
{{ booking.title }}
\n
\n
\n
\n {{ booking.attendees ? booking.attendees.length || 'No' : 'No' }} Attendee{{\n booking.attendees?.length === 1 ? '' : 's'\n }}{{ expected ? '(' + expected + ' Expected)' : '' }}\n
\n
\n
0\">\n
\n Company: {{ booking.company.length }}\n
\n
\n \n
Welcomed by: {{ booking.organiser?.name || booking.organiser }}
\n \n
\n
Catered
\n
\n \n \n \n \n \n\n","import {\n Component,\n OnChanges,\n Input,\n SimpleChanges,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n OnInit,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { CdkDragMove, CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nimport { IEventOverlap } from './event/event.component';\nimport { BaseDirective, closestToTimeSlotTz, Identity } from '@mckinsey-converge/base';\nimport { OrganisationService, Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { DayViewSettings } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\n\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { convertTimezonedTimestampToLocalDateTz, DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { DateTime } from 'luxon';\n\n@Component({\n selector: 'day-view-space',\n templateUrl: './space.component.html',\n styleUrls: ['./space.component.scss'],\n})\nexport class DayViewSpaceComponent extends BaseDirective implements OnInit, OnChanges {\n /** List of space dropzones connected to */\n @Input() public space_list: string[];\n /** Date to display events for */\n @Input() public dateTz: DateTZ;\n /** Space to display events for */\n @Input() public space: Space;\n /** Scroll value of the day view */\n @Input() public scroll: number;\n /** Only show events with setup and/or breakdown times */\n @Input() public overflow_only: boolean;\n /** Mapping of whether to show events with a given legend id */\n @Input() public legend: HashMap = {};\n /** Scroll value to add to drop placeholders */\n @Input('scrollTop') public scroll_top: number;\n /** Last update time of the displayed bookings */\n @Input('lastUpdate') public last_update: number;\n\n @Input() public eventMovingLoader : HashMap = {};\n /** Emitter for whether the space column is in view */\n @Output() public inView = new EventEmitter();\n /** Emitter for whether an event is being dragged */\n @Output() public dragging = new EventEmitter();\n /** Emitter for whether an event is being dropped and moving in progress */\n @Output() public moving = new EventEmitter<{}>();\n /** List of bookings for the current date and space */\n public event_list: Booking[] = [];\n /** Mapping of event IDs to overlap details */\n public overlap_details: HashMap = {};\n /** Mapping of positions of event in the day */\n public position_list: HashMap<{ top: number; height: number }> = {};\n /** Override for mapped position */\n public top: number;\n /** Client Rectangle for the container element box */\n public box: ClientRect;\n /** Whether the space list is in view */\n public in_view: boolean;\n /** ID of the booking with an action processing */\n public override_state: string;\n /** Map of bookings to whether they are loading */\n public loading: HashMap = {};\n /** Settings for day view */\n public settings: DayViewSettings = {} as any;\n\n /** Container element for the component contents */\n @ViewChild('view', { static: true }) private view: ElementRef;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _bookings: BookingsService,\n private _dialog: MatDialog,\n private cdr: ChangeDetectorRef,\n private _org: OrganisationService,\n ) {\n super();\n }\n\n /** Events to display for the active date */\n public events: Booking[] = []\n\n public ngOnInit(): void {\n this.events = this.filterEvents();\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.settings = this._service.setting('app.day_view') || {};\n this.subscription(\n 'breakdown',\n this._service\n .listen('APP.breakdown')\n .subscribe((state) => {\n this.overflow_only = state;\n this.events = [...this.filterEvents()];\n })\n );\n this.subscription(\n 'legend',\n this._service\n .listen('CONCIERGE.legend')\n .subscribe((state) => (this.legend = state || {}))\n );\n this.subscription(\n 'bookings',\n this._booking_state_service.filtered.subscribe((list) => {\n this.event_list = [...list];\n this.events = [...this.filterEvents()];\n this.cdr.detectChanges();\n })\n );\n this.checkInView();\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.scroll) {\n this.checkInView();\n }\n if (changes.space) {\n this.event_list = [...this.event_list];\n this.timeout('in_view', () => this.checkInView(), 100);\n }\n /* istanbul ignore else */\n if (changes.last_update) {\n this.timeout('update_overlaps', () => this.calculateOverlaps(), 1000);\n }\n }\n\n // private filterEvents(): Booking[] {\n // if (this.space) {\n // const bookings = this.event_list;\n // const list = bookings.filter((event) => {\n // if (this.override_state && this.override_state === event.icaluid) {\n // this.loading[event.id] = true;\n // }\n\n // const ignore = event.is_recurrent && event.recurrence_type === 'master';\n // const roomemail = event.room.filter(rm => rm.email === this.space.email)[0];\n\n // return (\n // !ignore &&\n // event.room.some(room => room.email.includes(this.space.email)) &&\n // (!this.overflow_only ||\n // event.setup[event.room.map(room => room.email)] ||\n // event.breakdown[event.room.map(room => room.email)])\n // );\n // }).map(e => new Booking({...e.toJSON()}) );\n\n // return list;\n // }\n // return [];\n // }\n\n private filterEvents(): Booking[] {\n if (!this.space) {\n return [];\n }\n \n return this.event_list.filter((event) => {\n // Mark as loading if override state matches.\n if (this.override_state && this.override_state === event.icaluid) {\n this.loading[event.id] = true;\n }\n \n const isRecurrentMaster = event.is_recurrent && event.recurrence_type === 'master';\n const isRoomEmailMatch = event.multi_rooms.some(room => room.email === this.space.email);\n \n // Determine if the event should be included based on setup or breakdown conditions.\n const isIncludedInSetupOrBreakdown = event.multi_rooms.some(room => {\n return event.room_setup || event.room_breakdown || event.setup[room.email] || event.breakdown[room.email];\n });\n \n return !isRecurrentMaster && isRoomEmailMatch && (!this.overflow_only || isIncludedInSetupOrBreakdown);\n }).map(event => new Booking({...event.toJSON()}));\n }\n\n /* istanbul ignore next */\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n\n /**\n * Calculate to overlap details for the booking events on the space\n */\n private calculateOverlaps() {\n const events = this.events.sort(\n (a, b) =>\n a.startDateTz.ms - b.startDateTz.ms ||\n a.duration - b.duration ||\n (a.title || '').localeCompare(b.title || '')\n );\n events.forEach((i) => (this.overlap_details[i.id] = { index: 0, total: 1 }));\n for (const bkn of events) {\n const bkn_start = bkn.startDateTz.startOfValue('minute');\n const bkn_end = bkn.endDateTz.startOfValue('minute');\n let count = 1;\n let index = 0;\n const collisions: Booking[] = [];\n for (const cmp of events) {\n /* istanbul ignore else */\n if (bkn.id !== cmp.id) {\n const cmp_start = cmp.startDateTz.startOfValue('minute');\n const cmp_end = cmp.endDateTz.startOfValue('minute');\n /* istanbul ignore else */\n if (\n bkn_start.isSameDate(cmp_start, 'minute') ||\n (bkn_start.isAfterDate(cmp_start) && bkn_start.isBeforeDate(cmp_end)) ||\n bkn_end.isSameDate(cmp_end, 'minute') ||\n (bkn_end.isAfterDate(cmp_start) && bkn_end.isBeforeDate(cmp_end))\n ) {\n count++;\n collisions.push(bkn);\n /* istanbul ignore else */\n if (\n events.findIndex((i) => i.id === bkn.id) >\n events.findIndex((i) => i.id === cmp.id)\n ) {\n index++;\n }\n }\n }\n }\n this.overlap_details[bkn.id] = { index: Math.max(0, index), total: count };\n }\n }\n\n /**\n * Check whether the space column is with the view of the\n */\n private checkInView() {\n /* istanbul ignore else */\n if (this.view && this.view.nativeElement) {\n const el = this.view.nativeElement;\n this.in_view =\n el.offsetLeft + this.scroll >= -240 &&\n el.offsetLeft + this.scroll <= window.innerWidth;\n this.inView.emit(this.in_view);\n }\n }\n\n /**\n * Initialise drag events\n */\n public initDrag() {\n this.box = this.view.nativeElement.getBoundingClientRect();\n this.dragging.emit(true);\n }\n\n /**\n * Cleanup after drag\n */\n public endDrag() {\n this.timeout('end_drag', () => (this.top = 0), 10);\n this.dragging.emit(false);\n }\n\n /**\n * Update top position of the dragged event placeholder\n * @param booking Booking being dragged\n * @param event Drag event\n */\n public updateDragTop(event: CdkDragMove) {\n /* istanbul ignore else */\n if (event.delta.y) {\n const y = event.pointerPosition.y;\n const top = (y - this.box.top - this.scroll_top) / this.box.height;\n const top_minutes = (Math.round((top * 24 * 60) / 15) * 15) / 60;\n this.top = (top_minutes / 24) * 100;\n\n }\n }\n\n /**\n * Handle drop event\n * @param event\n */\n public drop(event: CdkDragDrop<{ top: number; list: Booking[] }>): void {\n const id = event.item.element.nativeElement.id;\n const booking = event.previousContainer.data.list.find((i) => i.id === id);\n /* istanbul ignore else */\n if (!booking) {\n return;\n }\n const top = event.previousContainer.data.top;\n const new_start = Math.round(((top || 0) / 100) * 24 * 60);\n const old_date = booking.startDateTz;\n const new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n const start_epoch = new_date.seconds;\n const end_epoch = new_date.addValue({ minutes: booking.duration }).seconds;\n const now = DateNow(new Date());\n /* istanbul ignore else */\n // Prevent moving event into past\n if (now.startOfValue('minute').ms > new_date.ms) {\n this.handleDropError(booking.id, 'Meetings cannot be moved into the past');\n return;\n }\n if (now.startOfValue('minute').ms > booking.endDateTz.ms) {\n this.handleDropError(booking.id, 'Only future meetings can be moved');\n return;\n }\n if(booking.is_multiroom){\n this.handleDropError(booking.id, 'Multiroom meetings cannot be moved using drag and drop');\n return;\n }\n // Check for collisions\n this.loading[booking.id] = true;\n this.override_state = booking.icaluid;\n this.moving.emit({ isMoving:true, movingId:booking.id} );\n let room = booking.space;\n let message = `Update ${booking.organiser.name}'s meeting in \"${ booking.space.local_name }\" from ${ old_date.formatDate('h:mma') } to ${new_date.formatDate('h:mma')}`;\n let success = `Successfully updated meeting time from ${old_date.formatDate( 'h:mma' )} to ${new_date.formatDate('h:mma')}`;\n /* istanbul ignore else */\n if (event.container !== event.previousContainer) {\n // Same room\n room = this._spaces.find(event.container.id.replace('space-col-', '')) || room;\n message = `Move ${booking.organiser.name}'s meeting in \"${booking.space.local_name}\" to \"${ room.local_name }\" at ${new_date.formatDate('h:mma')}`;\n success = `Successfully moved booking to \"${room.local_name}\" at ${new_date.formatDate('h:mma')}`;\n }\n /* istanbul ignore else */\n // Check if booking has a change\n // if (room === booking.space && new_date.isSameDate(old_date, 'month')) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const room_list = [room];\n // Check if booking is already in the room\n const room_count = room_list.reduce((a, v) => a.add(v.id), new Set()).size;\n /* istanbul ignore else */\n // if (room_count < room_list.length) {\n // this.handleDropError(booking.id, 'The meeting is already in this room');\n // return;\n // }\n const new_booking = new Booking({\n ...booking.toJSON(),\n start_epoch,\n end_epoch,\n room: room_list[0],\n multi_rooms: room_list\n });\n \n // Check if catering needs be dropped to comply with catering hours\n let cateringWillBeDropped = false;\n if (booking.has_catering && booking.catering && booking.catering.length > 0) {\n const isOutsideCatering = this.isOutsideCateringHours(new_date, new_booking.duration);\n const roomDoesNotHaveCatering = !new_booking.space.has_catering;\n if (isOutsideCatering || roomDoesNotHaveCatering) {\n cateringWillBeDropped = true;\n message += `
Note: Moving this booking will remove the catering order because `;\n \n if (isOutsideCatering && roomDoesNotHaveCatering) {\n message += `the new time falls outside of catering hours and the new room does not support catering.`;\n } else if (isOutsideCatering) {\n message += `the new time falls outside of catering hours.`;\n } else if (roomDoesNotHaveCatering) {\n message += `the new room does not support catering.`;\n }\n message += ``;\n }\n }\n \n this.checkCollisions(\n room_list,\n new_date,\n new_booking.duration,\n new_booking.icaluid\n ).then(\n () => {\n this.moveBooking(message, new_booking, cateringWillBeDropped).then(\n (_) => {\n this.override_state = null;\n this.moving.emit({ isMoving:false, movingId:booking.id} );\n this._service.notifySuccess(success);\n },\n (err) => this.handleDropError(new_booking.id, `Error: ${err}`)\n );\n },\n () => this.handleDropError(new_booking.id, 'Updated meeting time clashes with another')\n );\n }\n\n public isOutsideCateringHours(startDateTime: DateTZ, duration: number): boolean {\n const startDateTimeLuxon = DateTime.fromMillis(startDateTime.ms, { zone: startDateTime.building_tz });\n const endDateTimeLuxon = startDateTimeLuxon.plus({ minutes: duration });\n \n const bookingDate = startDateTimeLuxon.startOf('day');\n const dayStartAt7am = bookingDate.set({ hour: 7 });\n const dayEndAt8pm = bookingDate.set({ hour: 20 });\n \n // Check if booking ends before or at 7 am, or starts at or after 8 pm\n if (endDateTimeLuxon <= dayStartAt7am || startDateTimeLuxon >= dayEndAt8pm) {\n return true;\n } else {\n return false;\n }\n } \n\n /**\n * Check if there are any booking collisions with the new booking time\n * @param spaces\n * @param dateTz\n * @param duration\n */\n private checkCollisions(\n spaces: Space[],\n dateTz: DateTZ,\n duration: number,\n ignore?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n this._spaces\n .available({\n room_ids: spaces.map((i) => i.id).join(','),\n dateTz,\n duration,\n ignore,\n hide_bookings: true,\n })\n .then(\n (list) => {\n list.length === spaces.length ? resolve() : reject();\n },\n () => reject()\n );\n });\n }\n\n /**\n * Handle errors from drop move logic\n * @param id Booking ID\n * @param message Error description\n */\n private handleDropError(id: string, message: string) {\n this.loading[id] = false;\n this.override_state = null;\n\t\t\t\tthis.moving.emit({ isMoving:false, movingId:id} );\n this._service.notifyError(message);\n }\n\n /**\n * Update booking\n * @param confirm_msg\n * @param new_booking\n */\n private moveBooking(confirm_msg: string, new_booking: Booking, cateringWillBeDropped: boolean = false): Promise {\n return new Promise((resolve, reject) => {\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: 'Update meeting',\n content: confirm_msg,\n icon: { type: 'icon', class: 'material-icons', content: 'event_available' },\n action: 'Ok',\n },\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n if (cateringWillBeDropped) {\n // Remove catering orders\n new_booking.catering = [];\n }\n this._bookings.save(new_booking).then(\n (bkn: Booking) => {\n this._booking_state_service.replace(bkn);\n resolve(bkn);\n },\n (err) => {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n this.override_state = null;\n reject(err)\n }\n );\n } else {\n this.moving.emit({ isMoving:false, movingId:new_booking.id} );\n }\n ref.close(event.reason);\n })\n );\n ref.afterClosed().subscribe((reason?:string) => { \n reason !== 'done' ? this.moving.emit({ isMoving:false, movingId:new_booking.id} ) : null;\n this.unsub('confirm');\n });\n });\n }\n\n public checkAvailabilityOnGivenTime(selectedBlockStart, selectedBlockEnd) {\n const runningBookings =\n this.events?.filter((bks) => {\n const startEpoch = new DateTZ({\n date: bks.start_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const endEpoch = new DateTZ({\n date: bks.end_epoch * 1000,\n is_local_tz: false,\n building_tz: bks.timezone,\n }).ms;\n const hasValidBreakdown: boolean =\n bks.breakdown &&\n Object.values(bks.breakdown).some((value) => value !== null);\n if (selectedBlockStart.ms === endEpoch && hasValidBreakdown) {\n return true;\n } else\n return (\n (selectedBlockStart.ms >= startEpoch && selectedBlockStart.ms < endEpoch) ||\n (selectedBlockEnd.ms > startEpoch && selectedBlockEnd.ms < endEpoch)\n );\n }) || [];\n return !!runningBookings.length;\n }\n\n\t\t/** Whether booking has been ended */\n public expired(booking): boolean {\n\t\t\treturn booking.timeBasedStatusLabel === 'done';\n\t\t}\n\n\n\t\tgridBookingOnClick(event: any, space: Space) {\n\n // if(!event.target.classList.contains('block') )\n // return;\n\n\t\t\tconst box = this.view.nativeElement.getBoundingClientRect();\n\t\t\tconst y = event.y;\n\n\t\t\tconst top = (y - box.top - 22) / box.height;\n\t\t\tconst top_minutes = Math.round((top * 24 ) * 100) / 100; //Math.round(top * 24 );\n\t\t\tconst topMinutes = (top_minutes / 24) * 100;\n\t\t\tconst new_start = Math.round(((topMinutes || 0) / 100) * 24 * 60) ;\n\t\t\tconst old_date = this._booking_state_service.booking_date;\n\n\t\t\tconst new_date = old_date.startOfValue('day').setValue({ minute: new_start });\n\t\t\tconst timezone = this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone')\n\t\t\tconst closestDateTz = closestToTimeSlotTz(new DateTZ({ date: new_date.ms, is_local_tz: true, building_tz: timezone }), +30)\n\n\t\t\tconst isConflict = this.checkAvailabilityOnGivenTime(closestDateTz, closestDateTz.addValue({ minutes: 60 }));\n\t\t\tif(isConflict) {\n\t\t\t\t// this._service.notifyError('Meetings cannot be create into the past');\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst now = DateNow(new Date());\n\t\t\t// Prevent moving event into past\n\t\t\tif (now.startOfValue('minute').ms > closestDateTz.ms) {\n\t\t\t\t\tthis._service.notifyError('Meetings cannot be created into the past');\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst form_data = {\n\t\t\t\tdateTz : closestDateTz,\n\t\t\t\tstartDateTz : closestDateTz,\n\t\t\t\tstart_epoch : closestDateTz.seconds,\n\t\t\t\tendDateTz : closestDateTz.addValue({ minutes: 60 }),\n\t\t\t\tend_epoch : closestDateTz.addValue({ minutes: 60 }).seconds,\n\t\t\t\ttimezone : timezone,\n\t\t\t\troom: space\n\t\t\t}\n\t\t\tconst booking\t=\tnew Booking(form_data);\n\t\t\tthis._dialog.open(BookingModalComponent, {\n\t\t\t\tdata: {\n\t\t\t\t\ttimezone: timezone,\n\t\t\t\t\tbooking: booking,\n\t\t\t\t\tisFromGrid: true\n\t\t\t\t },\n\t\t\t\tautoFocus: false,\n\t\t\t\tbackdropClass: 'mck-modal-backdrop',\n\t\t\t});\n\t\t}\n}\n","\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n \n\t\t\t\t\t\n
\n
\n \n
\n
\n
\n \n\n\n","import {\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges,\n ViewChild, NgZone, DoCheck, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { filter, first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { HashMap, Identity } from '@mckinsey-converge/base';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { isToday } from 'date-fns';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\n\n\nconst UPDATE_INTERVAL = 10;\n\n@Component({\n selector: 'day-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayViewTimelineComponent\n extends BaseDirective\n implements OnInit, OnChanges, OnDestroy\n{\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** List of shown legend items */\n @Input() public legend: HashMap = {};\n /** Whether to show only items with a setup and/or breakdown time */\n @Input() public overflow_only: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n\n @Input() undo_action;\n\n /** List of timeblocks to display */\n public time_blocks: Identity[] = this.generateTimeBlocks();\n /** Top value of the content scroll */\n public scroll_top: number = 0;\n /** Left value of the content scroll */\n public scroll_left: number = 0;\n /** Offset of the scroll value when starting a drag */\n public scroll_offset: number = 0;\n /** List of spaces to display for */\n public spaces: Space[] = [];\n /** List of spaces to display for */\n public filtered_spaces: Space[] = [];\n /** Mapping of space ids to whether they are in view */\n public in_view: { [id: string]: boolean } = {};\n /** Percent of the day that is now */\n public now: number;\n /** Currently active hour of the day */\n public active_hour: string;\n /** Mapping of spaces loading booking date */\n public loading_space: { [id: string]: boolean } = {};\n /** Booking ID to open modal for */\n public view_id: string;\n /** Last update time for the space bookings */\n public last_update: number = 0;\n /** Whether an event is being dragged */\n public is_dragging: boolean;\n /** Client rectangle for the scroll area */\n public box: ClientRect;\n /** Whether to show the holding bay */\n public show_holding_bay: boolean = true;\n\n public space_zones: string[] = [];\n\n public is_today: boolean = this.isToday();\n public modalInitialized = false;\n\n /** Scrollable area of the day view */\n @ViewChild('scroll_area', { static: true }) private scroll_area: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScroll: CdkVirtualScrollViewport;\n isEventMoving: boolean = false;\n bookingEl: any;\n timeoutID: any;\n column: any;\n\n /** Update scroll box when the window is resized */\n @HostListener('window:resize')\n public onResize() {\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n public get is_loading() {\n return this._booking_state_service.loading;\n }\n\n public isToday() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n }),\n 'day'\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _renderer: Renderer2,\n private _dialog: MatDialog,\n private _zone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n super();\n }\n\n public get holding_bay(): Space {\n const bld = this._org.building;\n /* istanbul ignore else */\n if (bld && bld.holding_bay) {\n return this._spaces.find(bld.holding_bay);\n }\n return null;\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n this._zone.runOutsideAngular(() => {\n this.interval('time', () => this.updateTime(), 15 * 1000);\n });\n // R--- return to see if the booking service needs updating\n this.subscription(\n 'dateTz',\n this._booking_state_service.dateTz.subscribe((dateTz) => {\n // const dateTz = new DateTZ({date});\n this.dateTz = dateTz;\n })\n );\n });\n });\n this.is_today = this.isToday();\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.init();\n this.initSpaces();\n // Update time\n this.updateTime();\n })\n );\n\n }\n\n ngAfterViewInit() {\n const d2 = this._renderer.createElement('div');\n this._renderer.addClass(d2, 'adjustable-room-block-2');\n this.virtualScroll.elementRef && this._renderer.appendChild(this.virtualScroll.elementRef.nativeElement, d2);\n }\n\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.level && this._org.building) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n this.spaces = this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.updateTime();\n this.initSpaces();\n }\n if (changes.space_type) {\n this.initSpaces();\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n public init() {\n this._service.title = 'Day View';\n this.subscription(\n 'viewing',\n this._service\n .listen('CONCIERGE.day_view.viewing')\n .subscribe((event) => this.scrollIntoView(event) )\n );\n // Subscribe to route query changes\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view') || localStorage.getItem('CONCIERGE.view_booking')) {\n this.view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_booking');\n const spaceJson = localStorage.getItem('CONCIERGE.view_booking_space');\n /* istanbul ignore else */\n if (details) {\n const space: Space | undefined = spaceJson\n ? new Space(JSON.parse(spaceJson))\n : undefined;\n const booking = new Booking({ ...JSON.parse(details), room: space });\n if(!this.modalInitialized) {\n this.modalInitialized = true;\n this.view(booking, space);\n localStorage.removeItem('CONCIERGE.view_booking');\n localStorage.removeItem('CONCIERGE.view_booking_space');\n }\n }\n }\n })\n );\n // this._zone.runOutsideAngular(() => {\n // this.interval(\n // 'scroll',\n // () => {\n // /* istanbul ignore else */\n // if (this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n // }\n // },\n // 1000\n // );\n // });\n /* istanbul ignore else */\n if (this.scroll_area['elementRef'].nativeElement) {\n this.box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n }\n }\n\n /**\n * Update scroll parameters to match the change in the scroll position\n * @param event\n */\n public updateScroll(event) {\n this.scroll_top = event.target.scrollTop;\n this.scroll_left = event.target.scrollLeft;\n }\n\n\n\n /** Generate time blocks to display on the day view */\n private generateTimeBlocks(): Identity[] {\n const blocks: Identity[] = [];\n const date = DateNow(new Date()).startOfValue('hour');\n for (let i = 0; i < 24; i++) {\n blocks.push({\n id: date.setValue({ hour: i }).formatDate('HH:mm'),\n name: date.setValue({ hour: i }).formatDate('h:mma').toLocaleLowerCase(),\n });\n }\n return blocks;\n }\n\n /** Update the now line position */\n private updateTime() {\n const now = new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone'),\n });\n this.now = (now.dateHour + now.minutes / 60) / 24;\n this.active_hour = now.startOfValue('hour').formatDate('HH:mm');\n this.is_today = this.isToday();\n this.cdr.detectChanges();\n }\n\n /**\n * View booking details\n * @param booking Booking to view the details of\n * @param space Space that's selected.\n */\n private view(booking: Booking, space?: Space) {\n this._dialog.open(MeetingDetailsModalComponent, {\n data: {\n space: space || booking.space,\n booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.view_id = null;\n }\n\n\n /**\n * Scroll booking to the event on the day view\n * @param booking Booking to scroll into view\n */\n private scrollIntoView(searchData: Booking | Space ) {\n if (searchData && this.scroll_area && this.scroll_area['elementRef'].nativeElement) {\n this.column && this._renderer.removeClass(this.column, 'wild');\n\n /** Select space column element using space id in search data - \n * space.id if seach data is space object or data.space.id if search data is booking object\n * \n */\n const spaceId = searchData['space'] ? searchData['space'].id : searchData.id;\n const element: HTMLDivElement = this.scroll_area['elementRef']\n .nativeElement.querySelector(`#space-col-${spaceId}`);\n\n\n this.column = element;\n\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n if(searchData['space'] && searchData['space'].id) \n this.bookingEl = element?.querySelector(`#${searchData.id}`)?.querySelector('.event-container');\n\n\n /* istanbul ignore else */\n if (element) {\n this.timeoutID && clearTimeout(this.timeoutID);\n this._renderer.addClass(element, 'wild');\n this.bookingEl && this._renderer.addClass(this.bookingEl, 'wild');\n const scroll_box = this.scroll_area['elementRef'].nativeElement.getBoundingClientRect();\n\n let date_percent;\n if(searchData['space'] && searchData['space'].id) {\n date_percent = Math.abs(\n searchData['startDateTz'].dateDiff(\n searchData['startDateTz'].startOfValue('day'),\n 'minutes'\n )\n ) / (24 * 60);\n }\n \n\n const box = element.getBoundingClientRect();\n const left = box.left - scroll_box.left + this.scroll_area['elementRef'].nativeElement.scrollLeft - 500;\n const top = (searchData['space'] && searchData['space'].id) ? \n this.scroll_area['elementRef'].nativeElement.scrollHeight * date_percent - 10 :\n 0\n\n\n this.scroll_area['elementRef'].nativeElement.scrollTo({\n left: left,\n top: top,\n behavior: 'smooth',\n });\n\n this.timeoutID = setTimeout(()=> {\n element && this._renderer.removeClass(element, 'wild');\n this.bookingEl && this._renderer.removeClass(this.bookingEl, 'wild');\n }, 3000);\n }\n }\n }\n\n /**\n * Setup an auto-scroll for the display view\n * @param x\n * @param y\n */\n public scrollView(x: number, y: number) {\n /* istanbul ignore else */\n if (x || y) {\n this.scroll_area['elementRef'].nativeElement.scrollTop += y || 0;\n this.scroll_area['elementRef'].nativeElement.scrollLeft += x || 0;\n /* istanbul ignore else */\n if (\n (y &&\n this.scroll_area['elementRef'].nativeElement.scrollTop >=\n this.scroll_area['elementRef'].nativeElement.scrollHeight) ||\n (x &&\n this.scroll_area['elementRef'].nativeElement.scrollLeft >=\n this.scroll_area['elementRef'].nativeElement.scrollWidth) ||\n (y && this.scroll_area['elementRef'].nativeElement.scrollTop <= 0) ||\n (x && this.scroll_area['elementRef'].nativeElement.scrollLeft <= 0)\n ) {\n this.clearInterval('auto_scroll');\n }\n // this.updateScroll({ target: this.scroll_area['elementRef'].nativeElement });\n }\n }\n\n public clearSelected() {\n this._service.set('CONCIERGE.day_view.viewing', null);\n }\n\n public cancelScroll() {\n this.clearInterval('auto_scroll');\n }\n\n public dragChange(is_dragging: boolean) {\n if (is_dragging) {\n this.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop; \n this.subscription(\n 'listen_move',\n this._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n const position = { x: event.clientX, y: event.clientY };\n const y = position.y > this.box.bottom - this.box.height * 0.05\n ? 1\n : position.y < this.box.top + this.box.height * 0.05\n ? -1\n : 0;\n const x = position.x > this.box.right - this.box.width * 0.05\n ? 1\n : position.x < this.box.left + this.box.height * 0.05\n ? -1\n : 0;\n this.scrollView(x * 5, y * 5);\n this._zone.runOutsideAngular(() => {\n this.interval('auto_scroll', () => {\n return this.scrollView(x * 40, y * 40) \n }, 15);\n });\n this.cdr.detectChanges();\n })\n );\n this.clearInterval('bookings');\n } else {\n this.cancelScroll();\n this.unsub('listen_move');\n }\n }\n\n private initSpaces() {\n const holding_bay = this.holding_bay;\n this.filtered_spaces = this.spaces.filter(\n (i) =>\n ( ( !this.space_type || i.zones.indexOf(this.space_type) >=0 ) || ( [i.room_type].indexOf(this.space_type) >= 0) ) &&\n (!holding_bay || i.id !== holding_bay.id) &&\n i.bookable\n );\n this.filtered_spaces.sort((a, b) => a.local_name.localeCompare(b.local_name));\n this.space_zones = this.spaces.map((i) => `space-col-${i.id}`);\n }\n\n\n\n\t\tpublic onEventDragging(isDragging: boolean): void {\n\t\t\t// Check if dragging is initiated\n\t\t\tif (isDragging) {\n\t\t\t\t// Store the current scroll position\n\t\t\t\tthis.scroll_offset = this.scroll_area['elementRef'].nativeElement.scrollTop;\n\t\t\t\t// Subscribe to mouse move events\n\t\t\t\tthis.subscribeToMouseMove();\n\t\t\t\t// Clear existing interval for bookings\n\t\t\t\tthis.clearInterval('bookings');\n\t\t\t} else {\n\t\t\t\t// Cancel scroll operation\n\t\t\t\tthis.cancelScroll();\n\t\t\t\t// Unsubscribe from mouse move events\n\t\t\t\tthis.unsubscribeFromMouseMove();\n\t\t\t}\n\t}\n\n\t// Subscribe to mouse move events and handle scroll logic\n\tprivate subscribeToMouseMove(): void {\n\t\tthis.subscription(\n\t\t\t'listen_move',\n\t\t\tthis._renderer.listen('window', 'mousemove', (event: MouseEvent) => {\n\t\t\t\t// Get mouse position\n\t\t\t\tconst position = { x: event.clientX, y: event.clientY };\n\t\t\t\t// Calculate scroll direction based on mouse position\n\t\t\t\tconst [x, y] = this.calculateScrollDirection(position);\n\t\t\t\t// Scroll the view based on calculated direction\n\t\t\t\tthis.scrollView(x * 5, y * 5);\n\t\t\t\t// Run auto-scroll logic\n\t\t\t\tthis.runAutoScroll(x, y);\n\t\t\t\t// Detect changes to update the view\n\t\t\t\tthis.cdr.detectChanges();\n\t\t\t})\n\t\t);\n\t}\n\n\t// Calculate scroll direction based on mouse position\n\tprivate calculateScrollDirection(position: { x: number, y: number }): [number, number] {\n\t\tconst tolerance = 0.05;\n\t\tconst x = this.calculateDirection(position.x, this.box.left, this.box.right, tolerance);\n\t\tconst y = this.calculateDirection(position.y, this.box.top, this.box.bottom, tolerance);\n\t\treturn [x, y];\n\t}\n\n\t// Calculate direction based on mouse position and element boundaries\n\tprivate calculateDirection(pos: number, min: number, max: number, tolerance: number): number {\n\t\tif (pos > max - this.box.width * tolerance) {\n\t\t\t\treturn 1; // Scroll right\n\t\t} else if (pos < min + this.box.width * tolerance) {\n\t\t\t\treturn -1; // Scroll left\n\t\t} else {\n\t\t\t\treturn 0; // Do not scroll\n\t\t}\n\t}\n\n\t// Run auto-scroll logic\n\tprivate runAutoScroll(x: number, y: number): void {\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis.interval('auto_scroll', () => this.scrollView(x * 10, y * 10), 10);\n\t\t});\n\t}\n\n\t// Unsubscribe from mouse move events\n\tprivate unsubscribeFromMouseMove(): void {\n\t\tthis.unsub('listen_move');\n\t}\n\n public movingEvent(booking) {\n this.isEventMoving = booking.isMoving;\n this.loading_space[booking.movingId] = booking.isMoving;\n \n }\n\n}\n\n","
\n\t
\n\t\t\t\n\t
\n\n\t
\n\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
Time
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ timeslot.name }}
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
{{ room.local_name }}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\tCapacity - {{ room.capacity || '0' }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{ room.capacity === 1 ? 'person' : 'people' }}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\n
\n
\n
Incoming Booking Requests
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\t
\n\t\t\t
Moving meeting
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t
\n\t
\n
\n","import { Component, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, BaseDirective } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'meeting-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss'],\n})\nexport class MeetingCateringDetailsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public orders = [];\n\n /** Total cost of all the orders */\n public get total(): number {\n let total = 0;\n this.orders.forEach((order) => (total += order.total));\n return total;\n }\n\n public get total_edited(): boolean {\n return this.booking.edits.some((_) => this.orders.some((o) => o.id === _));\n }\n\n /** Charge code for orders in the active space */\n public get charge_code(): string {\n return (this.orders.length ? this.orders[0].charge_code : '') || '';\n }\n\n /** Currency symbol for orders in active space */\n public get symbol(): string {\n const space = this.space || { level: { building_id: '' } };\n const building = this._org.buildings.find((bld) => bld.id === space.level.building_id) || {\n currency: 'USD',\n };\n return building.currency;\n }\n\n /** Notes for orders in active space */\n public get notes(): string {\n if (this.orders.length) {\n const note = this.booking.notes.find(\n (note) =>\n note.type === 'catering' &&\n // note.space === this.space.email &&\n this.booking.multi_rooms.some(room => room.email === note.space) &&\n note.author === this.booking.creator.name\n );\n return note ? note.message : '';\n } else {\n return '';\n }\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n constructor(\n private _org: OrganisationService,\n private _dialog: MatDialog,\n private _router: Router\n ) {\n super();\n }\n\n public ngOnInit() {\n this._updateOrders();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.booking) {\n this._updateOrders();\n }\n }\n\n /** Store the order details for viewing in another component */\n public storeOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n localStorage.setItem('CONCIERGE.view_order', JSON.stringify(order.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(booking.toApiJSON()));\n localStorage.setItem('CONCIERGE.date', `${booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${booking.startDateTz.building_tz}`);\n }\n\n /** Open modal to edit catering details for booking */\n public editMeetingCatering() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n only_catering: true,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n\n /**\n * View catering order for the event\n */\n public viewOrder(order: CateringOrder) {\n const booking = this.booking || order.booking;\n if (!booking || !order) return;\n /* istanbul ignore else */\n if (localStorage) this.storeOrder(order);\n this._router.navigate(['/catering', 'orders'], {\n queryParams: { booking: booking.id, view: order.id },\n });\n this._dialog.closeAll();\n }\n\n /** List of orders for this booking and space */\n private _updateOrders() {\n let orders = [];\n this.booking.multi_rooms.forEach((room) =>{\n const _temp = this.booking.catering.filter(\n (order) => order.location_id === room.email\n );\n _temp[0] && orders.push(..._temp);\n });\n orders = orders.map((order) => {\n let ord = order.toJSON();\n ord.booking = this.booking; // R--- check this change works\n return new CateringOrder(ord);\n });\n this.orders = orders;\n }\n}\n","
Catering
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n {{ total / 100 | currency: symbol }}\n
\n
\n
\n \n
\n {{ charge_code }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n\n
<No Catering Orders>
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingAction, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration } from '@mckinsey-converge/base';;\nimport { BookingModalComponent } from '../../../bookings/booking-modal/booking-modal.component';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nexport interface BookingDetailInfo {\n bookedBy: {\n display:boolean,\n value: string\n }\n}\n@Component({\n selector: 'meeting-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss'],\n})\nexport class MeetingDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Mapping of edited fields */\n\n @Output() updateBooking = new EventEmitter();\n\n @Output() public event = new EventEmitter();\n\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n\n public edited: HashMap = {};\n\n /** Display string for the locations in the booking */\n public get location(): string {\n // Ensure both this.booking.room and this.space are treated as arrays\n let rooms: Space[] = [];\n \n if (Array.isArray(this.booking.multi_rooms) && this.booking.multi_rooms.length > 0) {\n rooms = this.booking.multi_rooms;\n } else if (Array.isArray(this.space) && this.space.length > 0) {\n rooms = this.space;\n }\n \n // Map each room to its local_name and join these names with a comma\n return rooms.map(room => room.local_name).join(', ');\n }\n\n /** Display string for the booking duration */\n public get duration() {\n return this.booking ? humaniseDuration(this.booking.duration) : '1 hour';\n }\n\n /** Display string for attendees in booking */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n\n /** Display string for attendees in booking */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('dd MMM yyyy')} ${this.booking.startDateTz.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get end_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration})\n return `${end_.formatDate('dd MMM yyyy,')} ${end_.formatDate('h:mma').toLocaleLowerCase()}`;\n }\n /** Display string for attendees in booking */\n public get attendees() {\n return this.booking.attendees.map((person) => person.name).join('\\n');\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done';\n }\n\n public bookingDetails: BookingDetailInfo;\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n Object.values(this.booking.edits || []).forEach(i => {\n this.edited[i] = true;\n });\n this.setDetails();\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n /**\n * Function to set details of the booking, can take advantage to one time assignment and set tmeplate properties to avoid template conditions and function calls\n */\n setDetails() {\n const {creator, organiser, booker_concierge} = this.booking;\n this.bookingDetails = {\n bookedBy: {\n display: creator && ( creator.email !== organiser.email || (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ),\n value: (creator.email === organiser.email && booker_concierge !== null && organiser.email !==booker_concierge['email']) ? booker_concierge['name'] || booker_concierge['email'] : creator?.name || creator.email\n }\n }\n }\n\n public editMeeting() {\n const dialogRef = this._dialog.open(BookingModalComponent, {\n data: {\n timezone: this.booking.timezone,\n booking: this.booking,\n action: BookingAction.EDIT\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Booking Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name || booking.organiser.email }}\n
\n
\n \n \n \n \n \n
\n
\n
\n \n
\n {{ bookingDetails.bookedBy.value }}\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n {{ location }}\n
\n \n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ duration }}\n
\n
\n
\n \n
\n {{ attendees }}\n
\n
\n
0\">\n \n
\n {{ this.booking.company.join(', ') }}\n
\n
\n
\n \n
\n No\n
\n
\n
\n \n
\n
\n
\n\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\n\nimport { Booking, BookingAction } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingsService, BOOKING_STATUS } from '@mckinsey-converge/data-common';\nimport { DeleteConfirmModalComponent } from '../../bookings/delete-confirm-modal/delete-confirm-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\nexport interface MeetingDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-meeting-details-modal',\n templateUrl: './meeting-details-modal.component.html',\n styleUrls: ['./meeting-details-modal.component.scss'],\n})\nexport class MeetingDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Display string for the loading state */\n public loading: string;\n /** Whether the meeting is part of a recurring series */\n public isRecurrentBooking = false;\n /** Handler for request errors */\n /** Whether the meeting is approved or not */\n public isApproved = false;\n public isMasterApproved = false;\n\n public master_booking: any;\n \n private _on_error = (message) => (err) => {\n this._service.notifyError(`${message}. Error: ${err.message || err}`);\n this.setLoading(null);\n };\n\n /** Booking to view details */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n public set booking(booking: Booking) {\n this._data.booking = booking;\n // if space selected no longer exists on booking change, pick first one.\n if (this._data.booking.room?.id && this._data.booking.room.id !== this._data.space?.id) {\n this._data.space = this._data.booking.room;\n }\n }\n\n /** Space to display booking details for */\n public get space(): Space {\n return this._data.space;\n }\n\n /** Type of meeting */\n public get type(): string {\n return this.booking.getType();\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n @Inject(MAT_DIALOG_DATA) private _data: MeetingDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n if (!this.booking) {\n this._dialog_ref.close();\n return;\n }\n\n if (this.booking.is_recurrent) {\n if (this.booking.recurrence_type === 'master') {\n // If the booking is recurrent and of type 'master', use it directly\n this.isRecurrentBooking = this.booking.is_recurrent;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n } else if (this.booking.recurrence_type === 'occurrence') {\n // If the booking is recurrent and of type 'occurrence', find the master booking\n this.subscription(\n 'detail_bookings',\n this._booking_state_service.bookings.subscribe(async (bookings) => {\n this.master_booking = bookings.find((bkn) => {\n return (\n this.booking.recurrence_master_id === bkn.recurrence_master_id &&\n bkn.recurrence_type === 'master'\n );\n }) || await this._bookings.show(this.booking.recurrence_master_id);\n\n this.isApproved =\n this.booking.status === 'accepted' ||\n this.booking.status === 'approved';\n this.isMasterApproved =\n this.master_booking?.status === 'accepted' ||\n this.master_booking?.status === 'approved';\n\n // show Accept Series button for an occurrence only if it is not accepted yet and master booking is also not approved\n this.isRecurrentBooking =\n (this.master_booking?.is_recurrent &&\n !this.isApproved &&\n !this.isMasterApproved) ??\n false;\n if (this.isRecurrentBooking) {\n this.booking = this.master_booking;\n }\n })\n );\n }\n } else {\n // If the booking is not recurrent, use it directly\n this.isRecurrentBooking = false;\n this.isApproved =\n this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n }\n\n public setLoading(state: string) {\n this.loading = state;\n this._dialog_ref.disableClose = !!this.loading;\n }\n\n public acceptMeeting() {\n this.setLoading('Accepting meeting...');\n const event = this.booking.toJSON();\n\n let acceptOptions = {\n concierge: true,\n host: this.booking.organiser.email,\n room_email: this.space.email,\n icaluid: this.booking.icaluid,\n start: event.start,\n end: event.end,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings.accept(this.booking.id, acceptOptions).then(() => {\n this._service.notifySuccess('Meeting approved.');\n this.booking.status = BOOKING_STATUS.approved;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.approved });\n }, this._on_error('Apologies, Unable to approve! This time slot has been booked recently by another user, please try booking another one.'));\n }\n\n public declineMeeting() {\n this.setLoading('Declining meeting...');\n\n let declineOptions = {\n booking_id: this.booking.id,\n organiser: this.booking.organiser.email,\n icaluid: this.booking.icaluid,\n start: this.booking.startDateTz.seconds,\n end: this.booking.endDateTz.seconds,\n room_email: this.space.email,\n // Conditionally add series=true\n ...(this.booking.is_recurrent &&\n this.booking.recurrence_type === 'master' && { series: true }),\n };\n\n this._bookings\n .decline(this.booking.id, declineOptions)\n .then(() => {\n this._service.notifySuccess('Meeting declined.');\n this.booking.status = BOOKING_STATUS.declined;\n this._booking_state_service.replace(this.booking);\n this.setLoading(null);\n this.event.emit({ reason: 'action', metadata: BOOKING_STATUS.declined });\n }, this._on_error('Unable to declining meeting, please try another one.'));\n }\n\n /** Open modal to confirm deletion of booking */\n public confirmDeleteMeeting() {\n const ref = this._dialog.open(DeleteConfirmModalComponent);\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'action') {\n ref.componentInstance.loading = true;\n const success = await this.deleteMeeting().catch(\n this._on_error('Error deleting booking')\n );\n ref.componentInstance.loading = false;\n ref.componentInstance.success = !!success;\n setTimeout(() => {\n ref.close();\n }, 3000);\n }\n })\n );\n }\n\n /** Open model to cloning a booking */\n public cloningMeeting(): void {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.booking,\n action: BookingAction.CLONE,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /** Delete booking */\n private async deleteMeeting(opts: { series?: boolean } = {}) {\n this.setLoading('Deleting meeting...');\n await this.booking.delete(opts);\n this._service.notifySuccess('Successfully deleted booking');\n this.event.emit({ reason: 'action', metadata: 'removed' });\n this._dialog_ref.afterClosed().subscribe((_) => this.setLoading(null));\n this._dialog_ref.close();\n this._service\n .get('undo')\n .next({ action: opts && opts.series ? 'series' : 'booking', booking: this.booking });\n return true;\n }\n\n /** Update booking requirements */\n public async updateRequirements(form: FormGroup) {\n this.setLoading('Updating requirements...');\n const value = form.value;\n const booking_data = this.booking.toJSON();\n const booking = new Booking({\n ...booking_data,\n ...value,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n booking.room_setup = 900;\n booking.room_breakdown = 900;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n\t\t\t\t\t\t\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\t\t\t\t\t\tthis._booking_state_service.bookings.subscribe((res) => {\n\t\t\t\t\t\t\tconst booking = res.find((book) => this.booking.id === book.id);\n\t\t\t\t\t\t\tthis.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n\t\t\t\t\t\t});\n this._service.notifySuccess('Successfully updated requirements');\n }\n this.setLoading(null);\n }\n\n public async updateBooking(form) {\n this.setLoading('Updating booking...');\n /* const value = form.value;\n const booking_data = this.booking.toJSON();\n const startDateTz = form.controls.dateTz.value;\n const endDateTz = startDateTz.addValue({ minutes: value.duration });\n const booking = new Booking({\n ...booking_data,\n ...value,\n startDateTz,\n endDateTz,\n start_epoch: startDateTz.seconds,\n end_epoch: endDateTz.seconds,\n room: value.space_list[0], // R--- not ideal\n });\n // if notes or catering exist? add 15 min buffer setup and breakdown to booking\n const has_note_buffer =\n (booking.notes && booking.notes?.length) ||\n (booking.catering && booking.catering?.length)\n ? { [booking?.space?.email]: 900 }\n : null; // 900 seconds = 15 min\n if (has_note_buffer) {\n booking.setup = has_note_buffer;\n booking.breakdown = has_note_buffer;\n }\n const new_booking: Booking = (await this._bookings\n .save(booking)\n .catch(this._on_error(`Error updating booking`))) as any;\n */\n // if (new_booking) {\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated booking');\n // }\n this.setLoading(null);\n }\n\n public async updateBreakdown(event) {\n this.setLoading('Updating requirements...');\n /*const booking_data = this.booking.toJSON();\n const _booking = new Booking({\n ...booking_data,\n setup: event.setup,\n breakdown: event.breakdown,\n notes: event.notes,\n });\n const new_booking: Booking = (await this._bookings\n .save(_booking)\n .catch(this._on_error(`Error updating requirements`))) as any;\n if (new_booking) {\n const bkn = new Booking({ ...booking_data, ...new_booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n this._service.notifySuccess('Successfully updated requirements');\n }*/\n this._booking_state_service.bookings.subscribe((res) => {\n const booking = res.find((book) => this.booking.id === book.id);\n this.booking = booking; // if space selected no longer exists on booking change, this will pick first one.\n });\n this._service.notifySuccess('Successfully updated requirements');\n this.setLoading(null);\n }\n}\n","
\n
{{ booking.time_period }}
\n
\n \n {{booking.merged ? 'Merged' : 'Multiroom'}} \n \n
\n
{{ booking?.title }}
\n
\n \n
\n
\n\n \n\n\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport { UsersService } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Identity, DialogEvent } from '@mckinsey-converge/base';\nimport { humaniseDuration } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, BookingNote } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface PrivateDetailsModalData {\n space: Space;\n booking: Booking;\n}\n\n@Component({\n selector: 'a-private-details-modal',\n templateUrl: './private-details-modal.component.html',\n styleUrls: ['./private-details-modal.component.scss'],\n})\nexport class PrivateDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form Fields for private details */\n public form: FormGroup;\n /** Whether changes are being saved */\n public loading: boolean;\n /** List of available durations for setup and breakdown */\n public available_durations: Identity[] = new Array(5)\n .fill(0)\n .map((_, i) => ({ id: i * 15 * 60, name: humaniseDuration(i * 15) || '0 minutes' }));\n\n public get booking(): Booking {\n return this._data.booking;\n }\n\n constructor(\n private _service: ApplicationService,\n private _users: UsersService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: PrivateDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const note = this.booking.notes.find(\n (note) => note.type === 'private'//&& note.space === this._data.space.email\n ) || { message: '' };\n this.form = new FormGroup({\n setup: new FormControl(this.booking.room_setup || this.booking.setup[this._data.space.email] || 0),\n breakdown: new FormControl( this.booking.room_breakdown || this.booking.breakdown[this._data.space.email] || 0),\n notes: new FormControl(note.message),\n });\n }\n\n public saveChanges() {\n const now = new DateTZ();\n if (this.form.dirty) {\n const old_notes = this.booking.notes.filter(\n (note) => !(note.type === 'private') // && note.space === this._data.space.email\n );\n const notes = [\n ...old_notes,\n {\n type: 'private',\n date: now.ms,\n message: this.form.value.notes,\n author: this._users.current.name,\n space: this._data.space.email,\n } as BookingNote,\n ];\n const value = this.form.value;\n const setup = { ...this.booking.setup };\n Object.keys(setup).forEach((k) => setup[k]= value.setup );\n setup[this._data.space.email] = value.setup;\n const breakdown = { ...this.booking.breakdown };\n Object.keys(breakdown).forEach((k) => breakdown[k]= value.breakdown );\n breakdown[this._data.space.email] = value.breakdown;\n const room_setup = value.setup;\n const room_breakdown = value.breakdown;\n\n const new_booking = new Booking({\n ...this.booking.toJSON(),\n setup,\n breakdown,\n room_setup,\n room_breakdown,\n notes,\n });\n this.loading = true;\n this._dialog_ref.disableClose = true;\n this._bookings.save(new_booking).then(\n (booking) => {\n\n const bkn = new Booking({ ...this.booking, ...booking.toApiJSON() });\n this._data.booking = bkn;\n this._booking_state_service.replace(bkn);\n\n this.event.emit({ reason: 'done', metadata: {setup, breakdown, notes} });\n this._dialog_ref.close();\n },\n (err) => {\n this._dialog_ref.disableClose = false;\n this.loading = false;\n }\n );\n } else {\n this._dialog_ref.close();\n }\n }\n}\n","
\n
Edit Private Details
\n \n
\n\n
\n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n {{ duration.name }}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
Updating private details...
\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking, generateBookingForm } from '@mckinsey-converge/data-common';\nimport { humaniseDuration, BaseDirective, DialogEvent } from '@mckinsey-converge/base';;\nimport { PrivateDetailsModalComponent } from '../private-details-modal/private-details-modal.component';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-private-details',\n templateUrl: './private-details.component.html',\n styleUrls: ['./private-details.component.scss'],\n})\nexport class MeetingPrivateDetailsComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n\n @Output() updateBooking = new EventEmitter();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n public get setup(): string {\n let setup = this.booking?.room_setup || this.booking.setup[this.space.email];\n return setup ? humaniseDuration(setup / 60) : '';\n }\n\n public get breakdown(): string {\n let breakdown = this.booking.room_breakdown ||this.booking.breakdown[this.space.email];\n return breakdown ? humaniseDuration(breakdown / 60) : '';\n }\n\n public get notes() {\n // return (this.booking.notes.find(note => note.type === 'private' && note.space === this.space.email) || {}).message;\n return (this.booking.notes.find(note => note.type === 'private' ) || {}).message;\n }\n\n constructor(private _dialog: MatDialog) {\n super();\n }\n\n ngOnInit(): void {\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved'; \n }\n\n public openPrivateDetailsModal() {\n const dialogRef = this._dialog.open(PrivateDetailsModalComponent, {\n data: {\n space: this.space,\n booking: this.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n\n this.subscription(\n 'modal_events',\n dialogRef.componentInstance.event.subscribe(async (event: DialogEvent) => {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n if (event.reason === 'done') {\n dialogRef.close();\n this.updateBooking.emit(event.metadata);\n }\n })\n );\n }\n}\n","
\n Private Details\n
\n
\n
\n \n
\n {{ setup }}\n
\n
\n
\n \n
\n {{ breakdown }}\n
\n
\n
\n \n
\n {{ notes || '<No Notes>' }}\n
\n
\n
\n","import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { Booking, BookingStateService, SeriesAction, RecurrencePeriod, BookingsService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from \"@mckinsey-converge/date-tz\"\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\n\n@Component({\n selector: 'meeting-recurring-details',\n templateUrl: './recurring-details.component.html',\n styleUrls: ['./recurring-details.component.scss'],\n})\nexport class MeetingRecurringDetailsDisplayComponent extends BaseDirective implements OnInit {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** helper for setLoading state of the parent modal */\n @Output() public confirmDelete: EventEmitter<{ series?: boolean}> = new EventEmitter<{}>();\n\n /** Whether the meeting is approved or not */\n public isApproved = false;\n \n private _recurrence_endTz: DateTZ;\n private _recurrence_startTz: DateTZ;\n private _recurrence_period: RecurrencePeriod;\n private _recurrence_interval: number;\n private _occurrence_details: { id: string, start_epoch: number, dateTz?: DateTZ }[];\n private _specific_dates: boolean = false;\n private _master_booking: Booking;\n public expired_ocurrences: Array = [];\n\n constructor(\n private _booking_state: BookingStateService,\n private _dialog: MatDialog,\n private _bookings: BookingsService\n ) {\n super()\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'detail_bookings',\n this._booking_state.bookings.subscribe(async (bookings) => {\n\n const booking = bookings.find(bkn => { \n if(this.booking.recurrence_type === 'master')\n return bkn.recurrence_master_id === this.booking.icaluid;\n else \n return bkn.icaluid === this.booking.icaluid ;\n }) || this.booking;\n // if (!booking && this.booking.recurrence_type !== 'master') {\n // return;\n // }\n \n\n this.master_booking = ( this.booking.recurrence_type === 'occurrence' && booking\n ? bookings.filter(bkg => bkg.id === booking.recurrence_master_id)\n : this.booking.recurrence_type === 'master' ? [this.booking] \n : booking \n ? [booking]\n : []\n )?.shift();\n\n if (!this.master_booking) {\n this.master_booking = await this._bookings.show(booking.recurrence_master_id);\n this._booking_state.add(this.master_booking);\n }\n\n this.recurrence_endTz = this.master_booking.recurrenEndFromOcurrences(this.master_booking.occurrence_details);\n this.recurrence_startTz = new DateTZ({date: this.master_booking.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone});\n this.recurrence_period = this.master_booking.recurrence_period;\n this.recurrence_interval = this.master_booking.recurrence_interval;\n this.occurrence_details = this.master_booking.occurrence_details && this.master_booking.occurrence_details\n .filter(ocurrence => ocurrence.id !== this.master_booking.id)\n .map(ocurrence => ({ ...ocurrence, start_epoch: ocurrence.start_epoch * 1000, dateTz: new DateTZ({ date: ocurrence.start_epoch * 1000, is_local_tz: false, building_tz: this.master_booking.timezone }) }));\n const occurrence_ids = this.master_booking?.occurrence_details.map(ocurr => ocurr.id) || []\n this.expired_ocurrences = bookings.filter(booking => {\n if(occurrence_ids.includes(booking.id)){\n const building_tz = this.master_booking.timezone\n const date = (booking.start_epoch * 1000) + (booking.duration * 60000)\n const start = new DateTZ({date, is_local_tz: false, building_tz})\n const now = DateNow(new Date()).toZone(building_tz)\n return now.isAfterDate(start, 'minute')\n }\n return false\n })\n })\n );\n this.isApproved = this.booking.status === 'accepted' || this.booking.status === 'approved';\n }\n\n public set recurrence_startTz(date: DateTZ) {\n this._recurrence_startTz = date\n }\n\n public get recurrence_startTz():DateTZ {\n return this._recurrence_startTz\n }\n\n public set recurrence_endTz(date: DateTZ) {\n this._recurrence_endTz = date\n }\n\n public get recurrence_endTz(): DateTZ {\n return this._recurrence_endTz\n }\n\n public set recurrence_period(period: RecurrencePeriod) {\n this._recurrence_period = period;\n }\n\n public get recurrence_period():RecurrencePeriod {\n return this._recurrence_period;\n }\n\n public set recurrence_interval(interval: number) {\n this._recurrence_interval = interval;\n }\n\n public get recurrence_interval():number {\n return this._recurrence_interval;\n }\n\n public set occurrence_details(occurrences: { id: string, start_epoch: number }[]) {\n this._occurrence_details = occurrences;\n }\n\n public get occurrence_details(): { id: string, start_epoch: number }[] {\n return this._occurrence_details;\n }\n\n public set specific_dates(val: boolean) {\n this._specific_dates = val;\n }\n\n public get specific_dates(): boolean {\n return this._specific_dates;\n }\n\n public set master_booking(bkng: Booking) {\n this._master_booking = bkng;\n }\n\n public get master_booking():Booking {\n return this._master_booking;\n }\n\n public toggleSpecificDates() {\n this.specific_dates = !this.specific_dates;\n }\n\n public async editSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(true), //we want to send the master booking since it's the one with all of the series data\n action: SeriesAction.EDIT,\n timezone: localStorage.getItem('CONCIERGE.timezone')\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n }); \n }\n\n public async cloneSeries() {\n this._dialog.open(BookingModalComponent, {\n data: {\n booking: this.master_booking.duplicate(),\n action: SeriesAction.CLONE\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public async cancelSeries() {\n this.confirmDelete.emit({ series: true });\n }\n}\n","
\n
\n
\n
\n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Days' : 'Day'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Weeks' : 'Week'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs every {{recurrence_interval > 1 ? recurrence_interval + ' Months' : 'Month'}} effective {{recurrence_startTz.formatDate('dd MMM yyyy')}} until {{recurrence_endTz.formatDate('dd MMM yyyy')}}\n \n \n This is one occurrence in a recurring series which occurs on\n
\n
\n
\n
{{ occurrence.dateTz.formatDate('dd MMM yyyy') }}
\n
\n
\n
\n
\n
\n
\n \n
\n
\n\n \n \n \n\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport {\n Booking,\n generateBookingForm\n} from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { RequirementDetailsModalComponent, RequirementDetailsModalData } from '@mckinsey-converge/legacy-overlays';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'meeting-details-requirements',\n templateUrl: './requirements.component.html',\n styleUrls: ['./requirements.component.scss'],\n})\nexport class MeetingDetailsRequirementsComponent extends BaseDirective {\n /** Booking to display details */\n @Input() public booking: Booking;\n /** Space to display details */\n @Input() public space: Space;\n /** Emitter for changes to the booking */\n @Output() public bookingChange = new EventEmitter();\n /** Emitter for updating booking */\n @Output() public event = new EventEmitter();\n public roomNames: string;\n /** Whether to show all locations */\n public show_locations: boolean;\n\n /** Requirement notes */\n public get notes(): string {\n const note = this.booking.notes.find(\n (note) => note.type === 'equipment' && this.space.email === note.space\n );\n return (note ? note.message : '') || '';\n }\n\n /** Whether booking has been declined or ended */\n public get expired(): boolean {\n return this.booking.timeBasedStatusLabel === 'done' || this.booking.declined;\n }\n\n public get headcount(): any{\n const temp = this.booking.multi_rooms.filter(room => room.email === this.space.email)[0]['email'];\n return this.booking.headcount || this.booking.expected_attendees[temp];\n }\n\n constructor(private _dialog: MatDialog, private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void {\n this.roomNames = this.booking.local_room_name;\n }\n\n /** Open modal for adding equipment requirements to booking */\n public openEquipmentDetailsModal() {\n const form = generateBookingForm(this.booking, ['space_list'], true);\n const ref = this._dialog.open<\n RequirementDetailsModalComponent,\n RequirementDetailsModalData\n >(RequirementDetailsModalComponent, {\n maxWidth: '95vw',\n width: '32em',\n data: {\n spaces: form.controls.space_list.value,\n notes_field: form.controls.notes,\n codes_field: form.controls.equipment_codes,\n head_counts_field: form.controls.expected_attendees,\n standalone: true\n }\n });\n this.subscription(\n 'modal_events',\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.close();\n this.event.emit(form);\n }\n })\n );\n }\n}\n","
\n Room Requirements\n
\n
\n
\n
\n
\n
\n {{ roomNames || space.local_name }}\n
\n \n
\n
\n
\n \n
\n \n {{\n headcount\n }}\n
\n
\n
\n \n
\n {{\n booking.equipment_code || (booking.equipment_codes || {})[\n space.email || booking.room.email\n ] || 'No Charge Code'\n }}\n
\n
\n
\n \n
\n {{ notes }}\n
\n
\n
\n\n","import { Component, Input, SimpleChanges, ChangeDetectionStrategy } from '@angular/core';\nimport { map } from 'rxjs/operators';\n\nimport { Booking, Space } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nimport { timePeriodsIntersect } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-day-display',\n templateUrl: './day-display.component.html',\n styleUrls: ['./day-display.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewDayDisplayComponent extends BaseDirective {\n /** Date to display bookings for */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** List of spaces to display bookings for */\n @Input() public spaces: Space[];\n /** Whether the date set is today */\n public isToday: boolean = false;\n /** List of bookings for this date */\n public readonly booking_list = this._booking_state_service.filtered_week.pipe(\n map((bookings) => {\n const date = this.dateTz.startOfValue('day');\n /**\n * Before the dateTz refactor timePeriodsIntersect would show bookings on the wrong day\n * because this.dateTz did not have the building timezone\n */\n return bookings.filter((booking) => {\n const ignore = booking.is_recurrent && booking.recurrence_type === 'master';\n return (\n !ignore &&\n // this.spaces.find((space: Space) => space.email === booking.room.email) &&\n // Check if any room in booking.multi_rooms satisfies the condition with any space in this.spaces\n booking.multi_rooms.some(room => \n this.spaces.find((space: Space) => space.email === room.email)\n ) &&\n timePeriodsIntersect(\n date.ms,\n date.endOfValue('day').ms,\n booking.startDateTz.ms,\n booking.endDateTz.ms\n )\n );\n });\n })\n );\n\n /** Display string for the set date */\n public get date_display(): string {\n return this.dateTz.formatDate('EEE, dd MMM yyyy');\n }\n\n constructor(private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.dateTz) {\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.dateTz.building_tz })\n this.isToday = this.dateTz.isSameDate(now, 'day');\n }\n if (changes.spaces) {\n this.timeout('changed', () => this._booking_state_service.setFilters(this._booking_state_service.filters), 100);\n }\n }\n\n /**\n * Track by function for ngFor optimisation\n * @param index Index of the item\n * @param item Data associated with the item at the given index\n */\n public trackByFn(index: number, item: Booking) {\n return item.id || index;\n }\n}\n","
\n
{{ date_display }}
\n
Today
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
No events for {{ date_display }}
\n
\n
\n","import { Component, Input, ChangeDetectionStrategy, OnInit, ChangeDetectorRef} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { MeetingDetailsModalComponent } from 'src/app/calendar/meeting-details-modal/meeting-details-modal.component';\n\n@Component({\n selector: 'week-view-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WeekViewItemComponent implements OnInit{\n @Input() public event: Booking;\n\n public type: string = '';\n\n constructor(private _dialog: MatDialog) {}\n\n public ngOnInit() {\n this.type = this.event.getType();\n }\n\n /**\n * Open modal to view bookings details\n */\n public viewMeetingDetails() {\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: this.event.space,\n booking: this.event\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n })\n }\n}\n","\n
\n
{{ event.all_day ? 'All Day' : event.time_period }}
\n
\n \n \n
\n
\n
\n
\n \n
{{ event.organiser?.name }}
\n
\n
\n \n
\n {{ event.space?.local_name || event.local_room_name }}\n
\n
\n
\n \n
{{ event.attendees?.length || '0' }}
\n
\n
0\">\n \n
{{ event.company.length }}
\n
\n
\n\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'week-view-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class WeekViewTimelineComponent extends BaseDirective implements OnInit {\n /** Timestamp of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active level */\n @Input() public level: string;\n /** ID of the room type to filter displayed spaces by */\n @Input() public space_type: string;\n /** Whether weekends are displayed */\n @Input() public weekends: boolean;\n /** Whether space bookings are being loaded */\n @Input() public loading: boolean;\n /** List of dates to display */\n public dateListTz: DateTZ[] = [];\n /** List of spaces to display bookings for */\n public space_list: Space[] = [];\n\n constructor(private _spaces: SpacesService, private _booking_state_service: BookingStateService) {\n super();\n }\n\n public ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingWeek();\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n });\n\n this.subscription(\n 'spaces',\n this._spaces.listen('list').subscribe((spaces) => {\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz || changes.weekends || changes.level || changes.space_type) {\n this.dateListTz = this.generateDatesTz(this.dateTz, this.weekends);\n this.space_list = this._spaces.filter(\n (space) =>\n space.zones.includes(this.level) &&\n ( (!this.space_type || space.zones.includes(this.space_type)) || ( [space.room_type].indexOf(this.space_type) >= 0) )\n );\n }\n }\n\n public ngOnDestroy() {\n if (this._booking_state_service?.stopPolling) this._booking_state_service?.stopPolling();\n }\n\n /**\n * Generate list of dates to display\n * @param dateTz Currently selected date\n * @param weekends Whether weekends should be included\n */\n private generateDatesTz(dateTz: DateTZ, weekends: boolean = false): DateTZ[] {\n const list: DateTZ[] = [];\n // start of day takes midnight to the previous day issue\n let day = dateTz.addValue({ minutes: 5 }).startOfValue('day');\n let start = day.startOfValue('week');\n let end = start.endOfValue('week').addValue({ minutes: 15 });\n while (start.isBeforeDate(end)) {\n if ((start.dateWeekday !== 6 && start.dateWeekday !== 7) || weekends) {\n list.push(start);\n }\n start = start.addValue({ days: 1 });\n }\n\n return list;\n }\n \n}\n","
\n
\n \n
\n \n
\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Identity } from '@mckinsey-converge/base';\nimport { BookingModalComponent } from 'src/app/bookings/booking-modal/booking-modal.component';\nimport { Booking, BookingsService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService, BuildingLevel } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\nimport { AlertMode } from '@mckinsey-converge/ui';\nimport { MeetingDetailsModalComponent } from '../meeting-details-modal/meeting-details-modal.component';\nimport { Subscription } from 'rxjs/internal/Subscription';\n\n@Component({\n selector: 'a-week-view',\n templateUrl: './week-view.component.html',\n styleUrls: ['./week-view.component.scss'],\n})\nexport class WeekViewComponent extends BaseDirective implements OnInit {\n /** Currently selected date, starts out with no timezone data, gets updated later */\n public dateTz: DateTZ = DateNow(new Date());\n /** Whether weekends are displayed */\n public weekend: boolean;\n /** ID of the currently selected level */\n public active_level: string = '';\n /** ID of the currently selected level */\n public active_type: string = '';\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n public banner_mode = AlertMode.Error;\n public undo_action: 'series' | 'booking';\n private _undo_timer: any;\n\n public get building() {\n return this._org.building;\n }\n\n public has_access: boolean;\n private spaceTypesSubscription: Subscription;\n \n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog,\n private _router: Router,\n private _route: ActivatedRoute\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n if( this._service.get('active_type') !== null && this._service.get('active_type').hasOwnProperty('length')) {\n this.active_type = this._service.get('active_type');\n }\n\n this._service.title = 'Week View';\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('level') && this.active_level !== params.get('level')) {\n const level = this._org.levelWithID(params.get('level'));\n /* istanbul ignore else */\n if (level) {\n const building = this._org.buildings.find(\n (bld) => bld.id === level.building_id\n );\n /* istanbul ignore else */\n if (building) {\n this.active_level = level.id;\n this._org.building = building;\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n }\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n this._booking_state_service.updateRoomList();\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if(!this.has_access) return\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = (building.levels[0] || { id: '' }).id;\n this.updateLevel();\n }\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(building.levels);\n this.levels.sort((a, b) => b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n }));\n\n //\n const spaceTypeOptions = this._org.getRoomFilterOptionsPerLocation();\n\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n spaceTypeOptions,\n this._org.space_types\n );\n\n if (this._org.spaceTypesObservable) {\n this.spaceTypesSubscription = this._org.spaceTypesObservable.subscribe(\n (spaceTypes) => {\n this.space_types = [\n { id: '', name: 'All Space Types' } as any,\n ...spaceTypeOptions\n ].concat(spaceTypes);\n }\n );\n }\n })\n );\n this.subscription(\n 'week_view_undo',\n this._service.get('undo').subscribe(undo => {\n if (!undo)\n return\n\n if (this.undo_action) {\n this.undo_action = null;\n clearTimeout(this._undo_timer);\n }\n\n this._booking_state_service.attentToDelete(undo.booking, undo.action);\n this.undo_action = undo.action;\n\n this._undo_timer = setTimeout(() => {\n this._service.get('undo').next(null);\n this.undo_action = null;\n }, 15000);\n })\n );\n });\n }\n\n public ngOnDestroy(): void {\n if (this._service.get('undo').getValue()) {\n this._service.get('undo').next(null);\n }\n if (this.spaceTypesSubscription) {\n this.spaceTypesSubscription.unsubscribe();\n }\n }\n\n updateSpaceSelection(){\n this._service.set('active_type', this.active_type);\n }\n\n public newMeeting() {\n this._dialog.open(BookingModalComponent, {\n data: { timezone: this.timezone },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this._router?.url?.includes('/week-view') && this._router.navigate(['/week-view', this.active_level]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public hideBanner() {\n this.undo_action = null;\n }\n\n public async undoBooking(): Promise {\n const { action, booking } = this._service.get('undo').getValue();\n if (!booking)\n return;\n\n await booking.undo('accept', action === 'series' ? { series: true } : {});\n this._booking_state_service.attentToDelete(booking, action, true);\n this._service.get('undo').next(null);\n this.undo_action = null;\n this._undo_timer = null;\n\n this._dialog.open(MeetingDetailsModalComponent, {\n maxWidth: 'calc(100vw - 2em)',\n data: {\n space: booking.space,\n booking: booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n}\n","
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n 1\" appearance=\"outline\">\n \n \n {{ level?.name }}\n \n \n \n 1\" appearance=\"outline\">\n \n \n {{ type?.name }}\n \n \n \n \n Show Weekends\n \n
\n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Route } from '@angular/router';\n\nimport { WeekViewComponent } from './week-view.component';\nimport { WeekViewTimelineComponent } from './timeline/timeline.component';\nimport { SharedContentModule } from 'src/app/shared/shared.module';\nimport { WeekViewDayDisplayComponent } from './day-display/day-display.component';\nimport { WeekViewItemComponent } from './day-display/item/item.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: WeekViewComponent },\n { path: ':level', component: WeekViewComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [WeekViewComponent, WeekViewTimelineComponent, WeekViewDayDisplayComponent, WeekViewItemComponent],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, RouterModule.forChild(ROUTES), SharedContentModule, UiModule]\n})\nexport class WeekViewModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService, Building, CateringMenuService, CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { BehaviorSubject } from 'rxjs';\nimport { CateringStorage } from 'src/app/catering/catering.storage';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-catering',\n templateUrl: './catering.component.html',\n styleUrls: ['./catering.component.scss']\n})\nexport class CateringComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Name of the page to display */\n public page: string;\n /** Filter string for searching */\n public search_str: string;\n /** Toggle for new category modal */\n public category: number = 0;\n /** Toggle for new package modal */\n public package: number = 0;\n /** Number of categories being displayed */\n public length: number;\n /** Order type to filter by */\n public order_type: string = '';\n\n public orderDetailsExpanded = new BehaviorSubject(false);\n\n public has_access: boolean;\n menuWithOthers: any[]=[];\n allCategories: any[] = [\n { display: 'All orders', value: '', meta: { childItems: [] } },\n { display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n { display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n ];\n otherCategories: any[];\n public isClosed: boolean = false;\n\n public selectedSort: { display: string; value: string; meta: {}; } = { display: 'All orders', value: '', meta: { childItems: [] } };\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService,\n private cateringStorage: CateringStorage,\n private _menu: CateringMenuService,\n ) {\n super();\n this.orderDetailsExpanded.next(cateringStorage.orderDetails);\n }\n\n\n public ngOnInit(): void {\n\n\n\n this.subscription('orderDetailsExpand', this.orderDetailsExpanded.subscribe(value => {\n this.cateringStorage.orderDetails = value;\n }));\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.category = 0;\n this._service.title = 'Catering';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('page')) {\n this.page = params.get('page');\n }\n })\n );\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n\t\t\t\t\t\t\t\t\t\tthis.allCategories = [\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'All orders', value: '', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Pantry Only', value: 'pantry', meta: { childItems: [] } },\n\t\t\t\t\t\t\t\t\t\t\t{ display: 'Kitchen only', value: 'kitchen', meta: { childItems: [] } }\n\t\t\t\t\t\t\t\t\t\t];\n this.loadAllCategory();\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id }\n });\n })\n );\n });\n\n\n\n }\n\n\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n\n\n public mainCategorySelected(event, sortingValue) {\n if(!event.target.classList.contains('child')) {\n this.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n }\n\t}\n public selectSubcategory(event, sortingValue) {\n\t\tthis.selectedSort = sortingValue;\n this.order_type = this.selectedSort.value;\n\t}\n\n public loadAllCategory() {\n\n // this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n // this.length.emit(this.catering_menu.length);\n const filtered_menu = this.filter(this.catering_menu);\n\n this.otherCategories = filtered_menu.filter(mailEl => {\n\n var isThere = mailEl.items.filter(subEl => {\n if(subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\") {\n\n this.menuWithOthers.push({ value: subEl.name.toLowerCase(), display: subEl.name, meta: { parent: mailEl.name.toLowerCase() } })\n }\n return subEl.catering_type !== \"kitchen\" && subEl.catering_type !== \"pantry\";\n } );\n return !!isThere.length;\n });\n this.otherCategories.map(el => this.allCategories.push({ display: el.name, value: el.name.toLowerCase(), meta: { childItems: [] } }) );\n\n this.menuWithOthers.forEach(el => {\n this.allCategories.forEach(e => {\n if(e.value === el.meta.parent){\n e.meta['childItems'].push(el);\n }\n \t})\n });\n\n\n // console.log(this.allCategories);\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadAllCategory()\n );\n // this.loading = false;\n }\n );\n }\n\n\n\n\n public get timezone() {\n return this._org.building.timezone;\n }\n\n}\n","
\n\t\n\t
\n\t\t\t\n\t
\n\t
\n\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{{selectedSort.display}}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
{{mainCaterory.display}}
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t\t
\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tOrder Details\n\t\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

Catering Orders

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tView catering orders and their statuses upon arrival\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n Route,\n RouterModule\n} from '@angular/router';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport { CateringComponent } from './catering.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { CateringOrdersComponent } from './orders/orders.component';\nimport { CateringMenuComponent } from './menu/menu.component';\nimport { CateringMenuItemListComponent } from './menu/item-list/item-list.component';\nimport { CateringCategoryModalComponent } from './overlays/category-modal/category-modal.component';\nimport { CateringGroupModalComponent } from './overlays/group-modal/group-modal.component';\nimport { CateringItemModalComponent } from './overlays/item-modal/item-modal.component';\nimport { CateringOrdersItemComponent } from './orders/item/item.component';\nimport { OrderDetailsModalComponent } from './overlays/order-details-modal/order-details-modal.component';\nimport { OrderDetailsItemsComponent } from './overlays/order-details-modal/items/items.component';\nimport { OrderBookingDetailsComponent } from './overlays/order-details-modal/booking-details/booking-details.component';\nimport { OrderDetailsNotesComponent } from './overlays/order-details-modal/messages/messages.component';\nimport { CateringStorage } from './catering.storage';\nimport { CateringMenuOrderComponent } from './menu/item/item.component';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { BaseModule } from '@mckinsey-converge/base';\nimport { BookingsModule } from '../bookings/bookings.module';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst ROUTES: Route[] = [\n { path: '', component: CateringComponent },\n { path: ':page', component: CateringComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [\n CateringComponent,\n CateringOrdersComponent,\n CateringMenuComponent,\n CateringMenuItemListComponent,\n CateringCategoryModalComponent,\n CateringGroupModalComponent,\n CateringItemModalComponent,\n CateringOrdersItemComponent,\n OrderDetailsModalComponent,\n OrderDetailsItemsComponent,\n OrderBookingDetailsComponent,\n OrderDetailsNotesComponent,\n CateringMenuOrderComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n LegacyOverlaysModule,\n BaseModule,\n BookingsModule,\n UiModule\n ],\n providers: [CateringStorage],\n exports: [BaseModule]\n})\nexport class CateringModule {\n}\n","import { LocalStorageWrapper } from '@mckinsey-converge/storage';\n\nexport class CateringStorage extends LocalStorageWrapper {\n\n private static orderDetailsKey = 'order-details';\n\n constructor() {\n super('CATERING');\n }\n\n public set orderDetails(value: boolean) {\n this.setValue(CateringStorage.orderDetailsKey, value + '');\n }\n\n public get orderDetails(): boolean {\n const value = this.getValue(CateringStorage.orderDetailsKey);\n return value === 'true';\n }\n\n public removeOrderDetails() {\n this.removeValue(CateringStorage.orderDetailsKey);\n }\n}\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu-item-list',\n templateUrl: './item-list.component.html',\n styleUrls: ['./item-list.component.scss'],\n})\nexport class CateringMenuItemListComponent extends BaseDirective implements OnChanges {\n /** Category to display details for */\n @Input() public category: CateringCategory;\n /** Toggle for new groups */\n @Input() public package: number;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _dialog: MatDialog, private _org: OrganisationService) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.package && this.package) {\n this.openGroupModal();\n }\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({\n parent_id: this.category.id,\n zones: [this.building.id],\n });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: this.category },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'category_modal',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.category.items.findIndex(\n (item) => event.metadata.id === item.id\n );\n if (index >= 0) {\n (this.category.items as any[]).splice(index, 1, event.metadata);\n } else {\n (this.category.items as any[]).push(event.metadata);\n }\n }\n })\n );\n }\n}\n","
\n \n
\n \n
\n
\n
\n\n
\n
\n \n
\n
No packages or sub-categories for {{ category.name }}
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringGroupModalComponent } from '../../overlays/group-modal/group-modal.component';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent } from '@mckinsey-converge/legacy-overlays';\nimport { CateringComponent } from '../../catering.component';\nimport { DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { CateringItemModalComponent } from '../../overlays/item-modal/item-modal.component';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-order-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class CateringMenuOrderComponent extends BaseDirective {\n /** Whether item is a child of another */\n @Input() public subitem: boolean;\n /** Item to display */\n @Input() public item: CateringCategory;\n /** Parent of the item being displayed */\n @Input() public parent: CateringCategory;\n /** Whether item should be disabled if not available anytime */\n @Input() public disabled: boolean;\n /** Whether to show children items */\n public show_children: boolean;\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n public get symbol(): string {\n return this.building.currency;\n }\n\n constructor(\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _org: OrganisationService,\n private _menu_items: CateringItemsService,\n private _menu_categories: CateringCategoriesService\n ) {\n super();\n }\n\n public openGroupModal(group?: CateringCategory) {\n /* istanbul ignore else */\n if (!group) {\n group = new CateringCategory({ parent_id: this.item.id, zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringGroupModalComponent, {\n data: { group, parent: group.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(group, event.metadata);\n }\n })\n );\n }\n\n public openItemModal(item?: CateringItem) {\n /* istanbul ignore else */\n if (!item) {\n item = new CateringItem({ parent_id: this.item.id });\n }\n const ref = this._dialog.open(CateringItemModalComponent, {\n data: { item, parent: item.id ? this.parent : this.item },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'item-modal',\n ref.componentInstance.event.subscribe((event) => {\n if (event.reason === 'done' && event.metadata) {\n this.updateItemList(item, event.metadata);\n }\n })\n );\n }\n\n private updateItemList(old_item: CateringItem | CateringCategory, new_item: HashMap) {\n const item =\n old_item instanceof CateringCategory\n ? new CateringCategory(new_item)\n : new CateringItem(new_item);\n if (old_item.id) {\n const index = this.parent.items.findIndex((itm) => itm.id === old_item.id);\n (this.parent.items as any[]).splice(index, 1, item);\n (this.parent as any).items = [...this.parent.items];\n } else {\n (this.item.items as any[]).push(item);\n }\n }\n\n public deleteItem() {\n const type =\n this.item.is_category\n ? this.item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item';\n const ref = this._dialog.open(ConfirmModalComponent, {\n data: {\n title: `Delete catering ${type}`,\n content: `Are you sure you want to delete the catering ${type} \"${\n this.item.name\n }\"?
${\n this.item instanceof CateringCategory\n ? 'Any children items or groups will be immediately deleted'\n : ''\n }`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${type}...`;\n let e = null;\n let service =\n this.item.is_category\n ? this._menu_categories\n : this._menu_items;\n await service.delete(this.item.id).catch((err) => e = err || 'Error');\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n } else {\n this._service.notifyError(`Error deleting ${type}.`);\n }\n }\n });\n }\n}\n","
\n
\n
\n
{{ item.name }}
\n
{{ item.package ? '[Package] ' : '' }}{{ item.description }}
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n
\n
\n
\n {{ item.unit_price / 100 | currency: symbol }}\n
\n \n \n \n \n\n
\n \n
\n\n \n \n \n \n \n
\n \n
\n Edit\n {{\n item.items.length || item.is_category\n ? subitem\n ? 'Group'\n : item.package\n ? 'Package'\n : 'Sub-category'\n : 'Item'\n }}\n
\n
\n \n \n
\n","import { Component, OnInit, Input, SimpleChanges, EventEmitter, Output } from '@angular/core';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CateringCategoryModalComponent } from '../overlays/category-modal/category-modal.component';\nimport { HashMap, DialogEvent } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { CateringMenuService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-catering-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class CateringMenuComponent extends BaseDirective implements OnInit {\n /** Filter string for catering items */\n @Input() public search: string;\n /** Opens new category modal on change */\n @Input() public category: number;\n /** Opens new category modal on change */\n @Input() public package: number;\n /** Emitter for changes to the length of catering categories */\n @Output() public length = new EventEmitter();\n /** List of top level catering categories */\n public catering_menu: CateringCategory[] = [];\n /** Filtered list of top level catering categories */\n public filtered_menu: CateringCategory[] = [];\n /** Whether menu details are being loaded */\n public loading: boolean;\n /** Index of the active tab */\n public index: number = 0;\n /** Map of indexes to package open state */\n public state: HashMap = {};\n\n /** Currently active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService, private _menu: CateringMenuService, private _dialog: MatDialog) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.set('DELETED.menu', '');\n this.subscription('deleted', this._service.listen('DELETED.menu').subscribe(id => this.removeFromMenu(id)));\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe((_) => {\n this.index = 0;\n this.catering_menu = [];\n this.filtered_menu = [];\n this.loadCateringMenu();\n })\n );\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.search) {\n this.filtered_menu = this.filter(this.catering_menu);\n }\n if (changes.category && this.category) {\n this.openCategoryModal();\n }\n if (changes.package) {\n this.state[this.index] = this.package;\n }\n }\n\n public openCategoryModal(category?: CateringCategory) {\n /* istanbul ignore else */\n if (!category) {\n category = new CateringCategory({ zones: [this.building.id] });\n }\n const ref = this._dialog.open(CateringCategoryModalComponent, { \n data: { category }, \n autoFocus: false,\n backdropClass: 'mck-modal-backdrop', \n });\n this.subscription('category_modal', ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n const index = this.catering_menu.findIndex(item => event.metadata.id === item.id);\n if (index >= 0) {\n this.catering_menu.splice(index, 1, event.metadata);\n this.index = index;\n } else {\n this.index = this.catering_menu.length;\n this.catering_menu.push(event.metadata);\n }\n }\n }));\n }\n\n /**\n * Remove item from the menu\n * @param id ID of the item to remove\n * @param list Menu items and categories\n */\n private removeFromMenu(id: string, list: CateringCategory[] = this.catering_menu, depth: number = 0) {\n if (list.length === 0 || depth > 4) { return false; }\n const found = list.findIndex(item => item.id === id);\n if (found >= 0) {\n list.splice(found, 1);\n return true;\n } else {\n for (const item of list) {\n if (this.removeFromMenu(id, item.items as any, depth + 1)) { return true; }\n }\n }\n return false;\n }\n\n private loadCateringMenu(): void {\n /* istanbul ignore else */\n if (this.building) {\n this.loading = true;\n this._menu.query({ zone_id: this.building.id }).then(\n (menu: any[]) => {\n this.catering_menu = (menu || []).map((item) => new CateringCategory(item));\n this.length.emit(this.catering_menu.length);\n this.filtered_menu = this.filter(this.catering_menu);\n this.loading = false;\n },\n (err) => {\n this._service.notifyError(\n `Error loading menu for ${this.building.name}. Error: ${err.message | err}`,\n 'Retry',\n () => this.loadCateringMenu()\n );\n this.loading = false;\n }\n );\n }\n }\n\n /** Filter the list of catering items */\n private filter(list: CateringCategory[]) {\n return list;\n }\n}\n","
\n \n \n \n \n
\n
{{category?.name}}
\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Loading menu for {{ building?.name }}
\n
\n
\n\n
\n
\n \n
\n
No menu categories for {{ building?.name }}
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\n\nimport {\n CateringOrder,\n CateringOrderStatus,\n} from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { Identity, HashMap } from '@mckinsey-converge/base';\nimport { MatDialog } from '@angular/material/dialog';\nimport { OrderDetailsModalComponent } from '../../overlays/order-details-modal/order-details-modal.component';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-catering-orders-item',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND]\n})\nexport class CateringOrdersItemComponent implements OnChanges {\n /** Catering order details to display */\n @Input() public order: CateringOrder;\n /** Search filter string */\n @Input() public search: string;\n /** Whether order items should be shown */\n @Input()\n public show_items: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** Whether status is being updated */\n public loading: boolean;\n /** Mapping of items to the option selections */\n public readonly item_details: HashMap<{ amount: number, details: string }> = {};\n\n public showIndividualItem : boolean = false;\n\n public get search_matches(): HashMap {\n const map = {};\n const filter = this.search.toLowerCase();\n this.order.items.forEach((item) => {\n map[item.id] = item.name.toLowerCase().indexOf(filter) >= 0;\n });\n return map;\n }\n\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status) || ({} as any);\n }\n\n public get space(): Space {\n return this._spaces.find(this.order.location_id);\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n private _dialog: MatDialog\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.order && this.order) {\n this.active_status = this.order.status;\n this.updateItemDetails();\n }\n this.showIndividualItem = this.show_items;\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this.order.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this.order.id),\n 1,\n new CateringOrder({ ...this.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n }\n this.loading = false;\n }\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(): void {\n const dialogRef = this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: this.order,\n booking: this.order.booking,\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n private updateItemDetails() {\n for (const item of this.order.items) {\n if ((item as any).items) {\n const items = [];\n for (const sub_item of (item as any).items) {\n if (!sub_item.items.length && sub_item.amount) {\n items.push(sub_item)\n } else {\n for (const sub_sub_item of sub_item.items) {\n if (sub_sub_item.amount) {\n items.push(sub_sub_item)\n }\n }\n }\n }\n this.item_details[item.id] = {\n amount: items.length,\n details: `[${items.map(i => i.name).join(']\\n[')}]`\n };\n }\n }\n }\n\n public expandMore() {\n this.showIndividualItem = !this.showIndividualItem\n }\n}\n","
\n
\n
\n \n
\n
{{ order.deliver_at }}
\n
{{ space?.local_name || space?.simple_name || space?.settings?.room_name}}
\n
{{ order.booking?.organiser.name }}
\n
\n (K) Kitchen
\n (P) Pantry\n
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n\n
\n \n
\n \n
\n
\n
{{ item.name }}
\n \n {{ item_details[item.id]?.amount }}\n { item_details[item.id]?.amount, plural, =1 { Option } other { Options } }\n
\n
x {{ item.amount }}
\n
\n
\n \n \n\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { combineLatest, Subject } from 'rxjs';\nimport { filter, first, map } from 'rxjs/operators';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { OrderDetailsModalComponent } from '../overlays/order-details-modal/order-details-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport * as cloneDeep from 'lodash/cloneDeep';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'a-catering-orders',\n templateUrl: './orders.component.html',\n styleUrls: ['./orders.component.scss'],\n})\nexport class CateringOrdersComponent extends BaseDirective implements OnInit, OnChanges {\n /** Search filter string */\n @Input() public search: string = '';\n /** Currently selected date */\n @Input() public date: number;\n /** Type of order to show */\n @Input() public type: '' | 'Pantry' | 'Kitchen';\n\t\t@Input() public otherCategories: any[];\n @Input() public orderDetailsExpanded: boolean;\n\n\t\tpublic bookings = [];\n\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n /** List of catering orders for the selected date */\n public readonly orders = this._booking_state_service.filtered.pipe(\n map((bookings) => {\n let list: CateringOrder[] = [];\n bookings.forEach((booking, i) => {\n const catering = [...booking.catering]\n .map((order) => new CateringOrder({\n ...order,\n booking_date: booking.date,\n booking\n }));\n list = list.concat(catering);\n });\n list.sort((a, b) => a.booking_date - b.booking_date);\n return list;\n })\n );\n /** List of catering orders for the selected date */\n public filtered_orders = combineLatest([this.search$, this.orders]).pipe(\n map(([search, [...orders]]) => this.filter([...orders] || [], search || ''))\n );\n\n public display_orders: CateringOrder[] = [];\n /** Whether catering orders are loading */\n public readonly loading = this._booking_state_service.loading;\n\n /** Display string for the currenly selected date */\n public get date_display(): string {\n // R--- check if input can be changed since there is isSameDate calculations\n const date = new DateTZ({date: this.date});\n const now = DateNow(new Date())\n return now.isSameDate(date, 'day') ? 'Today' : date.formatDate('dd MMM yyyy');\n }\n\n /** Active building */\n public get building(): Building {\n return this._org.building;\n }\n\n constructor(\n private _spaces: SpacesService,\n private _booking_state_service: BookingStateService,\n private _org: OrganisationService,\n private _route: ActivatedRoute,\n private _dialog: MatDialog\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._booking_state_service.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .pipe(filter((bld) => !!bld))\n .subscribe(() => {\n this._booking_state_service.setZone(this._org.building.id);\n })\n );\n this.subscription(\n 'orders',\n this.filtered_orders.subscribe((orders) => {\n this.display_orders = orders.sort((a ,b) => {\n const date = new DateTZ({date: a.booking.date}).formatDate('yyyy/MM/dd');\n\n return Date.parse(`${date} ${a.deliver_at_time.slice(0, -2)} ${a.deliver_at_time.slice(-2)}`) - Date.parse(`${date} ${b.deliver_at_time.slice(0, -2)} ${b.deliver_at_time.slice(-2)}`)\n }\n )})\n )\n this.subscription(\n 'route.query',\n this._route.queryParamMap.subscribe((params) => {\n /* istanbul ignore else */\n if (params.has('view')) {\n const view_id = params.get('view');\n const details = localStorage.getItem('CONCIERGE.view_order');\n const booking_details = localStorage.getItem('CONCIERGE.view_booking');\n /* istanbul ignore else */\n if (details) {\n const booking = new Booking(JSON.parse(booking_details));\n const order = new CateringOrder(JSON.parse(details));\n order.booking = booking;\n this.viewOrderDetails(order);\n localStorage.removeItem('CONCIERGE.view_order');\n localStorage.removeItem('CONCIERGE.view_booking');\n }\n }\n })\n );\n this.search$.next(this.search);\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.search || changes.type) {\n this.search$.next(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, order: CateringOrder) {\n return order ? order.id : index;\n }\n\n /** Open modal to view catering order details */\n public viewOrderDetails(order: CateringOrder): void {\n this._dialog.open(OrderDetailsModalComponent, {\n maxHeight: '95vh',\n maxWidth: '95vw',\n data: {\n order: order,\n booking: order.booking\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n }\n\n /**\n * Filter list to find matching items\n * @param list List of orders to filter\n * @param search Filter string\n\t\t * TO DO : refactor ==>\n */\n private filter(list: CateringOrder[], search: string = '') {\n\t\t\t// Create a deep clone of the original list to avoid modifying the original data\n\t\t\tconst orders = cloneDeep(list);\n\t\t\t// Determine the filter criteria based on the search string or predefined type\n\t\t\tconst filter = search !== '' ? search.toLowerCase() : this.type ? this.type : '';\n\n\t\t\t// Check if 'otherCategories' is defined and if there are matching categories\n\t\t\tconst isOtherCategory = this.otherCategories ? this.otherCategories.filter(el => el.name.toLowerCase() === filter) : [];\n\t\t\tlet orderList = [];\n\n\t\t\t// If there are matching 'otherCategories', filter orders accordingly\n\t\t\tif(isOtherCategory.length) {\n\t\t\t\tconst result = this.filterOrdersByCategory([...orders], isOtherCategory[0]).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n\t\t\t\treturn orderList;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// No matching 'otherCategories', filter orders based on the general criteria\n\t\t\t\torderList = list;\n\t\t\t\tif(filter !== '') {\t\n\t\t\t\t\tconst result = this.filterOrdersByCategoryType([...orders], filter).filter(el => el.hasOwnProperty('booking'));\n\t\t\t\t\torderList = \t[...result].map((order) => new CateringOrder({ ...order }));\n // If no orders match the category type, attempt to search by item names, booker or room name\n if (orderList.length === 0) {\n const itemSearchResults = this.filterOrdersByItemName([...orders], filter);\n orderList = [...itemSearchResults];\n }\n\t\t\t\t}\n\t\t\t\treturn orderList;\n\t\t\t}\n }\n\n private filterOrdersByItemName(orders: CateringOrder[], search: string): CateringOrder[] {\n const filteredOrders: CateringOrder[] = [];\n \n orders.forEach(order => {\n const matchingItems = this.findItemsMatchingSearch(order.items, search);\n // Check if the order's location or organiser name matches the search\n const locationMatches = order.location?.toLowerCase().includes(search);\n const organiserMatches = order.booking?.organiser?.name?.toLowerCase().includes(search);\n \n if (matchingItems.length > 0 || locationMatches || organiserMatches) {\n const newOrder = new CateringOrder({\n ...order,\n items: matchingItems.length > 0 ? matchingItems : order.items,\n });\n filteredOrders.push(newOrder);\n }\n });\n \n return filteredOrders;\n }\n \n private findItemsMatchingSearch(items: any, search: string): any[] {\n const matchingItems = [];\n \n items.forEach(item => {\n let itemMatches = false;\n \n // Check if the item's name matches the search\n if (item.name?.toLowerCase().includes(search)) {\n itemMatches = true;\n }\n \n // Recursively check sub-items\n let subItems = [];\n if (item.items && item.items.length > 0) {\n subItems = this.findItemsMatchingSearch(item.items, search);\n if (subItems.length > 0) {\n itemMatches = true;\n }\n }\n \n if (itemMatches) {\n // If item matches, include it in the results\n const newItem = {\n ...item,\n items: subItems.length > 0 ? subItems : item.items,\n };\n matchingItems.push(newItem);\n }\n });\n return matchingItems;\n }\n\n\t\t// Function to filter orders based on specified categories\n\t\tfilterOrdersByCategory(orders, categories) {\n\t\t\tconst filteredOrders = [];\n\t\t\n\t\t\tfunction findMatchingOrders(order, categories) {\n\t\t\t\tif (order.items) {\n\t\t\t\t\tconst matchingItems = order.items.filter(item => {\n\t\t\t\t\t\tconst categoryName = findCategoryName(item.name, categories);\n\t\t\t\t\t\treturn categoryName !== null;\n\t\t\t\t\t});\n\t\t\n\t\t\t\t\tif (matchingItems.length > 0) {\n\t\t\t\t\t\tfilteredOrders.push({ ...order, items: matchingItems });\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\torder.items.forEach(subOrder => findMatchingOrders(subOrder, categories));\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\torders.forEach(order => findMatchingOrders(order, categories));\n\n\t\t\t// Function to find the category name for a given item name within the specified categories\n\t\t\tfunction findCategoryName(itemName, categories) {\n\t\t\t\tif(categories?.items !== undefined) {\n\t\t\t\t\tfor (const category of categories.items) {\n\t\t\t\t\t\tif (category.name === itemName) {\n\t\t\t\t\t\t\treturn category.name;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\tif (category.items) {\n\t\t\t\t\t\t\tconst subCategoryName = findCategoryName(itemName, category);\n\t\t\t\t\t\t\tif (subCategoryName) {\n\t\t\t\t\t\t\t\treturn subCategoryName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\n\t\t\treturn filteredOrders;\n\t\t}\n\n\t\t// Function to filter orders based on specified category type\n\t\tfilterOrdersByCategoryType(orders, categoryType) {\n\n\t\t\tconst filteredOrders = [];\n\n\t\t\tfunction filterMatchingItems(items) {\n return items\n .map(item => {\n if (item.catering_type === categoryType) {\n return { ...item };\n } else if (item.items) {\n const filteredSubItems = filterMatchingItems(item.items);\n if (filteredSubItems.length > 0) {\n return { ...item, items: filteredSubItems };\n } else {\n return null;\n }\n } else {\n return null;\n }\n })\n .filter(item => item !== null);\n }\n \n\t\t\torders.forEach(order => {\n\t\t\t\tconst filteredItems = filterMatchingItems([order]);\n\t\t\t\tif (filteredItems.length > 0) {\n\t\t\t\t\tfilteredOrders.push({ ...order , items: filteredItems[0].items});\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t\treturn filteredOrders;\n\t\t\t\n\t\t}\n\t\t\n}\n\nfunction flatten(arr) {\n\treturn arr.reduce(function (flat, toFlatten) {\n\t\treturn flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);\n\t}, []);\n}\n","
\n \n
\n
\n
\n
Time
\n
Location
\n
Host
\n
Package Types
\n
Status
\n
\n
\n \n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
No catering orders for {{ date_display }}
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\nimport { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\n\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport { ConfirmModalComponent, CONFIRM_METADATA } from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringCategoryModalData {\n /** Category to edit */\n category: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-category-modal',\n templateUrl: './category-modal.component.html',\n styleUrls: ['./category-modal.component.scss'],\n})\nexport class CateringCategoryModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n\n public get category(): CateringCategory {\n return this._data.category;\n }\n\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n public disabled: boolean = true\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringCategoryModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n admin_only: new FormControl(this.category.admin_only),\n restricted_from: new FormControl(this.category.restricted_from, Validators.pattern('[-_0-9]*')),\n });\n\n this.form.get('admin_only').setValue(this.form.get('admin_only').value ?? false);\n this.form.get('restricted_from').setValue(this.form.get('restricted_from').value ?? 0);\n\n if (!this.category.id) {\n this.disabled = false\n } else {\n this.form.valueChanges.subscribe(val => {\n for(let key of Object.keys(val)){\n if(this.category[key] !== val[key]){\n this.disabled = false\n return\n }\n this.disabled = true\n }\n });\n }\n\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Category`,\n content: `Are you sure you want to delete this Category? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting Category...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const category = new CateringCategory(this.category);\n const data = { ...category.toJSON(), ...this.form.value };\n \n /* Keep the \"stock\" status as true for main categories when adding or updating to avoid problems.\n The problem occurs when the top-level category is marked as \"out of stock\" if all items within it are out of stock. \n Then, if the items become available again, the top-level category stays marked as \"out of stock,\" even if subcategories and items are in stock.\n */\n data.out_of_stock = false; \n const request = category.id\n ? this._menu_categories.update(category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = category.items\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
{{ category.id ? 'Edit' : 'Add' }} category
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n Name*\n \n \n A valid name is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n Only numbers are allowed(0-999)\n \n
\n
\n \n Disable\n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, OnInit, Inject, EventEmitter, Output } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\nimport { UploadManager } from '@acaprojects/ngx-uploads';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\n\nimport * as blobUtil from 'blob-util';\nimport { CateringCategoriesService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\n\nexport interface CateringGroupModalData {\n group: CateringCategory;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-group-modal',\n templateUrl: './group-modal.component.html',\n styleUrls: ['./group-modal.component.scss'],\n})\nexport class CateringGroupModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n { id: 'none', name: 'Other' },\n ];\n\n /** Category being edit/created */\n public get category(): CateringCategory {\n return this._data.group;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n /** Image URL for the category */\n public get image(): string {\n return this.form.controls.image_path.value;\n }\n\n /** Whether category is a package */\n public get package(): boolean {\n return this.form.controls.package.value;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_categories: CateringCategoriesService,\n private _upload_manager: UploadManager,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringGroupModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.category.price\n this.form = new FormGroup({\n name: new FormControl(this.category.name, [Validators.required]),\n description: new FormControl(this.category.description),\n image_path: new FormControl(this.category.image_path),\n catering_type: new FormControl(this.category.catering_type, [Validators.required]),\n package: new FormControl(this.category.package || false),\n must_select: new FormControl(this.category.must_select),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.category.minimum_quantity),\n maximum_quantity: new FormControl(this.category.maximum_quantity),\n order_anytime: new FormControl(this.category.order_anytime),\n out_of_stock: new FormControl(this.category.out_of_stock),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete ${this.category.package ? 'Package' : 'Sub-Category'}`,\n content: `Are you sure you want to delete this ${\n this.category.package ? 'Package' : 'Sub-Category'\n }? Deleting it will also remove all it's children`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting ${\n this.category.package ? 'Package' : 'Sub-Category'\n }...`;\n let e = null;\n await this._menu_categories.delete(this.category.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.category.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = {\n ...(this.category instanceof CateringCategory\n ? this.category.toJSON()\n : this.category),\n ...this.form.value,\n parent_categories: [this.parent.id],\n };\n //if sub-category/item becomes non-package then mark it in stock \n data.out_of_stock = !data.package ? false : data.out_of_stock;\n data.price = data.unit_price;\n const request = this.category.id\n ? this._menu_categories.update(this.category.id, data)\n : this._menu_categories.add(data);\n request.then(\n (item) => {\n (item as any).items = this.category.items\n this.event.emit({ reason: 'done', metadata: new CateringCategory(item) });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.category.id ? 'updating' : 'creating'} category. Error: ${\n err.message || err\n }`\n )\n );\n }\n }\n\n /** Upload the image to the cloud */\n public uploadImage(event) {\n /* istanbul ignore else */\n if (event && event.target && event.target.files) {\n const files: FileList = event.target.files;\n /* istanbul ignore else */\n if (files.length) {\n const fileReader = new FileReader();\n fileReader.addEventListener('loadend', (e: any) => {\n this.uploading = true;\n const arrayBuffer = e.target.result;\n const blob = blobUtil.arrayBufferToBlob(arrayBuffer, 'image/png');\n this._upload_manager.upload([blob], { file_name: files[0].name });\n const upload = this._upload_manager.uploads[\n this._upload_manager.uploads.length - 1\n ];\n this.interval('upload', () => {\n /* istanbul ignore else */\n if (upload.complete || upload.error) {\n /* istanbul ignore else */\n if (upload.access_url && upload.complete) {\n this.form.controls.image_path.setValue(upload.access_url);\n }\n this.uploading = false;\n this.clearInterval('upload');\n }\n });\n });\n fileReader.readAsArrayBuffer(files[0]);\n }\n }\n }\n}\n","
\n
\n {{ category.id ? 'Edit' : 'Add' }} {{ package ? 'package' : 'sub-category' }}\n
\n \n
\n\n
\n
\n
\n \n \n \n \n
\n \n
\n \n
{{ parent.name }}
\n
\n
\n Package\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n \n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { CateringItem } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { CateringItemsService } from '@mckinsey-converge/data-common';\nimport {\n CONFIRM_METADATA, ConfirmModalComponent,\n} from '@mckinsey-converge/legacy-overlays';\nimport { mergeCateringItemWithFormData } from '@mckinsey-converge/data-common';\n\nexport interface CateringItemModalData {\n item: CateringItem;\n parent: CateringCategory;\n}\n\n@Component({\n selector: 'a-catering-item-modal',\n templateUrl: './item-modal.component.html',\n styleUrls: ['./item-modal.component.scss'],\n})\nexport class CateringItemModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form controls for editing category */\n public form: FormGroup;\n /** Display string for current loading state */\n public loading: string;\n /** Whether image is being uploaded */\n public uploading: boolean;\n /** List of available catering types */\n public readonly types: Identity[] = [\n { id: 'kitchen', name: 'Kitchen' },\n { id: 'pantry', name: 'Pantry' },\n ];\n\n /** Category being edit/created */\n public get item(): CateringItem {\n return this._data.item;\n }\n\n /** Parent category of the catergory being created/edited */\n public get parent(): CateringCategory {\n return this._data.parent;\n }\n\n constructor(\n private _service: ApplicationService,\n private _menu_items: CateringItemsService,\n private _dialog: MatDialog,\n private _dialog_ref: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private _data: CateringItemModalData,\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const price = this.item.price\n this.form = new FormGroup({\n name: new FormControl(this.item.name, [Validators.required]),\n description: new FormControl(this.item.description),\n catering_type: new FormControl(this.item.catering_type, [Validators.required]),\n supplier_cost: new FormControl(this.item.supplier_cost),\n unit_price: new FormControl(price),\n minimum_quantity: new FormControl(this.item.minimum_quantity),\n maximum_quantity: new FormControl(this.item.maximum_quantity),\n order_anytime: new FormControl(this.item.order_anytime),\n out_of_stock: new FormControl(this.item.out_of_stock),\n allergy: new FormControl(this.item.allergy),\n parent_categories: new FormControl([this._data.parent.id]),\n });\n }\n\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: `Delete Item`,\n content: `Are you sure you want to delete this item?`,\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n ref.componentInstance.event.subscribe(async (event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n ref.componentInstance.loading = `Deleting item...`;\n let e = null;\n await this._menu_items.delete(this.item.id).catch((err) => e === err);\n ref.close();\n if (!e) {\n this._service.set('DELETED.menu', this.item.id);\n this._dialog_ref.close();\n }\n }\n });\n }\n\n public submit() {\n this.form.markAllAsTouched();\n /* istanbul ignore else */\n if (this.form.valid) {\n const data = mergeCateringItemWithFormData(this.item, this.form.value).toJSON();\n const request = this.item.id\n ? this._menu_items.update(this.item.id, data)\n : this._menu_items.add(data);\n request.then(\n (item) => {\n this.event.emit({ reason: 'done', metadata: item });\n this._dialog_ref.close();\n },\n (err) =>\n this._service.notifyError(\n `Error ${this.item.id ? 'updating' : 'creating'} item. Error: ${\n err.message || err\n }`,\n ),\n );\n }\n }\n}\n","
\n
{{ item.id ? 'Edit' : 'Add' }} catering item
\n \n
\n\n
\n
\n
\n \n
{{ parent.name }}
\n
\n
\n Name*\n \n \n A valid name is required\n \n
\n
\n Type*\n \n \n \n {{ type.name }}\n \n \n Type is required\n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n Out of Stock\n
\n
\n Can order anytime\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n\n
\n \n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-booking-details',\n templateUrl: './booking-details.component.html',\n styleUrls: ['./booking-details.component.scss'],\n})\nexport class OrderBookingDetailsComponent {\n /** Email of the order space */\n @Input() public space: Space;\n /** Booking details to display */\n @Input() public booking: Booking;\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n /** Display startDateTZ and endDateTZ time only time */\n public get start_and_duration_time() {\n const end_ = this.booking.startDateTz.addValue({minutes: this.booking.duration});\n return `${this.start_time} - ${end_.formatDate('h:mm a')}`;\n }\n\n /** Display startDateTZ time only time */\n public get start_time() {\n return `${this.booking.startDateTz.formatDate('h:mm a')}`;\n }\n\n /** Store booking details to be used in another component */\n public storeBooking() {\n localStorage.setItem('CONCIERGE.view_booking', JSON.stringify(this.booking.toJSON()));\n localStorage.setItem('CONCIERGE.view_booking_space', JSON.stringify(this.space.toJSON()));\n localStorage.setItem('CONCIERGE.date', `${this.booking.startDateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.booking.startDateTz.building_tz}`);\n }\n}\n","
\n Meeting Details\n
\n
\n
\n \n
\n {{ booking.organiser?.name }}\n
\n
\n
\n \n
\n {{ space?.name }}\n
\n
\n
\n \n
\n {{ start_and_duration_time }}\n
\n
\n
\n \n
\n {{ booking.attendees?.length || '0' }}({{ booking.expected_attendees[space?.email] || 0 }} expected)\n
\n
\n
\n\n View on Day View\n\n","import { Component, Input } from '@angular/core';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { CateringCategory } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'order-details-items',\n templateUrl: './items.component.html',\n styleUrls: ['./items.component.scss'],\n})\nexport class OrderDetailsItemsComponent extends BaseDirective {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Whether order is being edited */\n public editing: boolean;\n /** Whether order is being updated */\n public loading: boolean;\n\n /** List of items in the order */\n public get items(): CateringCategory[] {\n return this.order.items as any;\n }\n\n constructor(\n private _service: ApplicationService, \n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,) {\n super();\n }\n\n public editOrder() {\n this.editing = true;\n }\n\n /** Handle changes to catering order */\n public async handleOrderEvent(order: CateringOrder) {\n /* istanbul ignore else */\n if (order) {\n const orders = [...this.booking.catering];\n const index = orders.findIndex((an_order) => order.id === an_order.id);\n if (index < 0) {\n orders.push(order);\n } else {\n orders.splice(index, 1, order);\n }\n this.loading = true;\n const new_booking = new Booking({ ...this.booking.toJSON(), catering: orders });\n const booking = await this._bookings\n .save(new_booking)\n .catch((err) =>\n this._service.notifyError(\n `Error unable to update order. Error: ${err.message || err}`\n )\n );\n if (booking) {\n this._booking_state_service.replace(booking);\n this.booking = booking;\n this.order = order;\n this.editing = false;\n }\n this.loading = false;\n }\n }\n}\n","
\n {{ editing ? 'Edit Order' : 'Order Details' }}\n
\n
\n \n
\n
\n
{{ item.name }}
\n
x{{ item.amount }}
\n
\n \n \n
\n
{{ sub_item.name }}
\n \n \n
\n
{{ sub_sub_item.name }}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n \n
\n
\n\n\n
\n
\n \n
\n
\n No items in order\n
\n
\n
\n\n
\n
\n \n
\n
\n Updating order\n
\n
\n
\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { CateringOrder } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { UsersService, BookingNote } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'order-details-notes',\n templateUrl: './messages.component.html',\n styleUrls: ['./messages.component.scss'],\n})\nexport class OrderDetailsNotesComponent implements OnInit {\n /** Booking details to display */\n @Input() public booking: Booking;\n /** Catering order to display notes for */\n @Input() public order: CateringOrder;\n /** Emitter for changes to the active booking */\n @Output() public bookingChange = new EventEmitter();\n /** Contents of the new private note */\n public new_note: string;\n /** Whether a note is being added */\n public loading: boolean;\n\n /** List of notes for catering order space */\n public get notes(): BookingNote[] {\n const notes = this.booking.notes.filter((note) => {\n return (\n (note.type === 'catering' || note.type === 'catering-private') &&\n note.space === this.order.location_id &&\n (!note.order_id || note.order_id === this.order.id)\n );\n });\n notes.forEach((note) => {\n // Use the booking timezone to make the note date TZ aware since the native format is not.\n const date = new DateTZ({date: note.date, is_local_tz: false, building_tz: this.booking.timezone })\n note.time = date.formatDate('dd MMM, h:mma');\n });\n return notes;\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _users: UsersService\n ) {}\n\n ngOnInit(): void {}\n\n /**\n * Add note for catering order\n */\n public async addNote() {\n /* istanbul ignore else */\n if (this.booking && this.new_note) {\n const user = this._users.current;\n const notes = this.booking.notes;\n const now = new DateTZ({ date: Date.now(), is_local_tz: false, building_tz: this.booking.timezone })\n const date = now.startOfValue('minute');\n const new_notes = [\n ...notes,\n {\n type: 'catering-private',\n date: date.ms,\n author: user.name,\n order_id: this.order.id,\n space: this.order.location_id,\n message: this.new_note,\n time: date.formatDate('h:mma'),\n },\n ];\n const pending_booking = new Booking({ ...this.booking.toJSON(), notes: new_notes });\n this.loading = true;\n const new_booking: Booking = (await this._bookings\n .save(pending_booking)\n .catch((err) => {\n this._service.notifyError(\n `Failed to add note to order meeting. Error: ${err.message || err}`\n );\n this.loading = false;\n throw err;\n })) as any;\n this.booking = new_booking;\n if (new_booking) {\n this._booking_state.replace(new_booking);\n }\n this.order.booking = new_booking;\n this.bookingChange.emit(new_booking);\n this.loading = false;\n this.new_note = '';\n }\n }\n}\n","
\n Private Notes\n
\n
\n \n
\n
{{ item.message }}
\n
\n
{{ item.author }}
\n
\n
{{ item.time }}
\n
\n
\n
\n
\n
\n \n \n \n \n
\n \n
\n
\n\n
\n
\n \n
\n
\n No private notes for order\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { CateringOrder, CateringOrderStatus } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { DialogEvent, Identity } from '@mckinsey-converge/base';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { SpacesService } from '@mckinsey-converge/data-common';\n\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateTZ, getTimezoneOffsetString } from '@mckinsey-converge/date-tz';\n\nexport interface OrderDetailsModalData {\n /** Order to display details for */\n order: CateringOrder;\n /** Booking associated with catering order */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-order-details-modal',\n templateUrl: './order-details-modal.component.html',\n styleUrls: ['./order-details-modal.component.scss'],\n})\nexport class OrderDetailsModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Whether status is being updated */\n public loading: boolean;\n /** Actively selected status */\n public active_status: CateringOrderStatus;\n /** List of available order statuses */\n public statuses: Identity[] = [\n { id: 'accepted', name: 'Accepted', icon: { class: 'custom-accepted' }, colour: '#3996B6' },\n {\n id: 'preparing',\n name: 'Preparing',\n icon: { class: 'custom-preparing' },\n colour: '#E7536B',\n },\n { id: 'ready', name: 'Ready', icon: { class: 'custom-ready' }, colour: '#FFD028' },\n {\n id: 'delivered',\n name: 'Delivered',\n icon: { class: 'custom-delivered' },\n colour: '#75BB43',\n },\n {\n id: 'cancelled',\n name: 'Cancelled',\n icon: { class: 'custom-cancelled' },\n colour: '#747474',\n },\n ];\n public booking: Booking;\n\n /** Order to display */\n public get order(): CateringOrder {\n return this._data.order;\n }\n\n /** Details for the active status */\n public get status_details(): Identity {\n return this.statuses.find((status) => status.id === this.active_status);\n }\n\n /** Space associated with the order */\n public get space(): Space {\n return this._spaces.find(this._data.order.location_id);\n }\n\n /** Details about the delivery time */\n public get delivery_date(): DateTZ {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time });\n }\n\n /** Details about the delivery_at time */\n public get delivery_at(): string {\n return this.booking.startDateTz.addValue({ minutes: this._data.order.delivery_time }).formatDate('h:mm a');\n }\n\n public get timezone() {\n return getTimezoneOffsetString(localStorage.getItem('CONCIERGE.timezone'));\n }\n\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _bookings: BookingsService,\n private _booking_state_service: BookingStateService,\n @Inject(MAT_DIALOG_DATA) private _data: OrderDetailsModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.active_status = this._data.order.status;\n this.booking = new Booking(this._data.booking)\n }\n\n /** Update the status of the order in the booking */\n public async updateStatus(): Promise {\n const booking = this._data.booking;\n /* istanbul ignore else */\n if (booking) {\n this.loading = true;\n const catering = [...booking.catering];\n catering.splice(\n catering.findIndex((order) => order.id === this._data.order.id),\n 1,\n new CateringOrder({ ...this._data.order, status: this.active_status })\n );\n const new_booking = new Booking({ ...booking.toJSON(), catering });\n const updated_booking: any = await this._bookings.save(new_booking).catch((err) => {\n this._service.notifyError(\n `Error updating order status. Error: ${err.message || err}`\n );\n this.active_status = this._data.order.status;\n });\n if (updated_booking) {\n this._booking_state_service.replace(updated_booking);\n this.booking = updated_booking;\n }\n this.loading = false;\n\n }\n }\n}\n","\n\n
\n
\n
\n
{{ space?.name }} ({{ space?.local_name}})
\n
({{delivery_date?.ms | date:'mediumDate':timezone }}) To be delivered at {{ delivery_at }}
\n
\n 1\"\n >\n \n \n
\n
\n \n \n \n
\n
\n
{{ status_details?.name }}
\n
\n \n \n
\n
{{ status.name }}
\n
\n
\n
\n \n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'access-denied',\n templateUrl: './access-denied.component.html',\n styleUrls: ['./access-denied.component.scss']\n})\nexport class AccessDenied {\n\n constructor() {}\n\n}\n","
\n \n

Oooops - sorry! You don’t have access to this page.

\n

Please contact help desk or continue to Converge for room booking.

\n
\n","import { Component, OnInit } from '@angular/core';\n\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLinkInternal, ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss']\n})\nexport class SidebarComponent implements OnInit {\n\n /** Currently active building */\n public get active_building(): Building {\n return this._org.building;\n }\n public set active_building(building: Building) {\n this._org.building = building;\n }\n\n /** List of available menu items */\n public get menu_items(): ApplicationLinkInternal[] {\n return this._service.setting('app.general.menu.items') || [];\n }\n\n /** Logo for the application organisation */\n public get logo(): ApplicationIcon {\n return this._service.setting('app.logo_light');\n }\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings || [];\n }\n\n constructor(private _service: ApplicationService, private _org: OrganisationService) {}\n\n ngOnInit(): void {}\n}\n","
\n {{ logo.content }}\n \n
\n
\n \n
\n
\n
\n \n
\n
{{ item.name }}
\n
\n \n
\n
1\">\n \n \n \n {{ building.name }}\n \n \n \n
\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { BaseDirective } from '@mckinsey-converge/base';\n\nimport { BookingStateService, OrganisationService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, getTimezoneOffsetString, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-topbar-header',\n templateUrl: './topbar-header.component.html',\n styleUrls: ['./topbar-header.component.scss'],\n})\nexport class TopbarHeaderComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Currently building timezone */\n @Input() public timezone: string;\n /** Currently active zone */\n @Input() public zone: string;\n /** Whether to show new item button */\n @Input() public show_add_item = false;\n /** Whether to show the events for the active month */\n @Input() public show_events: boolean = false;\n /** Emitter for changes selected date */\n @Output() public dateChangeTz = new EventEmitter();\n /** Emitter for add item button */\n @Output() public event = new EventEmitter();\n /** Counters of the events on given dates. Key format is `yyyy-MM-dd` */\n public event_map: { [date: string]: number };\n\n public fromDateTz = DateNow().subtractValue({ months: 6 });\n\n public get now() {\n return DateNow();\n }\n\n /** Display string for the currently selected date */\n public get tz(): string {\n return getTimezoneOffsetString(this.timezone_value);\n }\n\n public get timezone_value() {\n return localStorage.getItem('CONCIERGE.timezone') || this.timezone || this.now.building_tz;\n }\n\n public get is_today() {\n return new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n }).isSameDate(\n new DateTZ({\n date: Date.now(),\n is_local_tz: false,\n building_tz: this.timezone_value,\n }),\n 'day'\n );\n }\n\n constructor(private _bookings: BookingStateService, private _org: OrganisationService) {\n super();\n }\n\n public ngOnInit(): void {\n // CONCIERGE.date: Get the localstorage date and timezone when changing pages.\n const date = +localStorage.getItem('CONCIERGE.date') || this.now.ms;\n \n /* istanbul ignore else */\n if (date && (date !== this.dateTz.ms || this.timezone_value !== this.dateTz.building_tz)) {\n // CONCIERGE.date Reapply the localstorage date and timezone when changing pages.\n this.timeout(\n 'init',\n () => {\n this.dateTz = new DateTZ({\n date,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n this.updateDate();\n },\n 10\n );\n }\n this.subscription(\n 'events',\n this._bookings._noOfMeetings.subscribe((list) => {\n this.event_map = {};\n this.event_map = list[0];\n })\n );\n }\n\n public noOfCount(event) {\n // Disabling bellow until find more reliable way to call as it is been called multiple times on hover/click\n // this._bookings.getDailyMeetingCount();\n // event.stopPropogation();\n }\n\n /**\n * Change the selected date with the arrow controls\n *\n */\n public changeDate(value: number) {\n let date = new DateTZ({\n date: toMiddayUTC(this.dateTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n date = date.addValue({ days: value });\n this.dateTz = date;\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n /**\n * Change the selected date with the calendar widget\n *\n */\n public applyDatePickerValue(dateInputTz: DateTZ) {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(dateInputTz).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n this.closeDatePicker();\n }\n\n public updateDate() {\n this.timeout('update_date', () => this._bookings.setDate(this.dateTz));\n }\n\n /** Reset date to the current date */\n public resetDate() {\n this.dateTz = new DateTZ({\n date: toMiddayUTC(this.now).ms,\n is_local_tz: false,\n building_tz: this.timezone_value,\n });\n this.dateChangeTz.emit(this.dateTz);\n localStorage.setItem('CONCIERGE.date', `${this.dateTz.ms}`);\n localStorage.setItem('CONCIERGE.timezone', `${this.timezone_value}`);\n this.updateDate();\n }\n\n public closeDatePicker() {\n this.updateDate();\n }\n\n /** New Item button click */\n public newItem(): void {\n this.event.emit('new_item');\n }\n}\n","
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n

Today

\n

{{ dateTz.ms | date: 'mediumDate':tz }}

\n
\n \n
\n
\n \n \n
\n
\n
\n","import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { first } from 'rxjs/operators';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n})\nexport class LoginComponent extends BaseDirective implements OnInit {\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n /** Whether the user credentials are being checked */\n public loading: boolean;\n /** Form fields for the login form */\n public form: FormGroup;\n\n /** Password field element */\n @ViewChild('pass_field', { static: true }) private pwd_field: ElementRef;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n public ngOnInit(): void {\n this.loading = true;\n this.form = new FormGroup({\n username: new FormControl('', [Validators.required]),\n password: new FormControl('', [Validators.required]),\n });\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.loading = false;\n this.logo = this._service.setting('app.logo_light') || { type: 'icon' };\n });\n }\n\n /** Perform user login */\n public login() {\n this.loading = true;\n const form = this.form.value;\n this._users\n .login(\n {\n username: form.username,\n password: form.password,\n },\n { form: true }\n )\n .then(\n () => this.loading = false,\n () => {\n this.loading = false;\n this.form.controls.password.setErrors({ check: true });\n }\n );\n }\n}\n","
\n
\n
\n
\n
\n {{ logo.content }}\n \n
\n
\n
\n \n
\n \n Username:\n \n \n \n Username is required\n \n
\n
\n \n Password:\n \n \n \n Invalid username or password\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n \n
\n
Converge is loading
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { first } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { Building } from '@mckinsey-converge/data-common';\nimport { ReportDetails } from '../reports.component';\nimport { Report } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ReportsService } from '@mckinsey-converge/data-common';\n\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'a-report-display',\n templateUrl: './report-display.component.html',\n styleUrls: ['./report-display.component.scss'],\n})\nexport class ReportDisplayComponent implements OnInit, OnChanges {\n /** Details about the report being requested */\n @Input() public report: ReportDetails;\n /** Start date for the generated report */\n public start_date: number;\n /** End date for the generated report */\n public end_date: number;\n /** List of report data entries */\n public report_data: Report;\n /** Whether report data is loading */\n public loading: boolean;\n /** List of selected locations */\n public locations: Building[] = [{} as any];\n /** Multiple Locations? */\n public multipleLocations: boolean = false;\n\n /** List of available buildings */\n public get buildings(): Building[] {\n return this._org.buildings;\n }\n\n @Output() locationChanged = new EventEmitter();\n\n\n constructor(\n private _service: ApplicationService,\n private _org: OrganisationService,\n private _reports: ReportsService,\n private _router: Router\n ) {}\n\n public ngOnInit(): void {\n // R--- TODO no prams present for timezone\n const now = DateNow();\n this.start_date = now.startOfValue('day').ms;\n this.end_date = now.endOfValue('day').ms;\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n this.locations = [this._org.building];\n });\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.report) {\n this.report_data = null;\n }\n if (this.locations.length > 1) {\n this.locations = [this.locations[0]];\n }\n }\n\n /* function runs on location change from on-page dropdown(not from sidebar) */\n public onLocationChange(data: any) {\n this.locationChanged.emit(this.locations[0]);\n }\n\n /**\n * Ensure Space Time Continuum\n */\n public checkDates(new_date: number) {\n if (this.start_date > this.end_date) {\n // R--- TODO no prams present for timezone\n const date = new DateTZ({ date: new_date });\n this.start_date = date.startOfValue('day').ms;\n this.end_date = date.endOfValue('day').ms;\n }\n }\n\n /**\n * Generate report\n */\n public generateReport() {\n /* istanbul ignore else */\n if (this.report) {\n this.loading = true;\n this.report_data = null;\n const date = toMiddayUTC(new DateTZ({ date: this.start_date })).toZone(\n this.locations[0]?.timezone\n );\n const end_date = toMiddayUTC(new DateTZ({ date: this.end_date })).toZone(\n this.locations[0]?.timezone\n );\n this._reports\n .show(this.report.id, {\n date: date.formatDate('yyyy-MM-dd'),\n start_date: date.startOfValue('day').seconds,\n end_date: end_date.endOfValue('day').seconds,\n zone_ids: this.locations.map((i) => i.id).join(','),\n })\n .then(\n (report) => {\n const zone_ids = this.locations.map((i) => i.id).join(',');\n if (this.report.id === 'day' && this.locations[0]?.city !== 'Dallas') {\n this.loading = false;\n this._service.notifyError(\n `Day View is currently available for Dallas only`\n );\n } else {\n this.loading = false;\n this.report_data = new Report({ ...report, type: this.report.id });\n }\n },\n (err) => {\n this.loading = false;\n this._service.notifyError(\n `Error generating report. Error: ${err.message || err}`\n );\n }\n );\n }\n }\n\n public downloadReport() {\n /* istanbul ignore else */\n if (this.report_data) {\n const date = new DateTZ({ date: this.start_date });\n this.report_data.downloadCSV(\n `${this.report.name.split(' ').join('_').toLowerCase()}+${date.formatDate(\n 'yyyy-MM-dd'\n )}.csv`\n );\n }\n }\n}\n","
\n
\n
\n \n \n \n
\n
to
\n
\n \n \n
\n
\n
\n 1\">\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n \n \n \n {{ locations ? locations[0]?.name : '' }}\n 1\" class=\"selection\">\n (+{{ locations.length - 1 }}\n {{ locations?.length === 2 ? 'other' : 'others' }})\n \n \n \n
\n
{{ building.code }}
\n
{{ building.name }}
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n \n
\n\n
\n
\n \n
\n
\n {{\n report_data ? 'No entries for selected date' : 'Press generate above to view report'\n }}\n
\n
\n
\n\n
\n
\n \n
\n
Loading report...
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';\nimport { HashMap } from '@mckinsey-converge/base';\nimport { ReportDetails } from '../reports.component';\n\n\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'newlineToBR',\n pure: true // Set pure to true to ensure it's a stateless pipe\n})\nexport class NewlineToBRPipe implements PipeTransform {\n transform(value: string): string {\n if (typeof value !== 'string' || !value.includes('\\n')) {\n // If the value is not a string or doesn't contain newline characters, return it as is\n return value;\n }\n return value.replace(/\\n/g, '
').replace(/\\s/g, \"\\u00A0\");\n }\n}\n\n@Component({\n selector: 'a-report-table',\n templateUrl: './report-table.component.html',\n styleUrls: ['./report-table.component.scss'],\n})\nexport class ReportTableComponent implements OnChanges {\n /** List of report table data */\n @Input() public list: HashMap[] = [];\n /** Map of details for report */\n @Input() public details: ReportDetails;\n\n public fields: string[] = [];\n public sortField: string = '';\n public sortOrder: 'asc' | 'desc' = 'asc';\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.list && this.list && this.list.length) {\n this.fields = Object.keys(this.list[0]).filter(i => this.details.hide_fields.indexOf(i) < 0);\n }\n }\n\n public toggleSort(field: string) {\n if (this.isSortingDisabled(field)) {\n return; // Disable sorting for specific fields\n }\n\n if (this.sortField === field) {\n this.sortOrder = this.sortOrder === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortField = field;\n this.sortOrder = 'asc';\n }\n\n this.sortTable(field);\n }\n\n private sortTable(field: string) {\n const sortedList = [...this.list].sort((a, b) => {\n let aValue = a[field];\n let bValue = b[field];\n\n const dateWithTimeRegex = /\\d{1,2} \\w{3,4} \\d{4} -\\s+\\d{1,2}:\\d{2} (AM|PM)/;\n\n if (\n typeof aValue === 'string' &&\n dateWithTimeRegex.test(aValue) &&\n typeof bValue === 'string' &&\n dateWithTimeRegex.test(bValue)\n ) {\n aValue = this.parseDateString(aValue);\n bValue = this.parseDateString(bValue);\n }\n\n if (aValue < bValue) {\n return this.sortOrder === 'asc' ? -1 : 1;\n } else if (aValue > bValue) {\n return this.sortOrder === 'asc' ? 1 : -1;\n } else {\n return 0;\n }\n });\n\n this.list = sortedList;\n }\n\n private parseDateString(dateString: string): Date {\n const [datePart, timePart] = dateString.split(' - ');\n const formattedDate = `${datePart} ${timePart}`;\n return new Date(formattedDate);\n }\n\n public isSortingDisabled(field: string): boolean {\n // Disable sorting for specific fields\n const disabledFields = ['recurr', 'cancelled_by', 'all_day'];\n return disabledFields.includes(field);\n }\n}\n","\n \n \n \n \n \n \n\n \n \n
\n {{ key | replace }} \n \n \"Unsorted\"\n \"Ascending\"\n \"Descending\"\n \n \n {{ element[key] }}\n \n \n \n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { ApplicationIcon, OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { first } from 'rxjs/operators';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\nexport interface ReportDetails {\n /** ID associated with the report */\n id: string;\n /** Name of the report */\n name: string;\n /** Shortened name of the report */\n short_name: string;\n /** More details about the report */\n description: string;\n /** Fields to hide on the UI */\n hide_fields: string[];\n /** Icon to display for report */\n icon: ApplicationIcon;\n /** Multiselect Locations */\n multi_locations: boolean;\n}\n\n@Component({\n selector: 'a-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss'],\n})\nexport class ReportsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** ID of the active report */\n public active_report: string;\n\n public has_access: boolean;\n\n public location: any;\n\n /** List of available reports to display */\n public reports: ReportDetails[] = [\n {\n id: 'bookings',\n name: 'Aggregate Bookings Report',\n short_name: 'Bookings',\n description: 'Generate comprehensive reports on various aspects of bookings',\n hide_fields: ['room_email'],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: false,\n },\n {\n id: 'catering',\n name: 'Aggregate Charge Back Report',\n short_name: 'Catering',\n description: 'View confirmed catering report or mark up unconfirmed catering',\n hide_fields: ['room_email'],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n {\n id: 'audit',\n name: 'Audit',\n short_name: 'audit',\n description: '',\n hide_fields: [],\n icon: { type: 'img', src: 'assets/img/report-booking.svg' },\n multi_locations: true,\n }\n ];\n\n public get the_report(): ReportDetails {\n return this.reports.find((report) => report.id === this.active_report);\n }\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Reports';\n this.subscription(\n 'route.params',\n this._route.paramMap.subscribe((params) => {\n if (params.has('report')) {\n this.active_report = params.get('report');\n }\n })\n );\n\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.location = this._org.building;\n this.has_access = building ? true : false;\n\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n }\n })\n );\n });\n }\n\n public updateReport() {\n this._router.navigate(['/reports', this.active_report]);\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n\n public onLocationChanged(location: any) {\n this.location = location;\n //check for Dallas\n if (this.location.city != 'Dallas') {\n // remove day view from reports array\n this.reports = this.reports.filter(function (reports) {\n return reports.id !== 'day';\n });\n this._router.navigate([`/reports/${this.active_report}`]);\n } else {\n // add day view to reports array\n this.reports = [\n ...this.reports,\n {\n id: 'day',\n name: 'Day View Report',\n short_name: 'day-view',\n description: ' ',\n hide_fields: [' '],\n icon: { type: 'icon', class: 'material-icons', content: 'room_service' },\n multi_locations: true,\n },\n ];\n }\n }\n}\n","
\n \n
\n \n
\n
\n
\n 1\" appearance=\"outline\">\n \n \n {{ report.name }}\n \n \n \n
\n
\n
\n \n
\n
\n \n
\n

{{ report.short_name }}

\n
\n
{{ report.description }}
\n \n
\n
\n \n
\n
\n
\n
\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Route, RouterModule } from '@angular/router';\n\nimport { ReportsComponent } from './reports.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { ReportDisplayComponent } from './report-display/report-display.component';\nimport { ReportTableComponent, NewlineToBRPipe} from './report-table/report-table.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: ReportsComponent },\n { path: ':report', component: ReportsComponent },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n declarations: [ReportsComponent, ReportDisplayComponent, ReportTableComponent, NewlineToBRPipe],\n imports: [CommonModule, FormsModule, RouterModule.forChild(ROUTES), SharedContentModule]\n})\nexport class ReportsModule { }\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-bulk-qr-overlay',\n templateUrl: './bulk-qr-overlay.component.html',\n styleUrls: ['./bulk-qr-overlay.component.scss'],\n})\nexport class BulkQrOverlayComponent implements OnInit {\n @Input() itemsCheckboxes: any[];\n @Input() qrCodeUrls: any[];\n @Output() selectItemChange: EventEmitter = new EventEmitter();\n @Output() selectAllChange: EventEmitter = new EventEmitter();\n @Input() isOpen: boolean;\n @Input() selectAll: boolean;\n @Output() downloadQrCodeRequested: EventEmitter = new EventEmitter();\n @Output() cancelClick: EventEmitter = new EventEmitter();\n @Input() newArr: any[];\n @Input() allLevels: any;\n @Output() qrCodeUrlsChange: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public onSubmit(str: string) {\n this.qrCodeUrlsChange.emit(this.qrCodeUrls); // Emit the updated qrCodeUrls array\n this.downloadQrCodeRequested.emit();\n if (str === 'room') {\n this.qrTabClick({ index: 0 });\n } else if (str === 'level') {\n this.qrTabClick({ index: 1 });\n }\n }\n\n public onCancel(str: string) {\n // Handle cancel button logic for rooms here (reset the form)\n if (str === 'level') {\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...{ checked: false }, ...{ isLevel: false } };\n });\n }\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.selectAll = false;\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.cancelClick.emit();\n }\n\n public onSelectAllChange(str: string) {\n for (const checkbox of this.itemsCheckboxes) {\n checkbox.checked = this.selectAll;\n }\n if (str === 'room') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, roomname, level }) => ({\n url: window.location.origin + '/staff/#/home?id=' + id,\n roomname: roomname,\n level: level\n }));\n } else if (str === 'level') {\n this.qrCodeUrls = this.itemsCheckboxes\n .filter((checkbox) => checkbox.checked)\n .map(({ id, building_id, name }) => ({\n url: window.location.origin + '/staff/#/home?zone_id=' + building_id + '&floor=' + id,\n name: name,\n }));\n }\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n\n public onSelectItemChange(e: any, item: any) {\n if (e.checked && !item.isLevel) {\n //If room selected, push it to qrCodeUrls array\n let checkedRoomObj = {\n url: window.location.origin + '/staff/#/home?id=' + item.id,\n roomname: item.roomname,\n level: item.level,\n };\n this.qrCodeUrls.push(checkedRoomObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else if (e.checked && item.isLevel) {\n //If levels selected, push it to qrCodeUrls array\n let checkedLevelObj = {\n url:\n window.location.origin +\n '/staff/#/home?zone_id=' +\n item.building_id +\n '&floor=' +\n item.id,\n name: item.name,\n };\n this.qrCodeUrls.push(checkedLevelObj);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n } else {\n // If unselected, find the index of the checked Obj in qrCodeUrls array based on room/level name\n const index = item.isLevel\n ? this.qrCodeUrls.findIndex((obj) => obj.name === item.name)\n : this.qrCodeUrls.findIndex((obj) => obj.roomname === item.roomname);\n // If the object is found, remove it from the array using splice\n if (index !== -1) {\n this.qrCodeUrls.splice(index, 1);\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n }\n }\n }\n\n isAnyItemSelected(): boolean {\n return this.itemsCheckboxes.some((checkbox) => checkbox.checked);\n }\n\n public qrTabClick(e: any) {\n let checkedFlag = { checked: false };\n this.qrCodeUrls = [];\n this.qrCodeUrlsChange.emit(this.qrCodeUrls);\n this.itemsCheckboxes = [];\n this.selectAll = false;\n\n if (e.index === 0) {\n //rooms tab\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: false } };\n });\n } else if (e.index === 1) {\n //levels tab\n Object.assign(this.itemsCheckboxes, this.allLevels);\n this.itemsCheckboxes = this.itemsCheckboxes.map((item) => {\n return { ...item, ...checkedFlag, ...{ isLevel: true } };\n });\n }\n }\n}\n","\n
Print QR codes
\n\n\n \n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n Inject,\n} from '@angular/core';\nimport { BaseDirective, DialogEvent, HashMap } from '@mckinsey-converge/base';\nimport { ApplicationService, OrganisationService, SpacesService } from '@mckinsey-converge/data-common';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ResizeService, ReadLocalPicService } from '../services/';\nimport { RequiredFileType, RoomPhotoDiamension } from '../util/room-admin-utility';\nimport { HttpEventType, HttpHeaders, HttpClient} from '@angular/common/http';\nimport * as cloneDeep from 'lodash/cloneDeep';\n// import { UploadManager, Amazon } from '@acaprojects/ngx-uploads';\nimport { of, Observable, forkJoin } from \"rxjs\";\nimport { catchError, tap, toArray } from 'rxjs/operators';\nimport { ComposerService } from '@placeos/composer';\nimport { IconComponent } from '@mckinsey-converge/legacy-ui';\n\n@Component({\n selector: 'app-manage-photos',\n templateUrl: './manage-photos.component.html',\n styleUrls: ['./manage-photos.component.scss'],\n\t\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManagePhotosComponent extends BaseDirective implements OnInit {\n /** Emitter for modal events */\n @Output() public event = new EventEmitter();\n\n\t\t public canvas: HTMLCanvasElement;\n\t\t public context: any;\n\t\t public imageInitial = null;\n\t\t public imageToModify = null;\n\n\t\t public photoArray: Array = []; // array hold images to display (uploaded or to be upload)\n\t\t public photoUploadArray: Array = []; // array hold image to upload\n\n\t\t public uploadProgress:number;\n\t\t public uploadError: boolean = false;\n\t\t public uploadingStatus: string = 'Uploading...';\n\t\t public room: any;\n\t\t public resizedFiles = [];\n\t\t public requiredFileType = RequiredFileType;\n\t\t public count: any = 0;\n\t\t public total: number = 0;\n\t\t public failedNo: string;\n\t\t// isImageToModify: boolean;\n\n\n constructor(\n\t\t\tprivate _composer: ComposerService,\n\t\t\t@Inject(MAT_DIALOG_DATA) private _data: any,\n\t\t\tpublic resizeService: ResizeService,\n\t\t\tprivate readLocalPicService: ReadLocalPicService,\n\t\t\tprivate _spaces: SpacesService,\n\t\t\tprivate cdRef: ChangeDetectorRef,\n\t\t\tprivate _service: ApplicationService,\n\t\t\tprivate httpClient?: HttpClient,\n\t\t\t) {\n\t\t\tsuper();\n }\n \n\n public ngOnInit() {\n \tthis.photoArray = cloneDeep(this._data?.photos);\n\t\tthis.room = this._data?.room\n }\n\n\t\t\n\n\t\tpublic\tonFileSelected (event , indexToReplace?) {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.canvas = document.createElement('canvas');\n\t\t\tthis.context = this.canvas.getContext('2d');\n\t\t\tconst ext = RequiredFileType.split(',');\n\t\t\tconst files = event instanceof Array ? event : [...new Set(event.target.files)].filter((f:File) => ext.includes(f.type));\n\t\t\tconst unusedIdx = indexToReplace!==undefined ? 1 : (3 - this.photoArray.length);\n\t\t\tfiles.splice(0,unusedIdx).forEach( file => {\n\n\t\t\t\tthis.readLocalPicService.readFileInput(file).then((base64Img) => {\n\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\tasync function (that) {\n\n\t\t\t\t\t\t\tawait that.resizeService.resizeImage(base64Img, {width: RoomPhotoDiamension.width, height: RoomPhotoDiamension.height, outputFormat: 'image/png', })\n\t\t\t\t\t\t\t\t\t\t.then(function (imgResized) {\n\n\t\t\t\t\t\t\t\t\t\t\tthat.resizeService.createImage(imgResized).then(function (image) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.clearRect(0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.width = image.width;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.canvas.height = image.height;\n\t\t\t\t\t\t\t\t\t\t\t\tthat.context.drawImage( image, 0, 0, image.width, image.height );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement = that.canvas.toDataURL('image/png');\n\t\t\t\t\t\t\t\t\t\t\t\tif(indexToReplace!==undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.splice(indexToReplace, 1, { path : dataURL, index: indexToReplace+1 } )\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst index = that.photoArray.length+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat.photoUploadArray.push({ path: dataURL, index: index });\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tthat.cdRef.detectChanges();\n\n\t\t\t\t\t\t\t\t\t\t\t\t// indexToReplace!==undefined ? that.photoArray.splice(indexToReplace, 1, { path : dataURL} ) : that.photoArray.push({ path: dataURL });\n\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while creating image : ', error);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('ERROR while resizing image : ', error);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}, 0, this );\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.log('ERROR while Read local pic :', error);\n\t\t\t\t});\n\n\t\t\t})\n\n\t\t}\n\n\n\t\tupload() {\n\t\t\tthis.uploadError = false;\n\t\t\tthis.uploadProgress = 1;\n\t\t\tlet obs: Observable[] = [];\n\t\t\tthis.count = 0;\n\t\t\tthis.total = this.photoUploadArray.length;\n\t\t\t\n\t\t\t// for (var i = 0; i < this.photoUploadArray.length; i++)\n\t\t\tthis.photoUploadArray.forEach(( img, i) =>{ \n\t\t\t\tconst formData = new FormData();\n\t\t\t\tconst file = this.readLocalPicService.b64toFile(img.path);\n\n\t\t\t\tformData.append( \"file\", file, `${this.room.email.split('@')[0]}-part-${img.index}.png`);\n\t\t\t\t\n\t\t\t\tobs.push(this.uploadSpacePhotos('photos', formData).pipe( catchError(err => of(err.status))) ) ;\n\n\t\t\t}) \n\n\t\t\t\n\n\t\t\tthis.subscription(`uploadPhotosSub$`, forkJoin(obs.map(o => o.pipe( \n\t\t\t\t\ttap(item => this.updateProgressMeter(item)), \n\t\t\t\t\t// toArray() \n\t\t\t\t)))\n\t\t\t\t.subscribe(event => {\n\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tevent.forEach((res ,i ) => {\n\t\t\t\t\t\t\t\tif(res?.message === 'File uploaded successfully!') {\n\n\t\t\t\t\t\t\t\t\tthis.uploadError = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tconst suffixes = ['', 'st','nd','rd'];\n\t\t\t\t\t\t\t\t\tthis.failedNo = `${i+1}${suffixes[i+1]}`;\n\t\t\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(i === (this.photoUploadArray.length-1)) {\n\t\t\t\t\t\t\t\t\tthis.photoUploadArray = [];\n\t\t\t\t\t\t\t\t\tthis.uploadingStatus = 'Complete';\n\t\t\t\t\t\t\t\t\tthis.event.emit(this._data.photos);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror => {\n\t\t\t\t\t\t\tthis._data.photos = [];\n\t\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t\t\tthis.uploadError = true;\n\t\t\t\t\t\t\tconsole.log('Error while uploadig room photos: ', error) ;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tprivate updateProgressMeter(item) {\n\t\t\tif(item?.message === 'File uploaded successfully!') {\n\t\t\t\tthis.count++;\n\t\t\t\tthis.uploadProgress = this.total > 0 ? Math.round((this.count / this.total) * 100) : 0;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t}\n\t\t}\n\t\n\t\n\t\treset() {\n\t\t\tthis.uploadProgress = null;\n\t\t\tthis.cdRef.detectChanges();\n\t\t}\n\n\t\tpublic timestamp (photo) {\n\t\t\treturn photo?.index ? '' : `?${(new Date()).getTime()}`;\n\t\t}\n\n\n\t\t/**\n\t\t * update function version -2 - returns observable instead of promise...\n\t\t * @param form_data data to be update \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\t public uploadSpacePhotos(apiSubRoute: string, form_data: HashMap, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/${apiSubRoute}`;\n\t\t\tconst body = form_data;\n\t\n\t\t\tconst token = this._composer.auth.token; //sessionStorage.length ? JSON.parse(sessionStorage.getItem('OAUTH.params')).access_token : '';\n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n\n\t\tpublic deletePhoto(i: number) {\n\t\t\tconst index = this.photoArray[i].index;\n\t\t\tconst photoName = index ? `${this.room.email.split('@')[0]}-part-${index}.png` : this.photoArray[i].path.split('rooms/')[1];\n\n\t\t\tthis.photoArray.splice(i, 1); \n\t\t\tthis.photoUploadArray.splice(i, 1);\n\n\t\t\tthis.deleteSpacePhotos(i, false, {photo_name: [ photoName ]}).subscribe( val => {\n\t\t\t\tconsole.log(val);\n\t\t\t\tthis._service.notifySuccess('Successfully deleted!');\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tconsole.log('Error while deleting room photos: ', error) ;\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t})\n\t\t}\n\n\n\t\t/**\n\t\t * \n\t\t * @param should_inject_concierge common value to be set to add concierge: true to the query url and body\n\t\t * @param query_params Map of query paramaters to add to the request URL\n\t\t */\n\t\tpublic deleteSpacePhotos(index: number, should_inject_concierge: Boolean = false, query_params: HashMap = {}):Observable{\n\t\t\tconst url = `/api/staff/rooms/delete`;\n\t\t\tconst body = query_params;\n\t\n\t\t\tconst token = this._composer.auth.token; \n\t\n\t\t\tconst headers = new HttpHeaders({\n\t\t\t\t'Authorization': `Bearer ${token}`,\n\t\t\t});\n\t\t\t\n\t\t\tconst requestOptions = { headers: headers };\n\t\n\t\t\treturn this.httpClient.post(url, body, {\n\t\t\t\t\t\t...requestOptions \n\t\t\t\t});\n\t\n\t\t}\n\n}\n","
\n
\n
{{ room?.roomname }}
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n
\n\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Selected photos ({{ photoArray.length }}/3)\n\t\t\t\t\tRequired photo parameters: landscape orientation, W 400x H 225 pixels, format PNG or WEBP\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tRoom photo #{{i+1}}\n\t\t\t\t\t\t{{ room.email.split('@')[0] }}-part-{{i+1}}.png \n\t\t\t\t\t\tRatio: 400x225\n\t\t\t\t\t
\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\tDrag & drop or\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{uploadingStatus}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{failedNo}} Photo failed to upload successfully. Please try again.\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\n \n
","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RoomAdminComponent } from './room-admin.component';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\n\nconst routes: Routes = [\n { path: '',\n children: [\n { path: '', component: RoomAdminComponent },\n {\n path: 'room-details', \n component: RoomDetailsWrapperComponent\n }\n ]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class RoomAdminRoutingModule { }\n\n\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n DEFAULT_BOOKING_DURATION,\n rulesForSpace,\n SpacesService,\n User,\n} from '@mckinsey-converge/data-common';\nimport {\n OrganisationService,\n ApplicationService,\n BuildingLevel,\n} from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, toMiddayUTC } from '@mckinsey-converge/date-tz';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { Space } from '@mckinsey-converge/data-common';\nimport { first, take } from 'rxjs/operators';\nimport { Identity, BaseDirective, closestToTimeSlotTz } from '@mckinsey-converge/base';\nimport { Store } from '@ngrx/store';\nimport { selectCurrentUser, UserStoreState } from '@mckinsey-converge/user';\nimport { RoomAdminService } from './services/room-admin.service';\nimport jsPDF, { RGBAData } from 'jspdf';\nimport { Hash } from 'crypto';\n\n@Component({\n selector: 'app-room-admin',\n templateUrl: './room-admin.component.html',\n styleUrls: ['./room-admin.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomAdminComponent extends BaseDirective implements OnInit {\n public spaces: Space[] = [];\n public newArr: any[];\n public location: string;\n public isOpen = false;\n\n public itemsCheckboxes = [\n {\n label: '',\n checked: false,\n id: '',\n building_id: '',\n name: '',\n email: '',\n roomname: '',\n isLevel: false,\n },\n ];\n\n public qrCodeUrls = [];\n\n public selectAll: boolean = false;\n\n public allLevels: any; //need this for populating levels in bulk-qr-overlay component\n\n /** DateTZ object of the active date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n\n /** ID of the active level */\n @Input() public level: string;\n\n /** List of levels available for the active building */\n public levels: BuildingLevel[] = [];\n\n /** List of space types available for the active building */\n public space_types: Identity[] = [];\n\n /** ID of the currently selected level */\n public active_level = '';\n\n /** List of legend keys to show */\n public legend_list: string[] = [];\n\n /** List of available legend keys */\n public readonly legend_keys: readonly Identity[] = [\n { name: 'Internal', id: 'internal', color: '#E69FC7', active: true },\n { name: 'Client', id: 'client', color: '#1F40E6', active: true },\n { name: 'External', id: 'external', color: '#8C5AC8', active: true },\n { name: 'Setup', id: 'setup', color: '#d32f2f', active: true },\n { name: 'Training', id: 'training', color: '#F0E700', active: true },\n { name: 'Interview', id: 'interview', color: '#348D02', active: true },\n { name: 'Declined', id: 'declined', color: '#617288', active: true },\n ];\n\n public detailsViewIndex = 0;\n\n public rowInfo = [];\n\n public has_access: boolean;\n currentUser: User;\n public enableOverlay = false;\n constructor(\n private _service: ApplicationService,\n private _spaces: SpacesService,\n private _org: OrganisationService,\n private _router: Router,\n private _booking_state_service: BookingStateService,\n private store: Store,\n private cdref: ChangeDetectorRef,\n private roomAdminService: RoomAdminService\n ) {\n super();\n }\n\n public eventFromChild(data: number) {\n this.detailsViewIndex = data;\n }\n\n public passRowToDetailsView(data: []) {\n this.rowInfo = data;\n }\n\n public returnToRoomAdmin(data: number) {\n this.detailsViewIndex = data;\n this.updatePayload();\n this.cdref.detectChanges();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Room Administration';\n\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._org.initialised.pipe(first((_) => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n this.legend_list = this.legend_keys.map((item) => `${item.id}`);\n this.subscription(\n 'building',\n this._org.listen('active_building').subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({\n date: this.dateTz.ms,\n is_local_tz: false,\n building_tz: this.timezone,\n });\n const building = this._org.building;\n this.has_access = building ? true : false;\n if (!this.has_access) {\n return;\n }\n\n /* istanbul ignore else */\n if (!building.levels.find((lvl) => lvl.id === this.active_level)) {\n this.active_level = building?.levels[0]?.id;\n this.updateLevel();\n }\n this.updateLevel();\n this.levels = [{ id: '', name: 'All Levels' } as any].concat(\n building.levels\n );\n this.levels.sort((a, b) =>\n b.name.localeCompare(a.name, undefined, {\n numeric: true,\n ignorePunctuation: true,\n })\n );\n this.space_types = [{ id: '', name: 'All Space Types' } as any].concat(\n this._org.space_types\n );\n })\n );\n });\n });\n }\n\n public updateLevel() {\n this._booking_state_service.setZone(this.active_level || this._org.building.id);\n this.enableOverlay = true;\n this._spaces.queryRooms({zone_ids: this._org.building.id }).subscribe(\n (res) => {\n const list = res.map((i) => this._spaces.process(i));\n this._router.navigate(['/room-admin']);\n this.detailsViewIndex = 0;\n this.updatePayload([...list]);\n });\n }\n\n public updatePayload(spaces?) {\n const zone_id = !this.level ? this._org.building.id : this.level;\n /** TO DO : remove _space.filter use */\n this.spaces = spaces ? [...spaces] : this._spaces.filter((_) => _.zones.indexOf(zone_id) >= 0);\n this.location = this._org.building.name;\n const roomDataSource = [];\n for (let i = 0; i < this.spaces.length; i++) {\n if (this.spaces[i].map_id) {\n\n roomDataSource.push({\n roomname: this.spaces[i].local_name,\n roomnum: this.spaces[i].map_id,\n level: this.spaces[i].level.short_name,\n capacity: this.spaces[i].capacity,\n roomtype: this.spaces[i].internal_or_external,\n bookable: this.spaces[i].bookable,\n settings: this.spaces[i].settings,\n equipment: this.spaces[i]?.equipment,\n room_style: this.spaces[i]?.room_style,\n email: this.spaces[i].email,\n roomobject: this.spaces[i],\n id: this.spaces[i].id,\n building: this.spaces[i].building,\n });\n }\n }\n\n this.newArr = [...roomDataSource]; // to make sure tabe is up to date\n\n let checkedFlag = { checked: false };\n this.itemsCheckboxes = this.newArr.map((item) => {\n return { ...item, ...checkedFlag };\n });\n this.allLevels = this._org.building.levels;\n this.enableOverlay = false;\n this.cdref.detectChanges();\n }\n\n public get timezone() {\n return this._org.building?.timezone || localStorage.getItem('CONCIERGE.timezone');\n }\n\n public bg_click_close() {\n this.isOpen = false;\n this.qrCodeUrls = [];\n this.itemsCheckboxes.forEach((checkbox) => (checkbox.checked = false));\n this.cdref.detectChanges();\n }\n\n public onQrCodeUrlsChange(newUrls: any[]) {\n this.qrCodeUrls = newUrls;\n }\n\n public downloadQrCode() {\n /**\n * Use the same array of selected rooms/levels for qr code to iterate\n */\n this.roomAdminService.doc = new jsPDF();\n let isRoom: boolean;\n this.qrCodeUrls.forEach((item, i) => {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector(`.qr-code${i} img`);\n let imageData: any = null;\n if (item.roomname) {\n isRoom = true;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.roomname, false, item.level); // roomname should be room name for rooms or [Level ] for levels\n } else if (item.name) {\n isRoom = false;\n imageData = this.roomAdminService.drawCanvas(qrcode, item.name, true, ''); // roomname should be room name for rooms or [Level ] for levels\n }\n // Add generated qr code image to the pdf\n switch ((i + 1) % 4) {\n case 1:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n break;\n case 2:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 5, 100, 100);\n break;\n case 3:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 3, 130, 100, 100);\n break;\n case 0:\n this.roomAdminService.doc.addImage(imageData, 'JPEG', 107, 130, 100, 100);\n this.roomAdminService.doc.addPage();\n break;\n }\n });\n this.roomAdminService.doc.save(`${this.location} - ${isRoom ? `rooms.pdf` : `levels.pdf`}`);\n }\n}\n","
\n \n
\n \n
\n
\n
\n
\n
\n
\n \n
\n

Room Administration

\n
\n
\n
\n
\n
\n
\n

Showing {{ this.location }} Rooms ({{ newArr?.length }})

\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n \n
\n
\n\n
\n\t\n
\n\n
\n \n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RoomAdminRoutingModule } from './room-admin-routing.module';\nimport { RoomAdminComponent } from './room-admin.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { RoomsTableComponent } from './rooms-table/rooms-table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { RoomDetailsComponent } from './room-details/room-details.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { QRCodeModule } from 'angularx-qrcode';\nimport { OverlayModule} from '@angular/cdk/overlay';\nimport { MatTabsModule} from '@angular/material/tabs';\nimport { RoomAdminService } from './services/room-admin.service';\nimport { BulkQrOverlayComponent } from './bulk-qr-overlay/bulk-qr-overlay.component';\nimport { IconComponent, LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { UiModule } from '@mckinsey-converge/ui';\nimport { RoomDetailsWrapperComponent } from './room-details/room-details-wrapper.component';\nimport { ManagePhotosComponent } from './manage-photos/manage-photos.component';\nimport { ResizeService, ReadLocalPicService } from './services/';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { ComposerModule } from '@placeos/composer';\nimport { FileDragNDropDirective } from './util/file-drag-n-drop.directive';\n\n\n\n@NgModule({\n declarations: [RoomAdminComponent, RoomsTableComponent, RoomDetailsComponent, RoomDetailsWrapperComponent, BulkQrOverlayComponent, ManagePhotosComponent, FileDragNDropDirective],\n imports: [\n CommonModule,\n RoomAdminRoutingModule,\n SharedContentModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatExpansionModule,\n FormsModule,\n ReactiveFormsModule,\n MatSnackBarModule,\n QRCodeModule,\n LegacyUiModule,\n OverlayModule,\n MatTabsModule,\n UiModule,\n LegacyOverlaysModule,\n MatProgressBarModule,\n ComposerModule\n ],\n providers: [\n ResizeService,\n ReadLocalPicService,\n RoomAdminService\n ],\n})\nexport class RoomAdminModule { }\n","import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'room-details-wrapper',\n template: `\n
\n \n \n
\n
\n
\n
\n \n
\n

Room Administration > Room Detail

\n

Room detail

\n
\n
\n
\n
\n \n
\n
\n
\n `,\n styleUrls: ['./room-details-wrapper.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsWrapperComponent implements OnInit {\n public rowInfo: any;\n \n\n\n constructor(\n private cd: ChangeDetectorRef,\n private _router: Router,\n ) {\n if(this._router.getCurrentNavigation() !== null && this._router.getCurrentNavigation().extras['state']?.details) {\n this.rowInfo = this._router.getCurrentNavigation().extras['state']?.details;\n }\n else {\n this._router.navigate(['room-admin']);\n }\n }\n\n public ngOnInit(): void {\n this.cd.detectChanges();\n }\n\n public getToRoomList() {\n this._router.navigate(['room-admin'])\n }\n\n}","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { SpacesService, noWhitespaceValidator, OrganisationService, SpaceEquipments, SpaceStyles, setupRoomImages, ApplicationService } from '@mckinsey-converge/data-common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DropdownOpion, CngSelectData } from '@mckinsey-converge/ui';\nimport { roomTypeOptions, roomSubsetOptions, roomVisibilityOptions, canteringAvailabilityOptions, room, RoomSubset } from '../util/room-admin-utility';\nimport jsPDF from 'jspdf';\nimport { Router } from '@angular/router';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ManagePhotosComponent } from '../manage-photos/manage-photos.component';\nimport { BaseDirective, DialogEvent, SpaceImageObject } from '@mckinsey-converge/base';\nimport { BehaviorSubject } from 'rxjs';\n\n\n\n@Component({\n selector: 'app-room-details',\n templateUrl: './room-details.component.html',\n styleUrls: ['./room-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RoomDetailsComponent extends BaseDirective implements OnInit {\n public reactiveForm: FormGroup;\n public room: room;\n public rowInfoData: any;\n public doc: jsPDF;\n public cityname: string;\n\n public roomTypeDD: CngSelectData;\n public roomSubsetDD: CngSelectData;\n public roomVisibilityDD: CngSelectData;\n public canteringAvailabilityDD: CngSelectData;\n\t\tpublic givenRoomType: any = 'internal';\n\t\tpublic givenRoomSubType: any = 'conference';\n\t\tpublic givenCateringAvailability: any;\n\t\tpublic uploadedPhotos : Array = [];\n\t\tpublic roomSubsetOptions:RoomSubset;\n\n @Input() set rowInfo(value: any) {\n this.rowInfoData = value;\n }\n @Input() set location(value: string) {\n this.cityname = value;\n }\n\n @Output('parentFun') parentFun: EventEmitter = new EventEmitter();\n\t\tpublic loadImages = new BehaviorSubject([]);\n\n public disableButtons = false;\n public enableOverlay = false;\n public windowLocation = location;\n\n\t// Set to a config once we know where the files are hosted.\n public rootFolderURL = 'assets/img/rooms/';\n\t\tpublic foundImages: SpaceImageObject[] = [];\n\t\tpublic roomImages: SpaceImageObject[] = [];\n\n\n\t\tpublic get roomImagesFileSlug(): string {\n\t\t\treturn this.rowInfoData.email.split('@')[0];\n\t\t}\n\n constructor(\n private _spaces: SpacesService,\n private cd: ChangeDetectorRef,\n private _snackBar: MatSnackBar,\n private _router: Router,\n\t\tprivate _dialog: MatDialog,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _org:OrganisationService,\n\t\tprivate _service: ApplicationService,\n ) {\n\t\t\t\tsuper();\n this.room = {} as room;\n }\n\n public ngOnInit(): void {\n this.doc = new jsPDF();\n history.pushState({}, '');\n\n this.cityname = this?.rowInfoData?.building?.city;\n\n\t\t\t\tconst internalSubSet: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('internal_room_types');\n\t\t\t\tconst externalSubset: DropdownOpion[] = this._org.getRoomTypeSubsetDDOptions('external_room_types');\n\t\t\t\tthis.roomSubsetOptions = {internal: internalSubSet, external: externalSubset};\n\n\t\t\t\tconst internal_or_external = this.rowInfoData?.roomobject?.internal_or_external; // ( this.rowInfoData?.roomobject?.filters?.external ? 'external' : 'internal') || this.rowInfoData?.settings;\n\n\t\t\t\tif(internal_or_external) {\n\t\t\t\t\tthis.givenRoomType = typeof(internal_or_external) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof(internal_or_external.value) === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? internal_or_external.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: internal_or_external.value.value; // temporary fix\n\t\t\t\t}\n\t\t\t\tconst roomSubType = this.rowInfoData?.roomobject?.room_type;\n\t\t\t\tthis.givenRoomSubType = Array.isArray(roomSubType) && roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? roomSubType[0]\n\t\t\t\t\t\t\t\t\t\t: Array.isArray(roomSubType) && !roomSubType.length\n\t\t\t\t\t\t\t\t\t\t? 'conference'\n\t\t\t\t\t\t\t\t\t\t: roomSubType || 'conference';\n\t\t\t\tthis.givenCateringAvailability = this.rowInfoData?.roomobject?.filters?.catering ? 'yes-onsite' : 'no';\n\n\n\t\t\t\tthis.rowInfoData && this.setAllDropdowns(this.rowInfoData);\n\n\n this.reactiveForm = new FormGroup({\n\n roomname: new FormControl(this.rowInfoData.roomname, [\n Validators.required,\n Validators.maxLength(250),\n Validators.minLength(1),\n Validators.pattern('[^=`~!#$%*{};\\'\"]*'),\n noWhitespaceValidator,\n ]),\n\n city: new FormControl({ value: this.cityname, disabled: true }, []),\n level: new FormControl({ value: this.rowInfoData.level, disabled: true }, []),\n roomnumber: new FormControl({ value: this.rowInfoData.roomnum, disabled: true }, []),\n\n\n\n\n internal_or_external: new FormControl( this.givenRoomType , []),\n\t\t\t\t\t\troom_type: new FormControl( this.givenRoomSubType, [] ),\n\n capacity: new FormControl(this.rowInfoData.capacity.toString(), [\n Validators.required,\n Validators.maxLength(250),\n Validators.pattern(/^(?!0+$)[0-9]{1,10}$/),\n ]),\n\n\n roomvisibility: new FormControl(this.rowInfoData.bookable),\n\t\t\t\t\t\tcatering: new FormControl(this.rowInfoData?.roomobject?.filters?.catering || false),\n\n\t\t\t\t\t\t// equipment_code === booking charge code ! if possible change equipment_code key to booking_charge_code\n\t\t\t\t\t\tequipment_code: new FormControl( this.rowInfoData?.roomobject?.filters?.equipment_code || false), // || this.rowInfoData?.settings['equipment_code']\n\t\t\t\t\t\tcharge_code: new FormControl(this.rowInfoData?.roomobject?.filters?.charge_code || false), // || this.rowInfoData.settings.charge_code\n\n vc: new FormControl(this.isFeatureChecked('vc')),\n conference_phone: new FormControl(this.isFeatureChecked('conference_phone')),\n wireless_content_sharing: new FormControl( this.isFeatureChecked('wireless_content_sharing')),\n flipchart: new FormControl(this.isFeatureChecked('flipchart')),\n glassboard: new FormControl(this.isFeatureChecked('glassboard')),\n whiteboard: new FormControl(this.isFeatureChecked('whiteboard')),\n natural_light: new FormControl(this.isFeatureChecked('natural_light')),\n boardroom: new FormControl(this.isFeatureChecked('boardroom')),\n cocktail: new FormControl(this.isFeatureChecked('cocktail')),\n theatre: new FormControl(this.isFeatureChecked('theatre')),\n workshop: new FormControl(this.isFeatureChecked('workshop')),\n u_shape: new FormControl(this.isFeatureChecked('u_shape')),\n miscellaneous: new FormControl(this.isFeatureChecked('miscellaneous')),\n });\n\n\n\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\n\t\t\t\t\tthis.subscription(\n\t\t\t\t\t\t'found_images',\n\t\t\t\t\t\tthis.loadImages.subscribe((imgArr: SpaceImageObject[]) => {\n\t\t\t\t\t\t\tthis.roomImages = imgArr;\n\t\t\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t\t\t}));\n\n }\n\n\n\n public isFeatureChecked(param: string) {\n switch (param) {\n case 'vc': {\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData.roomobject['filters']?.vc;\n }\n case 'natural_light': {\n return this.rowInfoData.roomobject['filters']?.natural_light; // || this.rowInfoData['settings']?.natural_light;\n }\n default: {\n // const { extra_features } = this.rowInfoData['settings'];\n return this.rowInfoData['equipment']?.includes(param) || this.rowInfoData['room_style']?.includes(param); //extra_features && extra_features?.includes(param) ||\n }\n }\n }\n\n get capacity() {\n\t\t\treturn this.reactiveForm.get('capacity');\n }\n\n get roomname() {\n\t\t\treturn this.reactiveForm.get('roomname');\n }\n\n public onSubmit(formValue: any) {\n\t\t\tlet roomObject = Object.assign({}, this.rowInfoData.roomobject);\n\n\t\t\tconst allowed_keys = [\n\t\t\t\t\t'edge_id',\n\t\t\t\t\t'name',\n\t\t\t\t\t'description',\n\t\t\t\t\t'email',\n\t\t\t\t\t'equipment',\n\t\t\t\t\t'capacity',\n\t\t\t\t\t'filters',\n\t\t\t\t\t'features',\n\t\t\t\t\t'bookable',\n\t\t\t\t\t'installed_ui_devices',\n\t\t\t\t\t'zones',\n\t\t\t\t\t'modules',\n\t\t\t\t\t'room_type',\n\t\t\t\t\t'room_style',\n\t\t\t\t\t'settings',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'support_url',\n\t\t\t\t\t'version',\n\t\t\t\t\t'id',\n\t\t\t];\n\n\t\t\t// this is to filter unwanted keys and make the request body match room model\n\t\t\troomObject = Object.keys(roomObject)\n\t\t\t\t\t.filter((key) => allowed_keys.includes(key))\n\t\t\t\t\t.reduce((obj, key) => {\n\t\t\t\t\t\t\tobj[key] = roomObject[key];\n\t\t\t\t\t\t\treturn obj;\n\t\t\t\t\t}, {});\n\n\n\t\t\t// roomObject.settings.room_name = formValue.roomname;\n\t\t\troomObject.simple_name = formValue.roomname;\n\n\t\t\tif(formValue.internal_or_external) {\n\t\t\t\t// roomObject.settings.internal_or_external = formValue.internal_or_external;\n\t\t\t\troomObject.filters['external'] = formValue.internal_or_external === 'external';\n\t\t\t}\n\t\t\troomObject.room_type = formValue.room_type;\n\t\t\troomObject.capacity = parseInt(formValue.capacity);\n\n\t\t\troomObject.bookable = formValue.roomvisibility;\n\t\t\t// roomObject.settings['equipment_code'] = formValue.equipment_code;\n\t\t\troomObject.filters['equipment_code'] = formValue.equipment_code;\n\n\t\t\t// roomObject.settings['catering'] = formValue.catering\n\t\t\troomObject.filters['catering'] = formValue.catering;\n\t\t\t// roomObject.settings['charge_code'] = formValue.charge_code;\n\t\t\troomObject.filters['charge_code'] = formValue.charge_code;\n\n\n\n\t\t\t// roomObject.features = getExtraFeatures();\n\t\t\t// roomObject.settings.extra_features = getExtraFeatures();\n\t\t\troomObject.filters.vc = formValue.vc;\n\t\t\t// roomObject.settings.vc = formValue.vc;\n\t\t\t// roomObject.settings.natural_light = formValue.natural_light;\n\t\t\troomObject.filters['natural_light'] = formValue.natural_light;\n\t\t\tgetExtraFeatures();\n\n\t\t\tfunction getExtraFeatures() {\n\t\t\t\t\tconst excludeFromExtraFeatures = ['capacity','charge_code','internal_or_external', 'roomvisibility', 'roomname', 'equipment_code', 'catering', 'room_type'];\n\t\t\t\t\t// let features = '';\n\n\t\t\t\t\tObject.keys(formValue).forEach((element) => {\n\t\t\t\t\t\t\tconst isEqAndDetail = formValue[element];\n\t\t\t\t\t\t\t// console.log(SpaceEquipments[element]);\n\t\t\t\t\t\t\tif (!excludeFromExtraFeatures.includes(element) && isEqAndDetail) {\n\t\t\t\t\t\t\t\t\t// features += ` ${element}`;\n\n\t\t\t\t\t\t\t\t\tif(SpaceEquipments[element]!==undefined && !roomObject?.equipment.includes(element) ) {\n\t\t\t\t\t\t\t\t\t\troomObject?.equipment.push(element);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t else if( SpaceStyles[element]!==undefined && !roomObject?.room_style.includes(element) ){\n\t\t\t\t\t\t\t\t\t\t roomObject.room_style.push(element);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t} else if(!isEqAndDetail) {\n\t\t\t\t\t\t\t\t// roomObject.features = roomObject.features.replace(element, '');\n\t\t\t\t\t\t\t\troomObject.equipment = SpaceEquipments[element]!==undefined ? roomObject.equipment.filter((value)=>value!=element) : roomObject.equipment;\n\t\t\t\t\t\t\t\troomObject.room_style = SpaceStyles[element]!==undefined ? roomObject.room_style.filter((value)=>value!=element) : roomObject.room_style;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// return features;\n\t\t\t}\n\n\t\t\tconst body = roomObject;\n\n\t\t\tif (this.reactiveForm.invalid) {\n\t\t\t\t\tfor (const control of Object.keys(this.reactiveForm.controls)) {\n\t\t\t\t\t\t\tthis.reactiveForm.controls[control].markAsTouched();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\tthis.disableButtons = true;\n\t\t\t\t\tthis.enableOverlay = true;\n\n\t\t\t\t\tthis._spaces.updateSpace(this.rowInfoData.id, body).subscribe(\n\t\t\t\t\t\t\t(data: any) => {\n\t\t\t\t\t\t\t\t\tthis.updateAllRooms(); // TO DO: this call enabled to pull all updated rooms to use on day/week view, In future remove this call here and day/week view should handle it there\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.reactiveForm.markAsPristine();\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t\t\tthis._service.notifySuccess('Operation Successful!');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\t\t\t\tthis._service.notifyError('There was an error');\n\t\t\t\t\t\t\t\t\tthis.disableButtons = false;\n\t\t\t\t\t\t\t\t\tthis.enableOverlay = false;\n\t\t\t\t\t\t\t\t\tthis.cd.markForCheck();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.room = this.reactiveForm.value;\n }\n\n public updateAllRooms(): void {\n\t\t // Adjusted the query by incorporating the \"zone_ids\" option to filter rooms based on specific zone IDs instead of considering all thousands of rooms.\n\t\t const option = {\n zone_ids: this._org.building.id\n }\n this._spaces.query(option, true).then(() => { }).catch(() => {});\n }\n\n public onCancel() {\n\t\t\tthis._router.navigate(['room-admin']);\n }\n\n\n\n\n\t\tpublic setAllDropdowns(rowInfoData) {\n\t\t\t// const {internal_or_external} = rowInfoData?.settings;\n\t\t\t// const roomType = typeof(internal_or_external) === 'string' ? internal_or_external : internal_or_external.value;\n\n\t\t\tthis.roomTypeDD = {\n\t\t\t\tddBoxClass: 'room-type',\n\t\t\t\toptions: roomTypeOptions,\n\t\t\t\tdefaultSelected: roomTypeOptions.filter(el => el.value === this.givenRoomType )[0],\n\t\t\t\tonChangeCallback: this.roomTypeChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomSubsetDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'room-subset',\n\t\t\t\t\toptions: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()],\n\t\t\t\t\tdefaultSelected: this.roomSubsetOptions[this.roomTypeDD?.defaultSelected?.value.toString()].filter(el => el.value === this.givenRoomSubType )[0],\n\t\t\t\t\tonChangeCallback: this.roomTypeSubsetChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.roomVisibilityDD = {\n\t\t\t\t\tddBoxClass: 'room-visibility',\n\t\t\t\t\toptions: roomVisibilityOptions,\n\t\t\t\t\tdefaultSelected: roomVisibilityOptions.filter(el => el.value === rowInfoData?.bookable.toString())[0],\n\t\t\t\t\tonChangeCallback: this.roomVisibilityChanged.bind(this)\n\t\t\t};\n\n\t\t\tthis.canteringAvailabilityDD = {\n\t\t\t\t\tdisabled: false,\n\t\t\t\t\tddBoxClass: 'catering-availability',\n\t\t\t\t\toptions: canteringAvailabilityOptions,\n\t\t\t\t\tdefaultSelected: canteringAvailabilityOptions.filter(el => el.value === this.givenCateringAvailability )[0],\n\t\t\t\t\tonChangeCallback: this.roomCateringChanged.bind(this)\n\t\t\t};\n\t\t}\n\n /**\n\t * store selected border by sorting method and apply to\n\t * @param sortingValue\n\t */\n\tpublic roomTypeChanged(type: DropdownOpion) {\n\t\t\tthis.reactiveForm.controls.internal_or_external.setValue(type.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\n\t\t\tif(!this.roomSubsetDD.disabled) {\n\t\t\t\tthis.roomSubsetDD.options = this.roomSubsetOptions[type.value.toString()];\n this.roomSubsetDD.defaultSelected = type.value === this.givenRoomType ? this.roomSubsetDD.options.filter(el => el.value === this.givenRoomSubType )[0] : this.roomSubsetOptions[type.value.toString()][0];\n\t\t\t\tthis.reactiveForm.controls.room_type.setValue(this.roomSubsetDD.defaultSelected.value);\n\t\t\t}\n\t\t\tthis.reactiveForm.markAsDirty();\n\t\t\tthis.cdRef.detectChanges();\n\t}\n\tpublic roomTypeSubsetChanged(subset: DropdownOpion ) {\n\t\t\t// console.log(subset);\n\t\t\tthis.reactiveForm.controls.room_type.setValue(subset.value);\n\t\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomVisibilityChanged(visibility: DropdownOpion) {\n\t\tthis.reactiveForm.controls.roomvisibility.setValue(visibility.value==='true');\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n\tpublic roomCateringChanged(isCatering: DropdownOpion) {\n\t\tthis.reactiveForm.controls.catering.setValue(!(isCatering.value==='no'));\n\t\tthis.reactiveForm.markAsDirty();\n\t}\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img): string | HTMLCanvasElement | HTMLImageElement {\n\t\t\t// TO DO : move to enum/utility file, while room detail more editable field developement\n\t\t\tconst width = 500;\n\t\t\tconst height = 550;\n\t\t\tconst arcY = 300;\n\t\t\tconst arc_X_Center = width/2;\n\t\t\tconst otrRadius = arc_X_Center - 2 ;\n\t\t\tconst whtRadius = otrRadius - 12;\n\t\t\tconst innrRadius = otrRadius - 15;\n\n\t\t\tconst canvas: HTMLCanvasElement = document.createElement('canvas');\n\t\t\tcanvas.setAttribute('width', width.toString());\n\t\t\tcanvas.setAttribute('height', height.toString());\n\t\t\tconst ctx = canvas.getContext('2d');\n\n\t\t\tctx.strokeStyle = \"transparent\";\n\t\t\tctx.moveTo(arc_X_Center, 0);\n\t\t\tctx.lineTo(arc_X_Center, height);\n\t\t\tctx.stroke();\n\n\t\t\tctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.textAlign = \"center\";\n\t\t\tctx.fillText(this.rowInfoData?.roomname , arc_X_Center, 20);\n\n\t\t\t//oputer arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//inner white arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t//second inner arc\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n\t\t\tctx.fillStyle = '#051C2C';\n\t\t\tctx.fill();\n\t\t\tctx.stroke();\n\n\t\t\t// header text\n\t\t\tctx.fillStyle = '#FFFFFF';\n\t\t\tctx.font = '44px Bower';\n\t\t\tctx.fillText('Book Me', arc_X_Center, 166);\n\n\t\t\t//centeral rectangle\n\t\t\tctx.fillRect(137, 187, 225, 225);\n\t\t\t//fill central rectangle with color\n\t\t\tctx.fillStyle = '#FFFFFF';\n\n\t\t\t// fill text at the bottom\n\t\t\tctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n\t\t\tctx.fillText('in Converge', arc_X_Center, 470);\n\n\t\t\t// draw QR code image into center of canvas\n\t\t\timg !== null && ctx.drawImage(img, 137, 187);\n\n\t\t\t// create data url\n\t\t\tconst dataURL: string | HTMLCanvasElement | HTMLImageElement =\n\t\t\tcanvas.toDataURL('image/png');\n\t\t\treturn dataURL;\n }\n\n /**\n * Function downloadQRPdf\n * download generated QR code to the local system\n */\n public downloadQRPdf(roomid?: string): void {\n // Get the generated QR code img and modifiy as per design\n const qrcode = document.querySelector('.qr-code img');\n let imageData = this.drawCanvas(qrcode);\n // Add generated qr code image to the pdf\n this.doc.addImage(imageData, 'JPEG', 3, 5, 100, 100);\n\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 5, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 3, 130, 100, 100);\n\t\t\t\t// this.doc.addImage(imageData, \"JPEG\", 107, 130, 100, 100);\n // this.doc.addImage(imageData, \"JPEG\", 10, 10); // left commented for alignment reference later in future\n // doc.addPage();\n\t\t\t\t// this.openQRInConverge();\n this.doc.save(`${this.rowInfoData.id}.pdf`);\n }\n\n /**\n * Not in use but keeping for future use\n * Function openQRInConverge\n * Open QR code in seperate tab\n */\n public openQRInConverge(): void {\n const qrcode = document.querySelector('.qr-code img');\n const dataURL = this.drawCanvas(qrcode);\n const win = window.open();\n win &&\n win.document.write(\n '
\\\n\t\t\t\t\t\t\t\\\n\t\t\t\t\t\t
'\n );\n }\n\n\t\t/** Open modal for adding equipment requirements to booking */\n\t\tpublic openManagePhotosModal() {\n\t\t\tconst equipment_ref = this._dialog.open(ManagePhotosComponent, {\n\t\t\t\tmaxWidth: '95vw',\n\t\t\t\twidth: '70em',\n\t\t\t\tdata: {\n\t\t\t\t\tphotos: this.roomImages,\n\t\t\t\t\troom: this.rowInfoData\n\t\t\t\t\t}\n\t\t\t});\n\t\t\tthis.subscription(\n\t\t\t\t'equipments_modal_events',\n\t\t\t\tequipment_ref.componentInstance.event.subscribe((event: any) => {\n\t\t\t\t\t/* istanbul ignore else */\n\n\t\t\t\t\t\t// this.uploadedPhotos = event;\n\t\t\t\t\t\tsetupRoomImages(this, [1,2,3], this.rootFolderURL, this.roomImagesFileSlug);\n\t\t\t\t\t\t//equipment_ref.close();\n\n\t\t\t\t})\n\t\t\t);\n\t\t\tequipment_ref.afterClosed().subscribe(() => {\n\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\tthis.unsub('equipments_modal_events')\n\t\t\t});\n\t\t}\n\n\n\t\tpublic get timestamp () {\n\t\t\treturn (new Date()).getTime()\n\t\t}\n\n\n}\n","
\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{ \troomname.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.maxlength \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters' \n\t\t\t\t\t\t\t\t\t\t\t\t: roomname.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t ? 'Some special characters and are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t:\troomname.errors?.whitespace\n\t\t\t\t\t\t\t\t\t\t\t\t? 'Only spaces are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'System generated name '+ roomname.value + ' (can not be changed)' }} \t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {{\n\t\t\t\t\t\t\t\t\t\t\t\tcapacity.errors?.required \n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field is required'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.maxlength\n\t\t\t\t\t\t\t\t\t\t\t\t? 'This field must have at most 250 characters'\n\t\t\t\t\t\t\t\t\t\t\t\t: capacity.errors?.pattern \n\t\t\t\t\t\t\t\t\t\t\t\t? 'Zero, letters and special characters are not allowed'\n\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t   Booking charge code required \n\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t   Catering charge code required \n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Room equipment and detail \n\t\t\t\t\t\t\n\t\t\t\t\t\t

Room Equipment

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Video Conference (VC)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Conference phone

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Wireless content sharing

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Flipchart

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Glassboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Whiteboard

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

Room Detail

\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Room with window only (natural light)

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Boardroom room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Cocktail room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Theatre room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Workshop room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

U shape room style

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t

Miscellaneous

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\n\t\t
\n\t
\n\n\t\n\t\n\n\t
\n\t\n
\n\n
\n\t
\n\t\tRoom URL\n\t\t
\n\t\t\t{{ windowLocation.origin }}/staff/#/home?id={{ rowInfoData.id }}\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\n\t
\n\t\n\t
\n\t\t\n\t
\n
\n\n
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n\n","import { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { map } from 'rxjs/operators';\nimport { Observable, of as observableOf, merge } from 'rxjs';\nimport { Component, OnInit, Input, Injectable } from '@angular/core';\n\n\n// data model \nexport interface RoomsTableItem {\n roomname: string;\n roomnum: string;\n level: string;\n capacity: number;\n roomtype: string;\n bookable: boolean;\n}\n\n// sample data\nconst EXAMPLE_DATA: RoomsTableItem[] = [\n {\n roomname: 'test',\n roomnum: '02',\n level: '01',\n capacity: 4,\n roomtype: 'internal',\n bookable: true,\n}\n];\n\n/**\n * Data source for the RoomsTable view. This class should\n * encapsulate all logic for fetching and manipulating the displayed data\n * (including sorting, pagination, and filtering).\n */\n\n// convert this class into service and use provider:root\n@Injectable({\n providedIn: 'root',\n})\nexport class RoomsTableDataSource extends DataSource {\n data: RoomsTableItem[] = EXAMPLE_DATA;\n paginator: MatPaginator;\n sort: MatSort;\n\n\n constructor(public datatwo: RoomsTableItem[],\n ) {\n super();\n this.data = datatwo;\n }\n\n /**\n * Connect this data source to the table. The table will only update when\n * the returned stream emits new items.\n * @returns A stream of the items to be rendered.\n */\n \n \n connect(): Observable {\n // Combine everything that affects the rendered data into one update\n // stream for the data-table to consume.\n\n const dataMutations = [\n observableOf(this.data),\n this.paginator.page,\n this.sort.sortChange\n ];\n\n return merge(...dataMutations).pipe(map(() => {\n return this.getPagedData(this.getSortedData([...this.data]));\n }));\n }\n\n /**\n * Called when the table is being destroyed. Use this function, to clean up\n * any open connections or free any held resources that were set up during connect.\n */\n disconnect() {}\n\n /**\n * Paginate the data (client-side). If you're using server-side pagination,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getPagedData(data: RoomsTableItem[]) {\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.splice(startIndex, this.paginator.pageSize);\n }\n\n /**\n * Sort the data (client-side). If you're using server-side sorting,\n * this would be replaced by requesting the appropriate data from the server.\n */\n private getSortedData(data: RoomsTableItem[]) {\n if (!this.sort.active || this.sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const isAsc = this.sort.direction === 'asc';\n switch (this.sort.active) {\n case 'roomname': return compare(a.roomname, b.roomname, isAsc);\n case 'roomnum': return compare(+a.roomnum, +b.roomnum, isAsc);\n case 'level': return compare(+a.level, +b.level, isAsc);\n case 'capacity': return compare(+a.capacity, +b.capacity, isAsc);\n case 'roomtype': return compare(a.roomtype, b.roomtype, isAsc);\n case 'bookable': return compare(+a.bookable, +b.bookable, isAsc);\n default: return 0;\n }\n });\n }\n}\n\n\n/** Simple sort comparator for example ID/Name columns (for client-side sorting). */\nfunction compare(a: string | number, b: string | number, isAsc: boolean) {\n return (a < b ? -1 : 1) * (isAsc ? 1 : -1);\n}\n","import {\n AfterViewInit,\n Component,\n OnInit,\n ViewChild,\n Input,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n SimpleChanges,\n} from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTable } from '@angular/material/table';\nimport { RoomsTableDataSource, RoomsTableItem } from './rooms-table-datasource';\nimport { first } from 'rxjs/operators';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'app-rooms-table',\n templateUrl: './rooms-table.component.html',\n styleUrls: ['./rooms-table.component.scss'],\n})\nexport class RoomsTableComponent extends BaseDirective implements AfterViewInit, OnInit {\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n @ViewChild(MatTable) table: MatTable;\n dataSource: RoomsTableDataSource;\n\n constructor(private _org: OrganisationService,\n private _router: Router,\n private route: ActivatedRoute,\n private cdref: ChangeDetectorRef,) {\n super();\n }\n\n public formattedInputValue: [];\n\n @Input() set inputValue(value: []) {\n this.formattedInputValue = value;\n }\n\n @Output() private onDetailsClick = new EventEmitter();\n\n @Output() public rowClicked = new EventEmitter<[]>();\n\n /** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */\n // tslint:disable-next-line: max-line-length\n public displayedColumns = [\n 'roomname',\n 'roomnum',\n 'level',\n 'capacity',\n 'roomtype',\n 'bookable',\n 'details',\n ];\n\n public detailsViewIndex = 0;\n\n public _onDetailsClick(index: number) {\n this.onDetailsClick.emit(index);\n }\n\n public ngOnInit() {\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n }\n public ngOnChanges(changes: SimpleChanges): void {\n // console.log(changes);\n this.dataSource = new RoomsTableDataSource(this.formattedInputValue);\n if(!changes.inputValue.firstChange) {\n this.dataSource.sort = this.sort;\n this.dataSource.paginator = this.paginator;\n this.table.dataSource = this.dataSource;\n this.paginator.firstPage();\n this.cdref.detectChanges();\n }\n\n }\n\n // ngAfterViewInit heavy on performance, figure out api\n // function that gives callback after html loads\n // eg, onchange, check mat table documentation\n\n public ngAfterViewInit() {\n // this.dataSource.sort = this.sort;\n // this.dataSource.paginator = this.paginator;\n // this.table.dataSource = this.dataSource;\n // this.paginator.firstPage();\n }\n\n public getRecord(row: []) {\n const navigationExtras = {\n relativeTo:this.route,\n skipLocationChange: true ,\n state: {\n details: { ...row }\n }\n }\n this._router.navigate(['room-details'], navigationExtras)\n }\n}\n","
\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
Room Name{{ row.roomname }}Room Number{{ row.roomnum }}Level{{ row.level }}Capacity{{ row.capacity }}Room Type\n Internal\n External\n Room visibility\n Bookable\n Non Bookable\n \n \n
\n\n \n \n
\n","export * from './resize.service';\nexport * from './read-local-pic.service';\n// export * from './room-admin.service';","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\n\nexport class ReadLocalPicService {\n /**\n * eventErrorDecoder\n * @param event \n * @returns errorMessage\n */\n private eventErrorDecoder(event: any): string {\n let errorMessage = null;\n\n switch (event.target.error.code) {\n case event.target.error.NOT_FOUND_ERR:\n errorMessage = 'NOT_FOUND_ERR';\n break;\n case event.target.error.SECURITY_ERR:\n errorMessage = 'SECURITY_ERR';\n break;\n case event.target.error.ABORT_ERR:\n errorMessage = 'ABORT_ERR';\n break;\n case event.target.error.NOT_READABLE_ERR:\n errorMessage = 'NOT_READABLE_ERR';\n break;\n case event.target.error.ENCODING_ERR:\n errorMessage = 'ENCODING_ERR';\n break;\n case event.target.error.NO_MODIFICATION_ALLOWED_ERR:\n errorMessage = 'NO_MODIFICATION_ALLOWED_ERR';\n break;\n case event.target.error.INVALID_STATE_ERR:\n errorMessage = 'INVALID_STATE_ERR';\n break;\n case event.target.error.SYNTAX_ERR:\n errorMessage = 'SYNTAX_ERR';\n break;\n case event.target.error.INVALID_MODIFICATION_ERR:\n errorMessage = 'INVALID_MODIFICATION_ERR';\n break;\n case event.target.error.QUOTA_EXCEEDED_ERR:\n errorMessage = 'QUOTA_EXCEEDED_ERR';\n break;\n case event.target.error.TYPE_MISMATCH_ERR:\n errorMessage = 'TYPE_MISMATCH_ERR';\n break;\n case event.target.error.PATH_EXISTS_ERR:\n errorMessage = 'PATH_EXISTS_ERR';\n break;\n default:\n errorMessage = 'Unknown Error: ' + event.target.error.code;\n break;\n }\n return errorMessage;\n }\n\n /**\n * \n * @param inputFile \n * @returns \n */\n async readFileInput(inputFile: any): Promise {\n return new Promise((resolve, reject) => {\n if (!inputFile ) {\n reject('No file selected');\n } else {\n if (\n !(window.File && window.FileReader && window.FileList && window.Blob)\n ) {\n reject('Your browser does not support reading files');\n }\n\n const reader = new FileReader();\n reader.onload = (e: any) => {\n resolve(e.target.result);\n };\n reader.onabort = (e: any) => {\n reject(\n 'Failed to convert file to base64img, aborted: ' +\n this.eventErrorDecoder(e)\n );\n };\n reader.onerror = (e: any) => {\n reject(\n 'Failed to convert file to base64img, error: ' +\n this.eventErrorDecoder(e)\n );\n };\n\n reader.readAsDataURL(inputFile);\n }\n });\n }\n\n\n b64toFile(dataURI): File {\n // convert the data URL to a byte string\n const byteString = atob(dataURI.split(',')[1]);\n\n // pull out the mime type from the data URL\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]\n\n // Convert to byte array\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n // new File\n // Create a blob that looks like a file.\n const blob = new File([ab],'room-photo.png', { 'type': mimeString });\n // blob['lastModifiedDate'] = (new Date()).toISOString();\n // blob['name'] = 'file';\n \n // Figure out what extension the file should have\n // switch(blob.type) {\n // case 'image/jpeg':\n // blob['name'] += '.jpg';\n // break;\n // case 'image/png':\n // blob['name'] += '.png';\n // break;\n // }\n // cast to a File\n return blob;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResizeService {\n private mainCanvas: HTMLCanvasElement;\n\n private isCanvasSupported(): boolean {\n const canvas = document.createElement('canvas');\n return !!(canvas.getContext && canvas.getContext('2d'));\n }\n\n /**\n * Create image on the fly using Image class \n * @param src \n * @param crossOrigin \n * @returns image\n */\n async createImage(\n src: string,\n crossOrigin?: string\n ): Promise {\n return new Promise((resolve, reject) => {\n const img = new Image();\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.onload = () => {\n resolve(img);\n };\n\n img.onerror = (err) => {\n reject(err);\n };\n\n img.src = src;\n });\n }\n\n /**\n * Resize canvas - create canvas on the fly draw image with given diamension\n * @param cnv \n * @param width \n * @param height \n * @returns temp canvas instance\n */\n resizeCanvas(\n cnv: HTMLCanvasElement,\n width: number,\n height: number\n ): HTMLCanvasElement {\n if (!width || !height) {\n return cnv;\n }\n\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n const cnx = tmpCanvas.getContext('2d');\n cnx.drawImage(cnv, 0, 0, tmpCanvas.width, tmpCanvas.height);\n return tmpCanvas;\n }\n\n /**\n * Resize image \n * @param src \n * @param options \n * @returns \n */\n async resizeImage(src: string, options: any): Promise {\n if (!this.isCanvasSupported()) {\n throw new Error('Canvas is not supported on your browser');\n }\n if (!options || !src) {\n throw new Error('Missing argument when calling resizeImage function');\n }\n //Config options\n options = {\n height: options.height\n ? options.height\n : options.width\n ? null\n : options.size\n ? null\n : 1024,\n width: options.width\n ? options.width\n : options.height\n ? null\n : options.size\n ? null\n : 1024,\n size: options.size ? options.size : 500,\n sizeScale: options.sizeScale ? options.sizeScale : 'ko',\n step: options.step ? options.step : 3,\n outputFormat: options.outputFormat ? options.outputFormat : 'image/jpeg',\n crossOrigin: options.crossOrigin ? options.crossOrigin : null,\n };\n\n try {\n const img = await this.createImage(src, options.crossOrigin); // read image first by given base64 or blob image\n\n if (options.height || options.width) {\n // resize image as per height and width\n return this.resizeImageWidthHeight(\n img,\n options.width,\n options.height,\n options.step,\n options.outputFormat\n );\n } else if (options.size) {\n if (typeof options.sizeScale === 'string') {\n switch (options.sizeScale.toLowerCase()) {\n case 'ko':\n options.size *= 1024;\n break;\n case 'mo':\n options.size *= 1024 * 1024;\n break;\n case 'go':\n options.size *= 1024 * 1024 * 1024;\n break;\n }\n }\n return this.resizeImageBySize(img, options.size, options.outputFormat); //resize by size in diamension ration\n } else {\n throw new Error('Missing option to resize the image');\n }\n } catch (err) {\n throw new Error(err);\n }\n }\n\n /**\n * ResizeImageWidthHeight - Create canvas - draw image if given height and with OR use image original diamensions\n * and draw image data url\n * @param image \n * @param width \n * @param height \n * @param step \n * @param outputFormat \n * @returns \n */\n resizeImageWidthHeight(\n image: HTMLImageElement,\n width: number,\n height: number,\n step: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n\n if (!width && !height) {\n width = image.width;\n height = image.height;\n } else if (!width && height) {\n width = (height / image.height) * image.width;\n } else if (width && !height) {\n height = (width / image.width) * image.height;\n }\n\n const pixelStepWidth = image.width === width || !step ? 0 : (image.width - width) / step;\n const pixelStepHeight = image.height === height || !step ? 0 : (image.height - height) / step;\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n for (let i = 1; i < step; i++) {\n const newWidth = image.width - pixelStepWidth * i;\n const newHeight = image.height - pixelStepHeight * i;\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, newWidth, newHeight);\n }\n this.mainCanvas = this.resizeCanvas(this.mainCanvas, width, height);\n\n return this.mainCanvas.toDataURL(outputFormat);\n }\n\n /**\n * resizeImageBySize - resize image by given size in ration \n * \n * @param image \n * @param targetSize \n * @param outputFormat \n * @returns \n */\n resizeImageBySize(\n image: HTMLImageElement,\n targetSize: number,\n outputFormat: string\n ): string {\n if (!image) {\n return null;\n }\n if (!outputFormat) {\n outputFormat = 'image/jpeg';\n }\n\n this.mainCanvas = document.createElement('canvas');\n this.mainCanvas.width = image.width;\n this.mainCanvas.height = image.height;\n this.mainCanvas\n .getContext('2d')\n .drawImage(image, 0, 0, this.mainCanvas.width, this.mainCanvas.height);\n\n let tmpResult = this.mainCanvas.toDataURL(outputFormat);\n let result = tmpResult;\n\n const sizeOfTheImage = this.calulateImageSize(tmpResult, outputFormat);\n let divideStrategy = Math.max(\n 1,\n Math.min(sizeOfTheImage / targetSize, 200)\n );\n\n let iteratorLimit = 20;\n while (sizeOfTheImage > targetSize && iteratorLimit !== 0) {\n iteratorLimit--;\n\n const newImageSize = {\n width: this.mainCanvas.width / divideStrategy,\n height: this.mainCanvas.height / divideStrategy,\n };\n const canvas = this.resizeCanvas(\n this.mainCanvas,\n newImageSize.width,\n newImageSize.height\n );\n\n tmpResult = canvas.toDataURL(outputFormat);\n const sizeOfTheImageTmp = this.calulateImageSize(tmpResult, outputFormat);\n\n if (sizeOfTheImageTmp / targetSize < 0.5 || sizeOfTheImageTmp === 0) {\n divideStrategy = divideStrategy / 2;\n if (divideStrategy < 1) {\n iteratorLimit = 0;\n }\n } else {\n this.mainCanvas = canvas;\n result = tmpResult;\n }\n\n this.mainCanvas = canvas;\n }\n\n return result;\n }\n\n calulateImageSize(imgString: string, outputFormat: string): number {\n switch (outputFormat) {\n case 'image/jpeg':\n outputFormat = 'image/jpg';\n break;\n default:\n outputFormat = 'image/jpg';\n break;\n }\n return Math.max(\n 0,\n Math.round(\n ((imgString.length - ('data:' + outputFormat + ';base64,').length) *3) / 4 \n )\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport jsPDF from 'jspdf';\n@Injectable({ \n providedIn: 'root' \n}) \nexport class RoomAdminService { \n \n public doc = new jsPDF();\n\n /**\n * Function drawCanvas - Generate canvas as per required design for QR code\n * https://mckinsey.atlassian.net/browse/CNG-10\n * @param img\n * @returns canvas image\n */\n drawCanvas(img, name, isForLevels = false, level): string | HTMLCanvasElement | HTMLImageElement {\n // TO DO : move to enum/utility file, while room detail more editable field developement \n const width = 500;\n const height = 550;\n const arcY = 300;\n const arc_X_Center = width/2;\n const otrRadius = arc_X_Center - 2 ;\n const whtRadius = otrRadius - 12;\n const innrRadius = otrRadius - 15;\n \n const canvas: HTMLCanvasElement = document.createElement('canvas');\n canvas.setAttribute('width', width.toString());\n canvas.setAttribute('height', height.toString());\n const ctx = canvas.getContext('2d');\n \n ctx.strokeStyle = \"transparent\";\n ctx.moveTo(arc_X_Center, 0);\n ctx.lineTo(arc_X_Center, height);\n ctx.stroke(); \n \n ctx.font = '14px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.textAlign = \"center\"; \n ctx.fillText( isForLevels ? name : name + ' (L-' + level + \")\", arc_X_Center, 20 ); \n\n //oputer arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, otrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n //inner white arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, whtRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#FFFFFF';\n ctx.fill();\n ctx.stroke();\n \n //second inner arc\n ctx.beginPath();\n ctx.arc(arc_X_Center, arcY, innrRadius, 0, 2 * Math.PI);\n ctx.fillStyle = '#051C2C';\n ctx.fill();\n ctx.stroke();\n \n // header text\n ctx.fillStyle = '#FFFFFF';\n ctx.font = '44px Bower';\n ctx.fillText( isForLevels ? 'Book a room' : 'Book Me', arc_X_Center, 166);\n \n //centeral rectangle\n ctx.fillRect(137, 187, 225, 225);\n //fill central rectangle with color\n ctx.fillStyle = '#FFFFFF';\n \n // fill text at the bottom\n ctx.font = '29px McKinsey Sans, Helvetica Neue, Arial, sans-serif';\n ctx.fillText('in Converge', arc_X_Center, 470);\n \n // draw QR code image into center of canvas\n img !== null && ctx.drawImage(img, 137, 187);\n \n // create data url\n const dataURL: string | HTMLCanvasElement | HTMLImageElement =\n canvas.toDataURL('image/png');\n return dataURL;\n }\n \n}","import { Directive, HostListener, HostBinding, Output, EventEmitter, Input } from '@angular/core';\nimport { RequiredFileType } from './room-admin-utility';\n\n@Directive({\n selector: '[fileDragDrop]'\n})\n\nexport class FileDragNDropDirective {\n //@Input() private allowed_extensions : Array = ['png', 'jpg', 'bmp'];\n @Output() private filesChangeEmiter : EventEmitter = new EventEmitter();\n //@Output() private filesInvalidEmiter : EventEmitter = new EventEmitter();\n @HostBinding('style.background') private background = ''; //'#eee';\n @HostBinding('style.border') private borderStyle = '2px solid'; //'2px dashed';\n @HostBinding('style.border-color') private borderColor = '#E6E6E6';\n @HostBinding('style.border-radius') private borderRadius = '1px';\n\n constructor() { }\n\n @HostListener('dragover', ['$event']) public onDragOver(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = 'lightgray';\n this.borderColor = 'cadetblue';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('dragleave', ['$event']) public onDragLeave(evt){\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n }\n\n @HostListener('drop', ['$event']) public onDrop(evt){\n evt.preventDefault();\n evt.stopPropagation();\n const ext = RequiredFileType.split(',');\n this.background = '#eee';\n this.borderColor = '#696D7D';\n this.borderStyle = '1px dashed';\n // debugger;\n let files = [...new Set(evt.dataTransfer.files)].filter((f:File) => ext.includes(f.type)); //evt.dataTransfer.files;\n // let valid_files : Array = files;\n this.filesChangeEmiter.emit(files);\n }\n}","import { DropdownOpion } from '@mckinsey-converge/ui';\n\nexport interface RoomSubset {\n\tinternal: DropdownOpion[];\n\texternal: DropdownOpion[];\n}\n\nexport interface room {\n\troomname: string;\n\troomnumber: number;\n\tcity: string;\n\tlevel: number;\n\tcapacity: number;\n\troomtype: string;\n\troomvisibility: boolean;\n\tvc: boolean;\n\tconference_phone: boolean;\n\twireless_content_sharing: boolean;\n\tflipchart: boolean;\n\tglassboard: boolean;\n\twhiteboard: boolean;\n\tnatural_light: boolean;\n\tboardroom: boolean;\n\tcocktail: boolean;\n\ttheatre: boolean;\n\tworkshop: boolean;\n\tushape: boolean;\n\tmiscellaneous: boolean;\n}\n\nexport const roomTypeOptions: DropdownOpion[] = [\n { display: 'Internal', value: 'internal', meta: {} },\n { display: 'External', value: 'external', meta: {} },\n\t]\n\nexport const roomSubsetOptions: RoomSubset = {\n\t'external': [\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t],\n\t'internal': [\n\t\t{ display: 'Meeting', value: 'meeting', meta: {} },\n\t\t{ display: 'Partner', value: 'partner', meta: {} },\n\t\t{ display: 'Phonebooth', value: 'phonebooth', meta: {} },\n\t\t{ display: 'Team', value: 'team', meta: {} },\n\t\t{ display: 'Conference', value: 'conference', meta: {} },\n\t]\n}\n\nexport const roomVisibilityOptions: DropdownOpion[] = [\n\t{ display: 'Bookable', value: 'true', meta: {} },\n\t{ display: 'Non-bookable', value: 'false', meta: {} },\n]\n\nexport const canteringAvailabilityOptions: DropdownOpion[] = [\n\t{ display: 'Yes - Onsite', value: 'yes-onsite', meta: {} },\n\t// { display: 'Yes - Offsite', value: 'yes-offsite', meta: {} },\n\t{ display: 'No', value: 'no', meta: {} },\n]\n\nexport const RoomPhotoDiamension = {\n\twidth: 400,\n\theight: 225\n}\n\nexport const RequiredFileType = 'image/png,image/jpg,image/jpeg,image/webp';\n\nexport function timestamp(){ \n\treturn (new Date()).getTime(); \n} \n","import {\n NgModule,\n Type\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { EditorModule } from '@tinymce/tinymce-angular';\nimport { ComposerModule } from '@placeos/composer';\n\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CdkTableModule } from '@angular/cdk/table';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\nimport { APipesModule } from '@acaprojects/ngx-pipes';\nimport { ACustomEventsModule } from '@acaprojects/ngx-custom-events';\nimport { LoginComponent } from '../login/login.component';\nimport { TopbarHeaderComponent } from '../components/topbar-header/topbar-header.component';\n\nimport {\n CdkDropListScrollContainer,\n ReplacePipe\n} from '@mckinsey-converge/base';\nimport { SidebarComponent } from '../components/sidebar/sidebar.component';\nimport { LegacyUiModule } from '@mckinsey-converge/legacy-ui';\nimport { LegacyOverlaysModule } from '@mckinsey-converge/legacy-overlays';\nimport { AccessDenied } from '../components/access-denied/access-denied.component';\nimport { UiModule } from '@mckinsey-converge/ui';\n\nconst COMPONENTS: Type[] = [\n LoginComponent,\n TopbarHeaderComponent,\n SidebarComponent,\n AccessDenied\n];\n\nconst DIRECTIVES: Type[] = [\n CdkDropListScrollContainer\n];\n\nconst MATERIAL_MODULES: any[] = [\n MatButtonModule,\n MatSnackBarModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatAutocompleteModule,\n MatSelectModule,\n MatChipsModule,\n MatRippleModule,\n MatMenuModule,\n MatCheckboxModule,\n MatTooltipModule,\n MatRadioModule,\n MatTabsModule,\n MatSlideToggleModule\n];\n\nconst CDK_MODULES: any[] = [\n ScrollingModule,\n DragDropModule,\n CdkTableModule\n];\n\n@NgModule({\n declarations: [\n ...COMPONENTS,\n ...DIRECTIVES,\n ReplacePipe\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n APipesModule,\n ACustomEventsModule,\n RouterModule,\n EditorModule,\n ComposerModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n UiModule\n ],\n exports: [\n APipesModule,\n ACustomEventsModule,\n LegacyUiModule,\n LegacyOverlaysModule,\n ...COMPONENTS,\n ...DIRECTIVES,\n ...MATERIAL_MODULES,\n ...CDK_MODULES,\n ReplacePipe\n ]\n})\nexport class SharedContentModule {\n}\n","import { Component, OnInit } from '@angular/core';\nimport { first } from 'rxjs/operators';\n\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { ApplicationLoadingState, LoadingState } from '@mckinsey-converge/base';\nimport { ApplicationIcon } from '@mckinsey-converge/data-common';\nimport { UsersService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'app-shell-wrapper',\n templateUrl: './shell.component.html',\n styleUrls: ['./shell.component.scss'],\n})\nexport class ShellWrapperComponent extends BaseDirective implements OnInit {\n /** Loading state of the application */\n public loading_state: ApplicationLoadingState;\n /** Logo of the application organisation */\n public logo: ApplicationIcon;\n\n constructor(private _service: ApplicationService, private _users: UsersService) {\n super();\n }\n\n /** Whether the user needs to login */\n public get show_login(): boolean {\n return !this._users.is_logged_in;\n }\n\n /** Whether a module is still loading data */\n public get is_loading(): boolean {\n if (this.loading_state) {\n for (const mod in this.loading_state) {\n if (this.loading_state[mod] && this.loading_state[mod].state === 'loading') {\n return true;\n }\n }\n }\n return false;\n }\n\n /** List of modules with a loading state */\n public get loading_state_list(): LoadingState[] {\n const list: LoadingState[] = [];\n for (const mod in this.loading_state) {\n if (this.loading_state[mod]) {\n list.push(this.loading_state[mod]);\n }\n }\n return list;\n }\n\n public ngOnInit(): void {\n this.subscription(\n 'loading',\n this._service.listen('loading').subscribe((loading) => {\n this.loading_state = loading;\n })\n );\n this._service.initialised.pipe(first((_) => _)).subscribe(() => {\n this.logo = this._service.setting('app.logo_dark') || { type: 'icon' };\n });\n }\n}\n","\n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n \n
\n
Converge is loading
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseClass, Identity } from '@mckinsey-converge/base';\n\n@Component({\n selector: 'a-event-form',\n templateUrl: './event-form.component.html',\n styleUrls: ['./event-form.component.scss'],\n})\nexport class EventFormComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Booking details to display */\n @Input() public form: FormGroup;\n\n /** List of attendees in the booking */\n public attendees: User[] = [];\n\n constructor() {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (changes.event || changes.form) {\n this.attendees = this.form?.value.attendees || [];\n this.subscription(\n 'attendees',\n this.form\n .get('attendees')\n ?.valueChanges.subscribe((l) => (this.attendees = l || []))\n );\n }\n }\n\n public addVisitor() {\n const list = this.form.controls.attendees.value;\n const visitor = new User({ visitor: true, external: true, email: '' })\n list.push(visitor);\n //** Create visitor form group */\n const visitorFG = this.createVisitor(visitor);\n //** Push to visitor form array */\n this.getVisitors.push(visitorFG);\n this.form.controls.attendees.setValue(list);\n this.form.markAsDirty();\n }\n\n /**\n * Create visitor form group\n */\n createVisitor(visitor) {\n return new FormGroup({\n name: new FormControl(visitor.name, {validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(visitor.email, { validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n /** Replace visitor with updated values */\n public replaceVisitor(item: User, index: number) {\n const attendees = this.attendees;\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n attendees.splice(actualIndex, 1, item);\n this.form.controls.attendees.setValue(attendees);\n this.form.markAsDirty();\n }\n\n\n /** Remove visitor from attendee list */\n public removeVisitor(item: User, index: number) {\n const filteredAttendees = this.getFilteredAttendees();\n const actualIndex = this.attendees.indexOf(filteredAttendees[index]);\n const attendees = this.attendees.filter((_, i) => i !== actualIndex);\n this.form.controls.attendees.setValue(attendees);\n \n if (index > -1) {\n this.getVisitors.removeAt(index);\n }\n this.form.markAsDirty();\n }\n\n /**\n * Get the visitor form array \n */\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n public trackByFn(index: number, item: Identity) {\n return index;\n }\n\n getFilteredAttendees() {\n return this.attendees.filter(item => item.external || item.visitor);\n }\n \n getFormControl(i: number) {\n return this.getVisitors.at(i);\n }\n}\n","
\n
\n
\n
\n \n
\n
{{ event.start_time }} - {{ event.duration > 0 ? event.end_time : '' }}
\n
\n
S
\n
{{ event.organiser?.name }}
\n
\n
\n \n \n \n Title is required\n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n \n
\n
\n
\n","import { Component, OnInit, Input, SimpleChanges, OnChanges, EventEmitter, Output } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { User } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-form',\n templateUrl: './visitor-form.component.html',\n styleUrls: ['./visitor-form.component.scss'],\n})\nexport class VisitorFormComponent extends BaseDirective {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Emitter for changes to the person */\n @Output() public personChange = new EventEmitter();\n /** Form fields for visitor details */\n // public form: FormGroup;\n @Input() public form: FormGroup\n\n constructor(private _service: ApplicationService) {\n super();\n }\n\n public ngOnInit(): void { \n this.form.valueChanges.subscribe( values => {\n this.person = new User({ ...values, visitor: true, external: true });\n this.personChange.emit(this.person);\n })\n }\n\n \n}\n","
\n \n
\n
\n
\n
\n \n \n \n Name is required\n \n
\n
\n \n \n \n A valid email address is required\n \n
\n
\n
\n
\n","import { Component, OnInit, Inject, Output, EventEmitter } from '@angular/core';\nimport { FormGroup, Validators, FormControl, FormBuilder, FormArray } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DialogEvent } from '@mckinsey-converge/base';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport {\n ConfirmModalComponent,\n CONFIRM_METADATA,\n} from '@mckinsey-converge/legacy-overlays';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\n\nexport interface VisitorsFormModalData {\n /** Details of visitor listing */\n booking: Booking;\n}\n\n@Component({\n selector: 'a-visitors-form-modal',\n templateUrl: './visitors-form-modal.component.html',\n styleUrls: ['./visitors-form-modal.component.scss'],\n})\nexport class VisitorsFormModalComponent extends BaseDirective implements OnInit {\n /** Emitter for user action on the modal */\n @Output() public event = new EventEmitter();\n /** Form fields for visitor booking */\n public form: FormGroup;\n /** Display string for the loading state */\n public loading: string;\n attendeesStatus: boolean = true;\n\n /** Visitor booking data */\n public get booking(): Booking {\n return this._data.booking;\n }\n\n /** Whether form fields contain an attendee */\n public get has_attendees() {\n return (\n this.form &&\n this.form.controls.attendees.value &&\n this.form.controls.attendees.value.length\n );\n }\n\n constructor(\n private _service: ApplicationService,\n private _bookings: BookingsService,\n private _booking_state: BookingStateService,\n private _dialog_ref: MatDialogRef,\n private _dialog: MatDialog,\n private fb: FormBuilder,\n @Inject(MAT_DIALOG_DATA) private _data: VisitorsFormModalData\n ) {\n super();\n }\n\n public ngOnInit(): void {\n\n this.form = new FormGroup({\n title: new FormControl(this.booking.title, [Validators.required]),\n attendees: new FormControl([...this.booking.attendees], [Validators.minLength(1)]),\n visitors: this.fb.array([])\n });\n if (this.booking.id) {\n this.form.controls.title.disable();\n }\n\n /** \n * Create visitor form for existing visitors\n */\n this.booking.attendees.forEach( (el) => {\n if(el.external || el.visitor) {\n const visitorFG = this.createVisitor(el.name, el.email);\n this.getVisitors.push(visitorFG);\n // (this.form.controls.visitors).markAsTouched();\n }\n });\n }\n\n createVisitor(name, email) {\n return new FormGroup({\n name: new FormControl(name, { validators: [Validators.required, Validators.minLength(2)], updateOn: 'blur' }),\n email: new FormControl(email, {validators: [Validators.required, Validators.email], updateOn: 'blur' }),\n });\n }\n\n public get getVisitors() {\n return this.form.get(\"visitors\") as FormArray;\n }\n\n /** Delete visitor booking */\n public delete() {\n const ref = this._dialog.open(ConfirmModalComponent, {\n ...CONFIRM_METADATA,\n data: {\n title: 'Delete meeting',\n content: 'Are you sure you wish to delete this meeting?',\n icon: { type: 'icon', class: 'material-icons', content: 'delete' },\n action: 'Ok',\n },\n autoFocus: false,\n backdropClass: 'mck-modal-backdrop',\n });\n this.subscription(\n 'confirm',\n ref.componentInstance.event.subscribe((event: DialogEvent) => {\n /* istanbul ignore else */\n if (event.reason === 'done') {\n /* istanbul ignore else */\n if (this.booking.id) {\n this.loading = 'Deleting visitor booking...';\n this._dialog_ref.disableClose = true;\n this.booking.delete().then(\n () => {\n this.event.emit({ reason: 'done' });\n this._service.notifySuccess('Successfully removed visitors.');\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to remove visitors. Error: ${err.message || err}`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n }\n ref.close();\n })\n );\n }\n\n /** Save changes to visitor booking */\n public save() {\n this.timeout('save', () => {\n this.loading = 'Saving visitor booking...';\n this.form.markAllAsTouched();\n this._dialog_ref.disableClose = true;\n /* istanbul ignore else */\n if (this.form.dirty && this.form.valid) {\n const attendees = this.form.controls.attendees.value;\n for (const attendee of attendees) {\n if (!attendee.email) {\n attendee.email = `${Math.floor(Math.random() * 99999)}@guest.mckinsey.com`;\n }\n }\n const new_booking = new Booking({ ...this.booking.toJSON(), ...this.form.value });\n this._bookings.save(new_booking).then(\n (bkn) => {\n this.event.emit({ reason: 'done', metadata: bkn });\n this._service.notifySuccess(\n this.booking.id\n ? 'Successfully updated visitors.'\n : 'Successfully added visitors.'\n );\n this._booking_state.replace(new Booking({ ...this.booking, ...bkn.toApiJSON() }));\n this._dialog_ref.close();\n },\n (err) => {\n this.loading = null;\n this._service.notifyError(\n `Failed to ${this.booking.id ? 'update' : 'add'} visitors. Error: ${\n err.message || err\n }`\n );\n this._dialog_ref.disableClose = false;\n }\n );\n }\n else {\n this.loading = null;\n this._dialog_ref.disableClose = false;\n this._dialog_ref.close();\n }\n });\n }\n}\n","
\n
{{ booking.id ? 'Edit' : 'New' }} Visitors
\n \n
\n\n
\n \n
\n
\n\n
\n \n
\n
\n\n
\n
\n
\n \n
\n
{{ loading }}
\n
\n
\n
\n","import { Component, Input, SimpleChanges, OnChanges, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { ANIMATION_SHOW_CONTRACT_EXPAND } from '@mckinsey-converge/animations';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from '../../overlays/visitors-form-modal/visitors-form-modal.component';\nimport { BaseClass, unique } from '@mckinsey-converge/base';;\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor-booking',\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n animations: [ANIMATION_SHOW_CONTRACT_EXPAND],\n})\nexport class VisitorBookingItemComponent extends BaseClass implements OnChanges {\n /** Booking details to display */\n @Input() public event: Booking;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Whether attendee list should be shown */\n public show_attendees: boolean;\n /** Whether all the attendees have checked in */\n public checked_in: boolean = false;\n /** Whether all attendees are being checked in */\n public loading: boolean;\n\n public matched_attendees = [];\n\n /** Whether event will start soon or has started */\n public get upcoming() {\n const status = this.event.timeBasedStatusLabel;\n return status === 'upcoming' || status === 'in_progress';\n }\n\n /** Display string for checkin statuses of all attendees */\n public get status(): string {\n const { checked_in, count } = this.checkedInStatus();\n return `${checked_in} / ${count}`;\n }\n\n\n /** Whether user is a match for */\n public is_match(person: any): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n !search ||\n person.name.toLowerCase().indexOf(search) >= 0 ||\n person.email.toLowerCase().indexOf(search) >= 0\n );\n }\n\n constructor(private _service: ApplicationService, private _bookings: BookingsService, private _dialog: MatDialog) {\n super();\n }\n\n public checkedInStatus() {\n const checked_in_users = this.event.checkInsArray;\n return this.event.attendees.reduce(\n (counts, user) => {\n /* istanbul ignore else */\n if (user.external) {\n counts.count++;\n /* istanbul ignore else */\n if (checked_in_users.indexOf(user.email) >= 0) {\n counts.checked_in++;\n }\n }\n return counts;\n },\n { checked_in: 0, count: 0 }\n );\n }\n\n /**\n * Checkin the attendee\n */\n public async checkin() {\n this.loading = true;\n const value = await this._bookings\n .checkin(this.event.id, {\n host_email: this.event.organiser.email,\n attendees: unique(this.event.attendees.map(user => ({ name: user.name, email: user.email }))),\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n })\n .catch((err) => {\n this._service.notifyError(`Error checking in all attendees for booking. Error: ${err.message || err}`);\n });\n if (value) {\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins: value.check_ins\n });\n this.checked.emit();\n }\n this.loading = false;\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n const subject = encodeURIComponent(\n `${this.event.title}\" at ${this.event.start_time}, ${this.event.date_string}`\n );\n return `mailto:${this.event.attendees.filter(user => !user.email.includes('@guest'))\n .map((user) => user.email)\n .join(',')}?Subject=${subject}\"`;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.search) {\n if (!this.search) this.show_attendees = false;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n this.timeout('on_search', () => this.show_attendees = !!this.search, 50);\n }\n if (changes.event) {\n const { checked_in, count } = this.checkedInStatus();\n this.checked_in = checked_in >= count;\n this.matched_attendees = this.event?.attendees.filter(_ => this.is_match(_));\n }\n }\n\n public openEditModal() {\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking: this.event,\n },\n }\n );\n }\n}\n","
\n
\n
\n \n
\n
\n \n {{ event.start_time }}\n - {{ event.duration > 0 ? event.end_time : '' }}\n \n All Day\n
\n
\n
{{ event.organiser?.name }}
\n
\n
{{ event.company.length }}
\n
{{ event.title }}
\n
{{ event.multi_rooms?.simple_name || event.local_room_name }}
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n \n
\n
\n","import { Component, OnInit, Input, SimpleChanges } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { BookingStateService } from '@mckinsey-converge/data-common';\nimport { DateNow, DateTZ, convertTimezonedTimestampToLocalDateTz} from '@mckinsey-converge/date-tz';\n\n\n@Component({\n selector: 'visitor-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n})\nexport class VisitorTimelineComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n @Input() public dateTz: DateTZ = DateNow(new Date());\n /** Filter string */\n @Input() public search: string;\n /** Whether all bookings should be shown */\n @Input() public show_all: boolean;\n /** List of visitor bookings for the current date */\n public bookings: Booking[] = [];\n /** List of filtered bookings */\n public filtered_bookings: Booking[] = [];\n /** Whether visitor list is loading */\n public loading: boolean;\n /** List of items from an API search */\n public search_results$: Observable;\n /** Subject holding the value of the search */\n public readonly search$ = new Subject();\n\n public get nowTz(){\n return DateNow(new Date())\n }\n\n constructor(\n private _org: OrganisationService,\n private _spaces: SpacesService,\n private _bookings: BookingStateService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this._spaces.initialised.pipe(first((_) => _)).subscribe(() => {\n this._bookings.startPollingEveryFiveMin();\n this.subscription(\n 'building',\n this._org\n .listen('active_building')\n .subscribe((_) => {\n this.search$.next(`${this.dateTz.ms}|${_.id}`);\n this._bookings.setZone(_.id);\n })\n );\n this.subscription(\n 'bookings',\n this._bookings.filtered.subscribe((list) => this.updateEvents(list))\n );\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n /* istanbul ignore else */\n if (changes.dateTz) {\n this.search$.next(`${this.dateTz.ms}`);\n }\n /* istanbul ignore else */\n if (changes.search || changes.show_all) {\n this.filtered_bookings = this.filter(this.search);\n }\n }\n\n /* istanbul ignore next */\n public trackByFn(index: number, booking: Booking) {\n return booking.id;\n }\n\n public resetPolling() {\n this.interval(\n 'update_bookings',\n () => this.search$.next(`${this.dateTz.ms}|${this.nowTz.ms}`),\n 30 * 1000\n );\n }\n\n /** Filter the visitor bookings */\n public filter(str: string = '') {\n const search = str.toLowerCase();\n return this.bookings\n .filter((booking) => {\n return (\n booking.attendees.find(\n (user) =>\n user.name.toLowerCase().indexOf(search) >= 0 ||\n user.email.toLowerCase().indexOf(search) >= 0\n ) ||\n booking.title.toLowerCase().includes(search) ||\n booking.local_room_name.toLowerCase().includes(search)\n );\n })\n .filter((bkn) => (this.show_all ? true : bkn.has_visitors));\n }\n\n private updateEvents(list: Booking[]) {\n const unsorted_bookings = list.filter(\n (bkn) =>\n !bkn.declined &&\n bkn.room.zones.includes(this._org.building.id)\n );\n const bookings = unsorted_bookings.sort((a, b) => {\n if (a.date === b.date) {\n if (a.creator.name === b.creator.name) {\n return a.space.name > b.space.name ? 1 : -1;\n }\n return a.creator.name > b.creator.name ? 1 : -1;\n }\n return a.date > b.date ? 1 : -1;\n })\n this.bookings = bookings;\n this.filtered_bookings = this.filter(this.search);\n }\n}\n","
\n
\n \n
\n
\n
\n
Time
\n
Host
\n
Company
\n
Title
\n
Location
\n
Status
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n
\n \n
\n
\n No visitors {{ search ? 'matching ' + '\"' + search + '\"' : '' }} for {{ date_display }}\n
\n
\n
\n","import { Component, Input, SimpleChanges, Renderer2, ElementRef, OnChanges, Output, EventEmitter} from '@angular/core';\n\nimport { BookingCheckinParams, User } from '@mckinsey-converge/data-common';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport { BookingsService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\n\n@Component({\n selector: 'a-visitor',\n templateUrl: './visitor.component.html',\n styleUrls: ['./visitor.component.scss'],\n})\nexport class VisitorComponent implements OnChanges {\n /** Booking that the user is assoicated with */\n @Input() public event: Booking;\n /** User details to display */\n @Input() public person: User;\n /** Search filter string */\n @Input() public search: string;\n /** Emitter for changed to the checked in status */\n @Output() public checked = new EventEmitter();\n /** Status of the visitor */\n public status: string;\n /** Whether attendee is being checked in */\n public loading: boolean;\n\n /** Whether attendee is late */\n public get late() {\n return this.event.timeBasedStatusLabel === 'in_progress' && this.person.external;\n }\n\n /** Whether attendee has checked in */\n public get approved() {\n return this.event.checkInsArray.includes(this.person.email);\n }\n\n /** Whether user is a match for */\n public get is_match(): boolean {\n const search = (this.search || '').toLowerCase();\n return (\n this.person.name.toLowerCase().indexOf(search) >= 0 ||\n this.person.email.toLowerCase().indexOf(search) >= 0 ||\n this.event.title.toLowerCase().indexOf(search) >= 0 ||\n this.event.local_room_name.toLowerCase().indexOf(search) >= 0\n );\n }\n\n public get invalid_email(): boolean {\n return !this.person.email || this.person.email.includes('@guest.mckinsey.com');\n }\n\n /** URL for mailing all attendees of the event */\n public get mail_url(): string {\n return `mailto:${this.person.email}?subject=\"${this.event.title}\"%20at%20${\n this.event.start_time\n },%20${this.event.date_string}${\n this.event.organiser.email.toLowerCase() !== this.person.email\n ? '&cc=' + this.event.organiser.email\n : ''\n }`;\n }\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _bookings: BookingsService,\n private _service: ApplicationService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.search) {\n if (this.search && !this.is_match) {\n this._renderer.addClass(this._element.nativeElement, 'not-match');\n } else {\n this._renderer.removeClass(this._element.nativeElement, 'not-match');\n }\n }\n }\n\n /**\n * Checkin the attendee\n */\n public checkin() {\n this.loading = true;\n const fields: BookingCheckinParams= {\n host_email: this.event.organiser.email,\n attendees: [{ name: this.person.name, email: this.person.email }],\n booking_id: this.event.id,\n icaluid: this.event.icaluid,\n id: this.event.id,\n notify_users: [...this.event.notify_users],\n response_type: 'accepted',\n room_id: this.event.space.id,\n };\n this._bookings.checkinIndividualVisitor(this.event.id, fields).subscribe(result => {\n const check_ins = {...result.check_ins};\n check_ins[this.person.email] = true;\n this.event.check_ins = result.check_ins;\n this.event = new Booking({\n ...this.event.toJSON(),\n check_ins,\n });\n this.checked.emit();\n this.loading = false;\n }); \n }\n\n\n public get companyString(){\n return this.person.external ? this.event.company.join(',') : 'Mckinsey'\n }\n}\n","\n \n\n
\n
\n
{{ person?.name || person?.email }}
\n
\n
{{ companyString }}
\n
\n
{{ status }}
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { first } from 'rxjs/operators';\nimport { Booking } from '@mckinsey-converge/data-common';\nimport {\n VisitorsFormModalComponent,\n VisitorsFormModalData,\n} from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { SpacesService } from '@mckinsey-converge/data-common';\nimport { OrganisationService } from '@mckinsey-converge/data-common';\nimport { ApplicationService } from '@mckinsey-converge/data-common';\nimport { BaseDirective } from '@mckinsey-converge/base';\nimport { DateNow, DateTZ } from '@mckinsey-converge/date-tz';\n\n@Component({\n selector: 'app-visitors',\n templateUrl: './visitors.component.html',\n styleUrls: ['./visitors.component.scss'],\n})\nexport class VisitorsComponent extends BaseDirective implements OnInit {\n /** Currently selected date */\n public dateTz: DateTZ = DateNow(new Date());\n /** Search filter string */\n public search_str: string;\n /** Whether all bookings should be listed */\n public show_all: boolean;\n\n public get has_visitor_space(): boolean {\n const building = this._org.building;\n return building && !!this._spaces.find(building.visitor_space || building.holding_bay);\n }\n\n public has_access: boolean;\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _service: ApplicationService,\n private _dialog: MatDialog,\n private _spaces: SpacesService,\n private _org: OrganisationService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this._service.title = 'Visitors';\n this._org.initialised.pipe(first(_ => _)).subscribe(() => {\n // Init dateTz here once the organization data is loaded.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.subscription(\n 'route.query_params',\n this._route.queryParamMap.subscribe((params) => {\n if (params.has('zone') && params.get('zone') !== this._org.building.id) {\n const id = params.get('zone');\n const bld = this._org.buildings.find((building) => building.id === id);\n if (bld) {\n this._org.building = bld;\n }\n }\n })\n );\n this.subscription(\n 'building',\n this._org.listen('active_building')?.subscribe(() => {\n // Update dateTz here when the building is changed.\n this.dateTz = new DateTZ({ date: this.dateTz.ms, is_local_tz: false, building_tz: this.timezone });\n this.has_access = this._org.building ? true : false;\n if(!this.has_access) return\n this._router.navigate([], {\n relativeTo: this._route,\n queryParams: { zone: this._org.building.id },\n });\n })\n );\n })\n }\n\n public newVisitorMeeting() {\n const now = DateNow(new Date());\n const date = now.setValue({ minute: Math.ceil(now.minutes / 5) * 5 });\n const building = this._org.building;\n const space = this._spaces.find(building.visitor_space || building.holding_bay);\n const booking = new Booking({ \n start_epoch: date.seconds,\n end_epoch: date.addValue({ minutes: 60 }),\n room: space\n });\n this._dialog.open(\n VisitorsFormModalComponent,\n {\n data: {\n booking,\n },\n }\n );\n }\n\n // R--- surely these 2 methods are not DRY and all the main tabs need a base class\n // that encapsulates the common elements.\n public get timezone() {\n return this._org.building.timezone;\n }\n\n public updateDateTz(dateTz: DateTZ) {\n this.dateTz = dateTz;\n }\n}\n","
\n \n
\n \n
\n
\n \n
\n \n \n \n \n \n
\n \n All meetings\n \n \n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Route, RouterModule } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { VisitorsComponent } from './visitors.component';\nimport { SharedContentModule } from '../shared/shared.module';\nimport { VisitorTimelineComponent } from './timeline/timeline.component';\nimport { VisitorBookingItemComponent } from './timeline/item/item.component';\nimport { VisitorComponent } from './timeline/visitor/visitor.component';\nimport { VisitorsFormModalComponent } from './overlays/visitors-form-modal/visitors-form-modal.component';\nimport { EventFormComponent } from './overlays/visitors-form-modal/event-form/event-form.component';\nimport { VisitorFormComponent } from './overlays/visitors-form-modal/visitor-form/visitor-form.component';\n\nconst ROUTES: Route[] = [\n { path: '', component: VisitorsComponent },\n { path: ':level', component: VisitorsComponent },\n { path: '**', redirectTo: '' },\n];\n\n@NgModule({\n declarations: [\n VisitorsComponent,\n VisitorTimelineComponent,\n VisitorBookingItemComponent,\n VisitorComponent,\n VisitorsFormModalComponent,\n EventFormComponent,\n VisitorFormComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(ROUTES),\n SharedContentModule,\n ],\n})\nexport class VisitorsModule {}\n","import { EnvironmentData } from '@mckinsey-converge/environment';\n\nexport const environment: EnvironmentData = {\n production: true,\n hmr: false,\n heap_io_id: 91016686,\n};\n","/**\n * GENERAL APPLICATION SETTINGS\n */\nimport { SettingsData } from '@mckinsey-converge/data-common';\n\nconst general = {\n menu: {\n items: [\n {\n name: 'Day View',\n route: '/day-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'wb_sunny',\n },\n },\n {\n name: 'Week View',\n route: '/week-view',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'date_range',\n },\n },\n {\n name: 'Catering',\n route: '/catering',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'room_service',\n },\n },\n {\n name: 'Visitors',\n route: '/visitors',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'face',\n },\n },\n {\n name: 'Reports',\n route: '/reports',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'warning',\n },\n },\n {\n name: 'Room Admin',\n route: '/room-admin',\n icon: {\n type: 'icon',\n class: 'material-icons',\n content: 'settings',\n }\n },\n ],\n copyright: 'PlaceOS',\n },\n};\n/*=========================*\\\n|| BOOKING FLOW SETTINGS ||\n\\*=========================*/\nconst booking = {\n booking_types: [\n { name: 'Internal', id: 'internal' },\n { name: 'External', id: 'external' },\n ],\n show_fields: [\n 'attendees',\n 'body',\n 'catering',\n 'dateTz',\n 'duration',\n 'organiser',\n 'title',\n 'type',\n 'all_day',\n 'has_catering',\n 'is_recurrent',\n 'company',\n 'is_multiroom',\n 'merged'\n ],\n html_body: false,\n multiple_spaces: true,\n desk_start: 9,\n};\n\n/*=========================*\\\n|| DAY VIEW SETTINGS ||\n\\*=========================*/\nconst day_view = {\n dragdrop: true,\n};\n\n/*=========================*\\\n|| VISITORS SETTINGS ||\n\\*=========================*/\nconst visitors = {};\n\n/*=========================*\\\n|| REPORTS SETTINGS ||\n\\*=========================*/\nconst reports = {};\n/**\n * ROOT APPLICATION SETTINGS\n */\nconst app = {\n title: 'McKinsey Concierge',\n description: 'McKinsey Concierge UI written with Angular Framework',\n short_name: 'CONCIERGE',\n logo_light: {\n type: 'img',\n src: 'assets/img/logo-inverse.svg',\n background: '#0a0d2e',\n },\n logo_dark: {\n type: 'img',\n src: 'assets/img/logo.svg',\n background: '',\n },\n heap_io: {\n app_id: 3540602199,\n force_ssl: true,\n secure_cookie: true,\n disable_text_capture: true,\n cookie_path: '/concierge/'\n },\n general,\n booking,\n day_view,\n visitors,\n reports,\n};\n\n/**\n * ROOT SETTIGNS\n */\nexport const DEFAULT_SETTINGS: SettingsData = {\n debug: true,\n composer: {\n domain: '',\n route: '/concierge',\n protocol: '',\n port: '',\n use_domain: false,\n local_login: false,\n },\n app,\n mock: false,\n frontend: 'concierge',\n};\n","\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"]} \ No newline at end of file