mirror of
https://github.com/dyrkin/luxmed-bot.git
synced 2025-12-31 10:07:21 +01:00
Book: Fix getAllDoctors when clinicId is -1
ID for "any" clinic is -1.
This commit is contained in:
@@ -81,7 +81,7 @@ class Book(
|
||||
staticOptions = apiService
|
||||
.getAllDoctors(userId.accountId, bd.cityId.id, bd.serviceId.id)
|
||||
.map(
|
||||
_.filter(_.facilityGroupIds.exists(z => bd.clinicId == null || z.contains(bd.clinicId.id)))
|
||||
_.filter(doc => bd.clinicId == null || bd.clinicId.id == -1 || doc.facilityGroupIds.exists(_ == bd.clinicId.id))
|
||||
.map(_.toIdName)
|
||||
),
|
||||
applyId = id => bd.copy(doctorId = id.toIdName)
|
||||
|
||||
Reference in New Issue
Block a user