adding course filter to report creation, updated SectorList / CourseFields Views in Drupal

parent af0cafa8
......@@ -141,7 +141,7 @@ epal.ministry.log_out_go:
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.general_report:
path: '/ministry/general-report/{regionId}/{adminId}/{schId}'
path: '/ministry/general-report'
options:
_auth: [ 'basic_auth' ]
defaults:
......@@ -157,7 +157,7 @@ epal.ministry.report-completeness:
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-all-stat:
path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}'
path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}'
options:
_auth: [ 'basic_auth' ]
defaults:
......
......@@ -5,6 +5,9 @@ dependencies:
- user.role.administrator
- user.role.applicant
- user.role.authenticated
- user.role.eduadmin
- user.role.ministry
- user.role.regioneduadmin
module:
- basic_auth
- epalreadydata
......@@ -12,7 +15,7 @@ dependencies:
- serialization
- user
_core:
default_config_hash: x1x9jIC8SmXp0wDILOEs5_1lxH47q3VCokKYxEu4U-8
default_config_hash: YTXNI4Qb3Jgg7KwwlzgRShhY83j2js-q24x9a-SgLgg
id: coursefields
label: coursefields
module: views
......@@ -35,6 +38,9 @@ display:
authenticated: authenticated
administrator: administrator
applicant: applicant
ministry: ministry
eduadmin: eduadmin
regioneduadmin: regioneduadmin
cache:
type: tag
options: { }
......@@ -220,7 +226,46 @@ display:
footer: { }
empty: { }
relationships: { }
arguments: { }
arguments:
sector_id:
id: sector_id
table: eepal_specialty_field_data
field: sector_id
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: query_parameter
default_argument_options:
query_param: sector_id
fallback: ''
multiple: and
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: eepal_specialty
entity_field: sector_id
plugin_id: numeric
display_extenders: { }
cache_metadata:
max-age: -1
......@@ -228,6 +273,7 @@ display:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url
- url.query_args
- user.roles
tags: { }
......@@ -259,6 +305,9 @@ display:
name:
alias: ''
raw_output: true
sector_id:
alias: ''
raw_output: true
auth:
- basic_auth
cache_metadata:
......@@ -267,5 +316,6 @@ display:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url
- user.roles
tags: { }
......@@ -5,6 +5,9 @@ dependencies:
- user.role.administrator
- user.role.applicant
- user.role.authenticated
- user.role.eduadmin
- user.role.ministry
- user.role.regioneduadmin
module:
- basic_auth
- epalreadydata
......@@ -13,7 +16,7 @@ dependencies:
- serialization
- user
_core:
default_config_hash: 5rM-pSfc1ywl4-ufHeAQsKiVGcBMDcz4RLfYmMeVGfo
default_config_hash: 2Ow8_rRpftR4qqbwfsr6yc_XMzbRKZjHSEuFzrXvzV8
id: sectorlist
label: sectorList
module: views
......@@ -36,6 +39,9 @@ display:
authenticated: authenticated
administrator: administrator
applicant: applicant
ministry: ministry
eduadmin: eduadmin
regioneduadmin: regioneduadmin
cache:
type: tag
options: { }
......
......@@ -27,6 +27,7 @@ export class reportsSchema {
genReportSchema = {
actions: false,
noDataMessage: 'Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης',
columns: {
name: {
title: 'Κατηγορία',
......@@ -45,6 +46,7 @@ reportAllStatSchema = {
display : true,
perPage:10
},
noDataMessage: 'Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης',
columns: {
name: {
title: 'Σχολείο',
......@@ -65,6 +67,14 @@ reportAllStatSchema = {
num: {
title: 'Αριθμός Μαθητών',
filter: false
},
capacity: {
title: 'Χωρ/κα',
filter: false
},
percentage: {
title: 'Ποσοστό',
filter: false
}
}
};
......@@ -72,6 +82,7 @@ reportAllStatSchema = {
reportCompletenessSchemaFull = {
actions: false,
noDataMessage: 'Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης',
columns: {
name: {
title: 'Σχολείο',
......@@ -132,11 +143,20 @@ reportCompletenessSchemaFull = {
reportCompletenessSchema = {
actions: false,
noDataMessage: 'Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης',
columns: {
name: {
title: 'Σχολείο',
filter: false
},
region: {
title: 'ΠΔΕ',
filter: false
},
admin: {
title: 'ΔΙΔΕ',
filter: false
},
percTotal: {
title: 'Πληρότητα Σχολείου',
filter: false
......
......@@ -228,7 +228,7 @@
<legend>Κοινωνικά κριτήρια</legend>
<p style="margin-top: 15px; line-height: 1.5em;">Επιλέξτε όσα από τα παρακάτω κριτήρια πληρούνται για εσάς.
Οι επιλογές σας επέχουν θέση υπέυθυνης δήλωσης.
Οι επιλογές σας επέχουν θέση υπεύθυνης δήλωσης.
Θα πρέπει να προσκομίσετε τα αντίστοιχα δικαιολογητικά στο σχολείο εγγραφής σας, όταν σας ζητηθεί.
</p>
......
......@@ -138,7 +138,10 @@ import {
let mutual_ids = mutual_disabled.split(",");
for (let i=0; i<mutual_ids.length; i++) {
this.studentCriteriaGroup.controls['formArray']['controls'][mutual_ids[i]-1].setValue(false);
}
//console.log("Hi!");
//console.log(mutual_ids);
console.log(this.studentCriteriaGroup.controls['formArray']['controls']);
console.log(this.studentCriteriaGroup.controls['formArray']['controls'][mutual_ids[i]-1]); }
}
......
......@@ -32,7 +32,7 @@ import {AppSettings} from '../../app.settings';
<select class="form-control" formControlName="name" (change)="initializestore()">
<option value="Α' Λυκείου">Α' Λυκείου</option>
<option value="Β' Λυκείου">Β' Λυκείου</option>
<option value="Γ' Λυκείου">Γ' Λυκείου</option>
<option value="Γ' Λυκείου">Γ' Λυκείου / Δ' Λυκείου</option>
</select>
</div>
......
......@@ -681,7 +681,7 @@ export class HelperDataService implements OnInit, OnDestroy {
}
makeReport(username, userpassword, routepath, regionsel, adminsel, schsel) {
makeReport(username, userpassword, routepath, regionsel, adminsel, schsel, clsel, secsel, coursel) {
let headers = new Headers({
"Content-Type": "application/json",
......@@ -690,11 +690,22 @@ export class HelperDataService implements OnInit, OnDestroy {
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
console.log("Testing..");
console.log(`${AppSettings.API_ENDPOINT}` + routepath + regionsel);
//console.log("Testing..");
//console.log(`${AppSettings.API_ENDPOINT}` + routepath + regionsel);
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel, options)
.map(response => response.json());
if (routepath == "/ministry/general-report/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath , options)
.map(response => response.json());
}
else if (routepath == "/ministry/report-completeness/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel , options)
.map(response => response.json());
}
else if (routepath == "/ministry/report-all-stat/"){
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel + "/" +
clsel + "/" + secsel + "/" + coursel , options)
.map(response => response.json());
}
}
......@@ -828,6 +839,34 @@ getSchoolsPerAdminArea(username, userpassword, adminid) {
.map(response => response.json());
}
getSectors(username, userpassword, classid) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
console.log("Test");
console.log(`${AppSettings.API_ENDPOINT}/sectorfields/list`);
return this.http.get(`${AppSettings.API_ENDPOINT}/sectorfields/list` , options)
.map(response => response.json());
}
getCourses(username, userpassword, sectorid) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/coursefields/list/?sector_id=` + sectorid , options)
.map(response => response.json());
}
......
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