Commit b904e5ed authored by Duncan Kishira's avatar Duncan Kishira

7th June, 20219

parent 0c5a7b14
<?php
namespace App;
class Constants{
const RESULTS_PER_PAGE = 30;
const APP_NAME = "Kinetic HCM";
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\EmergencyContact;
class EmergencyController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* 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([
'name'=>'required',
'phone_no' =>'required|regex:/(07)[0-9]{8}/',
'relation'=>'required',
]);
$emergency = new EmergencyContact([
'name' => $request->get('name'),
'phone_no'=> $request->get('phone_no'),
'email'=> $request->get('email'),
'relation'=> $request->get('relation'),
]);
$emergency->save();
return redirect('/employees/create')->with('success', 'Emergency Contact 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)
{
$request->validate([
'name'=>'required',
'phone_no' =>'required|regex:/(07)[0-9]{8}/',
'relation'=>'required',
]);
$emergency = EmergencyContact::find($id);
$emergency->name = $request->get('name');
$emergency->phone_no = $request->get('phone_no');
$emergency->email = $request->get('email');
$emergency->relation = $request->get('relation');
$emergency->save();
return redirect('/employees/add')->with('success', 'Emergency Contact has been updated');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$emergency = EmergencyContact::find($id);
$emergency->delete();
return redirect('/employees/create')->with('success', 'Emergency Contact has been deleted successfully');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class MenusController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
# Return all the menus and their children
return view('Menus.index');
}
public function create()
{
# Get the main modules
$main_modules = DB::table('main_modules')->get();
# Get the menus
$menu_items = DB::table('menu_items')
->select('menu_name', 'id', 'children', 'parent', 'url', 'module_id')
->orderBy('position', 'asc')
->get();
# Create a new menu
return view('Menus.create', compact('main_modules', 'menu_items'));
}
public function change_menu(Request $request){
$module_id = $request->module_id;
return cookie('module_id', $module_id, 1440);
}
public function store(Request $request)
{
$this->validate($request, [
'menu-name' => 'required',
'url' => 'required',
]);
# Create a new menu item
DB::table('menu_items')
->updateOrInsert(
[
'module_id' => $request['module-name'],
'menu_name' => $request['menu-name'],
'url' => $request['url'],
],
[
'module_id' => $request['module-name'],
'menu_name' => $request['menu-name'],
'url' => $request['url'],
'parent' => $request['parent'],
'help_text' => $request['help-text'],
'tool_tip' => $request['tool-tip'],
'position' => $request['position'],
'is_active' => $request['status'],
'children' => $request['children']
]
);
return redirect('/menus/create')->withErrors('Menu has been created');
}
/**
* 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)
{
//
}
}
......@@ -14,6 +14,10 @@ class ReportController extends Controller
$this->middleware('auth');
}
public function index(){
return view('Report.index');
}
public function payroll_report(){
$month = 1;
$year = 2019;
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class RolesAndPrivilegesController extends Controller
{
public function __construct(){
$this->middleware('auth');
}
public function index()
{
return view('RolesAndPrivileges.index');
}
public function create()
{
$user_groups = DB::table('main_user_groups')
->where('is_active', '=', 1)
->orderBy('level', 'asc')
->select('id', 'group_name', 'level')
->get();
$modules = DB::table('main_modules')
->orderBy('position', 'asc')
->select('id', 'module_name', 'position')
->get();
$menu_items = DB::table('menu_items')
->orderBy('position', 'asc')
->select('id', 'module_id', 'menu_name', 'parent', 'children')
->get();
return view('RolesAndPrivileges.create', compact(['user_groups', 'modules', 'menu_items']));
}
public function savePrivileges(Request $request)
{
try{
DB::BeginTransaction();
$createPrivileges = substr($request->create, 0, -1);
$viewPrivileges = substr($request->view, 0, -1);
$editPrivileges = substr($request->edit, 0, -1);
$deletePrivileges = substr($request->delete, 0, -1);
$createPrivileges_ = substr($request->create_, 0, -1);
$viewPrivileges_ = substr($request->view_, 0, -1);
$editPrivileges_ = substr($request->edit_, 0, -1);
$deletePrivileges_ = substr($request->delete_, 0, -1);
$role_name = $request->roleName;
$role_type = $request->roleType;
$role_description = $request->roleDescription;
$group_id = $request->groupId;
$createPrivileges = explode(',', $createPrivileges);
$viewPrivileges = explode(',', $viewPrivileges);
$editPrivileges = explode(',', $editPrivileges);
$deletePrivileges = explode(',', $deletePrivileges);
# Save the role and retrieve the Role ID
$role_id = DB::table('roles')
->insertGetId([
'role_name' => $role_name,
'role_type' => $role_type,
'role_description' => $role_description,
'user_group' => $group_id
]);
# Save the data
# All modules
# 1. Create privileges
foreach ($createPrivileges_ as $createPrivilege_){
$arr_ = explode(':', $createPrivilege_);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 0,
'create_permission' => $arr_[1]
],
[
'create_permission' => $arr_[1]
]
);
}
# 2. View privileges
foreach ($viewPrivileges_ as $viewPrivilege_){
$arr_ = explode(':', $viewPrivilege_);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 0,
'view_permission' => $arr_[1]
],
[
'view_permission' => $arr_[1]
]
);
}
# 3. Edit privileges
foreach ($editPrivileges_ as $editPrivilege_){
$arr_ = explode(':', $editPrivilege_);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 0,
'edit_permission' => $arr_[1]
],
[
'edit_permission' => $arr_[1]
]
);
}
# 4. Delete privileges
foreach ($deletePrivileges_ as $deletePrivilege_){
$arr_ = explode(':', $deletePrivilege_);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 0,
'delete_permission' => $arr_[1]
],
[
'delete_permission' => $arr_[1]
]
);
}
# All menus and sub-menus
# 1. Create privileges
foreach ($createPrivileges as $createPrivilege){
$arr_ = explode(':', $createPrivilege);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 1,
'create_permission' => $arr_[1]
],
[
'create_permission' => $arr_[1]
]
);
}
# 2. View privileges
foreach ($viewPrivileges as $viewPrivilege){
$arr_ = explode(':', $viewPrivilege);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 1,
'view_permission' => $arr_[1]
],
[
'view_permission' => $arr_[1]
]
);
}
# 3. Edit privileges
foreach ($editPrivileges as $editPrivilege){
$arr_ = explode(':', $editPrivilege);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 1,
'edit_permission' => $arr_[1]
],
[
'edit_permission' => $arr_[1]
]
);
}
# 4. Delete privileges
foreach ($deletePrivileges as $deletePrivilege){
$arr_ = explode(':', $deletePrivilege);
DB::table('main_privileges')
->updateOrInsert(
[
'role' => $role_id,
'user_group' => $group_id,
'item' => $arr_[0],
'item_type' => 1,
'delete_permission' => $arr_[1]
],
[
'delete_permission' => $arr_[1]
]
);
}
DB::commit();
return response("Success");
}catch(\Exception $e){
DB::rollBack();
return $e;
}
}
public function show($id)
{
//
}
public function edit($id)
{
//
}
public function update(Request $request, $id)
{
//
}
public function destroy($id)
{
//
}
}
<?php
use Illuminate\Support\Facades\DB;
# Helpers (Accessible globally)
# We use a 'h_' prefix to avoid collisions with other functions that might have similar names
function h_get_user_payslip($user_id, $month, $year, $item_name){
$user_payslip = DB::table('payslips')
->where([
['user_id', $user_id],
['month', $month],
['year', $year],
['item_name', $item_name]
])
->select('item_amount')
->get();
$re = "--";
foreach($user_payslip as $up){
$re = $up->item_amount;
}
return $re;
}
function h_get_main_modules(){
# Get the current module
# Get the current controller
$routeArray = url()->current();
$controller = explode('/', $routeArray);
$controller = $controller[3];
# Create a search string
$url = '/'.$controller;
$query = DB::table('menu_items')
->where('url', '=', $url)
->first();
if (count($query) > 0){
$active_module = $query->module_id;
$main_modules = DB::table('main_modules')
->orderBy('position', 'asc')
->get();
$module_list = '';
foreach($main_modules as $main_module) {
if($main_module->id == $active_module){
$module_list .= "<li class='active'><a class='module-shifter' href='#'>$main_module->module_name</a></li>";
}else{
$module_list .= "<li><a class='module-shifter' href='$main_module->module_url'>$main_module->module_name</a></li>";
}
}
}else{
$main_modules = DB::table('main_modules')
->orderBy('position', 'asc')
->get();
$module_list = '';
foreach($main_modules as $main_module) {
$module_list .= "<li><a class='module-shifter' href='$main_module->module_url'>$main_module->module_name</a></li>";
}
}
return $module_list;
}
function h_load_main_menu(){
# Get the current controller
$routeArray = url()->current();
$controller = explode('/', $routeArray);
$controller = $controller[3];
# Create a search string
$url = '/'.$controller;
# Run a search in the menu items table to get the active menu
# If an active menu (exact match) is not found, assume then query the main modules table
# If an active module is not found, throw a 404
$query = DB::table('menu_items')
->where('url', '=', $url)
->first();
$module = [];
if (count($query) > 0){
# Get the active menu ID
$module['table'] = 'main_menu'; # Table where the active menu was found
$module['id'] = $query->id;
$module['module_id'] = $query->module_id;
$module['children'] = $query->children;
}else{
# Check the main modules table
$query = DB::table('main_modules')
->where('module_url', '=', $url)
->first();
if (count($query)){
# Get the active module ID
$module['table'] = 'main_module'; # Table where the active menu was found
$module['id'] = 0;
$module['module_id'] = $query->id;
}else{
return false;
}
}
# Start building the menu tree
# Start by getting all the menus required for this model, menus with no parents only
$main_menus = DB::table('menu_items')
->where([
['module_id', '=', $module['module_id']],
['parent', '=', 0]
])
->orderBy('position', 'asc')
->get();
$menu_tree = '';
if (count($main_menus) > 0){
foreach($main_menus as $main_menu){
# Open the list item
# Check if the menu item is active
if ($main_menu->children != ''){
$menu_children = explode(',', $main_menu->children);
$menu_tree .= (in_array($module['id'], $menu_children))?"<li class='active'>":"<li>";
}else{
$menu_tree .= ($main_menu->id == $module['id'])?"<li class='active'>":"<li>";
}
# Check if the menu item has children
if ($main_menu->children != ''){
$menu_tree .= "<a href='#'>";
$menu_tree .= "<i class='fa fa-angle-down text'></i>";
$menu_tree .= "<i class='fa fa-angle-up text-active'></i>";
$menu_tree .= "<span>$main_menu->menu_name</span>";
$menu_tree .= "</a>";
# Create list of children
$menu_tree .= "<ul class='nav bg'>";
$menu_children = explode(',', $main_menu->children);
$menu_children = DB::table('menu_items')
->whereIn('id', $menu_children)
->orderBy('position', 'asc')
->get();
foreach($menu_children as $menu_child){
$menu_tree .= ($menu_child->id == $module['id'])?"<li class='active'>":"<li>";
$menu_tree .= "<a href='$menu_child->url'>";
$menu_tree .= "<i class='fa fa-angle-right'></i>";
$menu_tree .= "<span>$menu_child->menu_name</span>";
$menu_tree .= "</a>";
$menu_tree .= "</li>";
}
$menu_tree .= "</ul>";
$menu_tree .= "</li>";
}else{
$menu_tree .= "<a href='$main_menu->url'>";
$menu_tree .= "<i class='fa fa-angle-right'></i>";
$menu_tree .= "<span>$main_menu->menu_name</span>";
$menu_tree .= "</a>";
$menu_tree .= "</li>";
}
}
}
return $menu_tree;
}
\ No newline at end of file
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MenuItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu_items', function(Blueprint $table){
$table->increments('id');
$table->string('module_id')->nullable();
$table->string('menu_name');
$table->string('url')->nullable();
$table->string('help_text')->nullable();
$table->string('tool_tip')->nullable();
$table->unsignedInteger('parent')->nullable();
$table->unsignedInteger('position')->nullable();
$table->string('children')->nullable();
$table->unsignedInteger('is_active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('menu_items');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMainModulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('main_modules', function (Blueprint $table) {
$table->increments('id');
$table->string('module_name');
$table->string('module_url');
$table->unsignedInteger('position');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('main_modules');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UserGroups extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_groups', function(Blueprint $table){
$table->increments('id');
$table->string('group_name');
$table->string('description')->nullable();
$table->unsignedInteger('level');
$table->unsignedInteger('created_by')->nullable();
$table->unsignedInteger('modified_by')->nullable();
$table->integer('is_active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_groups');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMainPrivilegesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('main_privileges', function (Blueprint $table) {
$table->increments('id');
$table->integer('role');
$table->integer('user_group');
$table->integer('item');
$table->integer('item_type')->nullable();
$table->integer('is_active')->nullable();
$table->string('create_privilege');
$table->string('view_privilege');
$table->string('edit_privilege');
$table->string('delete_privilege');
$table->string('upload_attachments')->nullable();
$table->string('view_attachments')->nullable();
$table->string('created_by')->nullable();
$table->string('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('main_privileges');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMainRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('main_roles', function (Blueprint $table) {
$table->increments('id');
$table->string('role_name');
$table->string('role_type')->nullable();
$table->string('role_description')->nullable();
$table->unsignedInteger('group_id');
$table->unsignedInteger('level');
$table->unsignedInteger('created_by')->nullable();
$table->unsignedInteger('modified_by')->nullable();
$table->unsignedInteger('is_active')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('main_roles');
}
}
This diff is collapsed.
......@@ -15,6 +15,8 @@
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"less": "^3.9.0",
"less-loader": "^5.0.0",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"vue": "^2.5.7"
......
This diff is collapsed.
This diff is collapsed.
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/*!
* Bootstrap-select v1.7.5 (http://silviomoreto.github.io/bootstrap-select)
*
* Copyright 2013-2015 bootstrap-select
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
*/.bootstrap-select{width:220px \0}.bootstrap-select>.dropdown-toggle{width:100%;padding-right:25px}.error .bootstrap-select .dropdown-toggle,.has-error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .dropdown-toggle:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.form-control.input-group-btn{z-index:auto}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row .bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-group .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group{margin-bottom:0}.form-group-lg .bootstrap-select.btn-group.form-control,.form-group-sm .bootstrap-select.btn-group.form-control{padding:0}.form-inline .bootstrap-select.btn-group .form-control{width:100%}.bootstrap-select.btn-group.disabled,.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group.disabled:focus,.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group.bs-container{position:absolute}.bootstrap-select.btn-group.bs-container .dropdown-menu{z-index:1060}.bootstrap-select.btn-group .dropdown-toggle .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .dropdown-toggle .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-] .dropdown-toggle{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;float:none;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li.active small{color:#fff}.bootstrap-select.btn-group .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li a{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bootstrap-select.btn-group .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px;white-space:nowrap}.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option{position:static}.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle{z-index:1061}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid rgba(204,204,204,.2);border-bottom:0}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before{display:block}.bs-actionsbox,.bs-donebutton,.bs-searchbox{padding:4px 8px}.bs-actionsbox{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-donebutton{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-donebutton .btn-group button{width:100%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox .form-control{margin-bottom:0;width:100%;float:none}select.bs-select-hidden,select.selectpicker{display:none!important}select.mobile-device{position:absolute!important;top:0;left:0;display:block!important;width:100%;height:100%!important;opacity:0}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"/js/app.js": "/js/app.js",
"/css/lcss.css": "/css/lcss.css",
"/css/scss.css": "/css/scss.css",
"/css/app.css": "/css/app.css"
}
......@@ -5,9 +5,9 @@
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
/*require('./bootstrap');
window.Vue = require('vue');
window.Vue = require('vue');*/
/**
* Next, we will create a fresh Vue application instance and attach it to
......@@ -15,8 +15,11 @@ window.Vue = require('vue');
* or customize the JavaScript scaffolding to fit your unique needs.
*/
Vue.component('example-component', require('./components/ExampleComponent.vue'));
/*Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: '#app'
});
el: '#app',
data: {
allowance_type: 'Housing allowance'
}
});*/
window._ = require('lodash');
window.Popper = require('popper.js').default;
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
......@@ -11,7 +10,7 @@ window.Popper = require('popper.js').default;
try {
window.$ = window.jQuery = require('jquery');
require('bootstrap');
require('bootstrap-sass');
} catch (e) {}
/**
......@@ -50,7 +49,5 @@ if (token) {
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// encrypted: true
// key: 'your-pusher-key'
// });
.arrow {
border-width: @arrow-outer-width;
z-index: 10;
&,
&:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
&:after{
border-width: @arrow-width;
content: "";
}
&.top {
left: 50%;
margin-left: -@arrow-outer-width;
border-top-width: 0;
border-bottom-color: @arrow-outer-fallback-color; // IE8 fallback
border-bottom-color: @arrow-outer-color;
top: -@arrow-outer-width;
&:after {
content: " ";
top: 1px;
margin-left: -@arrow-width;
border-top-width: 0;
border-bottom-color: @arrow-color;
}
}
&.right {
top: 50%;
right: -@arrow-outer-width;
margin-top: -@arrow-outer-width;
border-right-width: 0;
border-left-color: @arrow-outer-fallback-color; // IE8 fallback
border-left-color: @arrow-outer-color;
&:after {
content: " ";
right: 1px;
border-right-width: 0;
border-left-color: @arrow-color;
bottom: -@arrow-width;
}
}
&.bottom {
left: 50%;
margin-left: -@arrow-outer-width;
border-bottom-width: 0;
border-top-color: @arrow-outer-fallback-color; // IE8 fallback
border-top-color: @arrow-outer-color;
bottom: -@arrow-outer-width;
&:after {
content: " ";
bottom: 1px;
margin-left: -@arrow-width;
border-bottom-width: 0;
border-top-color: @arrow-color;
}
}
&.left {
top: 50%;
left: -@arrow-outer-width;
margin-top: -@arrow-outer-width;
border-left-width: 0;
border-right-color: @arrow-outer-fallback-color; // IE8 fallback
border-right-color: @arrow-outer-color;
&:after {
content: " ";
left: 1px;
border-left-width: 0;
border-right-color: @arrow-color;
bottom: -@arrow-width;
}
}
}
\ No newline at end of file
This diff is collapsed.
.btn-link{
color: @text-color;
&.active{
webkit-box-shadow:none;
box-shadow:none;
}
}
.btn-default{
.button-variant(@btn-default-color, @btn-default-bg, @btn-default-border);
border-bottom-color: #ccc;
.box-shadow(0 1px 1px rgba(90,90,90,0.1));
&.btn-bg{
border-color:rgba(0,0,0,0.1);
background-clip: padding-box;
}
}
.btn-primary{
.button-variant(@btn-primary-color, @btn-primary-bg, @btn-primary-border);
}
.btn-success{
.button-variant(@btn-success-color, @btn-success-bg, @btn-success-border);
}
.btn-info{
.button-variant(@btn-info-color, @btn-info-bg, @btn-info-border);
}
.btn-warning{
.button-variant(@btn-warning-color, @btn-warning-bg, @btn-warning-border);
}
.btn-danger{
.button-variant(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
}
.btn-dark{
.button-variant(@btn-dark-color, @btn-dark-bg, @btn-dark-border);
}
.btn-twitter{
.button-variant(@btn-twitter-color, @btn-twitter-bg, @btn-twitter-border);
}
.btn-facebook{
.button-variant(@btn-facebook-color, @btn-facebook-bg, @btn-facebook-border);
}
.btn-gplus{
.button-variant(@btn-gplus-color, @btn-gplus-bg, @btn-gplus-border);
}
.btn{
font-weight: 500;
border-radius: @border-radius-base;
}
.btn-icon{
padding-left: 0;
padding-right: 0;
width:34px;
text-align: center;
&.btn-sm{
width: 30px;
}
&.btn-lg{
width: 45px;
}
}
.text-active, .active > .text{display: none !important;}
.active > .text-active{display: inline-block !important;}
.btn-group-justified{border-collapse: separate;}
.btn-rounded{border-radius: 50px}
.btn > i{
&.pull-left,
&.pull-right{
line-height: 1.428571429;
}
}
.btn-block {
padding-left: 12px;
padding-right: 12px;
}
.btn-group-vertical > .btn:first-child:not(:last-child){
border-top-right-radius: @border-radius-base;
}
.btn-group-vertical > .btn:last-child:not(:first-child){
border-bottom-left-radius: @border-radius-base;
}
\ No newline at end of file
.bg-gradient{
#gradient > .vertical(rgba(40,50,60,0), rgba(40,50,60,0.05), 0, 100%);
filter:none;
}
.bg-light {
.color-variant(@brand-light, 2.5%, 5%, 2.5%, 5%);
color: @text-color;
}
.bg-dark {
.color-variant(@brand-dark, 5%, 10%, 5%, 10%);
.font-variant(@brand-dark, 45%, 50%, #fff);
}
.bg-black {
.color-variant(@brand-black, 5%, 10%, 5%, 10%);
.font-variant(@brand-black, 45%, 50%, #fff);
}
.bg-primary {
.color-variant(@brand-primary, 5%, 10%, 5%, 10%);
.font-variant(@brand-primary, 35%, 50%, #fff);
}
.bg-success {
.color-variant(@brand-success, 5%, 10%, 5%, 10%);
.font-variant(@brand-success, 35%, 50%, #fff);
}
.bg-info {
.color-variant(@brand-info, 5%, 10%, 5%, 10%);
.font-variant(@brand-info, 35%, 50%, #fff);
}
.bg-warning {
.color-variant(@brand-warning, 5%, 10%, 5%, 10%);
.font-variant(@brand-warning, 35%, 50%, #fff);
}
.bg-danger {
.color-variant(@brand-danger, 5%, 10%, 5%, 10%);
.font-variant(@brand-danger, 35%, 50%, #fff);
}
.bg-white {
background-color: #fff;
color: @text-color;
a {
color: @link-color;
&:hover{
color: darken(@link-color, 10%);
}
}
.text-muted{color: @text-muted !important;}
}
.bg-white-only{background-color:#fff;}
.bg-empty{background-color: transparent;}
\ No newline at end of file
This diff is collapsed.
// Core variables and mixins
@import "app.variables.less";
@import "app.mixins.less";
@import "app.reset.less";
@import "app.layout.less";
@import "app.nav.less";
@import "app.arrow.less";
@import "app.buttons.less";
@import "app.widgets.less";
@import "app.switch.less";
@import "app.plugin.less";
@import "app.colors.less";
@import "app.utilities.less";
@import "app.atlancis.less";
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
.nav-docs{
> ul > li > a{
padding-top: 5px!important;
padding-bottom: 5px!important;
}
}
.dropfile{border:2px dashed #e0e4e8;text-align: center;min-height: 20px}
.dropfile.hover{border-color: #aac3cc}
.dropfile small{margin: 50px 0;display: block}
.portlet{min-height: 30px;}
/*Charts*/
.jqstooltip{
.contentBox();
}
.easypiechart {position: relative;text-align: center;}
.easypiechart .h2{
margin-left:10px;
margin-top:10px;
display:inline-block;
}
.easypiechart canvas {position: absolute;top: 0;left: 0;}
.easypiechart .easypie-text{position: absolute;z-index:1;line-height: 1;font-size: 75%;width: 100%;top: 60%}
.easypiechart img{margin-top: -4px}
.combodate select{display: inline-block;}
.doc-buttons .btn{margin-bottom: 5px}
.the-icons{list-style: none;}
.fontawesome-icon-list i{font-size: 14px;width:40px;margin:0;display: inline-block;text-align: center;}
.fontawesome-icon-list a{line-height: 32px;display: block; white-space: nowrap;}
.fontawesome-icon-list a:hover i{font-size:28px;vertical-align:middle}
.th-sortable{cursor: pointer;}
.th-sortable .th-sort{float: right;position: relative;}
.th-sort i{position:relative;z-index: 1}
.th-sort .fa-sort{position: absolute;left: 0;top: 3px;color: #bac3cc;z-index: 0}
.th-sortable.active .text{display: none !important}
.th-sortable.active .text-active{display: inline-block !important}
// sortable
.sortable-placeholder{list-style: none;border: 1px dashed #CCC;min-height: 50px;margin-bottom: 5px}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
/*parsely*/
.parsley-error-list{margin:0;padding: 0;list-style: none;margin-top: 6px;font-size: 12px}
.parsley-error{border-color: #ff5f5f !important}
//
.datepicker td.active,
.datepicker td.active:hover,
.datepicker td.active:hover.active,
.datepicker td.active.active
{
background: @brand-primary;
}
.wizard .badge-info {
background-color: @brand-info;
}
.wizard .badge-success {
background-color: @brand-success;
}
.wizard ul li.active{
color: @brand-info;
}
#flotTip {
padding: 3px 5px;
background-color: #000;
z-index: 100;
color: #fff;
opacity: .7;
filter: alpha(opacity=70);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
\ No newline at end of file
This diff is collapsed.
.switch{
cursor: pointer;
position: relative;
input{
position: absolute;
.opacity(0);
&:checked{
+ span{
background-color: @brand-success;
&:after{
left: 31px;
}
}
}
}
span{
position: relative;
width: 60px;
height: 30px;
border-radius: 30px;
background-color: #fff;
border:1px solid #eee;
border-color:rgba(0,0,0,0.1);
display: inline-block;
.transition(background-color 0.2s);
&:after{
content: "";
position: absolute;
background-color: #fff;
width: 26px;
top: 1px;
bottom: 1px;
border-radius: 30px;
.box-shadow(1px 1px 3px rgba(0, 0, 0, 0.25));
.transition(left 0.2s);
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
set_time_limit(0);
require_once("lessc.inc.php");
$input = $_SERVER['REQUEST_URI'];
// see if it from direct request
if(strpos($input, '?')){
$q = explode("?", $input);
$input = $q[1];
}
$lc = new lessc($input);
try{
if($input == "app.less"){
$fp = fopen('../css/app.css',"wb");
fwrite($fp, $lc->parse());
fclose($fp);
}else{
header("Content-Type: text/css");
echo $lc->parse();
}
} catch (exception $ex){
echo "LESSC Error:";
echo $ex->getMessage();
}
?>
\ No newline at end of file
This diff is collapsed.
open the app.variables.less to change the variables
http://localhost/app/less/less.php?app.less
use the compiled css to replace the css/app.css
\ No newline at end of file
This diff is collapsed.
// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
// Variables
@import 'variables';
@import "variables";
// Bootstrap
@import '~bootstrap/scss/bootstrap';
.navbar-laravel {
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
//@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
......@@ -61,13 +61,13 @@
</div>
</div>
</div>
<div class="pull-right" style="margin:5px 10px 0 0;">
<div class="pull-right atl-margin-right">
<a href="{{ route('employees.create') }}" class="btn btn-info btn-sm"><i class="fa fa-plus"></i>Create</a>
<a href="{{ route('employees.index') }}" class="btn btn-info btn-sm"><i class="fa fa-refresh"></i>Refresh</a>
</div>
</div>
<div class="row" style="overflow-x:auto;">
<table class="table table-striped m-b-sm">
<table class="table atl-table m-b-sm">
<thead>
<tr>
<th class="sortable">Action</th>
......
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