From 89c80177a7326530d0450ea43255e6c50184062c Mon Sep 17 00:00:00 2001 From: Nikos Date: Sat, 20 May 2017 23:58:31 +0300 Subject: [PATCH] added drupal view courseperschool_night, modified front-end files for supporting night schools --- .../views.view.coursesperschool_night.yml | 646 ++++++++++++++++++ .../components/infoviews/perfecture-view.ts | 21 +- source/components/minister/report-all-stat.ts | 11 + source/components/minister/reports-schema.ts | 5 + .../application.preview.ts | 7 +- .../application.submit.ts | 4 +- .../epal.class.select.ts | 5 +- .../region.schools.select.ts | 24 +- source/services/helper-data-service.ts | 23 +- 9 files changed, 724 insertions(+), 22 deletions(-) create mode 100644 drupal/modules/epaldeploysystem/config/install/views.view.coursesperschool_night.yml diff --git a/drupal/modules/epaldeploysystem/config/install/views.view.coursesperschool_night.yml b/drupal/modules/epaldeploysystem/config/install/views.view.coursesperschool_night.yml new file mode 100644 index 0000000..134aaba --- /dev/null +++ b/drupal/modules/epaldeploysystem/config/install/views.view.coursesperschool_night.yml @@ -0,0 +1,646 @@ +langcode: el +status: true +dependencies: + config: + - user.role.administrator + - user.role.applicant + - user.role.authenticated + module: + - basic_auth + - epalreadydata + - hal + - rest + - serialization + - user +_core: + default_config_hash: 7lFDDggbFVzw0CGbo37kC2WLyNHGubRf8VfvN8b5iQ0 +id: coursesperschool_night +label: coursesperschool_night +module: views +description: '' +tag: '' +base_table: eepal_specialties_in_epal_field_data +base_field: id +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: role + options: + role: + authenticated: authenticated + administrator: administrator + applicant: applicant + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 0 + offset: 0 + id: 0 + total_pages: null + tags: + previous: ‹‹ + next: ›› + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + override: true + sticky: false + caption: '' + summary: '' + description: '' + columns: + name: name + info: + name: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + default: '-1' + empty_table: false + row: + type: fields + options: + inline: { } + separator: '' + hide_empty: false + default_field_elements: true + fields: + id: + id: id + table: eepal_region_field_data + field: id + relationship: region_edu_admin_id + group_type: group + admin_label: '' + label: ID + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: eepal_region + entity_field: id + plugin_id: field + name_1: + id: name_1 + table: eepal_region_field_data + field: name + relationship: region_edu_admin_id + group_type: group + admin_label: '' + label: Name + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: eepal_region + entity_field: name + plugin_id: field + id_1: + id: id_1 + table: eepal_school_field_data + field: id + relationship: epal_id + group_type: group + admin_label: '' + label: ID + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: eepal_school + entity_field: id + plugin_id: field + name_2: + id: name_2 + table: eepal_school_field_data + field: name + relationship: epal_id + group_type: group + admin_label: '' + label: Name + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: eepal_school + entity_field: name + plugin_id: field + special_case: + id: special_case + table: eepal_school_field_data + field: special_case + relationship: epal_id + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: default + format_custom_true: '' + format_custom_false: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: eepal_school + entity_field: special_case + plugin_id: field + filters: + operation_shift: + id: operation_shift + table: eepal_school_field_data + field: operation_shift + relationship: epal_id + group_type: group + admin_label: '' + operator: '=' + value: ΕΣΠΕΡΙΝΟ + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: eepal_school + entity_field: operation_shift + plugin_id: string + sorts: + id_1: + id: id_1 + table: eepal_region_field_data + field: id + relationship: region_edu_admin_id + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: eepal_region + entity_field: id + plugin_id: standard + header: { } + footer: { } + empty: { } + relationships: + epal_id: + id: epal_id + table: eepal_specialties_in_epal_field_data + field: epal_id + relationship: none + group_type: group + admin_label: 'Eepal school' + required: false + entity_type: eepal_specialties_in_epal + entity_field: epal_id + plugin_id: standard + region_edu_admin_id: + id: region_edu_admin_id + table: eepal_school_field_data + field: region_edu_admin_id + relationship: epal_id + group_type: group + admin_label: 'Eepal region' + required: true + entity_type: eepal_school + entity_field: region_edu_admin_id + plugin_id: standard + specialty_id: + id: specialty_id + table: eepal_specialties_in_epal_field_data + field: specialty_id + relationship: none + group_type: group + admin_label: 'Eepal specialty' + required: true + entity_type: eepal_specialties_in_epal + entity_field: specialty_id + plugin_id: standard + arguments: + id: + id: id + table: eepal_specialty_field_data + field: id + relationship: specialty_id + 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: course_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: id + plugin_id: numeric + display_extenders: { } + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user.roles + tags: { } + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: coursesperschool + enabled: false + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user.roles + tags: { } + rest_export_1: + display_plugin: rest_export + id: rest_export_1 + display_title: 'REST export' + position: 2 + display_options: + display_extenders: { } + style: + type: serializer + options: + uses_fields: false + formats: + hal_json: hal_json + json: json + row: + type: data_field + options: + field_options: + id: + alias: region_id + raw_output: true + name_1: + alias: region_name + raw_output: true + id_1: + alias: epal_id + raw_output: true + name_2: + alias: epal_name + raw_output: true + special_case: + alias: epal_special_case + raw_output: true + path: coursesperschool_night/list + pager: + type: some + options: + items_per_page: 0 + offset: 0 + auth: + - basic_auth + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - request_format + - url + - user.roles + tags: { } diff --git a/source/components/infoviews/perfecture-view.ts b/source/components/infoviews/perfecture-view.ts index 6cccc86..8d35cce 100644 --- a/source/components/infoviews/perfecture-view.ts +++ b/source/components/infoviews/perfecture-view.ts @@ -82,19 +82,33 @@ import { ngOnInit() { this.SchoolSub = this._hds.getSchoolId().subscribe(x => { - this.School$.next(x); + this.School$.next(x); console.log(x[0].id, "perfectureID"); this.perfecture = x[0].id; - + }, error => { this.School$.next([{}]); console.log("Error Getting School"); }, - () => console.log("Getting School ")); + () => { + console.log("Getting School "); + + this.SchoolPerPerfSub = this._hds.getSchoolPerPerfecture(this.perfecture).subscribe(data => { + this.SchoolsPerPerf$.next(data); + }, + error => { + this.SchoolsPerPerf$.next([{}]); + console.log("Error Getting Schools"); + }, + () => console.log("Getting Schools")); + } + + ); + /* this.SchoolPerPerfSub = this._hds.getSchoolPerPerfecture(this.perfecture).subscribe(data => { this.SchoolsPerPerf$.next(data); }, @@ -103,6 +117,7 @@ import { console.log("Error Getting Schools"); }, () => console.log("Getting Schools")); + */ diff --git a/source/components/minister/report-all-stat.ts b/source/components/minister/report-all-stat.ts index 4bc342f..0d1943e 100644 --- a/source/components/minister/report-all-stat.ts +++ b/source/components/minister/report-all-stat.ts @@ -244,6 +244,9 @@ import { API_ENDPOINT } from '../../app.settings'; if (loginInfoToken.auth_role == PDE_ROLE) { this.regionSelected = regId; this.showAdminList.next(true); + + console.log("Nikos1.."); + console.log(this.regionSelected); this.checkregion(this. regionSelected); } else if (loginInfoToken.auth_role == DIDE_ROLE) { @@ -337,6 +340,14 @@ createReport(regionSel) { courSel = this.courseSelected; } + if (this.userLoggedIn == PDE_ROLE) { + regSel = this.regionSelected; + console.log("Nikos2.."); + console.log(regSel); + } + else if (this.userLoggedIn == DIDE_ROLE) + admSel = this.adminAreaSelected; + this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, route, regSel, admSel, schSel, clSel, secSel, courSel).subscribe(data => { this.generalReport$.next(data); this.data = data; diff --git a/source/components/minister/reports-schema.ts b/source/components/minister/reports-schema.ts index ceed406..776fd77 100644 --- a/source/components/minister/reports-schema.ts +++ b/source/components/minister/reports-schema.ts @@ -128,6 +128,11 @@ reportCompletenessSchema = { title: 'Πληρότητα Γ\' τάξης (%)', width: '11%', filter: false + }, + percD: { + title: 'Πληρότητα Δ\' τάξης (%)', + width: '11%', + filter: false } } }; diff --git a/source/components/student-application-form/application.preview.ts b/source/components/student-application-form/application.preview.ts index bba915d..9ca5886 100644 --- a/source/components/student-application-form/application.preview.ts +++ b/source/components/student-application-form/application.preview.ts @@ -41,6 +41,9 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
  • Γ’ Λυκείου
  • +
  • + Δ’ Λυκείου +
  • @@ -68,8 +71,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st - -