Refactor project structure
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Client Project Timesheet</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="{{BASE_URL}}themecss/AdminLTE.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/ionicons.min.css" rel="stylesheet">
|
||||
<script src="{{BASE_URL}}themejs/bootstrap.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="margin-top:10px;">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-center">
|
||||
<i class="pull-right"><img class="logo" src="{{LOGO}}" style="max-height: 100px;"/></i>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>Company</th>
|
||||
<th>Client</th>
|
||||
<th>Reporting Period</th>
|
||||
<th>Projects</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{company}}</td>
|
||||
<td>{{client}}</td>
|
||||
<td>{{period}}</td>
|
||||
<td>{{projects}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:30%">Employee<br/>{{employee}}</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%">Manager</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%">Account Manager</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table borderless">
|
||||
|
||||
<tbody>
|
||||
<tr style="font-weight: bold;">
|
||||
<td>Date</td>
|
||||
<td>Start Time</td>
|
||||
<td>End Time</td>
|
||||
<td>Details</td>
|
||||
<td>Project</td>
|
||||
<td>Duration</td>
|
||||
</tr>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td>{{entry.date}}</td>
|
||||
<td>{{entry.startTime}}</td>
|
||||
<td>{{entry.endTime}}</td>
|
||||
<td>{{entry.details}}</td>
|
||||
<td>{{entry.project}}</td>
|
||||
<td>{{entry.duration | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td><br/><br/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>Total</b></td>
|
||||
<td>{{totalHours | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Working Day</td>
|
||||
<td>{{totalHoursWorking | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Non Working Day / Holiday</td>
|
||||
<td>{{totalHoursNonWorking | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><br/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>Project Statistics</b></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% for project,time in projectTimes %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{project}}</td>
|
||||
<td>{{time|number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.borderless td {
|
||||
border: none;
|
||||
}
|
||||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
43
core/modules/reports/customTemplates/payslip.html
Normal file
43
core/modules/reports/customTemplates/payslip.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Payslip {{employeeName}} {{payroll.name}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="{{BASE_URL}}themecss/AdminLTE.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/ionicons.min.css" rel="stylesheet">
|
||||
<script src="{{BASE_URL}}themejs/bootstrap.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="margin-top:10px;">
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-8">
|
||||
{% for field in fields %}
|
||||
{% if field.type == 'Company Logo' %}
|
||||
{% include 'payslip/logo.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Company Name' %}
|
||||
{% include 'payslip/companyname.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Payroll Column' %}
|
||||
{% include 'payslip/column.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Text' %}
|
||||
{% include 'payslip/text.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Separators' %}
|
||||
{% include 'payslip/hr.html' with {'field': field} %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-xs-2"></div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.borderless td {
|
||||
border: none;
|
||||
}
|
||||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
8
core/modules/reports/customTemplates/payslip/column.html
Normal file
8
core/modules/reports/customTemplates/payslip/column.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<b>{{field.label}}</b>
|
||||
</div>
|
||||
<div class="col-xs-6" style="text-align: right">
|
||||
{{field.value}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
<h2>{{companyName}}</h2>
|
||||
|
||||
{% if field.label != "" %}
|
||||
<h3>{{field.label}}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if field.text != "" %}
|
||||
<p>{{field.text}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
5
core/modules/reports/customTemplates/payslip/hr.html
Normal file
5
core/modules/reports/customTemplates/payslip/hr.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
8
core/modules/reports/customTemplates/payslip/logo.html
Normal file
8
core/modules/reports/customTemplates/payslip/logo.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
<img src="{{LOGO}}" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
14
core/modules/reports/customTemplates/payslip/text.html
Normal file
14
core/modules/reports/customTemplates/payslip/text.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
{% if field.label != "" %}
|
||||
<h3>{{field.label}}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if field.text != "" %}
|
||||
<p>{{field.text}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
44
core/modules/reports/index.php
Normal file
44
core/modules/reports/index.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
$moduleName = 'Reports';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
$additionalJs = array();
|
||||
$additionalJs[] = BASE_URL.'admin/reports/lib.js?v='.$jsVersion;
|
||||
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="tabUserReport" href="#tabPageUserReport"><?=t('Reports')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageUserReport">
|
||||
<div id="UserReport" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="UserReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabUserReport'] = new UserReportAdapter('UserReport','UserReport','','report_group');
|
||||
modJsList['tabUserReport'].setShowAddNew(false);
|
||||
modJsList['tabUserReport'].setRemoteTable(true);
|
||||
|
||||
/*
|
||||
modJsList['tabReport'] = new ReportGenAdapter('File','File','{"file_group":"Report"}','group');
|
||||
modJsList['tabReport'].setShowAddNew(false);
|
||||
*/
|
||||
|
||||
var modJs = modJsList['tabUserReport'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
15
core/modules/reports/meta.json
Normal file
15
core/modules/reports/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Reports",
|
||||
"menu": "User Reports",
|
||||
"order": "1",
|
||||
"icon": "fa-file-o",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 7,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Reports\\Common\\Model",
|
||||
"manager": "\\Reports\\User\\Api\\ReportsModulesManager"
|
||||
}
|
||||
18
core/modules/reports/scripts/reports.sql
Normal file
18
core/modules/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/modules/reports/templates/fields/label.html
Normal file
6
core/modules/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/modules/reports/templates/form_template.html
Normal file
14
core/modules/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