Refactor project structure
This commit is contained in:
17
core/admin/reports/dashboard.html
Normal file
17
core/admin/reports/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="col-lg-3 col-xs-12">
|
||||
|
||||
<div class="small-box bg-teal">
|
||||
<div class="inner">
|
||||
<h3><t>Reports</t></h3>
|
||||
<p>
|
||||
<t>View / Download Reports</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-document-text"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="reportsLink">
|
||||
<t>Generate a Report</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
48
core/admin/reports/index.php
Normal file
48
core/admin/reports/index.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
$moduleName = 'Reports';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
?><div class="span9">
|
||||
|
||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||
<li class="active"><a id="tabReport" href="#tabPageReport"><?=t('Reports')?></a></li>
|
||||
<li class=""><a id="tabExports" href="#tabPageExports"><?=t('Exports')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageReport">
|
||||
<div id="Report" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="ReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageExports">
|
||||
<div id="Exports" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="ExportsForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabReport'] = new ReportAdapter('Report','Report','{"type":"Reports"}','report_group');
|
||||
modJsList['tabReport'].setShowAddNew(false);
|
||||
modJsList['tabReport'].setRemoteTable(true);
|
||||
|
||||
modJsList['tabExports'] = new ReportAdapter('Report','Exports','{"type":"Exports"}','report_group');
|
||||
modJsList['tabExports'].setShowAddNew(false);
|
||||
modJsList['tabExports'].setRemoteTable(true);
|
||||
|
||||
var modJs = modJsList['tabReport'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
14
core/admin/reports/meta.json
Normal file
14
core/admin/reports/meta.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"label": "Reports",
|
||||
"menu": "Admin Reports",
|
||||
"order": "1",
|
||||
"icon": "fa-file-o",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager"
|
||||
],
|
||||
"dashboardPosition": 7,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Reports\\Common\\Model",
|
||||
"manager": "\\Reports\\Admin\\Api\\ReportsAdminManager"
|
||||
}
|
||||
18
core/admin/reports/scripts/reports.sql
Normal file
18
core/admin/reports/scripts/reports.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('Active Employee Report', 'This report list employees who are currently active based on joined date and termination date ',
|
||||
'[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}]\r\n]',
|
||||
'ActiveEmployeeReport',
|
||||
'["department"]', 'Class');
|
||||
|
||||
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('New Hires Employee Report', 'This report list employees who are joined between given two dates ',
|
||||
'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]',
|
||||
'NewHiresEmployeeReport',
|
||||
'["department","date_start","date_end"]', 'Class');
|
||||
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('Terminated Employee Report', 'This report list employees who are terminated between given two dates ',
|
||||
'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]',
|
||||
'TerminatedEmployeeReport',
|
||||
'["department","date_start","date_end"]', 'Class');
|
||||
6
core/admin/reports/templates/fields/label.html
Normal file
6
core/admin/reports/templates/fields/label.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="control-group" id="field__id_">
|
||||
<div class="controls">
|
||||
<label id="_id_" name="_id_" style="font-weight:bold"></label>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
14
core/admin/reports/templates/form_template.html
Normal file
14
core/admin/reports/templates/form_template.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<form class="form-horizontal" id="_id_">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
_fields_
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button onclick="try{modJs.save()}catch(e){};return false;" class="btn"><t>Download</t></button>
|
||||
<button onclick="modJs.cancel();return false;" class="btn"><t>Cancel</t></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user