Skip to content

Commit

Permalink
Sentrifugo version 1.1.1 release with import employee details through…
Browse files Browse the repository at this point in the history
… excel, capturing identity documents for employees and sending mails for the expiration of documents.
  • Loading branch information
sapplica committed Oct 8, 2014
1 parent fe3f926 commit 4f4d34a
Show file tree
Hide file tree
Showing 95 changed files with 24,359 additions and 727 deletions.
36 changes: 34 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
CHANGELOG Sentrifugo
====================

RELEASE 1.1.1
-------------
Changes in controllers
------------------------
/application/modules/default/controllers/IdentitydocumentsController.php
/application/modules/default/controllers/EmppersonaldetailsController.php
/application/modules/default/controllers/MydetailsController.php
/application/modules/default/controllers/CronjobController.php
/application/modules/default/controllers/EmployeeController.php

-IdentitydocumentsController.php
Implemented adding Identity Documents feature in Employee Configurations.

-EmppersonaldetailsController.php
Implemented capturing Identity documents in employee�s personal details (For HR).

-MydetailsController.php
Implemented capturing Identity documents in employee�s personal details (For Employee).

-CronjobController.php
Implemented Cron Job for sending email to employees before expiration of Identity documents.

-EmployeeController.php
Implemented import format through excel.
Implemented import employees details through excel

Changes in Scripts
---------------------
/public/media/css/style.css
/public/media/js/hrmsv2.js

- Modified some JavaScript files and styles for Identity documents feature.

RELEASE 1.1
-----------

Expand Down Expand Up @@ -67,7 +100,6 @@ Changes in scripts

- Modified javascript files and styles for Service Request.


upgrade.php
-----------------
- Implemented upgrade functionality to download new version if the code and database versions do not match.
- Implemented upgrade functionality to download new version if the code and database versions do not match.
53 changes: 53 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,56 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
7 changes: 3 additions & 4 deletions Zend/View/Helper/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ public function breadcrumbs($baseUrlString = '')
$menu_model = new Default_Model_Menu();

$breadcrumstring = trim($breadCrumIds[0]['nav_ids'], ',');
$breadcrumArr = explode(",",$breadcrumstring);

$breadcrumArr = explode(",",$breadcrumstring);
$breadCrumNames = $breadCrumIds;

$breadCrumbsData .= '<span class="firstbreadcrumb" onclick="window.location=\''.$baseUrlString.'\'">Home</span> <span class="arrows">&rsaquo;</span> ';
Expand Down Expand Up @@ -418,8 +417,8 @@ public function getBreadCrumDetails($url)
$sql = $db->query($selectQuery);
$result = $sql->fetchAll();
if(!empty($result))
{
$breadcrumbsData = $db->query("SELECT menuName,url,nav_ids FROM main_menu WHERE FIND_IN_SET(id,'".$result[0]['nav_ids']."') order by nav_ids;");
{
$breadcrumbsData = $db->query("SELECT menuName,url,nav_ids FROM main_menu WHERE FIND_IN_SET(id,'".$result[0]['nav_ids']."') ;");
$breadcrumbnames = $breadcrumbsData->fetchAll();
}else $breadcrumbnames = array();
}
Expand Down
59 changes: 46 additions & 13 deletions application/modules/default/controllers/AppraisalinitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ public function getgroupedemployeesAction()
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('getgroupedemployees', 'html')->initContext();
$employeeIds = '';
$groupedemployeeIds = '';
$groupedemployeeList = array();

$groupid = $this->_request->getParam('groupid');
$appraisalid = $this->_request->getParam('appraisalid');
Expand All @@ -480,19 +482,50 @@ public function getgroupedemployeesAction()
{
$appraisaldata = $appraisalinitmodel->getConfigData($appraisalid);
$appraisaldata = $appraisaldata[0];
$groupedEmployeeIds = $appraisalinitmodel->getGrouppedEmployeeList($appraisalid,$groupid);
if(!empty($groupedEmployeeIds))
{
foreach($groupedEmployeeIds as $list)
{
$employeeIds .=$list['employee_ids'].',';
}
$employeeIds = rtrim($employeeIds,',');
}

$employeeList = $appraisalinitmodel->getEmployeeList($appraisaldata,$employeeIds,1);
$groupedemployeeList = $appraisalinitmodel->getEmployeeList($appraisaldata,$employeeIds,2);
/** Start
* Fetching the employee ids who are being assigned for initialization.
* Subsequently fetching details of available employee who have not been assigned
* to any appraisal for display.
*/

$initializedEmployeeIds = $appraisalinitmodel->getGrouppedEmployeeList($appraisalid,'');

if(!empty($initializedEmployeeIds))
{
foreach($initializedEmployeeIds as $list)
{
$employeeIds .=$list['employee_ids'].',';
}
$employeeIds = rtrim($employeeIds,',');
}

$employeeList = $appraisalinitmodel->getEmployeeList($appraisaldata,$employeeIds,1);

/**
* End
*/

/** Start
* Fetching the employee ids of employees who have been assigned to any group.
* Subsequently fetching the details to display.
*/
$groupedEmployeeIds = $appraisalinitmodel->getGrouppedEmployeeList($appraisalid,$groupid);
//echo '<pre>';print_r($groupedEmployeeIds);exit;
if(!empty($groupedEmployeeIds))
{
foreach($groupedEmployeeIds as $list)
{
$groupedemployeeIds .=$list['employee_ids'].',';
}
$groupedemployeeIds = rtrim($groupedemployeeIds,',');

$groupedemployeeList = $appraisalinitmodel->getEmployeeList($appraisaldata,$groupedemployeeIds,2);
}


/**
* End
*/
$this->view->employeeList = $employeeList;
$this->view->groupedemployeeList = $groupedemployeeList;
}
Expand All @@ -509,7 +542,7 @@ public function savegroupedemployees()
}
$appraisalinitmodel = new Default_Model_Appraisalgroupemployees();
$menumodel = new Default_Model_Menu();
$groupid = $this->_request->getParam('groupid');
$groupid = $this->_request->getParam('group_id');
$appraisalid = $this->_request->getParam('appraisalid');
$empids = $this->_request->getParam('empids');
$id = '';
Expand Down
70 changes: 69 additions & 1 deletion application/modules/default/controllers/CronjobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,75 @@ public function indexAction()
}//end of cron status if
}//end of index action


/**
* This action is used to send mails to employees for passport expiry,and credit card expiry(personal details screen)
*/
public function empdocsexpiryAction()
{

$this->_helper->viewRenderer->setNoRender(true);
$this->_helper->layout()->disableLayout();

$email_model = new Default_Model_EmailLogs();
$cron_model = new Default_Model_Cronstatus();

$cron_status = $cron_model->getActiveCron('Emp docs expiry');

if($cron_status == 'yes')
{
try
{
//updating cron status table to in-progress
$cron_data = array(
'cron_status' => 1,
'cron_type' => 'Emp docs expiry',
'started_at' => gmdate("Y-m-d H:i:s"),
);

$cron_id = $cron_model->SaveorUpdateCronStatusData($cron_data, '');

if($cron_id != '')
{
$calc_date = new DateTime(date('Y-m-d'));
$calc_date->add(new DateInterval('P1M'));
$print_date = $calc_date->format(DATEFORMAT_PHP);
$calc_date = $calc_date->format('Y-m-d');
$mail_data = $email_model->getEmpDocExpiryData($calc_date);
if(count($mail_data) > 0)
{
foreach($mail_data as $mdata)
{
$view = $this->getHelper('ViewRenderer')->view;
$this->view->emp_name = $mdata['name'];
$this->view->docs_arr = $mdata['docs'];
$this->view->expiry_date = $print_date;
$text = $view->render('mailtemplates/empdocsexpirycron.phtml');
$options['subject'] = APPLICATION_NAME.': Documents expiry';
$options['header'] = 'Greetings from '.APPLICATION_NAME;
$options['toEmail'] = $mdata['email'];
$options['toName'] = $mdata['name'];
$options['message'] = $text;

sapp_Global::_sendEmail($options);
}
}
$cron_data = array(
'cron_status' => 0,
'completed_at' => gmdate("Y-m-d H:i:s"),
);
$cron_id = $cron_model->SaveorUpdateCronStatusData($cron_data, "id = ".$cron_id);
}//end of cron status id if
}
catch(Exception $e)
{

}
}//end of cron status if
}//end of emp expiry action

/**
* This action is used to send mails to employees for passport expiry,and credit card expiry
* This action is used to send mails to employees for passport expiry,and credit card expiry(visa and immigration screen)
*/
public function empexpiryAction()
{
Expand Down Expand Up @@ -170,6 +237,7 @@ public function empexpiryAction()
}
}//end of cron status if
}//end of emp expiry action

/**
* This action is to remind managers to approve leaves of his team members before end of month.
*/
Expand Down
Loading

0 comments on commit 4f4d34a

Please sign in to comment.