Commit 8c98d41a authored by David Mburu's avatar David Mburu

update

parent 13f8d6f9
APP_NAME=Laravel
APP_NAME=Kinetic
APP_ENV=local
APP_KEY=base64:CDBMH4A1L6ik4ne3Is/rkmrPUBJ7aoQC8uSF0BD0q5M=
APP_KEY=base64:xHWd7QcAN6yayaZb4fVUKz/39lH58EbZBcOKuNc8bvE=
APP_DEBUG=true
APP_URL=http://localhost
......
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.phpunit.result.cache
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class BusinessUnit extends Model
{
protected $fillable = ['business_unit_code','business_unit', 'country', 'city', 'address_1', 'business_unit_head'];
}
......@@ -4,7 +4,7 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
class ListItems extends Model
class Certificate extends Model
{
protected $table = 'list_items';
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Countries extends Model
{
protected $fillable = ['country','citizenship'];
public static function getEmployees(){
$records = DB::table('countries')->select('country','citizenship')->orderBy('id', 'desc')->get()->toArray();
return $records;
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Employees extends Model
{
protected $fillable = ['employee_id','prefix','first_name','last_name','middle_name','email_address','gender','role','business_unit','department','job_title','employment_status','date_of_joining','date_of_leaving','years_of_experience','work_phone','personal_phone','extension','kra_pin','nssf_number','nhif_number','ifmis_number','reporting_manager','duration','password','isAdmin','created_by','modified_by','is_active'];
public static function getEmployees(){
$records = DB::table('employees')->select('employee_id','prefix','first_name','last_name','middle_name','email_address','gender','role','business_unit','department','job_title','employment_status','date_of_joining','date_of_leaving','years_of_experience','work_phone','personal_phone','extension','kra_pin','nssf_number','nhif_number','ifmis_number','reporting_manager','duration','isAdmin','created_by','modified_by','is_active')->orderBy('id', 'desc')->get()->toArray();
return $records;
}
}
......@@ -32,7 +32,7 @@ class Employee_detailsExport implements FromCollection, WithHeadings, ShouldAuto
'Email',
'Gender',
'DateofJoining',
'YearsofExperience',
'YearsofExperience'
];
}
public function map($EmployeeTest): array
......
<?php
namespace App\Exports;
use App\Employees;
use Maatwebsite\Excel\Concerns\FromCollection;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use PhpOffice\PhpSpreadsheet\Shared\Date;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
use Maatwebsite\Excel\Concerns\WithMapping;
class EmployeesExport implements FromCollection, WithHeadings, ShouldAutoSize, WithMapping, WithColumnFormatting
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return collect(Employees::getEmployees());
}
public function headings(): array
{
return [
'EmployeeID',
'Prefix',
'FirstName',
'LastName',
'MiddleName',
'Email',
'Gender',
'Role',
'BusinessUnit',
'Department',
'JobTitle',
'EmploymentStatus',
'DateofJoining',
'DateofLeaving',
'Years of Experience',
'Work Phone',
'Personal Phone',
'Extension',
'KRA Pin',
'NSSF No.',
'NHIF No.',
'IFMIS No.',
'Duration',
];
}
public function map($Employees): array
{
return [
$Employees ->employee_id,
$Employees ->prefix,
$Employees ->first_name,
$Employees ->last_name,
$Employees ->middle_name,
$Employees ->email_address,
$Employees ->gender,
$Employees ->role,
$Employees ->business_unit,
$Employees ->department,
$Employees ->job_title,
$Employees ->employment_status,
Date::PHPToExcel($Employees -> date_of_joining),
Date::PHPToExcel($Employees -> date_of_leaving),
$Employees ->years_of_experience,
$Employees ->work_phone,
$Employees ->personal_phone,
$Employees ->extension,
$Employees ->kra_pin,
$Employees ->nssf_number,
$Employees ->nhif_number,
$Employees ->ifmis_number,
$Employees ->reporting_manager,
$Employees ->duration,
];
}
public function columnFormats(): array
{
return [
'M' => NumberFormat::FORMAT_DATE_YYYYMMDD2,//dateofjoining column
'N' => NumberFormat::FORMAT_DATE_YYYYMMDD2,//dateofleaving column
];
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class BranchController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$branches=DB::table('branches')->get();
return view('Configurations.BranchConfig.index',compact('branches'));
}
/**
* 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)
{
$request->validate([
'business_unit'=>'required',
'country'=>'required',
'city'=>'required',
'business_unit_head'=>'required',
'address_1'=>'required'
]);
DB::table('branches')
->insertGetId([
'business_unit_code' => $request['business_unit_code'],
'business_unit' => $request['business_unit'],
'country' => $request['country'],
'city' => $request['city'],
'address_1' => $request['address_1'],
'business_unit_head'=>$request['business_unit_head'],
'created_at' => DB::raw('NOW()'),
]);
return redirect('/branches')->with('Success','Branch added successfully');
}
/**
* 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)
{
$branches = DB::table('branches')->where('id', $id)->first();
return view('Configurations.BranchConfig.edit',compact('branches'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'business_unit'=>'required',
'country'=>'required',
'city'=>'required',
'business_unit_head'=>'required',
'address_1'=>'required'
]);
DB::table('branches')
->where('id', $id)
->update([
'business_unit' => $request['business_unit'],
'business_unit_code' => $request['business_unit_code'],
'country' => $request['country'],
'city' => $request['city'],
'address_1' => $request['address_1'],
'business_unit_head'=>$request['business_unit_head'],
]);
return redirect('/branches')->with('Success','Branch updated successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('branches')->where('id',$id)->exists()){
DB::table('branches')->where('id', $id)->delete();
return redirect('/branches')->with('success', 'Business Unit has been deleted Successfully');
}else{
return redirect('/branches')->with('error', 'Business Unit does not exist');
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\BusinessUnit;
use Validator;
use Response;
use View;
class BusinessunitController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$businessunits = BusinessUnit::orderBy('id', 'desc')->get();
return view('Config.BusinessunitConfig.index', ['businessunits' => $businessunits]);
}
/**
* 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)
{
$request->validate([
'business_unit_code' => 'required|min:2|max:32',
'business_unit' => 'required|min:2|max:32|regex:/^[a-z ,.\'-]+$/i',
'country' => 'required|min:2|max:35|regex:/^[a-z ,.\'-]+$/i',
'city' => 'required|min:2|max:35|regex:/^[a-z ,.\'-]+$/i',
'address_1' => 'required|min:2|max:35',
'business_unit_head' => 'required|min:2|max:32|regex:/^[a-z ,.\'-]+$/i',
]);
$businessunits = new BusinessUnit();
$businessunits->business_unit = $request->business_unit;
$businessunits->business_unit_code = $request->business_unit_code;
$businessunits->country = $request->country;
$businessunits->city = $request->city;
$businessunits->address_1 = $request->address_1;
$businessunits->business_unit_head = $request->business_unit_head;
$businessunits->save();
return response()->json($businessunits);
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$businessunits = BusinessUnit::findOrFail($id);
return response()->json($businessunits);
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$businessunits = BusinessUnit::findOrFail($id);
return response()->json($businessunits);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'business_unit_code' => 'required|min:2|max:32',
'business_unit' => 'required|min:2|max:32|regex:/^[a-z ,.\'-]+$/i',
'country' => 'required|min:2|max:35|regex:/^[a-z ,.\'-]+$/i',
'city' => 'required|min:2|max:35|regex:/^[a-z ,.\'-]+$/i',
'address_1' => 'required|min:2|max:35',
'business_unit_head' => 'required|min:2|max:32|regex:/^[a-z ,.\'-]+$/i',
]);
$businessunits = BusinessUnit::findOrFail($id);
$businessunits->business_unit = $request->business_unit;
$businessunits->business_unit_code = $request->business_unit_code;
$businessunits->country = $request->country;
$businessunits->city = $request->city;
$businessunits->address_1 = $request->address_1;
$businessunits->business_unit_head = $request->business_unit_head;
$businessunits->save();
return response()->json($businessunits);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$businessunits = BusinessUnit::findOrFail($id);
$businessunits->delete();
return response()->json($businessunits);
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class CertificationController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* 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)
{
$request->validate([
'course_name'=>'required',
'nameofInstitution' =>'required',
'nameofCertification'=>'required',
]);
$ceritificate = new Dependants([
'course_name' => $request->get('course_name'),
'nameofInstitution'=> $request->get('nameofInstitution'),
'nameofCertification'=> $request->get('nameofCertification'),
'dateofExpiration'=> $request->get('dateofExpiration'),
'trainingCertificate'=> $request->get('trainingCertificate'),
]);
$ceritificate->save();
return redirect('/employees/create')->with('success', 'Certificate has been added');
}
/**
* 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)
{
//
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class DepartmentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$departments=DB::table('departments')->get();
$businessunits = DB::table('branches')->get();
return view('Configurations.DepartmentConfig.index',compact(['departments','businessunits']));
}
/**
* 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)
{
$request->validate([
'department_name'=>'required',
'department_code'=>'required',
'department_head'=>'required',
'business_unit'=>'required',
'address_1'=>'required'
]);
DB::table('departments')
->insertGetId([
'department_name' => $request['department_name'],
'department_code' => $request['department_code'],
'city' => $request['city'],
'address_1' => $request['address_1'],
'department_head'=>$request['department_head'],
'business_unit'=>$request['business_unit'],
'created_at' => DB::raw('NOW()'),
]);
return redirect('/departments')->with('Success','Department added successfully');
}
/**
* 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)
{
$selectedBusinessunit = DB::table('departments')->select('business_unit')->where('id',$id)->get();
$department = DB::table('departments')->where('id', $id)->first();
$branches=DB::table('branches')->get();
return view('Configurations.DepartmentConfig.edit',compact(['branches','department','selectedBusinessunit']));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'department_name'=>'required',
'department_code'=>'required',
'department_head'=>'required',
'business_unit'=>'required',
'address_1'=>'required'
]);
DB::table('departments')
->where('id', $id)
->update([
'department_name' => $request['department_name'],
'department_code' => $request['department_code'],
// 'country' => $request['country'],
'city' => $request['city'],
'address_1' => $request['address_1'],
'department_head'=>$request['department_head'],
'business_unit'=>$request['business_unit'],
]);
return redirect('/departments')->with('Success','Department updated successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('departments')->where('id',$id)->exists()){
DB::table('departments')->where('id', $id)->delete();
return redirect('/departments')->with('success', 'Department has been deleted Successfully');
}else{
return redirect('/departments')->with('error', 'Department does not exist');
}
}
}
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Dependants;
class DependantController extends Controller
......@@ -14,7 +15,11 @@ class DependantController extends Controller
*/
public function index()
{
//
$departments = DB::table('departments')->get();
$businessunits = DB::table('business_units')->get();
$emergency = DB::table('emergency_contacts')->get();
$dependants = DB::table('dependants')->get();
return view('Employees.Registration', compact(['departments','businessunits','emergency','dependants']));
}
/**
......@@ -24,7 +29,8 @@ class DependantController extends Controller
*/
public function create()
{
//
$dependants = Dependants::latest()->paginate(5);
return response()->json($dependants);
}
/**
......@@ -35,6 +41,7 @@ class DependantController extends Controller
*/
public function store(Request $request)
{
$request->validate([
'name'=>'required',
'dateofBirth' =>'required',
......@@ -70,10 +77,18 @@ class DependantController extends Controller
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
public function edit(Request $request)
{
$dependant = Dependants::find($id);
return view('Employees.Registration', compact('dependant'));
/* $businessunits = DB::table('business_units')->get();
$departments = DB::table('departments')->get();
$emergency = DB::table('emergency_contacts')->get();
$dependants = DB::table('dependants')->get();
if($request->ajax()){
$dependant = Dependants::find($request->id);
return Response($dependant);
} */
/* $dependant = Dependants::find($id);
return view('Employees.Registration', compact(['dependants','businessunits','departments','emergency'])); */
}
/**
......@@ -85,7 +100,13 @@ class DependantController extends Controller
*/
public function update(Request $request, $id)
{
$request->validate([
$edit = Dependants::find($id)->update($request->all());
return response()->json($edit);
/* $request->validate([
'name'=>'required',
'dateofBirth' => 'required',
'relation'=>'required',
......@@ -95,9 +116,29 @@ class DependantController extends Controller
$dependant->name = $request->get('name');
$dependant->dateofBirth = $request->get('dateofBirth');
$dependant->relation = $request->get('relation');
$dependant_id =$request->id;
try {
$dependant->save();
$result = 0;
} catch (\Exception $e) {
$result = $e->errorInfo[1];
}
if ($result == 0) {
$notification = array(
'message' => 'Dependant Successfully Updated.',
'alert-type' => 'success'
);
return redirect('/employees/create'.$dependant_id)->with($notification);
} else {
$notification = array(
'message' => 'Something Error Found !, Please try again.',
'alert-type' => 'error'
);
return redirect('/employees/create'.$dependant_id)->with($notification);
} */
return redirect('/employees/create')->with('success', 'Dependant has been updated');
}
/**
......@@ -108,9 +149,14 @@ class DependantController extends Controller
*/
public function destroy($id)
{
$dependant = Dependants::find($id);
$dependant->delete();
return redirect('/employees/create')->with('success', 'Dependant has been deleted successfully');
}
}
......@@ -14,7 +14,11 @@ class EmergencyController extends Controller
*/
public function index()
{
$departments = DB::table('departments')->get();
$businessunits = DB::table('business_units')->get();
$emergency = DB::table('emergency_contacts')->get();
$dependants = DB::table('dependants')->get();
return view('Employees.Employeeinfo', compact(['departments','businessunits','emergency','dependants']));
}
/**
......@@ -35,9 +39,11 @@ class EmergencyController extends Controller
*/
public function store(Request $request)
{
$request->validate([
'name'=>'required',
'phone_no' =>'required|regex:/(07)[0-9]{8}/',
'phone_no' =>'required',
'email' =>'required',
'relation'=>'required',
]);
......
This diff is collapsed.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class EmploymentStatusController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$employment_status=DB::table('employment_status')->get();
return view('Configurations.EmploymentstatusConfig.index',compact('employment_status'));
}
/**
* 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)
{
$request->validate([
'employment_status_code'=>'required',
'employment_status'=>'required',
]);
DB::table('employment_status')
->insertGetId([
'employment_status_code' => $request['employment_status_code'],
'employment_status' => $request['employment_status'],
]);
return redirect('/status')->with('Success','Employment Status added successfully');
}
/**
* 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)
{
$employment_status = DB::table('employment_status')->where('id', $id)->first();
return view('Configurations.EmploymentstatusConfig.edit',compact('employment_status'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'employment_status_code'=>'required',
'employment_status'=>'required',
]);
DB::table('employment_status')
->where('id', $id)
->update([
'employment_status_code' => $request['employment_status_code'],
'employment_status' => $request['employment_status'],
]);
return redirect('/status')->with('Success','Employment Status updated successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('employment_status')->where('id',$id)->exists()){
DB::table('employment_status')->where('id', $id)->delete();
return redirect('/status')->with('success', 'Employment Status has been deleted Successfully');
}else{
return redirect('/status')->with('error', 'Employment Status does not exist');
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class JobTitleController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$jobtitles=DB::table('job_titles')->get();
$paycodes=DB::table('pay_frequencies')->get();
$rolecodes=DB::table('roles')->get();
return view('Configurations.JobtitleConfig.index',compact(['jobtitles','paycodes','rolecodes']));
}
/**
* 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)
{
$request->validate([
'job_title_code'=>'required',
'job_title'=>'required',
'rolecode'=>'required',
'job_paygrade_code'=>'required',
]);
DB::table('job_titles')
->insertGetId([
'job_title_code' => $request['job_title_code'],
'job_title' => $request['job_title'],
'role_code'=>$request['rolecode'],
'job_paygrade_code' => $request['job_paygrade_code'],
'description' => $request['description'],
'minimum_experience' => $request['minimum_experience'],
'created_at' => DB::raw('NOW()'),
]);
return redirect('/jobtitle')->with('Success','Job Title added successfully');
}
/**
* 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)
{
$jobtitles = DB::table('job_titles')->where('id', $id)->first();
$pay_codes=DB::table('pay_frequencies')->get();
$rolecodes=DB::table('roles')->get();
$selectedrole= DB::table('roles')->select('role_code')->where('id',$id)->get();
$selectedpaycode= DB::table('pay_frequencies')->select('payfrequency_code')->where('id',$id)->get();
return view('Configurations.JobtitleConfig.edit',compact(['jobtitles','rolecodes','pay_codes','selectedrole','selectedpaycode']));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'job_title_code'=>'required',
'job_title'=>'required',
'rolecode'=>'required',
'job_paygrade_code'=>'required',
]);
DB::table('job_titles')
->where('id', $id)
->update([
'job_title_code' => $request['job_title_code'],
'job_title' => $request['job_title'],
'role_code'=>$request['rolecode'],
'job_paygrade_code' => $request['job_paygrade_code'],
'description' => $request['description'],
'minimum_experience' => $request['minimum_experience'],
]);
return redirect('/jobtitle')->with('Success','Job Title updated successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('job_titles')->where('id',$id)->exists()){
DB::table('job_titles')->where('id', $id)->delete();
return redirect('/jobtitle')->with('success', 'Job title has been deleted Successfully');
}else{
return redirect('/jobtitle')->with('error', 'Job title does not exist');
}
}
}
......@@ -17,7 +17,7 @@ class PayfrequencyController extends Controller
$payFrequency = PayFrequency::all();
return view('Config.PayfrequencyConfig.index', compact('payFrequency'));
return view('Configurations.PayfrequencyConfig.index', compact('payFrequency'));
}
/**
......@@ -40,16 +40,16 @@ class PayfrequencyController extends Controller
{
$request->validate([
'payfrequency'=>'required',
'shortcode' =>'required',
'payfrequency_code' =>'required',
]);
$payFrequency = new PayFrequency([
'pay_frequency' => $request->get('payfrequency'),
'short_code'=> $request->get('shortcode'),
'payfrequency_code'=> $request->get('payfrequency_code'),
'description'=> $request->get('payfrequencyDescription')
]);
$payFrequency->save();
return redirect('/payfrequency')->with('success', 'Pay Frequency has been added');
return redirect('/payfrequency')->with('Success', 'Pay Frequency has been added');
}
/**
......@@ -72,8 +72,8 @@ class PayfrequencyController extends Controller
public function edit($id)
{
$payFrequency = PayFrequency::find($id);
return view('Config.PayfrequencyConfig.edit', compact('payFrequency'));
// dd($payFrequency);
return view('Configurations.PayfrequencyConfig.edit', compact('payFrequency'));
}
/**
......@@ -87,16 +87,16 @@ class PayfrequencyController extends Controller
{
$request->validate([
'payfrequency'=>'required',
'shortcode' => 'required',
'payfrequency_code' => 'required',
]);
$payFrequency = PayFrequency::find($id);
$payFrequency->pay_frequency = $request->get('payfrequency');
$payFrequency->short_code = $request->get('shortcode');
$payFrequency->payfrequency_code = $request->get('payfrequency_code');
$payFrequency->description = $request->get('payfrequencyDescription');
$payFrequency->save();
return redirect('/payfrequency')->with('success', 'Pay Frequency has been added');
return redirect('/payfrequency')->with('Success', 'Pay Frequency has been updated');
}
/**
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ReportingManagerController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$managers=DB::table('managers')->get();
$businessunits=DB::table('branches')->get();
$departments = DB::table('departments')->get();
$jobtitles = DB::table('job_titles')->get();
return view('Configurations.ReportingmangerConfig.index',compact(['managers','businessunits','departments','jobtitles']));
}
/**
* 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)
{
$request->validate([
'department'=>'required',
'business_unit'=>'required',
'name'=>'required',
]);
DB::table('managers')
->insertGetId([
'department' => $request['department'],
'business_unit' => $request['business_unit'],
'job_title_code'=> $request['jobtitle_code'],
'name' => $request['name'],
'created_at' => DB::raw('NOW()'),
]);
return redirect('/managers')->with('Success','Reporting Manager added successfully');
}
/**
* 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)
{
$manager = DB::table('managers')->where('id', $id)->first();
$jobtitles = DB::table('job_titles')->get();
$branches=DB::table('branches')->get();
$departments=DB::table('departments')->get();
$selectedjobtitle= DB::table('job_titles')->select('job_title_code')->where('id',$id)->get();
$selectedbranch= DB::table('branches')->select('business_unit')->where('id',$id)->get();
$selecteddepartment= DB::table('departments')->select('department_name')->where('id',$id)->get();
return view('Configurations.ReportingmangerConfig.edit',compact(['manager','jobtitles','branches','departments','selectedjobtitle','selectedbranch','selecteddepartment']));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'department'=>'required',
'business_unit'=>'required',
'name'=>'required',
]);
DB::table('managers')
->where('id', $id)
->update([
'department' => $request['department'],
'business_unit' => $request['business_unit'],
'job_title_code'=> $request['jobtitle_code'],
'name' => $request['name'],
]);
return redirect('/managers')->with('success', 'Reporting Manager has been updated Successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('managers')->where('id',$id)->exists()){
DB::table('managers')->where('id', $id)->delete();
return redirect('/managers')->with('success', 'Reporting Manager has been deleted Successfully');
}else{
return redirect('/managers')->with('error', 'Reporting Manager does not exist');
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class RolesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$roles=DB::table('roles')->get();
$status_codes=DB::table('employment_status')->get();
return view('Configurations.RolesConfig.index',compact(['roles','status_codes']));
}
/**
* 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)
{
$request->validate([
'role'=>'required',
'role_code'=>'required',
]);
DB::table('roles')
->insertGetId([
'role_code' => $request['role_code'],
'role' => $request['role'],
'employment_status_code' => $request['employmentstatus_code'],
'description' => $request['description'],
'created_at' => DB::raw('NOW()'),
]);
return redirect('/roles')->with('Success','Role added successfully');
}
/**
* 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)
{
$role= DB::table('roles')->where('id', $id)->first();
$status_codes=DB::table('employment_status')->get();
$selectedemploymentstatus_code= DB::table('employment_status')->select('employment_status_code')->where('id',$id)->get();
return view('Configurations.RolesConfig.edit',compact(['role','status_codes','selectedemploymentstatus_code']));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$request->validate([
'role'=>'required',
'role_code'=>'required',
]);
DB::table('roles')
->where('id', $id)
->update([
'role_code' => $request['role_code'],
'role' => $request['role'],
'employment_status_code' => $request['employmentstatus_code'],
'description' => $request['description'],
]);
return redirect('/roles')->with('Success','Role updated successfully');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if(DB::table('roles')->where('id',$id)->exists()){
DB::table('roles')->where('id', $id)->delete();
return redirect('/roles')->with('success', 'Role has been deleted Successfully');
}else{
return redirect('/roles')->with('error', 'Role does not exist');
}
}
}
......@@ -31,7 +31,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Imports extends Model
{
protected $fillable = ['country','citizenship'];
public static function getEmployees(){
$records = DB::table('countries')->select('country','citizenship')->orderBy('id', 'desc')->get()->toArray();
return $records;
}
}
......@@ -2,10 +2,10 @@
namespace App\Imports;
use App\Imports;
use App\Employees;
use Maatwebsite\Excel\Concerns\ToModel;
class Importables implements ToModel
class EmployeesImport implements ToModel
{
/**
* @param array $row
......@@ -14,9 +14,8 @@ class Importables implements ToModel
*/
public function model(array $row)
{
return new Imports([
'country' =>$row['0'],
'nationality'=>$row['1'],
return new Employees([
//
]);
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class JobTitle extends Model
{
//
}
......@@ -8,7 +8,7 @@ class PayFrequency extends Model
{
protected $fillable = [
'pay_frequency',
'short_code',
'payfrequency_code',
'description'
];
}
......@@ -36,6 +36,6 @@ class CreatePayslipsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('');
Schema::dropIfExists('payslips');
}
}
......@@ -16,8 +16,8 @@ class CreatePayFrequenciesTable extends Migration
Schema::create('pay_frequencies', function (Blueprint $table) {
$table->increments('id');
$table->string('pay_frequency',30);
$table->string('short_code',20);
$table->text('description',250);
$table->string('payfrequency_code',20);
$table->text('description',250)->nullable();
$table->timestamps();
});
}
......
......@@ -15,6 +15,7 @@ class CreateEmergencyContactsTable extends Migration
{
Schema::create('emergency_contacts', function (Blueprint $table) {
$table->increments('id');
$table->string('employee_id',30);
$table->string('name',30);
$table->integer('phone_no');
$table->string('email')->unique();
......
......@@ -15,6 +15,7 @@ class CreateDependantsTable extends Migration
{
Schema::create('dependants', function (Blueprint $table) {
$table->increments('id');
$table->string('employee_id',30);
$table->string('name',50);
$table->date('dateofBirth');
$table->string('relation',15);
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobTitlesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('job_titles', function (Blueprint $table) {
$table->increments('id');
$table->string('job_title_code',10);
$table->string('role_code',10);
$table->string('job_title');
$table->string('job_paygrade_code',10);
$table->string('description')->nullable();
$table->integer('minimum_experience');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('job_titles');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCertificatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('certificates', function (Blueprint $table) {
$table->increments('id');
$table->string('employee_id',30);
$table->string('courseName');
$table->string('nameofInstitution');
$table->string('certificationName');
$table->date('dateofIssuance');
$table->date('dateofExpiration')->nullable();
$table->string('certificateDocument');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('certificates');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Managers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('managers', function (Blueprint $table) {
$table->increments('id');
$table->string('business_unit');
$table->string('department');
$table->string('job_title_code',10);
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('managers');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class EmploymentStatus extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('employment_status', function (Blueprint $table) {
$table->increments('id');
$table->string('employment_status_code',10);
$table->string('employment_status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('employment_status');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Roles extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function (Blueprint $table) {
$table->increments('id');
$table->string('role_code',10);
$table->string('employment_status_code',10);
$table->string('role');
$table->string('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('roles');
}
}
......@@ -13,20 +13,14 @@ class CreateBusinessUnitsTable extends Migration
*/
public function up()
{
Schema::create('business_units', function(Blueprint $table){
Schema::create('business_units', function (Blueprint $table) {
$table->increments('id');
$table->string('business_unit', 255);
$table->string('business_unit_code', 50)->nullable();
$table->text('description')->nullable();
$table->date('start_date')->nullable();
$table->unsignedInteger('country')->nullable();
$table->unsignedInteger('county')->nullable();
$table->unsignedInteger('city')->nullable();
$table->string('country')->nullable();
$table->string('city')->nullable();
$table->text('address_1')->nullable();
$table->text('address_2')->nullable();
$table->text('address_3')->nullable();
$table->unsignedInteger('business_unit_head')->nullable();
$table->unsignedTinyInteger('service_desk_flags')->comment('1 = Buwise, 0 = Deptwise')->default(1)->nullable();
$table->string('business_unit_head');
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->tinyInteger('is_active')->default(1);
......
......@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDepartmentsTable extends Migration
class Departments extends Migration
{
/**
* Run the migrations.
......@@ -13,22 +13,17 @@ class CreateDepartmentsTable extends Migration
*/
public function up()
{
Schema::create('departments', function(Blueprint $table){
Schema::create('departments', function (Blueprint $table) {
$table->increments('id');
$table->string('department_name', 150);
$table->string('department_code', 20)->nullable();
$table->date('start_date')->nullable();
$table->unsignedInteger('country')->nullable();
$table->unsignedInteger('county')->nullable();
$table->unsignedInteger('city')->nullable();
$table->text('address_1'); #Mandatory
$table->text('address_2')->nullable();
$table->text('address_3')->nullable();
$table->unsignedInteger('department_head')->nullable();
$table->integer('business_unit')->nullable();
$table->unsignedInteger('created_by')->nullable();
$table->unsignedInteger('modified_by')->nullable();
$table->integer('is_active')->default(1);
$table->string('department_name', 255);
$table->string('department_code', 50)->nullable();
$table->string('city')->nullable();
$table->string('address_1')->nullable();
$table->text('department_head')->nullable();
$table->string('business_unit');
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->tinyInteger('is_active')->default(1);
$table->timestamps();
});
}
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Branches extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('branches', function (Blueprint $table) {
$table->increments('id');
$table->string('business_unit', 255);
$table->string('business_unit_code', 50)->nullable();
$table->string('country')->nullable();
$table->string('city')->nullable();
$table->text('address_1')->nullable();
$table->string('business_unit_head');
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->tinyInteger('is_active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('branches');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmployeesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('employees', function (Blueprint $table) {
$table->increments('id');
$table->string('employee_id');
$table->string('prefix')->nullable();
$table->string('first_name');
$table->string('last_name');
$table->string('middle_name')->nullable();
$table->string('email_address')->unique();
$table->string('gender');
$table->string('role')->nullable();
$table->string('business_unit')->nullable();
$table->string('department');
$table->string('job_title')->nullable();
$table->string('employment_status');
$table->date('date_of_joining');
$table->date('date_of_leaving')->nullable();
$table->integer('years_of_experience');
$table->integer('work_phone', 30)->nullable();
$table->integer('personal_phone', 30);
$table->integer('extension', 30)->nullable();
$table->string('kra_pin', 30);
$table->string('nssf_number', 30);
$table->string('nhif_number', 30);
$table->string('ifmis_number', 30)->nullable();
$table->string('reporting_manager')->nullable();
$table->string('duration')->nullable();
$table->string('profile_image')->nullable();
$table->string('password')->nullable();
$table->boolean('isAdmin')->nullable();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->integer('is_active')->default(1);
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('employees');
}
}
@import url(http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700);
.board{
margin: 60px auto;
height: 500px;
background: #fff;
/*box-shadow: 10px 10px #ccc,-10px 20px #ddd;*/
}
.board .nav-tabs {
position: relative;
/* border-bottom: 0; */
/* width: 80%; */
margin: 40px auto;
margin-bottom: 0;
box-sizing: border-box;
}
.board > div.board-inner{
background: #fafafa url(http://subtlepatterns.com/patterns/geometry2.png);
background-size: 30%;
}
p.narrow{
width: 60%;
margin: 10px auto;
}
.liner{
height: 2px;
background: #ddd;
position: absolute;
width: 80%;
margin: 0 auto;
left: 0;
right: 0;
top: 50%;
z-index: 1;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
color: #555555;
cursor: default;
/* background-color: #ffffff; */
border: 0;
border-bottom-color: transparent;
}
span.round-tabs{
width: 70px;
height: 70px;
line-height: 70px;
display: inline-block;
border-radius: 100px;
background: white;
z-index: 2;
position: absolute;
left: 0;
text-align: center;
font-size: 25px;
}
span.round-tabs.one{
color: rgb(34, 194, 34);border: 2px solid rgb(34, 194, 34);
}
li.active span.round-tabs.one{
background: #fff !important;
border: 2px solid #ddd;
color: rgb(34, 194, 34);
}
span.round-tabs.two{
color: #febe29;border: 2px solid #febe29;
}
li.active span.round-tabs.two{
background: #fff !important;
border: 2px solid #ddd;
color: #febe29;
}
span.round-tabs.three{
color: #3e5e9a;border: 2px solid #3e5e9a;
}
li.active span.round-tabs.three{
background: #fff !important;
border: 2px solid #ddd;
color: #3e5e9a;
}
span.round-tabs.four{
color: #f1685e;border: 2px solid #f1685e;
}
li.active span.round-tabs.four{
background: #fff !important;
border: 2px solid #ddd;
color: #f1685e;
}
span.round-tabs.five{
color: #999;border: 2px solid #999;
}
li.active span.round-tabs.five{
background: #fff !important;
border: 2px solid #ddd;
color: #999;
}
.nav-tabs > li.active > a span.round-tabs{
background: #fafafa;
}
.nav-tabs > li {
width: 20%;
}
/*li.active:before {
content: " ";
position: absolute;
left: 45%;
opacity:0;
margin: 0 auto;
bottom: -2px;
border: 10px solid transparent;
border-bottom-color: #fff;
z-index: 1;
transition:0.2s ease-in-out;
}*/
.nav-tabs > li:after {
content: " ";
position: absolute;
left: 45%;
opacity:0;
margin: 0 auto;
bottom: 0px;
border: 5px solid transparent;
border-bottom-color: #ddd;
transition:0.1s ease-in-out;
}
.nav-tabs > li.active:after {
content: " ";
position: absolute;
left: 45%;
opacity:1;
margin: 0 auto;
bottom: 0px;
border: 10px solid transparent;
border-bottom-color: #ddd;
}
.nav-tabs > li a{
width: 70px;
height: 70px;
margin: 20px auto;
border-radius: 100%;
padding: 0;
}
.nav-tabs > li a:hover{
background: transparent;
}
.tab-content{
}
.tab-pane{
position: relative;
padding-top: 50px;
}
.tab-content .head{
font-family: 'Roboto Condensed', sans-serif;
font-size: 25px;
text-transform: uppercase;
padding-bottom: 10px;
}
.btn-outline-rounded{
padding: 10px 40px;
margin: 20px 0;
border: 2px solid transparent;
border-radius: 25px;
}
.btn.green{
background-color:#5cb85c;
/*border: 2px solid #5cb85c;*/
color: #ffffff;
}
@media( max-width : 585px ){
.board {
width: 90%;
height:auto !important;
}
span.round-tabs {
font-size:16px;
width: 50px;
height: 50px;
line-height: 50px;
}
.tab-content .head{
font-size:20px;
}
.nav-tabs > li a {
width: 50px;
height: 50px;
line-height:50px;
}
.nav-tabs > li.active:after {
content: " ";
position: absolute;
left: 35%;
}
.btn-outline-rounded {
padding:12px 20px;
}
}
......@@ -114,15 +114,28 @@
});
// wizard
$(document).on('change', '.wizard', function (e, data) {
if(data.direction !== 'next' ) return;
var item = $(this).wizard('selectedItem');
var $step = $(this).find('.step-pane:eq(' + (item.step-1) + ')');
var validated = true;
var $nextText;
$(document).on('click', '[data-wizard]', function (e) {
var $this = $(this), href;
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, ''));
var option = $this.data('wizard');
var item = $target.wizard('selectedItem');
var $step = $target.next().find('.step-pane:eq(' + (item.step-1) + ')');
!$nextText && ($nextText = $('[data-wizard="next"]').html());
var validated = false;
$('[data-required="true"]', $step).each(function(){
return (validated = $(this).parsley( 'validate' ));
});
if(!validated) return e.preventDefault();
if($(this).hasClass('btn-next') && !validated){
return false;
}else{
$target.wizard(option);
var activeStep = (option=="next") ? (item.step+1) : (item.step-1);
var prev = ($(this).hasClass('btn-prev') && $(this)) || $(this).prev();
var next = ($(this).hasClass('btn-next') && $(this)) || $(this).next();
prev.attr('disabled', (activeStep == 1) ? true : false);
next.html((activeStep < $target.find('li').length) ? $nextText : next.data('last'));
}
});
// sortable
......@@ -221,6 +234,23 @@
'</a>';
setTimeout(function(){addMsg($msg);}, 1500);
// datatable
$('[data-ride="datatables"]').each(function() {
var oTable = $(this).dataTable( {
"bProcessing": true,
"sAjaxSource": "js/data/datatable.json",
"sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mData": "engine" },
{ "mData": "browser" },
{ "mData": "platform" },
{ "mData": "version" },
{ "mData": "grade" }
]
} );
});
// select2
if ($.fn.select2) {
$("#select2-option").select2();
......
This diff is collapsed.
$(document).ready(function () {
//Initialize tooltips
$('.nav-tabs > li a[title]').tooltip();
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
var $target = $(e.target);
if ($target.parent().hasClass('disabled')) {
return false;
}
});
$(".next-step").click(function (e) {
var $active = $('.board .nav-tabs li.active');
$active.next().removeClass('disabled');
nextTab($active);
});
$(".prev-step").click(function (e) {
var $active = $('.board .nav-tabs li.active');
prevTab($active);
});
});
function nextTab(elem) {
$(elem).next().find('a[data-toggle="tab"]').click();
}
function prevTab(elem) {
$(elem).prev().find('a[data-toggle="tab"]').click();
}
\ No newline at end of file
.toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#FFF}.toast-message a:hover{color:#CCC;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#FFF;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#FFF;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51A351}.toast-error{background-color:#BD362F}.toast-info{background-color:#2F96B4}.toast-warning{background-color:#F89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}}
\ No newline at end of file
!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("<div/>").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e("<div/>"),M=e("<div/>"),B=e("<div/>"),q=e("<div/>"),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.3",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});
//# sourceMappingURL=toastr.js.map
@extends('Layout.Employeesmaster')
@section('title', 'Employees')
@section('content')
<style>
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-inline;
margin-right: 10px;
}
</style>
<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><a href="/payfrequency">Pay Frequency</a></li>
<li class="active">Edit</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="card uper">
<div class="card-body">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div><br />
@endif
<form method="post" action="{{ route('payfrequency.update', $payFrequency->id) }}">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">Pay Frequency</label>
<input type="text" class="form-control" name="payfrequency" value={{ $payFrequency->pay_frequency }} />
</div>
<div class="form-group">
<label for="price">Short Code</label>
<input type="text" class="form-control" name="shortcode" value={{ $payFrequency->short_code }} />
</div>
<div class="form-group">
<label for="quantity">Description</label>
<input type="text" class="form-control" name="payfrequencyDescription" value={{ $payFrequency->description }} />
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
</div>
@endsection
\ No newline at end of file
@extends('Layout.Employeesmaster')
@section('title', 'Employees')
@section('content')
<style>
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-inline;
margin-right: 10px;
}
</style>
<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>Add Pay frequency</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">
@if(count($payFrequency) > 0)
<tr>
<th>Action</th>
<th>Pay Frequency</th>
<th>Short Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@foreach($payFrequency as $payfrequency)
<tr id="payfrequency-row-{{ $payfrequency->id }}">
<td>
<form action="{{ route('payfrequency.destroy', $payfrequency->id)}}" method="post" style=position:relative;float:right>
@csrf
@method('DELETE')
<a href="{{ route('payfrequency.edit',$payfrequency->id)}}" ><span class="btn btn-default"><i class="fa fa-edit no-margin"></i></span></a>
<button data-toggle="tooltip" data-placement="top" title="Delete" type="submit" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this item?');"><i class="fa fa-trash no-margin"></i></button>
</form>
</td>
<td>{{ $payfrequency->pay_frequency }}</td>
<td>{{ $payfrequency->short_code}}</td>
<td>{{ $payfrequency->description}}</td>
</tr>
@endforeach
@else
<tr>
<td colspan="2" class="text-center">Nothing to display</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<!-- Modal -->
@include('Modals/payFrequency')
@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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@extends('Layout.Employeesmaster')
@section('title', 'Employees')
@section('content')
<style>
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-inline;
margin-right: 10px;
}
</style>
<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><a href="/branches">Business Units</a></li>
<li class="active">Edit</li>
</ul>
@include('Layout.messages')
@include('Layout.errors')
<form method="post" action="{{ route('branches.update', $branches->id) }}">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">Business Unit Code</label>
<input type="text" class="form-control" name="business_unit_code" value={{ $branches->business_unit_code }} />
</div>
<div class="form-group">
<label for="name">Business Unit Name</label>
<input type="text" class="form-control" name="business_unit" value={{ $branches->business_unit }} />
</div>
<div class="form-group">
<label for="name">Country</label>
<input type="text" class="form-control" name="country" value={{ $branches->country }} />
</div>
<div class="form-group">
<label for="name">City</label>
<input type="text" class="form-control" name="city" value={{ $branches->city }} />
</div>
<div class="form-group">
<label for="name">Address</label>
<input type="text" class="form-control" name="address_1" value={{ $branches->address_1 }} />
</div>
<div class="form-group">
<label for="name">Department Head</label>
<input type="text" class="form-control" name="business_unit_head" value={{ $branches->business_unit_head }} />
</div>
<button type="submit" class="btn btn-primary">Update</button>
<a class="btn btn-default btn-close" href="{{ route('branches.index') }}">Cancel</a>
</form>
</section>
</section>
@endsection
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -72,9 +72,9 @@
@else
<a href="{{ route('login') }}">Login</a>
@if (Route::has('register'))
<!-- @if (Route::has('register'))
<a href="{{ route('register') }}">Register</a>
@endif
@endif -->
@endauth
</div>
@endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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