Sync DemoWorld: Care receptionist without queue; add Queue operators.
Deploy Ladill Meet / deploy (push) Failing after 13m30s
Deploy Ladill Meet / deploy (push) Failing after 13m30s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -186,19 +186,55 @@ final class DemoWorld
|
||||
* account_role?: string
|
||||
* }>>
|
||||
*/
|
||||
/**
|
||||
* Care specialty module doctors (Pro / Enterprise). Emails: demo-{tier}-{key}@ladill.com
|
||||
*
|
||||
* @var array<string, string> module key => display name
|
||||
*/
|
||||
public const SPECIALTY_DOCTORS = [
|
||||
'emergency' => 'Dr. Kojo Emergency',
|
||||
'blood_bank' => 'Dr. Ama Blood Bank',
|
||||
'dentistry' => 'Dr. Ama Dental',
|
||||
'ophthalmology' => 'Dr. Kofi Eye',
|
||||
'physiotherapy' => 'Dr. Efua Physio',
|
||||
'maternity' => 'Dr. Abena Maternity',
|
||||
'radiology' => 'Dr. Yaw Radiology',
|
||||
'cardiology' => 'Dr. Kwesi Cardiology',
|
||||
'psychiatry' => 'Dr. Adwoa Psychiatry',
|
||||
'pediatrics' => 'Dr. Fiifi Pediatrics',
|
||||
'orthopedics' => 'Dr. Kojo Orthopedics',
|
||||
'ent' => 'Dr. Esi ENT',
|
||||
'oncology' => 'Dr. Mansa Oncology',
|
||||
'renal' => 'Dr. Nana Renal',
|
||||
'surgery' => 'Dr. Kwadwo Surgery',
|
||||
'vaccination' => 'Dr. Afia Vaccination',
|
||||
'pathology' => 'Dr. Yaw Pathology',
|
||||
'infusion' => 'Dr. Akosua Infusion',
|
||||
'dermatology' => 'Dr. Ama Dermatology',
|
||||
'podiatry' => 'Dr. Kofi Podiatry',
|
||||
'fertility' => 'Dr. Abena Fertility',
|
||||
'child_welfare' => 'Dr. Efua Child Welfare',
|
||||
];
|
||||
|
||||
public const STAFF = [
|
||||
'free' => [
|
||||
[
|
||||
'key' => 'receptionist',
|
||||
'email' => 'demo-free-receptionist@ladill.com',
|
||||
'name' => 'Abena Reception (Free)',
|
||||
'apps' => ['care', 'frontdesk', 'queue'],
|
||||
'apps' => ['care', 'frontdesk'],
|
||||
'roles' => [
|
||||
'care' => 'receptionist',
|
||||
'frontdesk' => 'receptionist',
|
||||
'queue' => 'receptionist',
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'queue',
|
||||
'email' => 'demo-free-queue@ladill.com',
|
||||
'name' => 'Ama Queue (Free)',
|
||||
'apps' => ['queue'],
|
||||
'roles' => ['queue' => 'receptionist'],
|
||||
],
|
||||
],
|
||||
'pro' => [
|
||||
[
|
||||
@@ -219,13 +255,19 @@ final class DemoWorld
|
||||
'key' => 'receptionist',
|
||||
'email' => 'demo-pro-receptionist@ladill.com',
|
||||
'name' => 'Abena Reception (Pro)',
|
||||
'apps' => ['care', 'frontdesk', 'queue'],
|
||||
'apps' => ['care', 'frontdesk'],
|
||||
'roles' => [
|
||||
'care' => 'receptionist',
|
||||
'frontdesk' => 'receptionist',
|
||||
'queue' => 'receptionist',
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'queue',
|
||||
'email' => 'demo-pro-queue@ladill.com',
|
||||
'name' => 'Ama Queue (Pro)',
|
||||
'apps' => ['queue'],
|
||||
'roles' => ['queue' => 'receptionist'],
|
||||
],
|
||||
[
|
||||
'key' => 'pharmacist',
|
||||
'email' => 'demo-pro-pharmacist@ladill.com',
|
||||
@@ -292,13 +334,19 @@ final class DemoWorld
|
||||
'key' => 'receptionist',
|
||||
'email' => 'demo-enterprise-receptionist@ladill.com',
|
||||
'name' => 'Abena Reception',
|
||||
'apps' => ['care', 'frontdesk', 'queue'],
|
||||
'apps' => ['care', 'frontdesk'],
|
||||
'roles' => [
|
||||
'care' => 'receptionist',
|
||||
'frontdesk' => 'receptionist',
|
||||
'queue' => 'receptionist',
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'queue',
|
||||
'email' => 'demo-enterprise-queue@ladill.com',
|
||||
'name' => 'Ama Queue',
|
||||
'apps' => ['queue'],
|
||||
'roles' => ['queue' => 'receptionist'],
|
||||
],
|
||||
[
|
||||
'key' => 'pharmacist',
|
||||
'email' => 'demo-enterprise-pharmacist@ladill.com',
|
||||
@@ -471,7 +519,35 @@ final class DemoWorld
|
||||
*/
|
||||
public static function staff(string $tier): array
|
||||
{
|
||||
return self::STAFF[self::normalizeTier($tier)] ?? [];
|
||||
$tier = self::normalizeTier($tier);
|
||||
$roster = self::STAFF[$tier] ?? [];
|
||||
if (! in_array($tier, ['pro', 'enterprise'], true)) {
|
||||
return $roster;
|
||||
}
|
||||
|
||||
foreach (self::SPECIALTY_DOCTORS as $key => $name) {
|
||||
$email = sprintf('demo-%s-%s@ladill.com', $tier, $key);
|
||||
$already = false;
|
||||
foreach ($roster as $row) {
|
||||
if (strtolower((string) ($row['email'] ?? '')) === $email) {
|
||||
$already = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($already) {
|
||||
continue;
|
||||
}
|
||||
$suffix = $tier === 'pro' ? ' (Pro)' : '';
|
||||
$roster[] = [
|
||||
'key' => $key,
|
||||
'email' => $email,
|
||||
'name' => $name.$suffix,
|
||||
'apps' => ['care'],
|
||||
'roles' => ['care' => 'doctor'],
|
||||
];
|
||||
}
|
||||
|
||||
return $roster;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -484,8 +560,8 @@ final class DemoWorld
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (self::STAFF as $roster) {
|
||||
foreach ($roster as $member) {
|
||||
foreach (['free', 'pro', 'enterprise'] as $tier) {
|
||||
foreach (self::staff($tier) as $member) {
|
||||
if (strtolower($member['email']) === $email) {
|
||||
return $member;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user