diff --git a/api-payroll/public/html/editEmployee.php b/api-payroll/public/html/editEmployee.php index 1258af8..7a8eaa4 100644 --- a/api-payroll/public/html/editEmployee.php +++ b/api-payroll/public/html/editEmployee.php @@ -103,9 +103,10 @@
- \ No newline at end of file + diff --git a/api-payroll/public/html/newEmployee.php b/api-payroll/public/html/newEmployee.php index 99bb0e6..6280575 100644 --- a/api-payroll/public/html/newEmployee.php +++ b/api-payroll/public/html/newEmployee.php @@ -85,9 +85,10 @@ - \ No newline at end of file + diff --git a/api-payroll/public/html/registerWorkDays.php b/api-payroll/public/html/registerWorkDays.php index 0750ab9..94c02fd 100644 --- a/api-payroll/public/html/registerWorkDays.php +++ b/api-payroll/public/html/registerWorkDays.php @@ -134,6 +134,7 @@ diff --git a/api-payroll/public/js/landing.js b/api-payroll/public/js/landing.js index 9bb9850..087fa2b 100644 --- a/api-payroll/public/js/landing.js +++ b/api-payroll/public/js/landing.js @@ -1,3 +1,6 @@ +// will contain the current loaded view +let currentView; + /** * Destorys the session for the current user and redirects * back to the login form @@ -59,6 +62,8 @@ function loadView(requestedView){ url: baseUrl + '/html/' + requestedView, type: 'get', success:function(data){ + currentView = requestedView; + $("#newViewBody").hide().html(data).show('slow'); }, error:function(x,e) { @@ -80,4 +85,12 @@ function loadView(requestedView){ } }, }); -} \ No newline at end of file +} + +/** +* Reloads the last view that was accessed as a way of fully clearing and +* resetting the values of the form +*/ +function clearView(view){ + loadView(view); +}