WIP: director-view restructuring

parent e4221793
...@@ -138,7 +138,7 @@ public function getSpecialPerSchool(Request $request , $sectorId) ...@@ -138,7 +138,7 @@ public function getSpecialPerSchool(Request $request , $sectorId)
else if ($userRole === 'epal') else if ($userRole === 'epal')
{ {
$specialityPerSchool = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id'=> $epalId)); $specialityPerSchool = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id'=> $epalId));
$i = 0; $i = 0;
...@@ -218,8 +218,8 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -218,8 +218,8 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
else if ($userRole === 'epal') else if ($userRole === 'epal')
{ {
$selectIdNew = $epalId; $selectIdNew = $epalId;
if ($classId == 1) if ($classId == 1)
{ {
...@@ -259,7 +259,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -259,7 +259,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
$checkstudentstatus = reset($checkstatus); $checkstudentstatus = reset($checkstatus);
if ($i >= $limitdown && $i < $limitup) if ($i >= $limitdown && $i < $limitup)
{ {
$newstatus = $checkstudentstatus -> directorconfirm-> getValue(); $newstatus = $checkstudentstatus -> directorconfirm-> value;
$list[] = array( $list[] = array(
'i' => $i, 'i' => $i,
...@@ -270,12 +270,18 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -270,12 +270,18 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
'fathersurname' =>$epalStudent -> fathersurname ->value, 'fathersurname' =>$epalStudent -> fathersurname ->value,
'motherfirstname' => $epalStudent -> motherfirstname ->value, 'motherfirstname' => $epalStudent -> motherfirstname ->value,
'mothersurname' =>$epalStudent -> mothersurname ->value, 'mothersurname' =>$epalStudent -> mothersurname ->value,
'guardianfirstname' =>$epalUser -> name ->value, 'guardian_name' =>$epalStudent -> guardian_name ->value,
'guardiansurname' =>$epalUser -> surname ->value, 'guardian_surname' =>$epalStudent -> guardian_surname ->value,
'guardian_fathername' =>$epalStudent -> guardian_fathername ->value,
'guardian_mothername' =>$epalStudent -> guardian_mothername ->value,
'lastschool_schoolname' =>$epalStudent -> lastschool_schoolname ->value,
'lastschool_schoolyear' =>$epalStudent -> lastschool_schoolyear ->value,
'lastschool_class' =>$epalStudent -> currentclass ->value,
'regionaddress' =>$epalStudent -> regionaddress ->value, 'regionaddress' =>$epalStudent -> regionaddress ->value,
'regiontk' =>$epalStudent -> regiontk ->value, 'regiontk' =>$epalStudent -> regiontk ->value,
'regionarea' =>$epalStudent -> regionarea ->value, 'regionarea' =>$epalStudent -> regionarea ->value,
'certificatetype' =>$epalStudent -> certificatetype ->value, 'certificatetype' =>$epalStudent -> certificatetype ->value,
'graduation_year' =>$epalStudent -> graduation_year ->value,
'telnum' =>$epalStudent -> telnum ->value, 'telnum' =>$epalStudent -> telnum ->value,
'relationtostudent' =>$epalStudent -> relationtostudent ->value, 'relationtostudent' =>$epalStudent -> relationtostudent ->value,
'birthdate' =>$epalStudent -> birthdate ->value, 'birthdate' =>$epalStudent -> birthdate ->value,
...@@ -292,7 +298,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -292,7 +298,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
, Response::HTTP_OK); , Response::HTTP_OK);
} }
} }
else { else {
$list = array(); $list = array();
return $this->respondWithStatus($list, Response::HTTP_OK); return $this->respondWithStatus($list, Response::HTTP_OK);
...@@ -300,7 +306,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -300,7 +306,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
} }
else { else {
return $this->respondWithStatus([ return $this->respondWithStatus([
...@@ -582,7 +588,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -582,7 +588,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken)); $users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users); $user = reset($users);
if ($user) if ($user)
{ {
$newid = $user -> init -> value; $newid = $user -> init -> value;
$userRoles = $user->getRoles(); $userRoles = $user->getRoles();
$userRole = ''; $userRole = '';
...@@ -968,7 +974,7 @@ public function gettypeofschool(Request $request) ...@@ -968,7 +974,7 @@ public function gettypeofschool(Request $request)
else if ($userRole === 'epal') else if ($userRole === 'epal')
{ {
$list = array(); $list = array();
$list[] = array( $list[] = array(
'type' => $school -> operation_shift -> value, 'type' => $school -> operation_shift -> value,
...@@ -1221,7 +1227,7 @@ public function gettypeofschool(Request $request) ...@@ -1221,7 +1227,7 @@ public function gettypeofschool(Request $request)
$i++; $i++;
} }
} }
if ($CourseC) if ($CourseC)
{ {
foreach ($CourseC as $object) foreach ($CourseC as $object)
...@@ -1237,7 +1243,7 @@ public function gettypeofschool(Request $request) ...@@ -1237,7 +1243,7 @@ public function gettypeofschool(Request $request)
'taxi' => 'Δ Λυκείου '.$object -> specialty_id -> entity-> get('name')->value, 'taxi' => 'Δ Λυκείου '.$object -> specialty_id -> entity-> get('name')->value,
'capacity' => $classcapacity -> capacity_class_specialty_d -> value , 'capacity' => $classcapacity -> capacity_class_specialty_d -> value ,
'globalindex' => $i , 'globalindex' => $i ,
); );
} }
$i++; $i++;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment