-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ER:Add a diagnostic page (data and config).
- Loading branch information
Showing
32 changed files
with
2,487 additions
and
1,638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,79 @@ | ||
<?php | ||
/** | ||
* This controller serves the administration pages | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.4.2 | ||
*/ | ||
|
||
if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | ||
|
||
/** | ||
* This class serves the administration pages (readonly settings page for the moment). | ||
* In Jorani the settings are set into a configuration file and not into DB. | ||
*/ | ||
class Admin extends CI_Controller { | ||
|
||
/** | ||
* Default constructor | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
setUserContext($this); | ||
$this->lang->load('global', $this->language); | ||
} | ||
|
||
/** | ||
* Display the settings of the system (extract of config.php) | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function settings() { | ||
$this->auth->checkIfOperationIsAllowed('list_settings'); | ||
$data = getUserContext($this); | ||
$data['title'] = 'application/config/config.php'; | ||
$data['help'] = $this->help->create_help_link('global_link_doc_page_settings'); | ||
$this->load->view('templates/header', $data); | ||
$this->load->view('menu/index', $data); | ||
$this->load->view('admin/settings', $data); | ||
$this->load->view('templates/footer'); | ||
} | ||
|
||
/** | ||
* Output a QRCode containing the URL of the Jorani instance and the e-mail of the connected user | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function qrCode() { | ||
require_once(APPPATH . 'third_party/QRCode.php'); | ||
$this->load->model('users_model'); | ||
$user = $this->users_model->getUsers($this->user_id); | ||
$qr = new QRCode(); | ||
$qr = QRCode::getMinimumQRCode(base_url() . '#' . $user['login'] . | ||
'#' . $user['email'], QR_ERROR_CORRECT_LEVEL_L); | ||
echo $qr->printHTML(); | ||
} | ||
} | ||
<?php | ||
/** | ||
* This controller serves the administration pages | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.4.2 | ||
*/ | ||
|
||
if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | ||
|
||
/** | ||
* This class serves the administration pages (readonly settings page for the moment). | ||
* In Jorani the settings are set into a configuration file and not into DB. | ||
*/ | ||
class Admin extends CI_Controller { | ||
|
||
/** | ||
* Default constructor | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
setUserContext($this); | ||
$this->lang->load('global', $this->language); | ||
$this->lang->load('admin', $this->language); | ||
} | ||
|
||
/** | ||
* Display the settings of the system (extract of config.php) | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function settings() { | ||
$this->auth->checkIfOperationIsAllowed('list_settings'); | ||
$data = getUserContext($this); | ||
$data['title'] = 'application/config/config.php'; | ||
$data['help'] = $this->help->create_help_link('global_link_doc_page_settings'); | ||
$this->load->view('templates/header', $data); | ||
$this->load->view('menu/index', $data); | ||
$this->load->view('admin/settings', $data); | ||
$this->load->view('templates/footer'); | ||
} | ||
|
||
/** | ||
* Display the diagnostic of the content (duplicated requests, etc.) and configuration | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function diagnostic() { | ||
$this->auth->checkIfOperationIsAllowed('list_settings'); | ||
$data = getUserContext($this); | ||
$data['title'] =lang('admin_diagnostic_title'); | ||
$data['help'] = ''; | ||
$this->load->model('leaves_model'); | ||
$this->load->model('entitleddays_model'); | ||
$this->load->model('dayoffs_model'); | ||
$data['duplicatedLeaves'] = $this->leaves_model->detectDuplicatedRequests(); | ||
$data['wrongDateType'] = $this->leaves_model->detectWrongDateTypes(); | ||
$data['entitlmentOverflow'] = $this->entitleddays_model->detectOverflow(); | ||
$data['daysOffYears'] = $this->dayoffs_model->checkIfDefined(date("Y")); | ||
$this->load->view('templates/header', $data); | ||
$this->load->view('menu/index', $data); | ||
$this->load->view('admin/diagnostic', $data); | ||
$this->load->view('templates/footer'); | ||
} | ||
|
||
/** | ||
* Output a QRCode containing the URL of the Jorani instance and the e-mail of the connected user | ||
* @author Benjamin BALET <[email protected]> | ||
*/ | ||
public function qrCode() { | ||
require_once(APPPATH . 'third_party/QRCode.php'); | ||
$this->load->model('users_model'); | ||
$user = $this->users_model->getUsers($this->user_id); | ||
$qr = new QRCode(); | ||
$qr = QRCode::getMinimumQRCode(base_url() . '#' . $user['login'] . | ||
'#' . $user['email'], QR_ERROR_CORRECT_LEVEL_L); | ||
echo $qr->printHTML(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Translation file | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.4.6 | ||
*/ | ||
|
||
$lang['admin_diagnostic_title'] = 'Data & Config Diagnostic'; | ||
$lang['admin_diagnostic_description'] = 'Detection of configuration and data problems'; | ||
$lang['admin_diagnostic_no_error'] = 'No error'; | ||
|
||
$lang['admin_diagnostic_requests_tab'] = 'Leave Requests'; | ||
$lang['admin_diagnostic_requests_description'] = 'Accepted but duplicated Leave Requests'; | ||
$lang['admin_diagnostic_requests_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_requests_thead_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_requests_thead_start_date'] = 'Start Date'; | ||
$lang['admin_diagnostic_requests_thead_status'] = 'Status'; | ||
$lang['admin_diagnostic_requests_thead_type'] = 'Type'; | ||
|
||
$lang['admin_diagnostic_datetype_tab'] = 'Afternoon/Morning'; | ||
$lang['admin_diagnostic_datetype_description'] = 'Leave Requests with a wrong start/end type.'; | ||
$lang['admin_diagnostic_datetype_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_datetype_thead_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_datetype_thead_start_date'] = 'Date'; | ||
$lang['admin_diagnostic_datetype_thead_start_type'] = 'Start'; | ||
$lang['admin_diagnostic_datetype_thead_end_type'] = 'End'; | ||
$lang['admin_diagnostic_datetype_thead_status'] = 'Status'; | ||
|
||
$lang['admin_diagnostic_entitlements_tab'] = 'Entitled days'; | ||
$lang['admin_diagnostic_entitlements_description'] = 'List of contracts and employees having entitlements for more than one year.'; | ||
$lang['admin_diagnostic_entitlements_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_entitlements_thead_type'] = 'Type'; | ||
$lang['admin_diagnostic_entitlements_thead_name'] = 'Name'; | ||
$lang['admin_diagnostic_entitlements_thead_start_date'] = 'Start Date'; | ||
$lang['admin_diagnostic_entitlements_thead_end_date'] = 'End Date'; | ||
$lang['admin_diagnostic_entitlements_type_contract'] = 'Contract'; | ||
$lang['admin_diagnostic_entitlements_type_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_entitlements_deletion_problem'] = 'Incomplete deletion into database.' ; | ||
|
||
$lang['admin_diagnostic_daysoff_tab'] = 'Non-working days'; | ||
$lang['admin_diagnostic_daysoff_description'] = 'Number of days (per contract) for which a non-working duration has been defined.'; | ||
$lang['admin_diagnostic_daysoff_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_daysoff_thead_name'] = 'Name'; | ||
$lang['admin_diagnostic_daysoff_thead_ym1'] = 'Last year'; | ||
$lang['admin_diagnostic_daysoff_thead_y'] = 'This year'; | ||
$lang['admin_diagnostic_daysoff_thead_yp1'] = 'Next year'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,63 @@ | ||
<?php | ||
/** | ||
* Translation file | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.1.0 | ||
* @author Roger WOLFS | ||
*/ | ||
|
||
$lang['menu_banner_change_password'] = 'Nieuw wachtwoord'; | ||
$lang['menu_banner_welcome'] = 'Welkom'; | ||
$lang['menu_banner_logout'] = 'Uitloggen'; | ||
$lang['menu_banner_tip_myprofile'] = 'Bekijk persoonlijke informatie'; | ||
$lang['menu_banner_tip_reset'] = 'Reset wachtwoord'; | ||
|
||
$lang['menu_password_popup_title'] = 'Nieuw wachtwoord'; | ||
$lang['menu_password_popup_button_cancel'] = 'Annuleren'; | ||
|
||
$lang['menu_admin_title'] = 'Admin'; | ||
$lang['menu_admin_list_users'] = 'Lijst gebruikers'; | ||
$lang['menu_admin_add_user'] = 'Maak gebruiker aan'; | ||
$lang['menu_admin_settings_divider'] = 'Settings'; | ||
$lang['menu_admin_settings'] = 'Settings'; | ||
|
||
$lang['menu_hr_title'] = 'HR'; | ||
$lang['menu_hr_employees_divider'] = 'Werknemers'; | ||
$lang['menu_hr_list_organization'] = 'Organisatie'; | ||
$lang['menu_hr_list_employees'] = 'Lijst werknemers'; | ||
$lang['menu_hr_contracts_divider'] = 'Contracten'; | ||
$lang['menu_hr_list_contracts'] = 'Lijst contracten'; | ||
$lang['menu_hr_list_positions'] = 'Lijst functies'; | ||
$lang['menu_hr_leaves_type_divider'] = 'Afwezigheid'; | ||
$lang['menu_hr_list_leaves_type'] = 'Lijst types'; | ||
$lang['menu_hr_reports_divider'] = 'Rapporten'; | ||
$lang['menu_hr_report_leave_balance'] = 'Afwezigheidssaldo'; | ||
$lang['menu_hr_report_leaves'] = 'Leave requests'; | ||
|
||
$lang['menu_validation_title'] = 'Validatie'; | ||
$lang['menu_validation_delegations'] = 'Delegaties'; | ||
$lang['menu_validation_collaborators'] = 'Mijn medewerkers'; | ||
$lang['menu_validation_leaves'] = 'Afwezigheid'; | ||
$lang['menu_validation_overtime'] = 'Overuren'; | ||
|
||
$lang['menu_requests_title'] = 'Verzoeken'; | ||
$lang['menu_requests_leaves'] = 'Afwezigheid'; | ||
$lang['menu_requests_overtime'] = 'Overuren'; | ||
$lang['menu_requests_list_extras'] = 'Lijst van overuren'; | ||
$lang['menu_requests_request_extra'] = 'Aanmelding overuren'; | ||
|
||
$lang['menu_leaves_counters'] = 'Tellers'; | ||
$lang['menu_leaves_list_requests'] = 'Overzicht van afwezigheidsverzoeken'; | ||
$lang['menu_leaves_create_request'] = 'Vraag afwezigheid aan'; | ||
|
||
$lang['menu_calendar_title'] = 'Agenda\'s'; | ||
$lang['menu_calendar_year'] = 'jaarkalender'; | ||
$lang['menu_calendar_individual'] = 'Mijn agenda'; | ||
$lang['menu_calendar_workmates'] = 'Mijn collega\'s'; | ||
$lang['menu_calendar_collaborators'] = 'Mijn medewerkers'; | ||
$lang['menu_calendar_department'] = 'Afdeling'; | ||
$lang['menu_calendar_organization'] = 'Globaal'; | ||
$lang['menu_calendar_tabular'] = 'Tabel'; | ||
<?php | ||
/** | ||
* Translation file | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.1.0 | ||
* @author Roger WOLFS | ||
*/ | ||
|
||
$lang['menu_banner_change_password'] = 'Nieuw wachtwoord'; | ||
$lang['menu_banner_welcome'] = 'Welkom'; | ||
$lang['menu_banner_logout'] = 'Uitloggen'; | ||
$lang['menu_banner_tip_myprofile'] = 'Bekijk persoonlijke informatie'; | ||
$lang['menu_banner_tip_reset'] = 'Reset wachtwoord'; | ||
|
||
$lang['menu_password_popup_title'] = 'Nieuw wachtwoord'; | ||
$lang['menu_password_popup_button_cancel'] = 'Annuleren'; | ||
|
||
$lang['menu_admin_title'] = 'Admin'; | ||
$lang['menu_admin_list_users'] = 'Lijst gebruikers'; | ||
$lang['menu_admin_add_user'] = 'Maak gebruiker aan'; | ||
$lang['menu_admin_settings_divider'] = 'Settings'; | ||
$lang['menu_admin_settings'] = 'Settings'; | ||
$lang['menu_admin_diagnostic'] = 'Diagnostic'; | ||
|
||
$lang['menu_hr_title'] = 'HR'; | ||
$lang['menu_hr_employees_divider'] = 'Werknemers'; | ||
$lang['menu_hr_list_organization'] = 'Organisatie'; | ||
$lang['menu_hr_list_employees'] = 'Lijst werknemers'; | ||
$lang['menu_hr_contracts_divider'] = 'Contracten'; | ||
$lang['menu_hr_list_contracts'] = 'Lijst contracten'; | ||
$lang['menu_hr_list_positions'] = 'Lijst functies'; | ||
$lang['menu_hr_leaves_type_divider'] = 'Afwezigheid'; | ||
$lang['menu_hr_list_leaves_type'] = 'Lijst types'; | ||
$lang['menu_hr_reports_divider'] = 'Rapporten'; | ||
$lang['menu_hr_report_leave_balance'] = 'Afwezigheidssaldo'; | ||
$lang['menu_hr_report_leaves'] = 'Leave requests'; | ||
|
||
$lang['menu_validation_title'] = 'Validatie'; | ||
$lang['menu_validation_delegations'] = 'Delegaties'; | ||
$lang['menu_validation_collaborators'] = 'Mijn medewerkers'; | ||
$lang['menu_validation_leaves'] = 'Afwezigheid'; | ||
$lang['menu_validation_overtime'] = 'Overuren'; | ||
|
||
$lang['menu_requests_title'] = 'Verzoeken'; | ||
$lang['menu_requests_leaves'] = 'Afwezigheid'; | ||
$lang['menu_requests_overtime'] = 'Overuren'; | ||
$lang['menu_requests_list_extras'] = 'Lijst van overuren'; | ||
$lang['menu_requests_request_extra'] = 'Aanmelding overuren'; | ||
|
||
$lang['menu_leaves_counters'] = 'Tellers'; | ||
$lang['menu_leaves_list_requests'] = 'Overzicht van afwezigheidsverzoeken'; | ||
$lang['menu_leaves_create_request'] = 'Vraag afwezigheid aan'; | ||
|
||
$lang['menu_calendar_title'] = 'Agenda\'s'; | ||
$lang['menu_calendar_year'] = 'jaarkalender'; | ||
$lang['menu_calendar_individual'] = 'Mijn agenda'; | ||
$lang['menu_calendar_workmates'] = 'Mijn collega\'s'; | ||
$lang['menu_calendar_collaborators'] = 'Mijn medewerkers'; | ||
$lang['menu_calendar_department'] = 'Afdeling'; | ||
$lang['menu_calendar_organization'] = 'Globaal'; | ||
$lang['menu_calendar_tabular'] = 'Tabel'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Translation file | ||
* @copyright Copyright (c) 2014-2016 Benjamin BALET | ||
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0 | ||
* @link https://github.com/bbalet/jorani | ||
* @since 0.4.6 | ||
*/ | ||
|
||
$lang['admin_diagnostic_title'] = 'Data & Config Diagnostic'; | ||
$lang['admin_diagnostic_description'] = 'Detection of configuration and data problems'; | ||
$lang['admin_diagnostic_no_error'] = 'No error'; | ||
|
||
$lang['admin_diagnostic_requests_tab'] = 'Leave Requests'; | ||
$lang['admin_diagnostic_requests_description'] = 'Accepted but duplicated Leave Requests'; | ||
$lang['admin_diagnostic_requests_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_requests_thead_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_requests_thead_start_date'] = 'Start Date'; | ||
$lang['admin_diagnostic_requests_thead_status'] = 'Status'; | ||
$lang['admin_diagnostic_requests_thead_type'] = 'Type'; | ||
|
||
$lang['admin_diagnostic_datetype_tab'] = 'Afternoon/Morning'; | ||
$lang['admin_diagnostic_datetype_description'] = 'Leave Requests with a wrong start/end type.'; | ||
$lang['admin_diagnostic_datetype_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_datetype_thead_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_datetype_thead_start_date'] = 'Date'; | ||
$lang['admin_diagnostic_datetype_thead_start_type'] = 'Start'; | ||
$lang['admin_diagnostic_datetype_thead_end_type'] = 'End'; | ||
$lang['admin_diagnostic_datetype_thead_status'] = 'Status'; | ||
|
||
$lang['admin_diagnostic_entitlements_tab'] = 'Entitled days'; | ||
$lang['admin_diagnostic_entitlements_description'] = 'List of contracts and employees having entitlements for more than one year.'; | ||
$lang['admin_diagnostic_entitlements_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_entitlements_thead_type'] = 'Type'; | ||
$lang['admin_diagnostic_entitlements_thead_name'] = 'Name'; | ||
$lang['admin_diagnostic_entitlements_thead_start_date'] = 'Start Date'; | ||
$lang['admin_diagnostic_entitlements_thead_end_date'] = 'End Date'; | ||
$lang['admin_diagnostic_entitlements_type_contract'] = 'Contract'; | ||
$lang['admin_diagnostic_entitlements_type_employee'] = 'Employee'; | ||
$lang['admin_diagnostic_entitlements_deletion_problem'] = 'Incomplete deletion into database.' ; | ||
|
||
$lang['admin_diagnostic_daysoff_tab'] = 'Non-working days'; | ||
$lang['admin_diagnostic_daysoff_description'] = 'Number of days (per contract) for which a non-working duration has been defined.'; | ||
$lang['admin_diagnostic_daysoff_thead_id'] = 'ID'; | ||
$lang['admin_diagnostic_daysoff_thead_name'] = 'Name'; | ||
$lang['admin_diagnostic_daysoff_thead_ym1'] = 'Last year'; | ||
$lang['admin_diagnostic_daysoff_thead_y'] = 'This year'; | ||
$lang['admin_diagnostic_daysoff_thead_yp1'] = 'Next year'; |
Oops, something went wrong.