347 lines
13 KiB
PHP
Executable File
347 lines
13 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\Navigations;
|
|
|
|
class NavigationSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
$menuItems = [
|
|
// DOCTORS & HOSPITALS
|
|
[
|
|
'title' => 'Dashboard',
|
|
'path' => '/dashboard',
|
|
'permission' => 'dashboard'
|
|
],
|
|
// DOCTORS & HOSPITALS
|
|
[
|
|
'title' => 'DOCTORS & HOSPITALS',
|
|
'children' => [
|
|
[
|
|
'title' => 'Doctors',
|
|
'path' => '/master/doctors',
|
|
'permission' => 'doctor-list'
|
|
],
|
|
[
|
|
'title' => 'Hospitals',
|
|
'path' => '/master/hospitals',
|
|
'permission' => 'hospital-list'
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// PHARMACY & DELIVERY MANAGEMENT
|
|
[
|
|
'title' => 'PHARMACY & DELIVERY MANAGEMENT',
|
|
'children' => [
|
|
[
|
|
'title' => 'Drug',
|
|
'path' => '/master/drugs',
|
|
'permission' => 'drug-list'
|
|
],
|
|
[
|
|
'title' => 'Inventory',
|
|
'path' => '/inventory',
|
|
'permission' => null
|
|
],
|
|
[
|
|
'title' => 'Delivery Services',
|
|
'path' => '/delivery',
|
|
'permission' => null
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// STATION BENEFIT & MEMBERSHIP
|
|
[
|
|
'title' => 'STATION BENEFIT & MEMBERSHIP',
|
|
'openWhen' => ['/corporates', '/formularium', '/diagnosis', '/hospitals'],
|
|
'children' => [
|
|
[
|
|
'title' => 'Corporate',
|
|
'path' => '/corporates',
|
|
'permission' => 'corporate-list',
|
|
],
|
|
// ['title' => 'Corporate Create', 'path' => '/corporates/create'],
|
|
[
|
|
'title' => 'Formularium',
|
|
'path' => '/master/formularium-template-v2',
|
|
'permission' => 'formularium-list',
|
|
],
|
|
[
|
|
'title' => 'Master ICD-10 Diagnosis',
|
|
'path' => '/master/diagnosis',
|
|
'permission' => 'diagnosis-list',
|
|
],
|
|
[
|
|
'title' => 'Hospitals',
|
|
'path' => '/hospitals',
|
|
'permission' => null,
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// CLAIM REQUEST
|
|
[
|
|
'title' => 'CLAIM REQUEST',
|
|
'path' => '/claim-requests',
|
|
'permission' => 'claim-request-list'
|
|
],
|
|
// CLAIM MANAGEMENT
|
|
[
|
|
'title' => 'CLAIM MANAGEMENT',
|
|
'path' => '/claims',
|
|
'permission' => 'claim-management-list'
|
|
],
|
|
// CASE MANAGEMENT
|
|
[
|
|
'title' => 'CASE MANAGEMENT',
|
|
'children' => [
|
|
[
|
|
'title' => 'Daily Monitoring',
|
|
'path' => '/case_management/daily_monitoring',
|
|
'permission' => 'daily-monitoring-list'
|
|
],
|
|
// ['title' => 'Laboratorium Result', 'path' => '/case_management/laboratorium_result'],
|
|
[
|
|
'title' => 'Inpatient Monitoring',
|
|
'path' => '/case_management/inpatient_monitoring',
|
|
'permission' => 'final-log-list'
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// CUSTOMER SERVICES
|
|
[
|
|
'title' => 'CUSTOMER SERVICES',
|
|
'children' => [
|
|
[
|
|
'title' => 'Request',
|
|
'path' => '/custormer-service/request',
|
|
'permission' => 'request-log-list'
|
|
],
|
|
// ['title' => 'Membership', 'path' => '/cs-membership'],
|
|
[
|
|
'title' => 'Final LOG',
|
|
'path' => '/custormer-service/final-log',
|
|
'permission' => 'final-log-list'
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// REPORT
|
|
[
|
|
'title' => 'REPORT',
|
|
'children' => [
|
|
[
|
|
'title' => 'Files Provider',
|
|
'path' => 'report/files-provider',
|
|
'permission' => 'report-files-provider-list'
|
|
],
|
|
[
|
|
'title' => 'Letter of Guarantee',
|
|
'path' => '/report/logs',
|
|
'permission' => 'report-log-list'
|
|
],
|
|
[
|
|
'title' => 'Appointment',
|
|
'path' => '/report/appointments',
|
|
'permission' => 'report-appointment-list'
|
|
],
|
|
[
|
|
'title' => 'Live Chat',
|
|
'path' => '/report/live-chat',
|
|
'permission' => 'report-livechat-list'
|
|
],
|
|
[
|
|
'title' => 'Linksehat Payment',
|
|
'path' => '/report/linksehat-payments',
|
|
'permission' => 'report-livechat-payment'
|
|
],
|
|
// ['title' => 'Prescription', 'path' => '/report/prescription'],
|
|
[
|
|
'title' => 'Doctor Rating',
|
|
'path' => '/report/doctor-rating',
|
|
'permission' => 'report-doctor-rating'
|
|
],
|
|
[
|
|
'title' => 'Doctor Online',
|
|
'path' => '/report/doctor-online',
|
|
'permission' => 'report-doctor-online'
|
|
],
|
|
[
|
|
'title' => 'Katalog Dokter',
|
|
'path' => '/report/katalog-dokter',
|
|
'permission' => 'report-katalog-dokter'
|
|
]
|
|
],
|
|
'permission' => null
|
|
],
|
|
// MASTER
|
|
[
|
|
'title' => 'MASTER',
|
|
'children' => [
|
|
[
|
|
'title' => 'Diagnosis',
|
|
'path' => '/master/diagnosis',
|
|
'permission' => 'diagnosis-list'
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// USER MANAGEMENT
|
|
[
|
|
'title' => 'USER MANAGEMENT',
|
|
'children' => [
|
|
[
|
|
'title' => 'User Role',
|
|
'path' => '/user-role',
|
|
'permission' => 'user-role-list'
|
|
],
|
|
[
|
|
'title' => 'User Access',
|
|
'path' => '/user-access',
|
|
'permission' => 'user-access-list'
|
|
],
|
|
],
|
|
'permission' => null
|
|
],
|
|
// LINKING TOOLS
|
|
[
|
|
'title' => 'LINKING TOOLS',
|
|
'path' => '/linking',
|
|
'permission' => 'linkking-list'
|
|
],
|
|
// E-PRESCRIPTION
|
|
[
|
|
'title' => 'E-PRESCRIPTION',
|
|
'path' => '/e-prescription/live-chat',
|
|
'permission' => 'prescription-list'
|
|
],
|
|
####################### CLIENT PORTAL #########################
|
|
[
|
|
'title' => 'Dashboard',
|
|
'children' => [
|
|
[
|
|
'title' => 'Usage Dashboard',
|
|
'path' => '/dashboard',
|
|
'permission' => 'dashboard-list-client-portal'
|
|
],
|
|
],
|
|
'permission' => 'dashboard-client-portal'
|
|
],
|
|
[
|
|
'title' => 'Corporate',
|
|
'children' => [
|
|
[
|
|
'title' => 'Corporate',
|
|
'path' => '/corporate',
|
|
'permission' => 'corporate-list-client-portal'
|
|
],
|
|
[
|
|
'title' => 'Employee Data',
|
|
'path' => '/employee-data',
|
|
'permission' => 'employee-data-list-client-portal'
|
|
],
|
|
],
|
|
'permission' => 'corporate-client-portal'
|
|
],
|
|
[
|
|
'title' => 'Case Management',
|
|
'children' => [
|
|
[
|
|
'title' => 'Alarm Center',
|
|
'path' => '/alarm-center',
|
|
'permission' => 'alarm-center-list-client-portal'
|
|
],
|
|
[
|
|
'title' => 'Daily Monitoring',
|
|
'path' => '/daily_monitoring',
|
|
'permission' => 'daily-monitoring-list-client-portal'
|
|
],
|
|
[
|
|
'title' => 'Formularium',
|
|
'path' => '/master/formularium-template-v2',
|
|
'permission' => 'formularium-list-client-portal'
|
|
],
|
|
],
|
|
'permission' => 'case-management-client-portal'
|
|
],
|
|
[
|
|
'title' => 'User Management',
|
|
'children' => [
|
|
[
|
|
'title' => 'User Role',
|
|
'path' => '/user-role',
|
|
'permission' => 'user-role-list-client-portal'
|
|
],
|
|
[
|
|
'title' => 'User Access',
|
|
'path' => '/user-access',
|
|
'permission' => 'user-access-list-client-portal'
|
|
]
|
|
],
|
|
'permission' => 'user-management-client-portal'
|
|
],
|
|
####################### HOSPITAL PORTAL #########################
|
|
[
|
|
'title' => 'Dashboard',
|
|
'path' => '/dashboard',
|
|
'icon' => 'dashboard',
|
|
'permission' => 'dashboard-hospital-portal'
|
|
],
|
|
[
|
|
'title' => 'Claim',
|
|
'path' => '/claim',
|
|
'icon' => 'ic_booking',
|
|
'permission' => 'dashboard-claim-hospital-portal'
|
|
],
|
|
####################### CS LMS & APOTEK PORTAL #########################
|
|
[
|
|
'title' => 'Dashboard',
|
|
'path' => '/prescription-orders',
|
|
'icon' => 'dashboard',
|
|
'permission' => 'dashboard-apotek-portal'
|
|
],
|
|
];
|
|
|
|
foreach ($menuItems as $menuItemData) {
|
|
$menuItem = Navigations::updateOrCreate([
|
|
'title' => $menuItemData['title'],
|
|
'permission' => $menuItemData['permission'] ?? null
|
|
],
|
|
[
|
|
'title' => $menuItemData['title'],
|
|
'path' => $menuItemData['path'] ?? null,
|
|
'icon' => $menuItemData['icon'] ?? null,
|
|
'permission' => $menuItemData['permission'] ?? null
|
|
]);
|
|
|
|
if (isset($menuItemData['children'])) {
|
|
foreach ($menuItemData['children'] as $childData) {
|
|
$menuItemChildren = Navigations::updateOrCreate([
|
|
'title' => $childData['title'],
|
|
'permission' => $childData['permission'] ?? null
|
|
],
|
|
[
|
|
'title' => $childData['title'],
|
|
'path' => $childData['path'] ?? null,
|
|
'icon' => $childData['icon'] ?? null,
|
|
'parent_id' => $menuItem->id,
|
|
'permission' => $childData['permission'] ?? null
|
|
]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|