Changeset 3051679
- Timestamp:
- 03/15/2024 12:08:04 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kivicare-clinic-management-system/trunk/app/baseClasses/WidgetHandler.php
r3051648 r3051679 234 234 235 235 $userList = []; 236 foreach ($data as $key => $value) { 237 if($value === 'on'){ 238 if($key === 'kiviCare_patient'){ 239 $userList[$key] = __("Patient", "kc-lang"); 240 } elseif($key === 'kiviCare_doctor'){ 241 $userList[$key] = __('Doctor',"kc-lang"); 242 } elseif($key === 'kiviCare_receptionist'){ 243 $userList[$key] = __('Receptionist',"kc-lang"); 244 } 236 237 if(!empty($data)){ 238 foreach ($data as $key => $value) { 239 if($value === 'on'){ 240 if($key === 'kiviCare_patient'){ 241 $userList[$key] = __("Patient", "kc-lang"); 242 } elseif($key === 'kiviCare_doctor'){ 243 $userList[$key] = __('Doctor',"kc-lang"); 244 } elseif($key === 'kiviCare_receptionist'){ 245 $userList[$key] = __('Receptionist',"kc-lang"); 246 } 247 } 248 } 249 }else{ 250 $userList = [ 251 'kiviCare_patient' => __("Patient", "kc-lang"), 252 'kiviCare_doctor' => __('Doctor',"kc-lang"), 253 'kiviCare_receptionist' => __('Receptionist',"kc-lang"), 254 ]; 255 } 256 257 $receptionist_status = true; 258 $modules = get_option(KIVI_CARE_PREFIX . 'modules'); 259 260 if ($modules) { 261 $modules = json_decode($modules); 262 $modules1 = $modules->module_config; 263 264 foreach ($modules1 as $module) { 265 if ($module->name === 'receptionist') { 266 $receptionist_status = !empty($module->status) ? true : false; 267 } 268 } 269 270 if (!$receptionist_status && isset($userList['kiviCare_receptionist'])) { 271 unset($userList['kiviCare_receptionist']); 245 272 } 246 273 }
Note: See TracChangeset
for help on using the changeset viewer.