PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/fusetheme/timesheet.php

https://gitlab.com/haque.mdmanzurul/wp-archivefusetheme
PHP | 280 lines | 262 code | 14 blank | 4 comment | 1 complexity | 62e20c0132ea9254e9e3081d16afb1e7 MD5 | raw file
  1. <?php
  2. /*
  3. * Template name: Timesheet Page
  4. */
  5. get_header(); ?>
  6. <style>
  7. .RatesNumberColumn
  8. {
  9. text-align: right;
  10. width: 130px;
  11. }
  12. </style>
  13. <div class="jumbotron">
  14. <div class="container">
  15. <div class="row">
  16. <div class="col-md-8">
  17. <h1>
  18. Timesheet
  19. </h1>
  20. </div>
  21. <div class="col-md-4" style="text-align:right">
  22. <?php
  23. if ( has_post_thumbnail() ) {
  24. the_post_thumbnail();
  25. }else{
  26. ?>
  27. <img src="<?php bloginfo('template_directory'); ?>/images/Timesheet.png" height="150"><?php } ?>
  28. </div>
  29. </div>
  30. <p>
  31. As a logged in candidate, you may enter your working times and request authorisation.
  32. As a logged in client, you may authorise time worked by your candidate.
  33. </p>
  34. <p style="text-align: center">
  35. </p>
  36. </div>
  37. </div>
  38. <!-- Placement Details -->
  39. <div class="container">
  40. <div class="panel panel-default">
  41. <div class="panel-heading">
  42. <h3 class="panel-title">
  43. Placement
  44. </h3>
  45. </div>
  46. <div class="panel-body">
  47. <div class="table-responsive">
  48. <table class="table table-bordered table-striped">
  49. <tbody>
  50. <tr>
  51. <th class="text-nowrap">Placement ID</th>
  52. <td colspan="3"><div id="PlacementId"></div></td>
  53. </tr>
  54. <tr>
  55. <th class="text-nowrap">Reference</th>
  56. <td colspan="3"><div id="Reference"></div></td>
  57. </tr>
  58. <tr>
  59. <th class="text-nowrap">Company</th>
  60. <td colspan="3"><div id="CompanyName"></div></td>
  61. </tr>
  62. <tr>
  63. <th class="text-nowrap">Contractor</th>
  64. <td colspan="3"><div id="CandidateName"></div></td>
  65. </tr>
  66. <tr>
  67. <th class="text-nowrap">Job Title</th>
  68. <td colspan="3"><div id="JobTitle"></div></td>
  69. </tr>
  70. <tr>
  71. <th class="text-nowrap">Type</th>
  72. <td colspan="3"><div id="Type"></div></td>
  73. </tr>
  74. <tr>
  75. <th class="text-nowrap">Site Address</th>
  76. <td colspan="3"><div id="Location"></div></td>
  77. </tr>
  78. <tr>
  79. <th class="text-nowrap">Start Date</th>
  80. <td colspan="3"><div id="StartDate"></div></td>
  81. </tr>
  82. <tr>
  83. <th class="text-nowrap">End Date</th>
  84. <td colspan="3"><div id="EndDate"></div></td>
  85. </tr>
  86. <tr>
  87. <th class="text-nowrap">Line Manager</th>
  88. <td colspan="3"><div id="ClientName"></div></td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <!-- Timesheet Details -->
  97. <div class="container">
  98. <div class="panel panel-default">
  99. <div class="panel-heading">
  100. <h3 class="panel-title">
  101. Timesheet
  102. </h3>
  103. </div>
  104. <div class="panel-body">
  105. <div class="table-responsive">
  106. <table class="table table-bordered table-striped">
  107. <tbody>
  108. <tr>
  109. <th class="text-nowrap">Timesheet ID</th>
  110. <td colspan="3"><div id="TimesheetId"></div></td>
  111. </tr>
  112. <tr>
  113. <th class="text-nowrap">Period</th>
  114. <td colspan="3"><select id="cmbPeriod" style="width:auto;"></select></td>
  115. </tr>
  116. <tr>
  117. <th class="text-nowrap">Input Date</th>
  118. <td colspan="3"><div id="InputDate"></div></td>
  119. </tr>
  120. <tr>
  121. <th class="text-nowrap">Status</th>
  122. <td colspan="3"><div id="Status"></div></td>
  123. </tr>
  124. <tr id="trDateAuthorised" style="display: none">
  125. <th class="text-nowrap">Authorised</th>
  126. <td colspan="3"><div id="AuthorisedDate"></div></td>
  127. </tr>
  128. <tr id="trPaid" style="display: none">
  129. <th class="text-nowrap">Paid</th>
  130. <td colspan="3"><div id="Paid"></div></td>
  131. </tr>
  132. </tbody>
  133. </table>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="container" id="divTimesheets">
  139. <div class="panel panel-default" id="pnlPlacements">
  140. <div class="panel-heading">
  141. <h3 class="panel-title">
  142. Working Hours
  143. </h3>
  144. </div>
  145. <div class="panel-body">
  146. <!-- TODO: Telerik Grid or Custom? -->
  147. <div id="divTimesheetHoursGrid" style="border-width: 1px; width: 100%; ">
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="container" id="divRates">
  153. <div class="panel panel-default" id="pnlRates">
  154. <div class="panel-heading">
  155. <h3 class="panel-title">
  156. Hours, Rates &amp; Amounts
  157. </h3>
  158. </div>
  159. <div class="panel-body">
  160. <div class="table-responsive">
  161. <table class="table table-bordered table-striped" id="amountsTable">
  162. <tbody id="tbodyAmounts">
  163. <tr>
  164. <th></th>
  165. <td style="text-align:right; width: 110px;"><b>Total Hours</b></td>
  166. <td class="RatesNumberColumn"><b>Pay Rate</b></td>
  167. <td class="RatesNumberColumn"><b>Charge Rate</b></td>
  168. <td class="RatesNumberColumn"><b>Pay Amount</b></td>
  169. <td class="RatesNumberColumn"><b>Charge Amount</b></td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. <div class="container" id="divTimesheetSummary">
  178. <div class="panel panel-default" id="pnlTimesheetSummary">
  179. <div class="panel-heading">
  180. <h3 class="panel-title">
  181. Timesheet Summary
  182. </h3>
  183. </div>
  184. <div class="panel-body">
  185. <div class="table-responsive">
  186. <table class="table table-bordered table-striped" id="summaryTable">
  187. <tbody>
  188. <tr>
  189. <th></th>
  190. <td class="RatesNumberColumn"><b>Pay</b></td>
  191. <td class="RatesNumberColumn"><b>Charge</b></td>
  192. </tr>
  193. <tr>
  194. <th class="text-nowrap">Currency</th>
  195. <td class="RatesNumberColumn"><div id="summaryPayCurrency"></div></td>
  196. <td class="RatesNumberColumn"><div id="summaryChargeCurrency"></div></td>
  197. </tr>
  198. <tr>
  199. <th class="text-nowrap">Total Net Amount</th>
  200. <td class="RatesNumberColumn"><div id="summaryTotalNetPay"></div></td>
  201. <td class="RatesNumberColumn"><div id="summaryTotalNetCharge"></div></td>
  202. </tr>
  203. <tr>
  204. <th class="text-nowrap">VAT % Rate</th>
  205. <td class="RatesNumberColumn"><div id="summaryPayVATPercentage"></div></td>
  206. <td class="RatesNumberColumn"><div id="summaryChargeVATPercentage"></div></td>
  207. </tr>
  208. <tr>
  209. <th class="text-nowrap">Total VAT Amount</th>
  210. <td class="RatesNumberColumn"><div id="summaryPayVATAmount"></div></td>
  211. <td class="RatesNumberColumn"><div id="summaryChargeVATAmount"></div></td>
  212. </tr>
  213. <tr>
  214. <th class="text-nowrap">Grand Total</th>
  215. <td class="RatesNumberColumn"><div id="summaryPayGrandTotal"></div></td>
  216. <td class="RatesNumberColumn"><div id="summaryChargeGrandTotal"></div></td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <!-- Form Actions -->
  225. <div class="container">
  226. <div class="panel panel-default" id="pnlTimesheetActions">
  227. <div class="panel-heading">
  228. <h3 class="panel-title">
  229. Form Actions
  230. </h3>
  231. </div>
  232. <div class="panel-body">
  233. <div class="btn-group">
  234. <a class="btn btn-primary" id="btnSaveTimesheet" onclick="TriSysWeb.Pages.Timesheet.SaveButtonClick()" style="display:none">Save</a>
  235. <a class="btn btn-danger" id="btnRequestAuthorisation" onclick="TriSysWeb.Pages.Timesheet.RequestAuthorisation()" style="display:none">Request Authorisation</a>
  236. <a class="btn btn-danger" id="btnAuthoriseTimesheet" onclick="TriSysWeb.Pages.Timesheet.Authorise()" style="display:none">Authorise</a>
  237. <a class="btn btn-warning" id="btnBack" onclick="history.go(-1);">Back to Previous Page</a>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <!-- End of Form Actions -->
  243. <!-- /container -->
  244. <script type="text/javascript">
  245. $(document).ready(function ()
  246. {
  247. TriSysLoad.ApexFramework.LoadDynamically(function ()
  248. {
  249. var documentReadyObject = {
  250. ClientOrCandidateLogin: true,
  251. SQLLogin: true,
  252. PageName: "timesheet",
  253. ParentMenuName: "candidate",
  254. CallbackFunction: function ()
  255. {
  256. // Show placement and timesheet details after we can be sure that we are connected to the database
  257. setTimeout(TriSysWeb.Pages.Timesheet.Load, 100);
  258. }
  259. };
  260. TriSysWeb.Pages.DocumentReady(documentReadyObject);
  261. });
  262. });
  263. </script>
  264. <!-- End of Actions -->
  265. <?php get_footer(); ?>
  266. <!-- /container -->