Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
60d95068
Commit
60d95068
authored
May 18, 2017
by
Open Source Developer
Browse files
bugs fixed
parent
1b31d7e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
drupal/modules/epal/src/Controller/DirectorView.php
View file @
60d95068
...
...
@@ -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
;
...
...
source/components/student-application-form/application.preview.ts
View file @
60d95068
...
...
@@ -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
)
=>
{
...
...
source/components/student-application-form/application.submit.ts
View file @
60d95068
...
...
@@ -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>
`
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment