Fixed director view bug. Other fixes

parent 88da1f2e
...@@ -5,8 +5,6 @@ use Drupal\Core\Entity\Query\QueryFactory; ...@@ -5,8 +5,6 @@ use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
// require_once '/home/haris/devel/eepal/drupal/modules/casost/src/CAS/phpCAS.php';
use phpCAS; use phpCAS;
use Drupal\user\Entity\User; use Drupal\user\Entity\User;
use Drupal\Core\Database\Connection; use Drupal\Core\Database\Connection;
......
...@@ -192,7 +192,27 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface { ...@@ -192,7 +192,27 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface {
)) ))
->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE); ->setDisplayConfigurable('view', TRUE);
$fields['category'] = BaseFieldDefinition::create('string')
->setLabel(t('Κατηγορα'))
->setDescription(t('Κατηγορία κριτηρίου.'))
->setSettings(array(
'max_length' => 100,
'text_processing' => 0,
))
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['value_limit'] = BaseFieldDefinition::create('float') $fields['value_limit'] = BaseFieldDefinition::create('float')
->setLabel(t('Αριθμητικό όριο')) ->setLabel(t('Αριθμητικό όριο'))
->setDescription(t('Αριθμητικό όριο.')) ->setDescription(t('Αριθμητικό όριο.'))
...@@ -210,7 +230,7 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface { ...@@ -210,7 +230,7 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface {
)) ))
->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE); ->setDisplayConfigurable('view', TRUE);
$fields['moria'] = BaseFieldDefinition::create('float') $fields['moria'] = BaseFieldDefinition::create('float')
->setLabel(t('Μόρια')) ->setLabel(t('Μόρια'))
->setDescription(t('Μόρια.')) ->setDescription(t('Μόρια.'))
...@@ -228,7 +248,7 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface { ...@@ -228,7 +248,7 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface {
)) ))
->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE); ->setDisplayConfigurable('view', TRUE);
$fields['mutual_disabled_id'] = BaseFieldDefinition::create('integer') $fields['mutual_disabled_id'] = BaseFieldDefinition::create('integer')
->setLabel(t('Id αμοιβαία αποκλειόμενου κριτηρίου')) ->setLabel(t('Id αμοιβαία αποκλειόμενου κριτηρίου'))
->setDescription(t('Id αμοιβαία αποκλειόμενου κριτηρίου.')) ->setDescription(t('Id αμοιβαία αποκλειόμενου κριτηρίου.'))
......
...@@ -28,7 +28,7 @@ import { ...@@ -28,7 +28,7 @@ import {
<option value="2" >Β' Λυκείου</option> <option value="2" >Β' Λυκείου</option>
<option value="3" >Γ' Λυκείου</option> <option value="3" >Γ' Λυκείου</option>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<select #tmop class="form-control" *ngIf="(selectionBClass | async)" (change)="checkbclass(tmop,txoption)" formControlName="tomeas"> <select #tmop class="form-control" *ngIf="(selectionBClass | async)" (change)="checkbclass(tmop,txoption)" formControlName="tomeas">
...@@ -54,10 +54,10 @@ import { ...@@ -54,10 +54,10 @@ import {
Όνομα Μητέρας: {{StudentDetails$.motherfirstname}}<br> Όνομα Μητέρας: {{StudentDetails$.motherfirstname}}<br>
Επώνυμο Μητέρας:{{StudentDetails$.mothersurname}}<br> Επώνυμο Μητέρας:{{StudentDetails$.mothersurname}}<br>
Ημερομηνία Γέννησης: {{StudentDetails$.birthdate}}<br> Ημερομηνία Γέννησης: {{StudentDetails$.birthdate}}<br>
<strong>Επιβεβαίωση Εγγραφής: </strong> <strong>Επιβεβαίωση Εγγραφής: </strong>
<input #cb class="pull-right" type="checkbox" name="{{ StudentDetails$.id }}" (change)="updateCheckedOptions(StudentDetails$.id, $event)" > <input #cb class="pull-right" type="checkbox" name="{{ StudentDetails$.id }}" (change)="updateCheckedOptions(StudentDetails$.id, $event)" >
</div> </div>
</div> </div>
<button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent()"> <button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent()">
...@@ -84,7 +84,7 @@ import { ...@@ -84,7 +84,7 @@ import {
constructor( private fb: FormBuilder, constructor( private fb: FormBuilder,
private _hds: HelperDataService, private _hds: HelperDataService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private router: Router ) private router: Router )
{ {
...@@ -99,7 +99,7 @@ import { ...@@ -99,7 +99,7 @@ import {
taxi: ['', []], taxi: ['', []],
specialit: ['', []], specialit: ['', []],
}); });
} }
ngOnDestroy() ngOnDestroy()
...@@ -111,11 +111,11 @@ import { ...@@ -111,11 +111,11 @@ import {
if (this.selectionBClass) if (this.selectionBClass)
this.selectionBClass.unsubscribe(); this.selectionBClass.unsubscribe();
if (this.selectionCClass) if (this.selectionCClass)
this.selectionCClass.unsubscribe(); this.selectionCClass.unsubscribe();
if (this.retrievedStudent) if (this.retrievedStudent)
this.retrievedStudent.unsubscribe(); this.retrievedStudent.unsubscribe();
} }
ngOnInit() { ngOnInit() {
} }
...@@ -134,24 +134,23 @@ import { ...@@ -134,24 +134,23 @@ import {
{ {
this.selectionBClass.next(true); this.selectionBClass.next(true);
this.selectionCClass.next(false); this.selectionCClass.next(false);
this.StudentSelected$ = new BehaviorSubject([{}]);
this.StudentSelectedSub = this._hds.getSectorPerSchool(this.SchoolId).subscribe(this.StudentSelected$); this.StudentSelectedSub = this._hds.getSectorPerSchool(this.SchoolId).subscribe(this.StudentSelected$);
} }
else if (txop.value === "3") else if (txop.value === "3")
{ {
var sectorint = +this.formGroup.value.tomeas; var sectorint = +this.formGroup.value.tomeas;
console.log(sectorint,"test"); console.log(sectorint,"test");
if (this.formGroup.value.tomeas != '') if (this.formGroup.value.tomeas != '')
{ {
var sectorint = +this.formGroup.value.tomeas; var sectorint = +this.formGroup.value.tomeas;
this.StudentSelectedSpecial$ = new BehaviorSubject([{}]);
this.StudentSelectedSpecialSub = this._hds.getSpecialityPerSchool(this.SchoolId, sectorint).subscribe(this.StudentSelectedSpecial$); this.StudentSelectedSpecialSub = this._hds.getSpecialityPerSchool(this.SchoolId, sectorint).subscribe(this.StudentSelectedSpecial$);
} }
this.selectionBClass.next(true); this.selectionBClass.next(true);
this.selectionCClass.next(true); this.selectionCClass.next(true);
this.StudentSelected$ = new BehaviorSubject([{}]);
this.StudentSelectedSub = this._hds.getSectorPerSchool(this.SchoolId).subscribe(this.StudentSelected$); this.StudentSelectedSub = this._hds.getSectorPerSchool(this.SchoolId).subscribe(this.StudentSelected$);
} }
} }
...@@ -163,13 +162,13 @@ import { ...@@ -163,13 +162,13 @@ import {
if (txop.value === "3") if (txop.value === "3")
{ {
this.StudentSelectedSpecial$ = new BehaviorSubject([{}]); this.StudentSelectedSpecial$ = new BehaviorSubject([{}]);
this.StudentSelectedSpecialSub = this._hds.getSpecialityPerSchool(this.SchoolId, sectorint).subscribe(this.StudentSelectedSpecial$); this.StudentSelectedSpecialSub = this._hds.getSpecialityPerSchool(this.SchoolId, sectorint).subscribe(this.StudentSelectedSpecial$);
} }
} }
findstudent(txop) findstudent(txop)
{ {
var sectorint = +this.formGroup.value.tomeas; var sectorint = +this.formGroup.value.tomeas;
if (txop.value === "1") if (txop.value === "1")
{ {
...@@ -180,15 +179,15 @@ import { ...@@ -180,15 +179,15 @@ import {
this.currentclass = 2; this.currentclass = 2;
} }
else if (txop.value === "3") else if (txop.value === "3")
{ {
this.currentclass = 3; this.currentclass = 3;
} }
this.retrievedStudent.next(true); this.retrievedStudent.next(true);
this.StudentInfo$ = new BehaviorSubject(false); this.StudentInfo$ = new BehaviorSubject(false);
this.StudentInfoSub = this._hds.getStudentPerSchool(this.SchoolId, sectorint, this.currentclass).subscribe(this.StudentInfo$); this.StudentInfoSub = this._hds.getStudentPerSchool(this.SchoolId, sectorint, this.currentclass).subscribe(this.StudentInfo$);
} }
updateCheckedOptions(id, event) updateCheckedOptions(id, event)
...@@ -196,8 +195,8 @@ updateCheckedOptions(id, event) ...@@ -196,8 +195,8 @@ updateCheckedOptions(id, event)
let i = this.saved.length; let i = this.saved.length;
if (event.target.checked === false) if (event.target.checked === false)
{ {
var count=this.saved.length; var count=this.saved.length;
for(var j=0;j<count;j++) for(var j=0;j<count;j++)
...@@ -225,4 +224,4 @@ checkcclass() ...@@ -225,4 +224,4 @@ checkcclass()
this.retrievedStudent.next(false); this.retrievedStudent.next(false);
} }
} }
\ No newline at end of file
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