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

parent 5933a60e
......@@ -38,7 +38,7 @@ epal.current_user:
_controller: '\Drupal\epal\Controller\CurrentUser::getLoginInfo'
requirements:
_user_is_logged_in: 'TRUE'
submitedapplications:
epal.submitedapplications:
path: '/epal/subapplic'
options:
_auth: [ 'basic_auth' ]
......@@ -46,7 +46,7 @@ submitedapplications:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getSubmittedApplications'
requirements:
_user_is_logged_in: 'TRUE'
studentapplication:
epal.studentapplication:
path: '/epal/student/{studentId}'
options:
_auth: [ 'basic_auth' ]
......@@ -54,7 +54,7 @@ studentapplication:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getStudentApplications'
requirements:
_user_is_logged_in: 'TRUE'
epalchosen:
epal.epalchosen:
path: '/epal/epalchosen/{studentId}'
options:
_auth: [ 'basic_auth' ]
......@@ -78,7 +78,7 @@ epal.allocation:
_controller: '\Drupal\epal\Controller\Distribution::createDistribution'
requirements:
_user_is_logged_in: 'TRUE'
sectorperschool:
epal.sectorperschool:
path: '/epal/sectorperSchool'
options:
_auth: [ 'basic_auth' ]
......@@ -86,7 +86,7 @@ sectorperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getSectorsPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
specialityperschool:
epal.specialityperschool:
path: '/epal/specialityperSchool/{sectorId}'
options:
_auth: [ 'basic_auth' ]
......@@ -94,7 +94,7 @@ specialityperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getSpecialPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
confirmstudents:
epal.confirmstudents:
path: '/epal/confirmstudent'
options:
_auth: [ 'basic_auth' ]
......@@ -102,7 +102,7 @@ confirmstudents:
_controller: '\Drupal\epal\Controller\DirectorView::ConfirmStudents'
requirements:
_user_is_logged_in: 'TRUE'
studentperschool:
epal.studentperschool:
path: '/epal/studentperSchool/{selectId}/{classId}/{limitdown}/{limitup}'
options:
_auth: [ 'basic_auth' ]
......@@ -110,7 +110,7 @@ studentperschool:
_controller: '\Drupal\epal\Controller\DirectorView::getStudentPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
savecapacity:
epal.savecapacity:
path: '/epal/savecapacity/{taxi}/{tomeas}/{specialit}'
options:
_auth: [ 'basic_auth' ]
......@@ -198,15 +198,15 @@ epal.ministry.storesettings:
_controller: '\Drupal\epal\Controller\MinisterSettings::storeSettings'
requirements:
_user_is_logged_in: 'TRUE'
regionview:
path: '/epal/ScoolperPerf/{perfectureId}'
epal.perfectureschools:
path: '/epal/schools-per-perf'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\DirectorView::getSchoolsPerPerfetcure'
_controller: '\Drupal\epal\Controller\DirectorView::getSchoolsPerPerfecture'
requirements:
_user_is_logged_in: 'TRUE'
coursesperschools:
epal.coursesperschools:
path: '/epal/CoursesperSch/{schoolid}'
options:
_auth: [ 'basic_auth' ]
......@@ -214,7 +214,7 @@ coursesperschools:
_controller: '\Drupal\epal\Controller\DirectorView::getCoursesPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
critirioschosen:
epal.critirioschosen:
path: '/epal/critiriachosen/{studentId}/{type}'
options:
_auth: [ 'basic_auth' ]
......@@ -222,7 +222,7 @@ critirioschosen:
_controller: '\Drupal\epal\Controller\SubmitedApplications::getCritiria'
requirements:
_user_is_logged_in: 'TRUE'
findcapacity:
epal.findcapacity:
path: '/epal/findCapacity/{taxi}/{tomeas}/{specialit}'
options:
_auth: [ 'basic_auth' ]
......@@ -230,7 +230,7 @@ findcapacity:
_controller: '\Drupal\epal\Controller\DirectorView::findCapacity'
requirements:
_user_is_logged_in: 'TRUE'
findschoolid:
epal.findschoolid:
path: '/epal/getschool'
options:
_auth: [ 'basic_auth' ]
......@@ -238,7 +238,7 @@ findschoolid:
_controller: '\Drupal\epal\Controller\DirectorView::getSchoolID'
requirements:
_user_is_logged_in: 'TRUE'
gettypeofschool:
epal.gettypeofschool:
path: '/epal/gettypeofschool'
options:
_auth: [ 'basic_auth' ]
......@@ -246,5 +246,3 @@ gettypeofschool:
_controller: '\Drupal\epal\Controller\DirectorView::gettypeofschool'
requirements:
_user_is_logged_in: 'TRUE'
......@@ -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');
......@@ -724,8 +724,6 @@ public function getSchoolID(Request $request)
'id' => $schid
);
$i++;
return $this->respondWithStatus(
$list
......
......@@ -74,9 +74,7 @@ import {
studentbirthdate: ['', [Validators.required]],
//studentbirthdate: ['', [Validators.pattern(VALID_DATE_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]],
mothersurname: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
regionaddress: ['', [Validators.pattern(VALID_ADDRESS_PATTERN),Validators.required]],
regiontk: ['', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]],
regionarea: ['', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
......@@ -110,9 +108,7 @@ import {
this.studentDataGroup.controls['name'].setValue(studentDataField.name);
this.studentDataGroup.controls['studentsurname'].setValue(studentDataField.studentsurname);
this.studentDataGroup.controls['fatherfirstname'].setValue(studentDataField.fatherfirstname);
this.studentDataGroup.controls['fathersurname'].setValue(studentDataField.fathersurname);
this.studentDataGroup.controls['motherfirstname'].setValue(studentDataField.motherfirstname);
this.studentDataGroup.controls['mothersurname'].setValue(studentDataField.mothersurname);
this.studentDataGroup.controls['regionaddress'].setValue(studentDataField.regionaddress);
this.studentDataGroup.controls['regiontk'].setValue(studentDataField.regiontk);
this.studentDataGroup.controls['regionarea'].setValue(studentDataField.regionarea);
......
......@@ -87,7 +87,6 @@ import { SECTOR_FIELDS_INITIAL_STATE } from '../../store/sectorfields/sectorfiel
private sectorsSub: Subscription;
private regionsSub: Subscription;
private sectorFieldsSub: Subscription;
private criteriaFieldsSub: Subscription;
private courseActive = "-1";
private numSelectedSchools = <number>0;
private numSelectedOrder = <number>0;
......
......@@ -77,16 +77,6 @@ import * as html2canvas from "html2canvas"
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" id = "telnum" style="border:1px solid #eceeef;"> {{StudentDetails$.telnum}} </p></div>
<div><label for="relationtostudent">Η αίτηση γίνεται από</label> <p class="form-control" id = "relationtostudent" style="border:1px solid #eceeef;"> {{StudentDetails$.relationtostudent}} </p></div>
<h5>Κοινωνικά Κριτίρια </h5>
<div *ngFor="let critiriaChoices$ of CritirioChosen$ | async" [hidden]="UserData$.id !== userActive">
{{critiriaChoices$.critirio}}
</div>
<h5>Εισοδηματικά Κριτίρια </h5>
<div *ngFor="let incomeChoices$ of incomeChosen$ | async" [hidden]="UserData$.id !== userActive">
{{incomeChoices$.critirio}}
</div>
<h5>Επιλογές ΕΠΑΛ</h5>
<div *ngFor="let epalChoices$ of EpalChosen$ | async" [hidden]="UserData$.id !== userActive">
Σχολείο: {{epalChoices$.epal_id}}
......@@ -211,20 +201,6 @@ import * as html2canvas from "html2canvas"
console.log("Error Getting Schools");
},
() => console.log("Getting Schools"));
this.CritirioChosenSub = this._hds.getCritiria(this.userActive+1, 1).subscribe(data => {
this.CritirioChosen$.next(data)},
error => {
this.CritirioChosen$.next([{}]);
console.log("Error Getting Schools");
},
() => console.log("Getting Schools"));
this.incomeChosenSub = this._hds.getCritiria(this.userActive+1, 2).subscribe(data => {
this.incomeChosen$.next(data)},
error => {
this.incomeChosen$.next([{}]);
console.log("Error Getting Schools");
},
() => console.log("Getting Schools"));
}
......@@ -283,5 +259,3 @@ html2canvas(document.getElementById("target"), <Html2Canvas.Html2CanvasOptions>{
}
......@@ -39,7 +39,8 @@ export const CRITERIA_INIT = 'CRITERIA_INIT';
export const VALID_NAMES_PATTERN = '[A-Za-zΑ-ΩΆΈΉΊΙΎΌΏα-ωάέήίΐύόώ ]*$';
export const VALID_ADDRESS_PATTERN = '[0-9A-Za-zΑ-ΩΆΈΉΊΎΌΏα-ωάέήίύόώ ]*$';
export const VALID_ADDRESSTK_PATTERN = '[0-9 ]*$';
export const VALID_DIGITS_PATTERN = '69[0-9]*$';
// export const VALID_DIGITS_PATTERN = '69[0-9]*$';
export const VALID_DIGITS_PATTERN = '2[0-9]*$';
export const VALID_EMAIL_PATTERN = '[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}';
......
......@@ -664,7 +664,7 @@ export class HelperDataService implements OnInit, OnDestroy {
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/epal/ScoolperPerf/` , options)
return this.http.get(`${AppSettings.API_ENDPOINT}/epal/schools-per-perf/` , options)
.map(response => response.json());
}
......
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