<? global $vis_language; ?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6">
      <h3 class="m-b-xs text-black"><? echo $operation['view_title'];?></h3>
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSETTINGS'];?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li><a  class="link" href="#/setting/view_staff/<? echo $vis_language['TXTSTAFF'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSTAFF'];?>',{'vis_module':'setting','vis_operation':'view_staff'});" class="link"><? echo $operation['view_title']; ?></a> </li>
         <li class="active"><?echo $vis_language['TXTUPDATESTAFF'];?></li>
      </ul>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class="panel-heading text-right bg-light clearfix">
         <ul class="nav nav-tabs pull-left">
            <li class="active"><a data-toggle="tab" oncontextmenu="return false;" href="#profile" ><? echo $vis_language['TXTPROFILE']; ?></a></li>
            <li><a data-toggle="tab" oncontextmenu="return false;" href="#department_access" onclick="view_department_access();"><? echo $vis_language['TXTDEPARTMENTACCESS']; ?></a></li>
            <li><a data-toggle="tab" oncontextmenu="return false;" href="#signature" onclick="view_signature();"><? echo$vis_language['TXTSIGNATURE']; ?></a></li>
            <li><a data-toggle="tab" oncontextmenu="return false;" href="#change_password" onclick="view_change_password();"><? echo $vis_language['TXTCHNGPASS']; ?></a></li>
         </ul>
         <span class="hidden-sm dropdown">
         <i class="fa"></i>
         </span>
      </header>
      <div class="panel-body">
      <div class="tab-content">
         <div id="profile" class="tab-pane active">
            <? include_once(VIS_PATH_TEMPLATE.'staff_profile.php'); ?>
         </div>
         <div id="department_access" class="tab-pane">
         </div>
         <div id="signature" class="tab-pane">
         </div>
         <div id="change_password" class="tab-pane">
         </div>
      </div>
   </section>
</section>
<script>
   function view_department_access() {
       $.ajax({
           url: 'index.php',
           data: { 'vis_module': "setting", 'vis_operation': "staff_department_details",  'vis_staff_id': '<? echo $staff['staff_id']; ?>' },
           type: "POST",
           success: function(data) {
               $("#department_access").html(data);
           }
       });
   }
   function view_signature() {
       $.ajax({
           url: 'index.php',
           data: { 'vis_module': "setting", 'vis_operation': "staff_signature",  'vis_staff_id': '<? echo $staff['staff_id']; ?>','vis_group_id': '<? echo $staff['group_id']; ?>'},
           type: "POST",
           success: function(data) {
               $("#signature").html(data);
           }
       });
   }
   function view_change_password() {
       $.ajax({
           url: 'index.php',
           data: { 'vis_module': "setting", 'vis_operation': "staff_password_reset",  'vis_staff_id': '<? echo $staff['staff_id']; ?>','vis_staff_email': '<? echo $staff['email']; ?>' },
           type: "POST",
           success: function(data) {
               $("#change_password").html(data);
           }
       });
   }
</script>
