Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
e-epal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
f9c55197
Commit
f9c55197
authored
May 12, 2017
by
Open Source Developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trans
parent
c93d51dc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
36 deletions
+45
-36
drupal/modules/epal/src/Controller/DirectorView.php
drupal/modules/epal/src/Controller/DirectorView.php
+4
-0
drupal/modules/epal/src/Controller/SubmitedApplications.php
drupal/modules/epal/src/Controller/SubmitedApplications.php
+1
-1
source/components/director/director-view.ts
source/components/director/director-view.ts
+38
-22
source/components/student-application-form/submited.aplication.preview.ts
...s/student-application-form/submited.aplication.preview.ts
+0
-11
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+2
-2
No files found.
drupal/modules/epal/src/Controller/DirectorView.php
View file @
f9c55197
...
@@ -290,13 +290,17 @@ public function getStudentPerSchool(Request $request, $epalId , $selectId, $clas
...
@@ -290,13 +290,17 @@ public function getStudentPerSchool(Request $request, $epalId , $selectId, $clas
{
{
$postData
=
json_decode
(
$content
);
$postData
=
json_decode
(
$content
);
$arr
=
$postData
->
students
;
$arr
=
$postData
->
students
;
$type
=
$postData
->
type
foreach
(
$arr
as
$value
)
{
foreach
(
$arr
as
$value
)
{
$valnew
=
intval
(
$value
);
$valnew
=
intval
(
$value
);
$studentForConfirm
=
$this
->
entityTypeManager
->
getStorage
(
'epal_student_class'
)
->
loadByProperties
(
array
(
'id'
=>
$valnew
));
$studentForConfirm
=
$this
->
entityTypeManager
->
getStorage
(
'epal_student_class'
)
->
loadByProperties
(
array
(
'id'
=>
$valnew
));
$studentConfirm
=
reset
(
$studentForConfirm
);
$studentConfirm
=
reset
(
$studentForConfirm
);
if
(
$studentConfirm
)
{
if
(
$studentConfirm
)
{
if
(
$type
==
1
)
$studentConfirm
->
set
(
'directorconfirm'
,
true
);
$studentConfirm
->
set
(
'directorconfirm'
,
true
);
if
(
$type
==
1
)
$studentConfirm
->
set
(
'directorconfirm'
,
false
);
$studentConfirm
->
save
();
$studentConfirm
->
save
();
}
}
}
}
...
...
drupal/modules/epal/src/Controller/SubmitedApplications.php
View file @
f9c55197
...
@@ -123,7 +123,7 @@ class SubmitedApplications extends ControllerBase
...
@@ -123,7 +123,7 @@ class SubmitedApplications extends ControllerBase
}
else
{
}
else
{
return
$this
->
respondWithStatus
([
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"User not found"
),
'message'
=>
t
(
"User not found
!!!!
"
),
],
Response
::
HTTP_FORBIDDEN
);
],
Response
::
HTTP_FORBIDDEN
);
}
}
...
...
source/components/director/director-view.ts
View file @
f9c55197
...
@@ -44,8 +44,8 @@ import {
...
@@ -44,8 +44,8 @@ import {
<button type="button" class="btn-primary btn-sm pull-right" (click)="findstudent(txoption,1)">
<button type="button" class="btn-primary btn-sm pull-right" (click)="findstudent(txoption,1)">
Αναζήτηση
Αναζήτηση
</button>
</button>
<br>
<br>
<ul class="list-group main-view">
<ul class="list-group main-view">
<div *ngIf="(retrievedStudent | async)">
<div *ngIf="(retrievedStudent | async)">
...
@@ -53,10 +53,19 @@ import {
...
@@ -53,10 +53,19 @@ import {
<li class="list-group-item isclickable" [class.oddout]="isOdd" [class.evenout]="isEven" (click)="setActiveUser(StudentDetails$.i)" [class.selectedout]="userActive === StudentDetails$.i" >
<li class="list-group-item isclickable" [class.oddout]="isOdd" [class.evenout]="isEven" (click)="setActiveUser(StudentDetails$.i)" [class.selectedout]="userActive === StudentDetails$.i" >
<h5> {{StudentDetails$.name}} {{StudentDetails$.name}} </h5>
<h5> {{StudentDetails$.name}} {{StudentDetails$.name}} </h5>
</li>
</li>
<strong>Επιβεβαίωση Εγγραφής: </strong>
<input #cb class="pull-right" type="checkbox" name="{{ StudentDetails$.id }}" (change)="updateCheckedOptions(StudentDetails$.id, $event)" >
<div [hidden]="userActive !== StudentDetails$.i" >
<div [hidden]="userActive !== StudentDetails$.i" >
<p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ αφού γίνει ο έλεγχος των στοιχείων του μαθητή επιβεβαιώστε τη δυνατότητα εγγραφής του.</p>
<strong><label>Επιβεβαίωση Εγγραφής:</label> </strong>
<select #cb name="{{StudentDetails$.id}}" (change)="updateCheckedOptions(StudentDetails$.id, cb)" >
<option value=1>Ναι</option>
<option value=2>Όχι</option>
<option value=3 selected></option>
</select>
<button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent()">
Επιβεβαίωση Εγγραφής
</button>
<table>
<table>
<tr><td>
<tr><td>
<div class="form-group" *ngIf="StudentDetails$.relationtostudent === 'Μαθητής' ">
<div class="form-group" *ngIf="StudentDetails$.relationtostudent === 'Μαθητής' ">
...
@@ -117,9 +126,6 @@ import {
...
@@ -117,9 +126,6 @@ import {
</div>
</div>
</div>
</div>
<button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent()">
Επιβεβαίωση Εγγραφής
</button>
<br>
<br>
<nav aria-label="pagination">
<nav aria-label="pagination">
<ul class="pagination justify-content-center">
<ul class="pagination justify-content-center">
...
@@ -161,6 +167,7 @@ import {
...
@@ -161,6 +167,7 @@ import {
private
limitup
=
5
;
private
limitup
=
5
;
private
pageno
=
1
;
private
pageno
=
1
;
private
userActive
=
<
number
>-
1
;
private
userActive
=
<
number
>-
1
;
private
type
:
Number
;
constructor
(
private
fb
:
FormBuilder
,
constructor
(
private
fb
:
FormBuilder
,
...
@@ -319,27 +326,36 @@ import {
...
@@ -319,27 +326,36 @@ import {
}
}
updateCheckedOptions
(
id
,
event
)
{
updateCheckedOptions
(
id
,
cbvalue
)
{
let
i
=
this
.
saved
.
length
;
let
i
=
this
.
saved
.
length
;
console
.
log
(
cbvalue
.
value
,
"
aaaaa
"
);
if
(
cbvalue
.
value
===
'
1
'
)
{
if
(
event
.
target
.
checked
===
false
)
{
this
.
saved
[
i
]
=
id
;
var
count
=
this
.
saved
.
length
;
this
.
type
=
1
;
for
(
var
j
=
0
;
j
<
count
;
j
++
)
{
console
.
log
(
"
ok
"
)
if
(
this
.
saved
[
j
]
===
id
)
{
this
.
saved
.
splice
(
j
,
1
);
}
}
}
}
else
{
else
if
(
cbvalue
.
value
===
'
2
'
)
{
this
.
saved
[
i
]
=
id
;
this
.
saved
[
i
]
=
id
;
this
.
type
=
2
;
//var count = this.saved.length;
//for (var j = 0; j < count; j++) {
// if (this.saved[j] === id) {
// this.saved.splice(j, 1);
// }
console
.
log
(
"
not confirmed
"
)
}
}
else
if
(
cbvalue
.
value
===
'
3
'
)
{
}
}
}
confirmStudent
()
{
confirmStudent
()
{
this
.
_hds
.
saveConfirmStudents
(
this
.
saved
);
this
.
_hds
.
saveConfirmStudents
(
this
.
saved
,
this
.
type
);
}
}
checkcclass
()
{
checkcclass
()
{
...
...
source/components/student-application-form/submited.aplication.preview.ts
View file @
f9c55197
...
@@ -206,20 +206,15 @@ import * as html2canvas from "html2canvas"
...
@@ -206,20 +206,15 @@ import * as html2canvas from "html2canvas"
},
},
()
=>
console
.
log
(
"
Getting Schools
"
));
()
=>
console
.
log
(
"
Getting Schools
"
));
}
}
createPdf
()
createPdf
()
{
{
console
.
log
(
"
lalalalalala
"
);
html2canvas
(
document
.
getElementById
(
"
target
"
)).
then
(
function
(
canvas
)
html2canvas
(
document
.
getElementById
(
"
target
"
)).
then
(
function
(
canvas
)
{
{
var
img
=
canvas
.
toDataURL
();
var
img
=
canvas
.
toDataURL
();
var
doc
=
new
jsPDF
(
'
p
'
,
'
mm
'
);
var
doc
=
new
jsPDF
(
'
p
'
,
'
mm
'
);
console
.
log
(
img
,
doc
,
"
lalalalalala
"
);
doc
.
addImage
(
img
,
'
PNG
'
,
10
,
10
);
doc
.
addImage
(
img
,
'
PNG
'
,
10
,
10
);
doc
.
save
(
'
applications.pdf
'
);
doc
.
save
(
'
applications.pdf
'
);
});
});
...
@@ -227,12 +222,6 @@ import * as html2canvas from "html2canvas"
...
@@ -227,12 +222,6 @@ import * as html2canvas from "html2canvas"
createPdf1
()
createPdf1
()
{
{
...
...
source/services/helper-data-service.ts
View file @
f9c55197
...
@@ -562,7 +562,7 @@ export class HelperDataService implements OnInit, OnDestroy {
...
@@ -562,7 +562,7 @@ export class HelperDataService implements OnInit, OnDestroy {
saveConfirmStudents
(
students
)
{
saveConfirmStudents
(
students
,
type
)
{
this
.
loginInfo$
.
getValue
().
forEach
(
loginInfoToken
=>
{
this
.
loginInfo$
.
getValue
().
forEach
(
loginInfoToken
=>
{
this
.
authToken
=
loginInfoToken
.
auth_token
;
this
.
authToken
=
loginInfoToken
.
auth_token
;
this
.
authRole
=
loginInfoToken
.
auth_role
;
this
.
authRole
=
loginInfoToken
.
auth_role
;
...
@@ -573,7 +573,7 @@ export class HelperDataService implements OnInit, OnDestroy {
...
@@ -573,7 +573,7 @@ export class HelperDataService implements OnInit, OnDestroy {
this
.
createAuthorizationHeader
(
headers
);
this
.
createAuthorizationHeader
(
headers
);
let
options
=
new
RequestOptions
({
headers
:
headers
});
let
options
=
new
RequestOptions
({
headers
:
headers
});
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
http
.
post
(
`
${
AppSettings
.
API_ENDPOINT
}
/epal/confirmstudent`
,
{
students
},
options
)
this
.
http
.
post
(
`
${
AppSettings
.
API_ENDPOINT
}
/epal/confirmstudent`
,
{
students
,
type
},
options
)
.
map
(
response
=>
response
.
json
())
.
map
(
response
=>
response
.
json
())
.
subscribe
(
data
=>
{
.
subscribe
(
data
=>
{
resolve
(
data
);
resolve
(
data
);
...
...
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