update login dashboard designed finished
This commit is contained in:
@@ -5,7 +5,7 @@ class HomeController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
@employees = Employee.all_emp_except_waiter.order("name asc")
|
@employees = Employee.all_emp_except_waiter.order("name asc")
|
||||||
@login_form = LoginForm.new()
|
@login_form = LoginForm.new()
|
||||||
render "layouts/login", layout: false
|
render "layouts/့login_dashboard", layout: false
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
174
app/views/layouts/့login_dashboard.html.erb
Normal file
174
app/views/layouts/့login_dashboard.html.erb
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
|
<title>SmartSales : Restaurant</title>
|
||||||
|
<%= csrf_meta_tags %>
|
||||||
|
<!-- Favicon-->
|
||||||
|
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||||
|
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||||
|
<%= stylesheet_link_tag 'login', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
|
||||||
|
<%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="theme-light-blue login_dashboard">
|
||||||
|
<!-- Page Loader -->
|
||||||
|
<div class="page-loader-wrapper">
|
||||||
|
<div class="loader">
|
||||||
|
<div class="preloader">
|
||||||
|
<div class="spinner-layer pl-red">
|
||||||
|
<div class="circle-clipper left">
|
||||||
|
<div class="circle"></div>
|
||||||
|
</div>
|
||||||
|
<div class="circle-clipper right">
|
||||||
|
<div class="circle"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Please wait...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- #END# Page Loader -->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<p class="dashboard_logo">
|
||||||
|
<img id="" src="/image/SX-logo.png" style="text-align: center;">
|
||||||
|
<br><small>Version - 1.0.1</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row clearfix">
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 p-t-20 p-l-10 p-r-10 p-b-50" style="background-color: #fff;">
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<span class="col-md-4"></span>
|
||||||
|
<input type="text" class="form-control col-md-4" id="emp_id" onkeypress="empID()" placeholder="Access PIN">
|
||||||
|
<span class="col-md-4"></span>
|
||||||
|
</div>
|
||||||
|
<p class="role-header">Supervisor <hr class="right m-t--10 m-b--13" style="width: 88%;"></p>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<% @employees.each do |employee| %>
|
||||||
|
<%if employee.role == "supervisour" %>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 empBtn" data-formid="#form_<%= employee.emp_id %>" >
|
||||||
|
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
|
||||||
|
</form>
|
||||||
|
<div class="card emp-body">
|
||||||
|
<div class="body bg-teal">
|
||||||
|
<%= employee.name%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="role-header">Cashier <hr class="right" style="margin-top:-10px !important;margin-bottom: :-13px !important;width: 88%;"></p>
|
||||||
|
<div class="row">
|
||||||
|
<% @employees.each do |employee| %>
|
||||||
|
<%if employee.role == "cashier" %>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 empBtn" data-formid="#form_<%= employee.emp_id %>" >
|
||||||
|
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
|
||||||
|
</form>
|
||||||
|
<div class="card emp-body">
|
||||||
|
<div class="body bg-teal">
|
||||||
|
<%= employee.name%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="role-header">Accountant <hr class="right" style="margin-top:-10px !important;margin-bottom: :-13px !important;width: 88%;"></p>
|
||||||
|
<div class="row">
|
||||||
|
<% @employees.each do |employee| %>
|
||||||
|
<%if employee.role == "account" %>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 empBtn" data-formid="#form_<%= employee.emp_id %>" >
|
||||||
|
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH">
|
||||||
|
</form>
|
||||||
|
<div class="card emp-body">
|
||||||
|
<div class="body bg-teal">
|
||||||
|
<%= employee.name%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
.login_dashboard{
|
||||||
|
background-color: #2790a5;
|
||||||
|
}
|
||||||
|
p.dashboard_logo {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
.dashboard_logo small{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.dashboard img{
|
||||||
|
|
||||||
|
}
|
||||||
|
p.role-header{
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
margin-top:30px;
|
||||||
|
}
|
||||||
|
.emp-body{
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
margin-top:5px !important;
|
||||||
|
}
|
||||||
|
.emp-body .body{
|
||||||
|
padding: 15px 5px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.empBtn{
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(document).on('turbolinks:load', function () {
|
||||||
|
$(".empBtn").click(function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
var item = $(this).data("formid");
|
||||||
|
$(item).submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function empID(){
|
||||||
|
$('#emp_id').keyup(function(e) {
|
||||||
|
var txtVal = this.value;
|
||||||
|
if ($.isNumeric(txtVal)) {
|
||||||
|
if( txtVal.length === 3 ) {
|
||||||
|
window.location.href = '/auth/'+txtVal;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alert("Please Enter Numeric Number")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user