Sync DemoWorld specialty staff ownerEmailForStaff fix.
Deploy Ladill POS / deploy (push) Successful in 1m7s
Deploy Ladill POS / deploy (push) Successful in 1m7s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -585,9 +585,14 @@ final class DemoWorld
|
|||||||
public static function ownerEmailForStaff(?string $email): ?string
|
public static function ownerEmailForStaff(?string $email): ?string
|
||||||
{
|
{
|
||||||
$email = strtolower(trim((string) $email));
|
$email = strtolower(trim((string) $email));
|
||||||
foreach (self::STAFF as $tier => $roster) {
|
if ($email === '') {
|
||||||
foreach ($roster as $member) {
|
return null;
|
||||||
if (strtolower($member['email']) === $email) {
|
}
|
||||||
|
|
||||||
|
// Use staff() so dynamically appended specialty doctors resolve too.
|
||||||
|
foreach (['free', 'pro', 'enterprise'] as $tier) {
|
||||||
|
foreach (self::staff($tier) as $member) {
|
||||||
|
if (strtolower((string) $member['email']) === $email) {
|
||||||
return self::ownerEmailForTier($tier);
|
return self::ownerEmailForTier($tier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user