Commit 4fb6c85a authored by Χάρης Παπαδόπουλος's avatar Χάρης Παπαδόπουλος
Browse files

Merge branch 'lock_actions' into 'develop'

application.form.main validation fix. Restructured submited.aplication.preview. UI enhancements

See merge request !133
parents d5006978 147f9c43
......@@ -268,8 +268,8 @@ epal.findcapacityperschool:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\DirectorView::FindCapacityPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
requirements:
_user_is_logged_in: 'TRUE'
epal.applicant.creationpdf:
path: '/epal/pdf-application/{studentId}'
options:
......
......@@ -95,12 +95,18 @@ class SubmitedApplications extends ControllerBase
'fathersurname' =>$object -> fathersurname ->value,
'motherfirstname' => $object -> motherfirstname ->value,
'mothersurname' =>$object -> mothersurname ->value,
'guardianfirstname' =>$epalUser -> name ->value,
'guardiansurname' =>$epalUser -> surname ->value,
'guardian_name' =>$object -> guardian_name ->value,
'guardian_surname' =>$object -> guardian_surname ->value,
'guardian_fathername' =>$object -> guardian_fathername ->value,
'guardian_mothername' =>$object -> guardian_mothername ->value,
'lastschool_schoolname' =>$object -> lastschool_schoolname ->value,
'lastschool_schoolyear' =>$object -> lastschool_schoolyear ->value,
'lastschool_class' =>$object -> currentclass ->value,
'regionaddress' =>$object -> regionaddress ->value,
'regiontk' =>$object -> regiontk ->value,
'regionarea' =>$object -> regionarea ->value,
'certificatetype' =>$object -> certificatetype ->value,
'graduation_year' =>$object -> graduation_year ->value,
'telnum' =>$object -> telnum ->value,
'relationtostudent' =>$object -> relationtostudent ->value,
'birthdate' =>$object -> birthdate ->value,
......@@ -191,7 +197,7 @@ public function getEpalChosen(Request $request, $studentId)
foreach ($critiriaChosen as $object) {
$critirio_id = $object -> criterio_id ->entity -> id();
$critiriatype = $this->entityTypeManager->getStorage('epal_criteria')->loadByProperties(array( 'id'=>$critirio_id ));
$typeofcritiria = reset($critiriatype);
$typeofcritiria = reset($critiriatype);
$typecrit = $typeofcritiria -> category -> value;
if ($typecrit == "Κοινωνικό" && $type == 1){
$list[] = array(
......
......@@ -196,10 +196,14 @@ import {
submitSelected() {
// if (this.studentDataGroup.invalid || this.studentCriteriaGroup.invalid) {
if (this.studentDataGroup.invalid) {
if (this.studentDataGroup.invalid || this.invalidFormData()) {
this.modalHeader.next("modal-header-danger");
this.modalTitle.next("Η αίτηση δεν είναι πλήρης");
this.modalText.next("Πρέπει να συμπληρώσετε όλα τα πεδία που συνοδεύονται από (*)");
if (this.invalidFormData())
this.modalText.next("Πρέπει να συμπληρώσετε όλα τα πεδία που συνοδεύονται από (*). Το σχολείο τελευταίας φοίτησης πρέπει να αναζητηθεί και να επιλεχθεί από τα αποτελέσματα της αναζήτησης.");
else
this.modalText.next("Πρέπει να συμπληρώσετε όλα τα πεδία που συνοδεύονται από (*)");
this.showModal();
} else {
this._sdfa.saveStudentDataFields([this.studentDataGroup.value]);
......@@ -208,6 +212,14 @@ import {
}
}
private invalidFormData() : boolean {
if (!this.studentDataGroup.controls['lastschool_schoolname'].value.registry_no)
return true;
return false;
}
checkcriteria(cb, mutual_disabled) {
if (mutual_disabled !== "-1" && cb.checked === true) {
//this.studentCriteriaGroup.controls['formArray']['controls'][mutual_disabled-1].setValue(false);
......
......@@ -98,8 +98,9 @@ import { HelperDataService } from '../../services/helper-data-service';
<div *ngIf="studentDataField$.lastschool_class === 3"><label for="lastschool_class">Τάξη τελευταίας φοίτησης</label> <p class="form-control" style="border:1px solid #eceeef;">Γ'</p></div>
<div *ngIf="studentDataField$.lastschool_class === 4"><label for="lastschool_class">Τάξη τελευταίας φοίτησης</label> <p class="form-control" style="border:1px solid #eceeef;">Δ'</p></div>
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" style="border:1px solid #eceeef;"> {{studentDataField$.telnum}} </p></div>
<div><label for="relationtostudent">Η αίτηση γίνεται από</label> <p class="form-control" style="border:1px solid #eceeef;"> {{studentDataField$.relationtostudent}} </p></div>
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" style="border:1px solid #eceeef;"> {{studentDataField$.telnum}} </p></div>
</div>
<div class="row" style="margin-top: 20px; margin-bottom: 20px;">
......@@ -401,7 +402,7 @@ import { HelperDataService } from '../../services/helper-data-service';
if (this.modalHeader.getValue() === "modal-header-success") {
this.router.navigate(['/post-submit']);
}
}
public onHidden():void {
......
......@@ -174,7 +174,8 @@
background-color: #eeeeee;
}
.selectedout {
background-color: #fd9665;
/* background-color: #fd9665; */
background-color: #cfcfcf;
}
.changecolor
......
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