Commit ee38070a authored by David Mburu's avatar David Mburu

Second commit

parent b125d0de
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PayfrequencyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('Employees.PayfrequencyConfig');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
@extends('Layout.Employeesmaster')
@section('title', 'Employees')
<style>
.choose_file {
position: relative;
display: inline-block;
font: normal 14px Myriad Pro, Verdana, Geneva, sans-serif;
color: #7f7f7f;
margin-top: 2px;
background: white
}
#import_file{
-webkit-appearance:none;
position:absolute;
top:0;
left:0;
opacity:0;
width: 100%;
height: 100%;
}
</style>
@section('content')
<section id="content">
<section class="scrollable padder">
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
<li><a href="."><i class="fa fa-home"></i> Home</a></li>
<li class="active">Pay Frequency</li>
</ul>
@if ( session('success') )
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<strong>{{ session('success') }}</strong>
</div>
@endif
@if (session('error'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<strong>{{ session('error') }}</strong>
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<div>
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
</div>
@endif
<div class=container-fluid>
<div class=row>
<legend style="padding:25px 5px 5px 10px">Pay Frequency</legend>
<div class="pull-right" style="margin:5px 20px 5px 10px;">
<a href="" class="btn btn-info btn-sm"><i class="fa fa-plus"></i></a>
</div>
</div>
<div class=row style="padding:0px 5px 5px 10px">
<div class="table-responsive" style="padding:0px 5px 5px 10px">
<table class="table table-striped m-b-sm datagrid">
<thead>
<tr>
<th>Action</th>
<th>Pay Frequency</th>
<th>Short Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-eye no-margin"></i></span></a>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-edit no-margin"></i></span></a>
<a href=""><span class="btn btn-danger btn-sm"><i class="fa fa-trash no-margin"></i></span></a>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
@endsection
@section('footer-include')
<!-- fuelux -->
<script src="/js/libs/underscore-min.js"></script>
<script src="/js/fuelux/fuelux.js"></script>
{{--<script src="js/fuelux/demo.datagrid.js"></script>--}}
<!-- select2 -->
@endsection
@section('j-script')
<!-- Jquery -->
<script>
$(document).on('ready', function(){
});
</script>
@endsection
\ No newline at end of file
@extends('Layout.Employeesmaster')
@section('title', 'Employees')
<style>
.info p {
text-align:center;
color: #999;
text-transform:none;
font-weight:600;
font-size:15px;
margin-top:2px
}
.info i {
color:#F6AA93;
}
form {
border-radius: 5px;
width:100%;
background-color: #FFFFFF;
overflow: hidden;
}
p span {
color: #F00;
}
p {
margin: 0px;
font-weight: 500;
line-height: 2;
color:#333;
}
a {
text-decoration:inherit
}
.form-group {
overflow: hidden;
clear: both;
}
.form-control {
position:relative;
clear: both;
margin-top: 2px;
display:inline-block;
margin-right: 10px;
}
</style>
@section('content')
<section id="content">
<section class="scrollable padder">
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
<li><a href="."><i class="fa fa-home"></i> Home</a></li>
<li class="active">Pay Frequency</li>
</ul>
@if ( session('success') )
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<strong>{{ session('success') }}</strong>
</div>
@endif
@if (session('error'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<strong>{{ session('error') }}</strong>
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<div>
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
</div>
@endif
<div class=container-fluid>
<div class=row>
<legend style="padding:25px 5px 5px 10px">Pay Frequency</legend>
<div class="pull-right" style="margin:5px 20px 5px 10px;">
<a href="" class="btn btn-info btn-sm" data-toggle="modal" data-target="#createPayfrequency"><i class="fa fa-plus"></i></a>
</div>
</div>
<div class=row style="padding:0px 5px 5px 10px">
<div class="table-responsive" style="padding:0px 5px 5px 10px">
<table class="table table-striped m-b-sm datagrid">
<thead>
<tr>
<th>Action</th>
<th>Pay Frequency</th>
<th>Short Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-eye no-margin"></i></span></a>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-edit no-margin"></i></span></a>
<a href=""><span class="btn btn-danger btn-sm"><i class="fa fa-trash no-margin"></i></span></a>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<!-- Modal -->
<div class="modal fade" id="createPayfrequency" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Pay Frequency</h4>
</div>
<div class="modal-body">
<form method="post" action="" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;">
<div class=form-group style="padding-left:20px">
<p>Pay Frequency<span>*</span></p>
<input name="payfrequency" type="text" class="form-control" id="payfrequency" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 10em;height: 30px;float: left;padding: 0px 15px;"
required>
</div>
<div class=form-group style="padding-left:20px">
<p>Short Code <span>*</span></p>
<input name="shortcode" type="text" class="form-control" id="shortcode" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 10em;height: 30px;float: left;padding: 0px 15px;"
required>
</div>
<div class=form-group style="padding-left:20px">
<p>Description <span>*</span></p>
<input name="description" type="text" class="form-control" id="description" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 10em;height: 30px;float: left;padding: 0px 15px;"
required> </div>
</form>
</div>
<div class="modal-footer">
<button type="button" onclick="form_submit()" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function form_submit() {
document.getElementById("my_form").submit();
}
</script>
@endsection
@section('footer-include')
<!-- fuelux -->
<script src="/js/libs/underscore-min.js"></script>
<script src="/js/fuelux/fuelux.js"></script>
{{--<script src="js/fuelux/demo.datagrid.js"></script>--}}
<!-- select2 -->
@endsection
@section('j-script')
<!-- Jquery -->
<script>
$(document).on('ready', function(){
});
</script>
@endsection
\ No newline at end of file
...@@ -60,7 +60,7 @@ a { ...@@ -60,7 +60,7 @@ a {
<ul class="breadcrumb no-border no-radius b-b b-light pull-in"> <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
<li><a href="."><i class="fa fa-home"></i> Home</a></li> <li><a href="."><i class="fa fa-home"></i> Home</a></li>
<li><a href="/employees">Employees</a></li> <li><a href="/employees">Employees</a></li>
<li class="active">Employee info</li> <li class="active">Add</li>
</ul> </ul>
@include('Layout.errors') @include('Layout.errors')
@if ( session('success') ) @if ( session('success') )
...@@ -72,17 +72,18 @@ a { ...@@ -72,17 +72,18 @@ a {
<strong>{{ session('success') }}</strong> <strong>{{ session('success') }}</strong>
</div> </div>
@endif @endif
<div class="container-fluid" style="margin-bottom:0px;"> <div class="container-fluid" style="margin-bottom:0px;">
<div class=col-md-3 style="width:13.5%"> <div class=col-md-3 id=tabLinks style="width:13.5%">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item active" ><a href="#employeeinfo" class="tabLink employeeinfo" onclick="tabswitch(this)">Employee Info</a></li> <li class="list-group-item active" ><a href="#employeeinfo" class="tab" onclick="tabswitch(this)">Employee Info</a></li>
<li class="list-group-item "><a href="#personal" class="tabLink documents" onclick="tabswitch(this)">Personal</a></li> <li class="list-group-item "><a href="#personal" class="tab" onclick="tabswitch(this)">Personal</a></li>
<li class="list-group-item ">Salary</li> <li class="list-group-item ">Salary</li>
<li class="list-group-item "><a href="#personal" class="tabLink training" onclick="tabswitch(this)">Training and Certification</a></li> <li class="list-group-item "><a href="#training" class="tab" onclick="tabswitch(this)">Training and Certification</a></li>
</ul> </ul>
</div> </div>
<div class=col-md-6 style="width:86.5%"> <div class=col-md-6 style="width:86.5%">
<form method="post" action="{{ route('registration') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;"> <form method="post" action="{{ route('/employees/add') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;">
{{ csrf_field() }} {{ csrf_field() }}
<div class="tabcontainer employeeinfo" id=employeeinfo> <div class="tabcontainer employeeinfo" id=employeeinfo>
<fieldset> <fieldset>
...@@ -93,8 +94,9 @@ a { ...@@ -93,8 +94,9 @@ a {
<div class="wrapper" style="width:10%;padding:0px 0px 5px 0px;"> <div class="wrapper" style="width:10%;padding:0px 0px 5px 0px;">
<select name="employeecode" id="employeecode" class="form-control"style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'> <select name="employeecode" id="employeecode" class="form-control"style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
<option value="0">Select Employee Code</option> <option value="0">Select Employee Code</option>
<option value="1">NA</option> <option value="1">Branch Code</option>
<option value="2">ATL</option> <option value="2">Department Code</option>
<option value="3">None</option>
</select> </select>
</div> </div>
<div style="float:left; margin-top: 2px;text-align: left;font-family: 'Roboto Regular',sans-serif;color: #208BBD;font-size: 12px;cursor: pointer;"> <div style="float:left; margin-top: 2px;text-align: left;font-family: 'Roboto Regular',sans-serif;color: #208BBD;font-size: 12px;cursor: pointer;">
...@@ -368,7 +370,7 @@ a { ...@@ -368,7 +370,7 @@ a {
<!-- PersonalInfo Div --> <!-- PersonalInfo Div -->
<div class="col-md-6 tabcontainer personal" id=personal style="display:none;width:86.5%"> <div class="col-md-6 tabcontainer personal" id=personal style="display:none;width:86.5%">
<form method="post" action="{{ route('registration') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;"> <form method="post" action="{{ route('/employees/add') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;">
{{ csrf_field() }} {{ csrf_field() }}
<fieldset> <fieldset>
<legend>Personal Info</legend> <legend>Personal Info</legend>
...@@ -423,7 +425,7 @@ a { ...@@ -423,7 +425,7 @@ a {
<div class=row style="padding:0px 5px 5px 10px"> <div class=row style="padding:0px 5px 5px 10px">
<div class=col-md-4 style="width:20%"> <div class=col-md-4 style="width:20%">
<p>Identity Documents </p> <p>Identity Documents<span>*</span> </p>
<div class="wrapper" style="width:10%;padding:0px 0px 5px 0px;float:left;"> <div class="wrapper" style="width:10%;padding:0px 0px 5px 0px;float:left;">
<select name="identitydocument" onchange="inputfieldVisibility(this);" id="identitydocument" class="form-control" style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'> <select name="identitydocument" onchange="inputfieldVisibility(this);" id="identitydocument" class="form-control" style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
<option value="">Select Identification</option> <option value="">Select Identification</option>
...@@ -474,7 +476,7 @@ a { ...@@ -474,7 +476,7 @@ a {
<fieldset> <fieldset>
<div class=row style="padding:5px 5px 5px 10px"> <div class=row style="padding:5px 5px 5px 10px">
<h3 style="padding:5px 5px 5px 10px">Contact info</h3> <h3 style="padding:5px 5px 5px 10px">Contact info</h3>
<legend style="padding:5px 5px 5px 10px">Physical Address</legend> <legend style="padding:5px 5px 5px 10px">Postal Address</legend>
<div class=col-md-4 style="width:20%"> <div class=col-md-4 style="width:20%">
<p>Country <span>*</span></p> <p>Country <span>*</span></p>
<input name="country" type="text" class="form-control" id="country" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;" <input name="country" type="text" class="form-control" id="country" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;"
...@@ -500,13 +502,9 @@ a { ...@@ -500,13 +502,9 @@ a {
<input name="postalcode" type="text" class="form-control" id="postalcode" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;"> <input name="postalcode" type="text" class="form-control" id="postalcode" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;">
</div> </div>
</div><!-- End of third row --> </div><!-- End of third row -->
<div class=row style="padding:0px 5px 5px 20px">
<input type="checkbox" class="addressCheckbox" style="font-size:45px;"/>
Check this box if Physical Address and Postal Address are the same.
</div>
<div class=row style="padding:0px 5px 5px 10px"> <div class=row style="padding:0px 5px 5px 10px">
<legend style="padding:25px 5px 5px 10px">Postal Address</legend> <legend style="padding:25px 5px 5px 10px">Current Address</legend>
<div class=col-md-4 style="width:20%"> <div class=col-md-4 style="width:20%">
<p>Country <span>*</span></p> <p>Country <span>*</span></p>
<input name="postalCountry" type="text" class="form-control" id="postalCountry" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;" <input name="postalCountry" type="text" class="form-control" id="postalCountry" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;"
...@@ -535,29 +533,40 @@ a { ...@@ -535,29 +533,40 @@ a {
</div><!-- End of fourth row --> </div><!-- End of fourth row -->
<div class=row style="padding:0px 5px 5px 10px"> <div class=row style="padding:0px 5px 5px 10px">
<legend style="padding:25px 5px 5px 10px">Emergency Contacts</legend> <legend style="padding:25px 5px 5px 10px">Emergency Contacts</legend>
<div class=col-md-4 style="width:20%"> <div class="pull-right" style="margin:5px 20px 5px 10px;">
<p>Name <span>*</span></p> <a href="" class="btn btn-info btn-sm"><i class="fa fa-plus"></i>Add Emergency Contact</a>
<input name="emergencyName" type="text" class="form-control" id="emergencyName" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;"
required>
</div> </div>
<div class=col-md-4 style="width:20%">
<p>Email<span>*</span></p>
<input name="emergencyEmail" type="text" class="form-control" id="emergencyEmail" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;"
required>
</div> </div>
<div class=col-md-4 style="width:20%"> <div class=row style="padding:0px 5px 5px 10px">
<p>PhoneNo. <span>*</span></p> <div class="table-responsive" style="padding:0px 5px 5px 10px">
<input name="emergencyPhoneno" type="text" class="form-control" id="emergencyPhoneno" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;" <table class="table table-striped m-b-sm datagrid">
required> <thead>
</div> <tr>
<div class=col-md-4 style="width:20%"> <th>Name</th>
<p>Relation <span>*</span></p> <th>Phone No.</th>
<input name="emergencyRelation" type="text" class="form-control" id="emergencyRelation" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 40px;float: left;padding: 0px 15px;" <th>Email</th>
required> <th>Relation</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr id="">
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-edit no-margin"></i></span></a>
<a href=""><span class="btn btn-danger btn-sm" ><i class="fa fa-trash no-margin"></i></span></a>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
</tbody>
</table>
</div> </div>
</div><!-- End of fifth row --> </div><!-- End of fifth row -->
<div class=row style="padding:0px 5px 15px 10px"> <div class=row style="padding:0px 5px 15px 10px">
<div class=col-md-4 style="width:20%; padding-top:15px"> <div class=col-md-4 style="width:20%; padding-top:15px">
<button class="btn btn-info" style="padding: 5px 25px 5px 25px">Save</button> <button class="btn btn-info" style="padding: 5px 25px 5px 25px">Save</button>
...@@ -567,32 +576,65 @@ a { ...@@ -567,32 +576,65 @@ a {
</div> </div>
</div> <!-- End of button row --> </div> <!-- End of button row -->
</form> <!-- End of form --> </form> <!-- End of form -->
</div> <!--End of column --> </div> <!--End of column -->
<div class="col-md-6 tabcontainer training" id=training style="display:none;width:86.5%">
<div class=row style="padding:0px 5px 5px 10px">
<legend style="padding:25px 5px 5px 10px">Training and Certification</legend>
<div class="pull-right" style="margin:5px 20px 5px 10px;">
<a href="" class="btn btn-info btn-sm"><i class="fa fa-plus"></i>Add Certification</a>
</div>
</div>
<div class=row style="padding:0px 5px 5px 10px">
<div class="table-responsive" style="padding:0px 5px 5px 10px">
<table class="table table-striped m-b-sm datagrid">
<thead>
<tr>
<th>Course Name</th>
<th>Course Level</th>
<th>Name of Institution</th>
<th>Cerification Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr id="">
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-edit no-margin"></i></span></a>
<a href=""><span class="btn btn-danger btn-sm" ><i class="fa fa-trash no-margin"></i></span></a>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
</tbody>
</table>
</div>
</div><!-- End of fifth row -->
</div><!--- End of training and Certification -->
</div> <!-- End of container --> </div> <!-- End of container -->
</section> </section>
</section> </section>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="/js/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<script> <script>
$(document).ready(function(){
$("input").click(function(){ $("input").click(function(){
$(this).next().show(); $(this).next().show();
$(this).next().hide(); $(this).next().hide();
}); });
});
</script> </script>
<!-- Javascript for rendering disability form if checkbox is checked -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){
$('#disabilitycheckbox').change(function(){ $('#disabilitycheckbox').change(function(){
if($(this).is(":checked")) if($(this).is(":checked"))
$('#disabilityformrow').fadeIn('slow'); $('#disabilityformrow').fadeIn('slow');
...@@ -600,10 +642,25 @@ $("input").click(function(){ ...@@ -600,10 +642,25 @@ $("input").click(function(){
$('#disabilityformrow').fadeOut('slow'); $('#disabilityformrow').fadeOut('slow');
}); });
});
</script> </script>
<!--Javascript for rendering tablinks--> <!--Javascript for rendering tablinks-->
<script> <script>
$('#tabLinks').on('click', '.list-group a', function (e) {
clickEvent = true;
$('.list-group li').removeClass('active');
$(this).parent().addClass('active');
localStorage.setItem('tab', $(e.currentTarget).attr('href'));
});
$(function() {
var slide = localStorage.getItem('tab');
console.log(slide);
if (slide) {
$("a[href='" + slide + "']").click().tab('show');
}
});
function tabswitch(item) { function tabswitch(item) {
var divs = document.getElementsByClassName("tabcontainer"); var divs = document.getElementsByClassName("tabcontainer");
for (var i = 0; i < divs.length; i++) { for (var i = 0; i < divs.length; i++) {
...@@ -614,6 +671,9 @@ $("input").click(function(){ ...@@ -614,6 +671,9 @@ $("input").click(function(){
document.getElementById(target[1]).style.display = "block"; document.getElementById(target[1]).style.display = "block";
} }
</script> </script>
<!-- Javascript for rendering input fields on set conditions -->
<script> <script>
function inputfieldVisibility(that) { function inputfieldVisibility(that) {
if (that.value == "national") { if (that.value == "national") {
...@@ -637,34 +697,10 @@ $("input").click(function(){ ...@@ -637,34 +697,10 @@ $("input").click(function(){
document.getElementById("ethnicfield").style.display = "none"; document.getElementById("ethnicfield").style.display = "none";
} }
} }
</script> </script>
<script>
$('.addressCheckbox').change(function () {
var country = document.getElementById("country").value;
var state = document.getElementById("state").value;
var city = document.getElementById("city").value;
var address = document.getElementById("streetaddress").value;
var code = document.getElementById("postalcode").value;
if ($(this).is(':checked')) {
$('input[name="postalCountry"]').prop('disabled', true).val(country);
$('input[name="postalState"]').prop('disabled', true).val(country);
$('input[name="postalCity"]').prop('disabled', true).val(country);
$('input[name="postalStreetAddress"]').prop('disabled', true).val(country);
$('input[name="postalNo"]').prop('disabled', true).val(country);
} else {
$('input[name="postalCountry"]').prop('disabled', false).val('');
$('input[name="postalState"]').prop('disabled', false).val('');
$('input[name="postalCity"]').prop('disabled', false).val('');
$('input[name="postalStreetAddress"]').prop('disabled', false).val('');
$('input[name="postalNo"]').prop('disabled', false).val('');
}
});
}
}
</script>
@endsection @endsection
@section('footer-include') @section('footer-include')
<!-- fuelux --> <!-- fuelux -->
......
@extends('Layout.Employeesmaster') @extends('Layout.Employeesmaster')
@section('title', 'Employees') @section('title', 'Employees')
<style>
.choose_file {
position: relative;
display: inline-block;
font: normal 14px Myriad Pro, Verdana, Geneva, sans-serif;
color: #7f7f7f;
margin-top: 2px;
background: white
}
#import_file{
-webkit-appearance:none;
position:absolute;
top:0;
left:0;
opacity:0;
width: 100%;
height: 100%;
}
</style>
@section('content') @section('content')
<section id="content"> <section id="content">
<section class="scrollable padder"> <section class="scrollable padder">
<ul class="breadcrumb no-border no-radius b-b b-light pull-in"> <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
<li><a href="."><i class="fa fa-home"></i> Home</a></li> <li><a href="."><i class="fa fa-home"></i> Home</a></li>
<li><a href="/employees">Employees</a></li> <li class="active">Employees</li>
<li class="active">Export/Import</li>
</ul> </ul>
<h2 class="text-center">
Laravel Excel/CSV Import
</h2>
@if ( session('success') ) @if ( session('success') )
<div class="alert alert-success alert-dismissible" role="alert"> <div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> <button type="button" class="close" data-dismiss="alert" aria-label="Close">
...@@ -43,24 +59,72 @@ ...@@ -43,24 +59,72 @@
</div> </div>
</div> </div>
@endif @endif
<div class="panel-body"> <div class=container-fluid>
<div class=row style="float:right;position:relative">
<div class=col-md-3 style=width:49.5%>
<a href="{{ route('export') }}"><button class="btn btn-success">Download Excel xls</button></a> <a href="{{ route('export') }}"><button class="btn btn-success">Download Excel xls</button></a>
<!-- <a href="{{ url('export/xlsx') }}"><button class="btn btn-success">Download Excel xlsx</button></a> </div>
<a href="{{ url('export/csv') }}"><button class="btn btn-success">Download CSV</button></a> --> <div class=col-md-3 style=width:49.5%>
<form action="{{ route('import') }}" method="POST" enctype="multipart/form-data" id="importForm">
</div>
<div class="col-sm-9">
<form action="{{ route('import') }}" method="POST" enctype="multipart/form-data">
{{ csrf_field() }} {{ csrf_field() }}
Choose your xls/csv File : <input type="file" name="file" class="form-control"> <input type="file" name="file" class="form-control" id="import_file" >
<input type="submit" class="btn btn-success" value="Import File" >
</form>
</div>
</div>
<div class=row>
<legend style="padding:25px 5px 5px 10px">Employees</legend>
<div class="pull-right" style="margin:5px 20px 5px 10px;">
<a href="/employees/add" class="btn btn-info btn-sm"><i class="fa fa-plus"></i>Add Employee</a>
</div>
</div>
<div class=row style="padding:0px 5px 5px 10px">
<div class="table-responsive" style="padding:0px 5px 5px 10px">
<table class="table table-striped m-b-sm datagrid">
<thead>
<tr>
<th>Action</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Phone No.</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-eye no-margin"></i></span></a>
<a href=""><span class="btn btn-default btn-sm"><i class="fa fa-edit no-margin"></i></span></a>
<input type="submit" class="btn btn-primary btn-lg" style="margin-top: 3%"> </td>
</form> <td></td>
</div> <td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div>
</section> </section>
<script>
var form = document.getElementById('importForm');
var input = document.getElementById('import_file');
var change_running = false;
input.addEventListener('change', function(){
if(!change_running){
setTimeout(function(){
change_running = true;
form.submit();
change_running = false;
}, 300);
}
});
</script>
@endsection @endsection
@section('footer-include') @section('footer-include')
<!-- fuelux --> <!-- fuelux -->
......
...@@ -139,8 +139,8 @@ ...@@ -139,8 +139,8 @@
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu text-left"> <ul class="dropdown-menu text-left">
<li><a href="allowances">Payroll</a></li> <li><a href="/allowances">Payroll</a></li>
<li><a href="employees">Employees</a></li> <li><a href="/employees">Employees</a></li>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -171,30 +171,42 @@ ...@@ -171,30 +171,42 @@
<span>Employees</span> <span>Employees</span>
</a> </a>
<ul class="nav lt"> <ul class="nav lt">
<li style="list-style:none">
<a href="/employees">
<i class="fa fa-angle-right"></i>
<span>Employees</span>
</a>
</li>
</ul>
<ul class="nav lt">
<li class="active"> <li class="active">
<a href="#" class="active"> <a href="#" class="active">
<i class="fa fa-angle-down text"></i> <i class="fa fa-angle-down text"></i>
<i class="fa fa-angle-up text-active"></i> <i class="fa fa-angle-up text-active"></i>
<span>Others</span> <span>Employee Configurations</span>
</a> </a>
<ul class="nav bg"> <ul class="nav bg">
<li> <li>
<a href="/employees"> <a href="">
<i class="fa fa-angle-right"></i> <i class="fa fa-angle-right"></i>
<span>Export/Import Tool</span> <span>Employment Status</span>
</a> </a>
</li> </li>
</ul> <li>
<a href="">
<i class="fa fa-angle-right"></i>
<span>Job Title</span>
</a>
</li> </li>
<li> <li>
<a href="/registration"> <a href="/payfrequency">
<i class="fa fa-angle-right"></i> <i class="fa fa-angle-right"></i>
<span>Employees</span> <span>Pay Frequency</span>
</a> </a>
</li> </li>
</ul> </ul>
</li>
</ul> </ul>
</li>
</nav> </nav>
<!-- / nav --> <!-- / nav -->
</div> </div>
......
...@@ -139,8 +139,8 @@ ...@@ -139,8 +139,8 @@
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu text-left"> <ul class="dropdown-menu text-left">
<li><a href="allowances">Payroll</a></li> <li><a href="/allowances">Payroll</a></li>
<li><a href="{{route('employees')}}">Employees</a></li> <li><a href="/employees">Employees</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -58,20 +58,11 @@ Route::get('/payslip', 'PayslipController@index'); ...@@ -58,20 +58,11 @@ Route::get('/payslip', 'PayslipController@index');
Route::post('/payslip/view_payslip', 'PayslipController@view_payslip'); Route::post('/payslip/view_payslip', 'PayslipController@view_payslip');
#EmployeesController #EmployeesController
Route::get('/employees', 'EmployeesController@index')->name('employees'); Route::get('/employees', 'EmployeesController@index');
Route::get('/employees/export', 'EmployeesController@export')->name('export'); Route::get('/employees/export', 'EmployeesController@export')->name('export');
Route::post('/employees/import', 'EmployeesController@import')->name('import'); Route::post('/employees/import', 'EmployeesController@import')->name('import');
Route::get('/registration', 'EmployeesController@form')->name('registration'); Route::get('/employees/add', 'EmployeesController@form')->name('/employees/add');
Route::post('/registration', 'EmployeesController@store'); Route::get('/payfrequency', 'PayfrequencyController@index');
Route::group(['prefix' => 'laravel-crud-search-sort-ajax-modal-form'], function () {
Route::get('/', 'Crud5Controller@index');
Route::match(['get', 'post'], 'create', 'Crud5Controller@create');
Route::match(['get', 'put'], 'update/{id}', 'Crud5Controller@update');
Route::delete('delete/{id}', 'Crud5Controller@delete');
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment