Commit f9c55197 authored by Open Source Developer's avatar Open Source Developer

trans

parent c93d51dc
......@@ -290,13 +290,17 @@ public function getStudentPerSchool(Request $request, $epalId , $selectId, $clas
{
$postData = json_decode($content);
$arr = $postData->students;
$type = $postData ->type
foreach ($arr as $value) {
$valnew = intval($value);
$studentForConfirm = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('id' => $valnew ));
$studentConfirm = reset($studentForConfirm);
if ($studentConfirm) {
if ($type == 1)
$studentConfirm->set('directorconfirm', true);
if ($type == 1)
$studentConfirm->set('directorconfirm', false);
$studentConfirm->save();
}
}
......
......@@ -123,7 +123,7 @@ class SubmitedApplications extends ControllerBase
} else {
return $this->respondWithStatus([
'message' => t("User not found"),
'message' => t("User not found!!!!"),
], Response::HTTP_FORBIDDEN);
}
......
......@@ -41,11 +41,11 @@ import {
<option *ngFor="let SpecialSelection$ of StudentSelectedSpecial$ | async; let i=index" [value] = "SpecialSelection$.id"> {{SpecialSelection$.specialty_id}} </option>
</select>
</div>
<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>
<br>
<br>
<ul class="list-group main-view">
<div *ngIf="(retrievedStudent | async)">
......@@ -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" >
<h5> {{StudentDetails$.name}}&nbsp;{{StudentDetails$.name}} </h5>
</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>
<tr><td>
<div class="form-group" *ngIf="StudentDetails$.relationtostudent === 'Μαθητής' ">
......@@ -116,10 +125,7 @@ import {
<input #maxpage type="text" class="form-control" placeholder=".col-1" formControlName="maxpage">
</div>
</div>
<button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent()">
Επιβεβαίωση Εγγραφής
</button>
<br>
<nav aria-label="pagination">
<ul class="pagination justify-content-center">
......@@ -161,6 +167,7 @@ import {
private limitup= 5;
private pageno = 1;
private userActive = <number>-1;
private type: Number;
constructor(private fb: FormBuilder,
......@@ -319,27 +326,36 @@ import {
}
updateCheckedOptions(id, event) {
updateCheckedOptions(id, cbvalue) {
let i = this.saved.length;
console.log(cbvalue.value,"aaaaa");
if (event.target.checked === false) {
var count = this.saved.length;
for (var j = 0; j < count; j++) {
if (this.saved[j] === id) {
this.saved.splice(j, 1);
}
}
if (cbvalue.value === '1') {
this.saved[i] = id;
this.type = 1;
console.log("ok")
}
else {
else if (cbvalue.value === '2') {
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() {
this._hds.saveConfirmStudents(this.saved);
this._hds.saveConfirmStudents(this.saved, this.type);
}
checkcclass() {
......
......@@ -206,20 +206,15 @@ import * as html2canvas from "html2canvas"
},
() => console.log("Getting Schools"));
}
createPdf()
{
console.log("lalalalalala");
html2canvas(document.getElementById("target")).then(function(canvas)
{
var img = canvas.toDataURL();
var doc = new jsPDF('p', 'mm');
console.log(img, doc, "lalalalalala");
doc.addImage(img, 'PNG', 10, 10);
doc.save('applications.pdf');
});
......@@ -227,12 +222,6 @@ import * as html2canvas from "html2canvas"
createPdf1()
{
......
......@@ -562,7 +562,7 @@ export class HelperDataService implements OnInit, OnDestroy {
saveConfirmStudents(students) {
saveConfirmStudents(students, type) {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
......@@ -573,7 +573,7 @@ export class HelperDataService implements OnInit, OnDestroy {
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
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())
.subscribe(data => {
resolve(data);
......
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