@@ -91,6 +91,7 @@ public static function getOffices(bool $showUnpublished = false): OfficeList
91
91
}
92
92
93
93
$ matchingScope = $ scopeMap [$ provider ->source . '_ ' . $ provider ->id ] ?? null ;
94
+ $ rd = MapperService::extractReservationDuration ($ matchingScope );
94
95
$ offices [] = new Office (
95
96
id: (int ) $ provider ->id ,
96
97
name: $ provider ->displayName ?? $ provider ->name ,
@@ -120,7 +121,8 @@ public static function getOffices(bool $showUnpublished = false): OfficeList
120
121
infoForAllAppointments: $ matchingScope ->getInfoForAllAppointments (),
121
122
slotsPerAppointment: ((string ) $ matchingScope ->getSlotsPerAppointment () === '' ? null : (string ) $ matchingScope ->getSlotsPerAppointment ()),
122
123
appointmentsPerMail: ((string ) $ matchingScope ->getAppointmentsPerMail () === '' ? null : (string ) $ matchingScope ->getAppointmentsPerMail ()),
123
- whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ())
124
+ whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()),
125
+ reservationDuration: $ rd ,
124
126
) : null ,
125
127
maxSlotsPerAppointment: $ matchingScope ? ((string ) $ matchingScope ->getSlotsPerAppointment () === '' ? null : (string ) $ matchingScope ->getSlotsPerAppointment ()) : null
126
128
);
@@ -157,6 +159,7 @@ public static function getScopes(): ThinnedScopeList|array
157
159
$ key = $ provider ->source . '_ ' . $ provider ->id ;
158
160
if (isset ($ scopeMap [$ key ])) {
159
161
$ matchingScope = $ scopeMap [$ key ];
162
+ $ rd = MapperService::extractReservationDuration ($ matchingScope );
160
163
$ scopesProjectionList [] = new ThinnedScope (
161
164
id: (int ) $ matchingScope ->id ,
162
165
provider: MapperService::providerToThinnedProvider ($ provider ),
@@ -176,7 +179,8 @@ public static function getScopes(): ThinnedScopeList|array
176
179
infoForAllAppointments: $ matchingScope ->getInfoForAllAppointments (),
177
180
slotsPerAppointment: ((string ) $ matchingScope ->getSlotsPerAppointment () === '' ? null : (string ) $ matchingScope ->getSlotsPerAppointment ()),
178
181
appointmentsPerMail: ((string ) $ matchingScope ->getAppointmentsPerMail () === '' ? null : (string ) $ matchingScope ->getAppointmentsPerMail ()),
179
- whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ())
182
+ whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()),
183
+ reservationDuration: $ rd ,
180
184
);
181
185
}
182
186
}
@@ -271,6 +275,7 @@ public static function getScopeByOfficeId(int $officeId): ThinnedScope|array
271
275
$ finalProvider = $ providerKey && isset ($ providerMap [$ providerKey ])
272
276
? $ providerMap [$ providerKey ]
273
277
: $ scopeProvider ;
278
+ $ rd = MapperService::extractReservationDuration ($ matchingScope );
274
279
$ result = [
275
280
'id ' => $ matchingScope ->id ,
276
281
'provider ' => MapperService::providerToThinnedProvider ($ finalProvider ) ?? null ,
@@ -290,7 +295,8 @@ public static function getScopeByOfficeId(int $officeId): ThinnedScope|array
290
295
'infoForAllAppointments ' => $ matchingScope ->getInfoForAllAppointments () ?? null ,
291
296
'slotsPerAppointment ' => ((string ) $ matchingScope ->getSlotsPerAppointment () === '' ? null : (string ) $ matchingScope ->getSlotsPerAppointment ()) ?? null ,
292
297
'appointmentsPerMail ' => ((string ) $ matchingScope ->getAppointmentsPerMail () === '' ? null : (string ) $ matchingScope ->getAppointmentsPerMail ()) ?? null ,
293
- 'whitelistedMails ' => ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()) ?? null
298
+ 'whitelistedMails ' => ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()) ?? null ,
299
+ 'reservationDuration ' => $ rd ,
294
300
];
295
301
return new ThinnedScope (
296
302
id: (int ) $ result ['id ' ],
@@ -311,7 +317,8 @@ public static function getScopeByOfficeId(int $officeId): ThinnedScope|array
311
317
infoForAllAppointments: $ result ['infoForAllAppointments ' ],
312
318
slotsPerAppointment: $ result ['slotsPerAppointment ' ],
313
319
appointmentsPerMail: $ result ['appointmentsPerMail ' ],
314
- whitelistedMails: $ result ['whitelistedMails ' ]
320
+ whitelistedMails: $ result ['whitelistedMails ' ],
321
+ reservationDuration: $ result ['reservationDuration ' ]
315
322
);
316
323
}
317
324
@@ -423,6 +430,7 @@ public static function getScopeById(?int $scopeId): ThinnedScope|array
423
430
$ matchingProv = ($ providerKey && isset ($ providerMap [$ providerKey ]))
424
431
? $ providerMap [$ providerKey ]
425
432
: $ scopeProvider ;
433
+ $ rd = MapperService::extractReservationDuration ($ matchingScope );
426
434
return new ThinnedScope (
427
435
id: (int ) $ matchingScope ->id ,
428
436
provider: MapperService::providerToThinnedProvider ($ matchingProv ),
@@ -442,7 +450,8 @@ public static function getScopeById(?int $scopeId): ThinnedScope|array
442
450
infoForAllAppointments: $ matchingScope ->getInfoForAllAppointments () ?? null ,
443
451
slotsPerAppointment: ((string ) $ matchingScope ->getSlotsPerAppointment () === '' ? null : (string ) $ matchingScope ->getSlotsPerAppointment ()) ?? null ,
444
452
appointmentsPerMail: ((string ) $ matchingScope ->getAppointmentsPerMail () === '' ? null : (string ) $ matchingScope ->getAppointmentsPerMail ()) ?? null ,
445
- whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()) ?? null
453
+ whitelistedMails: ((string ) $ matchingScope ->getWhitelistedMails () === '' ? null : (string ) $ matchingScope ->getWhitelistedMails ()) ?? null ,
454
+ reservationDuration: $ rd ,
446
455
);
447
456
}
448
457
@@ -705,6 +714,7 @@ public static function getThinnedProcessById(?int $processId, ?string $authKey):
705
714
$ providerKey = $ scopeProvider ? ($ scopeProvider ->getSource () . '_ ' . $ scopeProvider ->id ) : null ;
706
715
$ matchingProvider = $ providerKey && isset ($ providerMap [$ providerKey ]) ? $ providerMap [$ providerKey ] : $ scopeProvider ;
707
716
$ thinnedProvider = MapperService::providerToThinnedProvider ($ matchingProvider );
717
+ $ rd = MapperService::extractReservationDuration ($ process ->scope );
708
718
$ thinnedScope = new ThinnedScope (
709
719
id: (int ) $ process ->scope ->id ,
710
720
provider: $ thinnedProvider ,
@@ -724,7 +734,8 @@ public static function getThinnedProcessById(?int $processId, ?string $authKey):
724
734
infoForAllAppointments: $ process ->scope ->getInfoForAllAppointments () ?? null ,
725
735
slotsPerAppointment: ((string ) $ process ->scope ->getSlotsPerAppointment () === '' ? null : (string ) $ process ->scope ->getSlotsPerAppointment ()) ?? null ,
726
736
appointmentsPerMail: ((string ) $ process ->scope ->getAppointmentsPerMail () === '' ? null : (string ) $ process ->scope ->getAppointmentsPerMail ()) ?? null ,
727
- whitelistedMails: ((string ) $ process ->scope ->getWhitelistedMails () === '' ? null : (string ) $ process ->scope ->getWhitelistedMails ()) ?? null
737
+ whitelistedMails: ((string ) $ process ->scope ->getWhitelistedMails () === '' ? null : (string ) $ process ->scope ->getWhitelistedMails ()) ?? null ,
738
+ reservationDuration: $ rd ,
728
739
);
729
740
}
730
741
0 commit comments