Sync DemoWorld: Care receptionist without queue; add Queue operators.
Deploy Ladill Frontdesk / deploy (push) Successful in 2m58s
Deploy Ladill Frontdesk / deploy (push) Successful in 2m58s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -186,19 +186,55 @@ final class DemoWorld
|
|||||||
* account_role?: string
|
* 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 = [
|
public const STAFF = [
|
||||||
'free' => [
|
'free' => [
|
||||||
[
|
[
|
||||||
'key' => 'receptionist',
|
'key' => 'receptionist',
|
||||||
'email' => 'demo-free-receptionist@ladill.com',
|
'email' => 'demo-free-receptionist@ladill.com',
|
||||||
'name' => 'Abena Reception (Free)',
|
'name' => 'Abena Reception (Free)',
|
||||||
'apps' => ['care', 'frontdesk', 'queue'],
|
'apps' => ['care', 'frontdesk'],
|
||||||
'roles' => [
|
'roles' => [
|
||||||
'care' => 'receptionist',
|
'care' => 'receptionist',
|
||||||
'frontdesk' => 'receptionist',
|
'frontdesk' => 'receptionist',
|
||||||
'queue' => 'receptionist',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'key' => 'queue',
|
||||||
|
'email' => 'demo-free-queue@ladill.com',
|
||||||
|
'name' => 'Ama Queue (Free)',
|
||||||
|
'apps' => ['queue'],
|
||||||
|
'roles' => ['queue' => 'receptionist'],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'pro' => [
|
'pro' => [
|
||||||
[
|
[
|
||||||
@@ -219,13 +255,19 @@ final class DemoWorld
|
|||||||
'key' => 'receptionist',
|
'key' => 'receptionist',
|
||||||
'email' => 'demo-pro-receptionist@ladill.com',
|
'email' => 'demo-pro-receptionist@ladill.com',
|
||||||
'name' => 'Abena Reception (Pro)',
|
'name' => 'Abena Reception (Pro)',
|
||||||
'apps' => ['care', 'frontdesk', 'queue'],
|
'apps' => ['care', 'frontdesk'],
|
||||||
'roles' => [
|
'roles' => [
|
||||||
'care' => 'receptionist',
|
'care' => 'receptionist',
|
||||||
'frontdesk' => 'receptionist',
|
'frontdesk' => 'receptionist',
|
||||||
'queue' => 'receptionist',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'key' => 'queue',
|
||||||
|
'email' => 'demo-pro-queue@ladill.com',
|
||||||
|
'name' => 'Ama Queue (Pro)',
|
||||||
|
'apps' => ['queue'],
|
||||||
|
'roles' => ['queue' => 'receptionist'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'key' => 'pharmacist',
|
'key' => 'pharmacist',
|
||||||
'email' => 'demo-pro-pharmacist@ladill.com',
|
'email' => 'demo-pro-pharmacist@ladill.com',
|
||||||
@@ -292,13 +334,19 @@ final class DemoWorld
|
|||||||
'key' => 'receptionist',
|
'key' => 'receptionist',
|
||||||
'email' => 'demo-enterprise-receptionist@ladill.com',
|
'email' => 'demo-enterprise-receptionist@ladill.com',
|
||||||
'name' => 'Abena Reception',
|
'name' => 'Abena Reception',
|
||||||
'apps' => ['care', 'frontdesk', 'queue'],
|
'apps' => ['care', 'frontdesk'],
|
||||||
'roles' => [
|
'roles' => [
|
||||||
'care' => 'receptionist',
|
'care' => 'receptionist',
|
||||||
'frontdesk' => 'receptionist',
|
'frontdesk' => 'receptionist',
|
||||||
'queue' => 'receptionist',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'key' => 'queue',
|
||||||
|
'email' => 'demo-enterprise-queue@ladill.com',
|
||||||
|
'name' => 'Ama Queue',
|
||||||
|
'apps' => ['queue'],
|
||||||
|
'roles' => ['queue' => 'receptionist'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'key' => 'pharmacist',
|
'key' => 'pharmacist',
|
||||||
'email' => 'demo-enterprise-pharmacist@ladill.com',
|
'email' => 'demo-enterprise-pharmacist@ladill.com',
|
||||||
@@ -471,7 +519,35 @@ final class DemoWorld
|
|||||||
*/
|
*/
|
||||||
public static function staff(string $tier): array
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (self::STAFF as $roster) {
|
foreach (['free', 'pro', 'enterprise'] as $tier) {
|
||||||
foreach ($roster as $member) {
|
foreach (self::staff($tier) as $member) {
|
||||||
if (strtolower($member['email']) === $email) {
|
if (strtolower($member['email']) === $email) {
|
||||||
return $member;
|
return $member;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user