Skip to content

Commit

Permalink
empUID not used?
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaoVA committed Jul 21, 2023
1 parent d81d496 commit d495e5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LEAF_Nexus/api/controllers/EmployeeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function post($act)
});


$this->index['POST']->register('employee/refresh/[text]/[digit]', function ($args) use ($employee, $national_db) {
$this->index['POST']->register('employee/refresh/[text]', function ($args) use ($employee, $national_db) {
if (!$national_db) {
$return_value = $employee->refresh($args[0]);
} else {
Expand Down
6 changes: 3 additions & 3 deletions LEAF_Nexus/templates/view_employee.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="toolbar" class="toolbar_right toolbar noprint">
<div id="tools"><h1>Tools</h1>
<!--{if $is_admin == true}-->
<div onclick="refreshEmp('<!--{$summary.employee.userName|escape:"quotes"}-->', '<!--{$empUID}-->');"><img src="dynicons/?img=system-software-update.svg&w=32" style="vertical-align: middle" alt="Refresh Employee" title="Refresh Employee" /> Refresh Employee</div>
<div onclick="refreshEmp('<!--{$summary.employee.userName|escape:"quotes"}-->');"><img src="dynicons/?img=system-software-update.svg&w=32" style="vertical-align: middle" alt="Refresh Employee" title="Refresh Employee" /> Refresh Employee</div>
<br />
<!--{/if}-->
<div onclick="assignBackup();"><img src="dynicons/?img=gnome-system-users.svg&amp;w=32" style="vertical-align: middle" alt="Set Backup" title="Set Backup" /> Assign Backup</div>
Expand Down Expand Up @@ -80,12 +80,12 @@
<!--{include file="site_elements/genericJS_toolbarAlignment.tpl"}-->
function refreshEmp(userName, empUID) {
function refreshEmp(userName) {
var CSRFToken = '<!--{$CSRFToken}-->';
$.ajax({
type: 'POST',
url: "./api/employee/refresh/_" + userName + "/" + empUID,
url: "./api/employee/refresh/_" + userName,
dataType: "json",
data: {CSRFToken: CSRFToken},
success: function(res) {
Expand Down

0 comments on commit d495e5c

Please sign in to comment.