fixed epal.routing. WIP: restructure application form(remove - add fields)

parent 5933a60e
...@@ -38,7 +38,7 @@ epal.current_user: ...@@ -38,7 +38,7 @@ epal.current_user:
_controller: '\Drupal\epal\Controller\CurrentUser::getLoginInfo' _controller: '\Drupal\epal\Controller\CurrentUser::getLoginInfo'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
submitedapplications: epal.submitedapplications:
path: '/epal/subapplic' path: '/epal/subapplic'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -46,7 +46,7 @@ submitedapplications: ...@@ -46,7 +46,7 @@ submitedapplications:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getSubmittedApplications' _controller: '\Drupal\epal\Controller\SubmitedApplications::getSubmittedApplications'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
studentapplication: epal.studentapplication:
path: '/epal/student/{studentId}' path: '/epal/student/{studentId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -54,7 +54,7 @@ studentapplication: ...@@ -54,7 +54,7 @@ studentapplication:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getStudentApplications' _controller: '\Drupal\epal\Controller\SubmitedApplications::getStudentApplications'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epalchosen: epal.epalchosen:
path: '/epal/epalchosen/{studentId}' path: '/epal/epalchosen/{studentId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -73,12 +73,12 @@ epal.application_submit: ...@@ -73,12 +73,12 @@ epal.application_submit:
epal.allocation: epal.allocation:
path: '/epal/distribution' path: '/epal/distribution'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
defaults: defaults:
_controller: '\Drupal\epal\Controller\Distribution::createDistribution' _controller: '\Drupal\epal\Controller\Distribution::createDistribution'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
sectorperschool: epal.sectorperschool:
path: '/epal/sectorperSchool' path: '/epal/sectorperSchool'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -86,7 +86,7 @@ sectorperschool: ...@@ -86,7 +86,7 @@ sectorperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getSectorsPerSchool' _controller: '\Drupal\epal\Controller\DirectorView::getSectorsPerSchool'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
specialityperschool: epal.specialityperschool:
path: '/epal/specialityperSchool/{sectorId}' path: '/epal/specialityperSchool/{sectorId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -94,7 +94,7 @@ specialityperschool: ...@@ -94,7 +94,7 @@ specialityperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getSpecialPerSchool' _controller: '\Drupal\epal\Controller\DirectorView::getSpecialPerSchool'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
confirmstudents: epal.confirmstudents:
path: '/epal/confirmstudent' path: '/epal/confirmstudent'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -102,7 +102,7 @@ confirmstudents: ...@@ -102,7 +102,7 @@ confirmstudents:
_controller: '\Drupal\epal\Controller\DirectorView::ConfirmStudents' _controller: '\Drupal\epal\Controller\DirectorView::ConfirmStudents'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
studentperschool: epal.studentperschool:
path: '/epal/studentperSchool/{selectId}/{classId}/{limitdown}/{limitup}' path: '/epal/studentperSchool/{selectId}/{classId}/{limitdown}/{limitup}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -110,7 +110,7 @@ studentperschool: ...@@ -110,7 +110,7 @@ studentperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getStudentPerSchool' _controller: '\Drupal\epal\Controller\DirectorView::getStudentPerSchool'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
savecapacity: epal.savecapacity:
path: '/epal/savecapacity/{taxi}/{tomeas}/{specialit}' path: '/epal/savecapacity/{taxi}/{tomeas}/{specialit}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -125,7 +125,7 @@ epal.ministry.log_in_go: ...@@ -125,7 +125,7 @@ epal.ministry.log_in_go:
defaults: defaults:
_controller: '\Drupal\epal\Controller\MinistryLogin::loginGo' _controller: '\Drupal\epal\Controller\MinistryLogin::loginGo'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.log_out_go: epal.ministry.log_out_go:
path: '/ministry/logout' path: '/ministry/logout'
options: options:
...@@ -133,7 +133,7 @@ epal.ministry.log_out_go: ...@@ -133,7 +133,7 @@ epal.ministry.log_out_go:
defaults: defaults:
_controller: '\Drupal\epal\Controller\MinistryLogin::logoutGo' _controller: '\Drupal\epal\Controller\MinistryLogin::logoutGo'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.general_report: epal.ministry.general_report:
path: '/ministry/general-report' path: '/ministry/general-report'
options: options:
...@@ -141,7 +141,7 @@ epal.ministry.general_report: ...@@ -141,7 +141,7 @@ epal.ministry.general_report:
defaults: defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makegGeneralReport' _controller: '\Drupal\epal\Controller\ReportsCreator::makegGeneralReport'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.report-completeness: epal.ministry.report-completeness:
path: '/ministry/report-completeness/{regionId}/{adminId}/{schId}' path: '/ministry/report-completeness/{regionId}/{adminId}/{schId}'
options: options:
...@@ -149,7 +149,7 @@ epal.ministry.report-completeness: ...@@ -149,7 +149,7 @@ epal.ministry.report-completeness:
defaults: defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportCompleteness' _controller: '\Drupal\epal\Controller\ReportsCreator::makeReportCompleteness'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.report-all-stat: epal.ministry.report-all-stat:
path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}' path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}'
options: options:
...@@ -157,7 +157,7 @@ epal.ministry.report-all-stat: ...@@ -157,7 +157,7 @@ epal.ministry.report-all-stat:
defaults: defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportAllStat' _controller: '\Drupal\epal\Controller\ReportsCreator::makeReportAllStat'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.report-no-capacity: epal.ministry.report-no-capacity:
path: '/ministry/report-no-capacity/{capacityEnabled}' path: '/ministry/report-no-capacity/{capacityEnabled}'
options: options:
...@@ -165,7 +165,7 @@ epal.ministry.report-no-capacity: ...@@ -165,7 +165,7 @@ epal.ministry.report-no-capacity:
defaults: defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportNoCapacity' _controller: '\Drupal\epal\Controller\ReportsCreator::makeReportNoCapacity'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.retrieve-registry-id: epal.ministry.retrieve-registry-id:
path: '/ministry/retrieve-registry-id' path: '/ministry/retrieve-registry-id'
options: options:
...@@ -173,7 +173,7 @@ epal.ministry.retrieve-registry-id: ...@@ -173,7 +173,7 @@ epal.ministry.retrieve-registry-id:
defaults: defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::retrieveUserRegistryNo' _controller: '\Drupal\epal\Controller\ReportsCreator::retrieveUserRegistryNo'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.massive_mail: epal.ministry.massive_mail:
path: '/ministry/send-massive-mail' path: '/ministry/send-massive-mail'
options: options:
...@@ -181,7 +181,7 @@ epal.ministry.massive_mail: ...@@ -181,7 +181,7 @@ epal.ministry.massive_mail:
defaults: defaults:
_controller: '\Drupal\epal\Controller\InformUnlocatedStudents::sendMailToStudents' _controller: '\Drupal\epal\Controller\InformUnlocatedStudents::sendMailToStudents'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.retrievesettings: epal.ministry.retrievesettings:
path: '/ministry/retrieve-settings' path: '/ministry/retrieve-settings'
options: options:
...@@ -189,7 +189,7 @@ epal.ministry.retrievesettings: ...@@ -189,7 +189,7 @@ epal.ministry.retrievesettings:
defaults: defaults:
_controller: '\Drupal\epal\Controller\MinisterSettings::retrieveSettings' _controller: '\Drupal\epal\Controller\MinisterSettings::retrieveSettings'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.storesettings: epal.ministry.storesettings:
path: '/ministry/store-settings/{capacityDisabled}/{directorViewDisabled}/{applicantsLoginDisabled}' path: '/ministry/store-settings/{capacityDisabled}/{directorViewDisabled}/{applicantsLoginDisabled}'
options: options:
...@@ -197,16 +197,16 @@ epal.ministry.storesettings: ...@@ -197,16 +197,16 @@ epal.ministry.storesettings:
defaults: defaults:
_controller: '\Drupal\epal\Controller\MinisterSettings::storeSettings' _controller: '\Drupal\epal\Controller\MinisterSettings::storeSettings'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
regionview: epal.perfectureschools:
path: '/epal/ScoolperPerf/{perfectureId}' path: '/epal/schools-per-perf'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
defaults: defaults:
_controller: '\Drupal\epal\Controller\DirectorView::getSchoolsPerPerfetcure' _controller: '\Drupal\epal\Controller\DirectorView::getSchoolsPerPerfecture'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
coursesperschools: epal.coursesperschools:
path: '/epal/CoursesperSch/{schoolid}' path: '/epal/CoursesperSch/{schoolid}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -214,7 +214,7 @@ coursesperschools: ...@@ -214,7 +214,7 @@ coursesperschools:
_controller: '\Drupal\epal\Controller\DirectorView::getCoursesPerSchool' _controller: '\Drupal\epal\Controller\DirectorView::getCoursesPerSchool'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
critirioschosen: epal.critirioschosen:
path: '/epal/critiriachosen/{studentId}/{type}' path: '/epal/critiriachosen/{studentId}/{type}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -222,7 +222,7 @@ critirioschosen: ...@@ -222,7 +222,7 @@ critirioschosen:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getCritiria' _controller: '\Drupal\epal\Controller\SubmitedApplications::getCritiria'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
findcapacity: epal.findcapacity:
path: '/epal/findCapacity/{taxi}/{tomeas}/{specialit}' path: '/epal/findCapacity/{taxi}/{tomeas}/{specialit}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -230,7 +230,7 @@ findcapacity: ...@@ -230,7 +230,7 @@ findcapacity:
_controller: '\Drupal\epal\Controller\DirectorView::findCapacity' _controller: '\Drupal\epal\Controller\DirectorView::findCapacity'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
findschoolid: epal.findschoolid:
path: '/epal/getschool' path: '/epal/getschool'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -238,7 +238,7 @@ findschoolid: ...@@ -238,7 +238,7 @@ findschoolid:
_controller: '\Drupal\epal\Controller\DirectorView::getSchoolID' _controller: '\Drupal\epal\Controller\DirectorView::getSchoolID'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
gettypeofschool: epal.gettypeofschool:
path: '/epal/gettypeofschool' path: '/epal/gettypeofschool'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
...@@ -246,5 +246,3 @@ gettypeofschool: ...@@ -246,5 +246,3 @@ gettypeofschool:
_controller: '\Drupal\epal\Controller\DirectorView::gettypeofschool' _controller: '\Drupal\epal\Controller\DirectorView::gettypeofschool'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
...@@ -200,27 +200,27 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -200,27 +200,27 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
{ {
$list=array( $list=array(
'id' => sizeof($studentPerSchool), 'id' => sizeof($studentPerSchool),
'up' => $limitup, 'up' => $limitup,
'down' => $limitdown 'down' => $limitdown
); );
} }
else else
{ {
foreach ($studentPerSchool as $object) foreach ($studentPerSchool as $object)
{ {
$studentId = $object -> id() ; $studentId = $object -> id() ;
$epalStudents = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id'=> $studentId)); $epalStudents = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id'=> $studentId));
$epalStudent = reset($epalStudents); $epalStudent = reset($epalStudents);
if ($epalStudents) { if ($epalStudents) {
$studentIdNew = $epalStudent -> id(); $studentIdNew = $epalStudent -> id();
$checkstatus = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array( 'student_id'=> $studentIdNew)); $checkstatus = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array( 'student_id'=> $studentIdNew));
$checkstudentstatus = reset($checkstatus); $checkstudentstatus = reset($checkstatus);
if ($i >= $limitdown && $i < $limitup) if ($i >= $limitdown && $i < $limitup)
{ {
$newstatus = $checkstudentstatus -> directorconfirm-> getValue(); $newstatus = $checkstudentstatus -> directorconfirm-> getValue();
$list[] = array( $list[] = array(
'i' => $i, 'i' => $i,
'id' => $epalStudent -> id(), 'id' => $epalStudent -> id(),
...@@ -283,7 +283,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -283,7 +283,7 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
$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) {
// //
$postData = null; $postData = null;
...@@ -427,7 +427,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -427,7 +427,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
public function getSchoolsPerPerfetcure(Request $request) public function getSchoolsPerPerfecture(Request $request)
{ {
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
...@@ -438,12 +438,12 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -438,12 +438,12 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
{ {
$perfectureId = $user -> init -> value; $perfectureId = $user -> init -> value;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('region_edu_admin_id'=> $perfectureId )); $schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('region_edu_admin_id'=> $perfectureId ));
if ($schools) if ($schools)
{ {
$list = array(); $list = array();
foreach ($schools as $object) { foreach ($schools as $object) {
$status = $this->returnstatus(147); $status = $this->returnstatus(147);
$list[] = array( $list[] = array(
'id' =>$object -> id(), 'id' =>$object -> id(),
'name' => $object -> name ->value, 'name' => $object -> name ->value,
...@@ -463,7 +463,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -463,7 +463,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
], Response::HTTP_FORBIDDEN); ], Response::HTTP_FORBIDDEN);
} }
} }
else else
{ {
...@@ -489,14 +489,14 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -489,14 +489,14 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
$list= array(); $list= array();
$SchoolCats = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id'=> $schoolid )); $SchoolCats = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id'=> $schoolid ));
$SchoolCat = reset($SchoolCats); $SchoolCat = reset($SchoolCats);
if ($SchoolCat){ if ($SchoolCat){
$categ = $SchoolCat-> metathesis_region -> value; $categ = $SchoolCat-> metathesis_region -> value;
} }
$CourseA = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id'=> $schoolid )); $CourseA = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id'=> $schoolid ));
if ($CourseA) if ($CourseA)
{ {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name'=> 1, 'category' => $categ )); $limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name'=> 1, 'category' => $categ ));
$limitdown = reset($limit_down); $limitdown = reset($limit_down);
...@@ -515,10 +515,10 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -515,10 +515,10 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
'classes' => 1, 'classes' => 1,
'limitdown' => $limit, 'limitdown' => $limit,
); );
} } } }
$CourseB = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid )); $CourseB = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid ));
if ($CourseB) if ($CourseB)
{ {
...@@ -564,13 +564,13 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -564,13 +564,13 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
'categ' => $categ, 'categ' => $categ,
'classes' => 3, 'classes' => 3,
'limitdown' => $limit, 'limitdown' => $limit,
); );
} }
} }
if ($CourseA || $CourseB || $CourseC) if ($CourseA || $CourseB || $CourseC)
{ {
return $this->respondWithStatus( return $this->respondWithStatus(
$list $list
, Response::HTTP_OK); , Response::HTTP_OK);
...@@ -582,7 +582,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -582,7 +582,7 @@ public function SaveCapacity(Request $request,$taxi,$tomeas,$specialit)
], Response::HTTP_FORBIDDEN); ], Response::HTTP_FORBIDDEN);
} }
} }
else else
{ {
...@@ -598,7 +598,7 @@ public function returnstatus($id) ...@@ -598,7 +598,7 @@ public function returnstatus($id)
if ($id == 147) if ($id == 147)
return true ; return true ;
return false; return false;
} }
...@@ -624,22 +624,22 @@ public function findCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -624,22 +624,22 @@ public function findCapacity(Request $request,$taxi,$tomeas,$specialit)
$response->headers->set('Content-Type', 'application/json'); $response->headers->set('Content-Type', 'application/json');
return $response; return $response;
} }
$list = array(); $list = array();
if (($tomeasnew == 0) && ($specialitnew == 0)) if (($tomeasnew == 0) && ($specialitnew == 0))
{ {
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid )); $CapacityPerClass = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid ));
$classcapacity = reset($CapacityPerClass); $classcapacity = reset($CapacityPerClass);
if ($classcapacity) { if ($classcapacity) {
$list[] = array( $list[] = array(
'taxi' => $taxi, 'taxi' => $taxi,
'capacity' => $classcapacity -> capacity_class_a -> value , 'capacity' => $classcapacity -> capacity_class_a -> value ,
); );
} }
} }
...@@ -699,7 +699,7 @@ public function findCapacity(Request $request,$taxi,$tomeas,$specialit) ...@@ -699,7 +699,7 @@ public function findCapacity(Request $request,$taxi,$tomeas,$specialit)
return $this->respondWithStatus( return $this->respondWithStatus(
$list $list
, Response::HTTP_OK); , Response::HTTP_OK);
} else { } else {
return $this->respondWithStatus([ return $this->respondWithStatus([
...@@ -724,13 +724,11 @@ public function getSchoolID(Request $request) ...@@ -724,13 +724,11 @@ public function getSchoolID(Request $request)
'id' => $schid 'id' => $schid
); );
$i++;
return $this->respondWithStatus( return $this->respondWithStatus(
$list $list
, Response::HTTP_OK); , Response::HTTP_OK);
} else { } else {
...@@ -768,12 +766,12 @@ public function gettypeofschool(Request $request) ...@@ -768,12 +766,12 @@ public function gettypeofschool(Request $request)
{ {
$list = array(); $list = array();
$list[] = array( $list[] = array(
'type' => $school -> operation_shift -> value, 'type' => $school -> operation_shift -> value,
); );
return $this->respondWithStatus( return $this->respondWithStatus(
$list $list
, Response::HTTP_OK); , Response::HTTP_OK);
} }
} else { } else {
......
...@@ -74,9 +74,7 @@ import { ...@@ -74,9 +74,7 @@ import {
studentbirthdate: ['', [Validators.required]], studentbirthdate: ['', [Validators.required]],
//studentbirthdate: ['', [Validators.pattern(VALID_DATE_PATTERN),Validators.required]], //studentbirthdate: ['', [Validators.pattern(VALID_DATE_PATTERN),Validators.required]],
fatherfirstname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], fatherfirstname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
fathersurname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
motherfirstname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], motherfirstname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
mothersurname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
regionaddress: ['', [Validators.pattern(VALID_ADDRESS_PATTERN),Validators.required]], regionaddress: ['', [Validators.pattern(VALID_ADDRESS_PATTERN),Validators.required]],
regiontk: ['', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]], regiontk: ['', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]],
regionarea: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], regionarea: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
...@@ -110,9 +108,7 @@ import { ...@@ -110,9 +108,7 @@ import {
this.studentDataGroup.controls['name'].setValue(studentDataField.name); this.studentDataGroup.controls['name'].setValue(studentDataField.name);
this.studentDataGroup.controls['studentsurname'].setValue(studentDataField.studentsurname); this.studentDataGroup.controls['studentsurname'].setValue(studentDataField.studentsurname);
this.studentDataGroup.controls['fatherfirstname'].setValue(studentDataField.fatherfirstname); this.studentDataGroup.controls['fatherfirstname'].setValue(studentDataField.fatherfirstname);
this.studentDataGroup.controls['fathersurname'].setValue(studentDataField.fathersurname);
this.studentDataGroup.controls['motherfirstname'].setValue(studentDataField.motherfirstname); this.studentDataGroup.controls['motherfirstname'].setValue(studentDataField.motherfirstname);
this.studentDataGroup.controls['mothersurname'].setValue(studentDataField.mothersurname);
this.studentDataGroup.controls['regionaddress'].setValue(studentDataField.regionaddress); this.studentDataGroup.controls['regionaddress'].setValue(studentDataField.regionaddress);
this.studentDataGroup.controls['regiontk'].setValue(studentDataField.regiontk); this.studentDataGroup.controls['regiontk'].setValue(studentDataField.regiontk);
this.studentDataGroup.controls['regionarea'].setValue(studentDataField.regionarea); this.studentDataGroup.controls['regionarea'].setValue(studentDataField.regionarea);
......
...@@ -87,7 +87,6 @@ import { SECTOR_FIELDS_INITIAL_STATE } from '../../store/sectorfields/sectorfiel ...@@ -87,7 +87,6 @@ import { SECTOR_FIELDS_INITIAL_STATE } from '../../store/sectorfields/sectorfiel
private sectorsSub: Subscription; private sectorsSub: Subscription;
private regionsSub: Subscription; private regionsSub: Subscription;
private sectorFieldsSub: Subscription; private sectorFieldsSub: Subscription;
private criteriaFieldsSub: Subscription;
private courseActive = "-1";