Sync DemoWorld specialty staff ownerEmailForStaff fix.
Deploy Ladill POS / deploy (push) Successful in 1m7s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 15:29:00 +00:00
co-authored by Cursor
parent b4cbdab332
commit fbd4f39f0d
+8 -3
View File
@@ -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);
} }
} }