Commit 60d95068 authored by Open Source Developer's avatar Open Source Developer

bugs fixed

parent 1b31d7e6
......@@ -43,7 +43,7 @@ public function getSectorsPerSchool(Request $request, $epalId)
$user = reset($users);
if ($user) {
// $schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $user->mail->value, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $this->testSchoolId, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => intval($epalId)));
$school = reset($schools);
if (!$school) {
$this->logger->warning("no access to this school=" . $user->id());
......@@ -101,7 +101,7 @@ public function getSpecialPerSchool(Request $request, $epalId , $sectorId)
$user = reset($users);
if ($user) {
// $schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $user->mail->value, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $this->testSchoolId, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array( 'id' => intval($epalId)));
$school = reset($schools);
if (!$school) {
$this->logger->warning("no access to this school=" . $user->id());
......@@ -164,7 +164,7 @@ public function getStudentPerSchool(Request $request, $epalId , $selectId, $clas
$user = reset($users);
if ($user) {
// $schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $user->mail->value, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $this->testSchoolId, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array( 'id' => intval($epalId)));
$school = reset($schools);
if (!$school) {
$this->logger->warning("no access to this school=" . $user->id());
......@@ -278,17 +278,7 @@ public function getStudentPerSchool(Request $request, $epalId , $selectId, $clas
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if ($user) {
// $schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $user->mail->value, 'id' => intval($epalId)));
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $this->testSchoolId));
$school = reset($schools);
if (!$school) {
$this->logger->warning("no access to this school=" . $user->id());
$response = new Response();
$response->setContent('No access to this school');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
}
//
$postData = null;
......
......@@ -80,7 +80,7 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
</div>
</ul>
<div *ngIf="currentUrl === '/submited-preview'">
<div *ngIf="currentUrl === '/application-submit'">
<div *ngFor="let studentDataField$ of studentDataFields$ | async;">
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
......@@ -119,7 +119,7 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
<div *ngIf="currentUrl === '/submited-preview'">
<div *ngIf="currentUrl === '/application-submit'">
Κοινωνικά/Εισοδηματικά Κριτήρια
</div>
</li>
......@@ -127,7 +127,7 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
</div>
</div>
<div *ngIf="currentUrl === '/submited-preview'">
<div *ngIf="currentUrl === '/application-submit'">
<div *ngFor="let criteriaField$ of criteriaFields$ | async;">
<div *ngIf="criteriaField$.selected === true">
{{criteriaField$.name}}
......@@ -172,6 +172,7 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
ngOnInit() {
this.currentUrl = this.router.url;
console.log(this.currentUrl,"url");
this.sectorsSub = this._ngRedux.select(state => {
state.sectors.reduce((prevSector, sector) => {
sector.courses.reduce((prevCourse, course) => {
......
......@@ -56,7 +56,7 @@ import { HelperDataService } from '../../services/helper-data-service';
</div>
<application-preview-select></application-preview-select>
<button type="button button-lg pull-right" *ngIf="(studentDataFields$ | async).size > 0 && (criteria$ | async).size > 0 && (regions$ | async).size > 0 && (epalclasses$ | async).size > 0 && (loginInfo$ | async).size > 0" class="btn-primary btn-lg pull-center" (click)="submitNow()">Υποβολή</button>
<button type="button button-lg pull-right" *ngIf="(studentDataFields$ | async).size > 0 && (criteria$ | async).size > 0 && (regions$ | async).size > 0 && (epalclasses$ | async).size > 0 && (loginInfo$ | async).size > 0" class="btn-primary btn-lg pull-right" (click)="submitNow()">Υποβολή</button>
`
})
......
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