Mike 4 роки тому
батько
коміт
44ab2bb61b
1 змінених файлів з 5 додано та 5 видалено
  1. 5 5
      app/Community/Controllers/ApiController.php

+ 5 - 5
app/Community/Controllers/ApiController.php

xqd
@@ -572,12 +572,12 @@ class ApiController extends Controller
                             $idSum = array_sum($orgids);
                             if($org_id == $idSum) $newBase[$tType-1]['status'] = true;
                             if($org_id != $idSum) $newBase[$tType-1]['status'] = 'other';
+                        }
 
-                            $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id,'type'=>$tType])->first();
-                            if(!empty($self))
-                                foreach($self as $key=>$org){
-                                    $newBase[$tType-1]['status'] = true;
-                                    if($org != $org_id) $newBase[$tType-1]['status'] = 'other';
+                        $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->first();
+                        if(!empty($self)){
+                            foreach($self as $sf){
+                                $newBase[$sf['type']]['status'] = true;
                             }
                         }
 //