Commit 25a55be0 by rizky

change password

parent 83ced364
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7,6 +7,9 @@ use Illuminate\Http\Request; ...@@ -7,6 +7,9 @@ use Illuminate\Http\Request;
use Sentinel; use Sentinel;
use App\User; use App\User;
use DB; use DB;
use Hash;
use Validator;
class CustomerController extends Controller class CustomerController extends Controller
...@@ -23,11 +26,6 @@ class CustomerController extends Controller ...@@ -23,11 +26,6 @@ class CustomerController extends Controller
public function feedbackIndex() public function feedbackIndex()
{ {
// $id = Sentinel::getUser()->id;
// $users = DB::table('users')->where('id', $id)->first();
// $id = $users->id;
// $this->data['users'] = User::find($id);
$feedbacks = Feedback::all(); $feedbacks = Feedback::all();
return view('customers.feedback', compact('feedbacks')); return view('customers.feedback', compact('feedbacks'));
} }
...@@ -43,4 +41,44 @@ class CustomerController extends Controller ...@@ -43,4 +41,44 @@ class CustomerController extends Controller
return redirect()-> back()->with('alert-success', 'Terima kasih atas partisipasi anda untuk memberikan feedback kepada kami'); return redirect()-> back()->with('alert-success', 'Terima kasih atas partisipasi anda untuk memberikan feedback kepada kami');
} }
public function changePassword()
{
return view('customers.profile.changepassword');
}
public function changePasswordPost()
{
// custom validator
Validator::extend('password', function ($attribute, $value, $parameters, $validator) {
return Hash::check($value, \Sentinel::getUser()->password);
});
// message for custom validation
$messages = [
'password' => 'Invalid current password.',
];
// validate form
$validator = Validator::make(request()->all(), [
'current_password' => 'required|password',
'password' => 'required|min:6|confirmed',
'password_confirmation' => 'required',
], $messages);
// if validation fails
if ($validator->fails()) {
return redirect()->back()->withErrors($validator->errors());
}
// update password
$user = User::find(Sentinel::getUser()->id);
$user->password = bcrypt(request('password'));
$user->save();
return redirect()->back()->with('alert-success', 'Password telah diperbaharui.');
}
} }
\ No newline at end of file
...@@ -4,6 +4,10 @@ namespace App\Http\Controllers; ...@@ -4,6 +4,10 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use DB; use DB;
use App\User;
use Sentinel;
use Validator;
use Hash;
class ManagerController extends Controller class ManagerController extends Controller
{ {
...@@ -30,5 +34,42 @@ class ManagerController extends Controller ...@@ -30,5 +34,42 @@ class ManagerController extends Controller
return view('managers.daftar_feedback', compact('feedbacks')); return view('managers.daftar_feedback', compact('feedbacks'));
} }
public function changePassword()
{
return view('managers.profile.changepassword');
}
public function changePasswordPost()
{
// custom validator
Validator::extend('password', function ($attribute, $value, $parameters, $validator) {
return Hash::check($value, \Sentinel::getUser()->password);
});
// message for custom validation
$messages = [
'password' => 'Invalid current password.',
];
// validate form
$validator = Validator::make(request()->all(), [
'current_password' => 'required|password',
'password' => 'required|min:6|confirmed',
'password_confirmation' => 'required',
], $messages);
// if validation fails
if ($validator->fails()) {
return redirect()->back()->withErrors($validator->errors());
}
// update password
$user = User::find(Sentinel::getUser()->id);
$user->password = bcrypt(request('password'));
$user->save();
return redirect()->back()->with('alert-success', 'Password telah diperbaharui.');
}
} }
...@@ -6,6 +6,9 @@ use Illuminate\Http\Request; ...@@ -6,6 +6,9 @@ use Illuminate\Http\Request;
use Sentinel; use Sentinel;
use DB; use DB;
use App\Pengunjung; use App\Pengunjung;
use App\User;
use Hash;
use Validator;
class StaffController extends Controller class StaffController extends Controller
{ {
...@@ -41,14 +44,43 @@ class StaffController extends Controller ...@@ -41,14 +44,43 @@ class StaffController extends Controller
} }
public function changePassword()
{
return view('staffs.profile.changepassword');
}
public function changePasswordPost()
{
// custom validator
Validator::extend('password', function ($attribute, $value, $parameters, $validator) {
return Hash::check($value, \Sentinel::getUser()->password);
});
// message for custom validation
$messages = [
'password' => 'Invalid current password.',
];
// public function viewmember() // validate form
// { $validator = Validator::make(request()->all(), [
// $customers = Sentinel::findRoleBySlug('customer'); 'current_password' => 'required|password',
// $customers = DB::table('users')->orderby( 'password' => 'required|min:6|confirmed',
// 'id','desc')->get(); 'password_confirmation' => 'required',
// return view('staffs.daftar_member');
// }
], $messages);
// if validation fails
if ($validator->fails()) {
return redirect()->back()->withErrors($validator->errors());
}
// update password
$user = User::find(Sentinel::getUser()->id);
$user->password = bcrypt(request('password'));
$user->save();
return redirect()->back()->with('alert-success', 'Password telah diperbaharui.');
}
} }
...@@ -84,12 +84,6 @@ class TicketController extends Controller ...@@ -84,12 +84,6 @@ class TicketController extends Controller
Then, upload it in Data Pemesanan '); Then, upload it in Data Pemesanan ');
} }
public function destroyorder($id)
{
$orders = Order::findOrFail($id);
$orders->delete();
return redirect()->back();
}
public function lunas($id){ public function lunas($id){
DB::table('orders')->where('id' , $id)->update(['status' => 1]); DB::table('orders')->where('id' , $id)->update(['status' => 1]);
...@@ -136,6 +130,13 @@ class TicketController extends Controller ...@@ -136,6 +130,13 @@ class TicketController extends Controller
return view('customers.ticket.data_konfirmasi', compact('transactions')); return view('customers.ticket.data_konfirmasi', compact('transactions'));
} }
public function destroyorder($id)
{
$orders = Order::findOrFail($id);
$orders->delete();
return redirect()->back()->with('alert-success', 'Pemesanan dibatalkan');
}
public function datapesanan() public function datapesanan()
{ {
$orders = DB::table('orders')->orderby( $orders = DB::table('orders')->orderby(
...@@ -143,6 +144,14 @@ class TicketController extends Controller ...@@ -143,6 +144,14 @@ class TicketController extends Controller
return view('staffs.data_pemesanan', compact('orders')); return view('staffs.data_pemesanan', compact('orders'));
} }
public function destroypemesanan($id)
{
$orders = Order::findOrFail($id);
$orders->delete();
return redirect()->back()->with('alert-success', 'Pemesanan tidak dikonfirmasi');
}
public function datatransaksi() public function datatransaksi()
{ {
$transactions = DB::table('orders')->orderby( $transactions = DB::table('orders')->orderby(
......
...@@ -31,4 +31,10 @@ class User extends Authenticatable ...@@ -31,4 +31,10 @@ class User extends Authenticatable
{ {
return static::whereEmail($email)->first(); return static::whereEmail($email)->first();
} }
public function setNameAttribute($value)
{
$this->attributes['first_name'] = ucfirst($value);
}
} }
@if(Sentinel::check())
@extends('layouts.master-customer')
@section('content')
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h4> <a href="{{url('/customer')}}" class="fa fa-home"> Home</a> / <a href="{{url('/password')}}"> Change Password</a> </h4>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Change Password </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
@if(Session::has('alert-success'))
<div class="alert alert-success">
{{ Session::get('alert-success') }}
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('/password') }}">
{{ csrf_field() }}
{{ method_field('put') }}
<div class="form-group{{ $errors->has('current_password') ? ' has-error' : '' }}">
<label for="current_password" class="col-md-4 control-label">Current Password</label>
<div class="col-md-6">
<input id="current_password" type="password" class="form-control" name="current_password" autofocus>
<span class="help-block">{{ $errors->first('current_password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">New Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password">
<span class="help-block">{{ $errors->first('password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password_confirmation" class="col-md-4 control-label">New Password Confirmation</label>
<div class="col-md-6">
<input id="password_confirmation" type="password" class="form-control" name="password_confirmation">
<span class="help-block">{{ $errors->first('password_confirmation') }}</span>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Change Password
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@endif
\ No newline at end of file
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<th>Jumlah</th> <th>Jumlah</th>
<th>Total Harga</th> <th>Total Harga</th>
<th>Status dan Waktu Konfirmasi</th> <th>Status dan Waktu Konfirmasi</th>
<td>Tanggal Berkunjung</td> <th>Tanggal Berkunjung</th>
<th>Image</th> <th></th>
<th>Keterangan</th> <th>Keterangan</th>
</tr> </tr>
</thead> </thead>
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
<td>{{$trans->user_id}}</td> <td>{{$trans->user_id}}</td>
<td>{{$trans->first_name}}</td> <td>{{$trans->first_name}}</td>
<td>{{$trans->jumlah}}</td> <td>{{$trans->jumlah}}</td>
<td>{{$trans->harga}}</td> <td>IDR {{$trans->harga}},-</td>
<td><p style="color: #00A000">Dikonfirmasi</p> <br>{{$trans->created_at}}</td> <td><p style="color: #00A000">Dikonfirmasi</p> <br>{{$trans->created_at}}</td>
<td>{{$trans->tanggal_kunjung}}</td> <td>{{$trans->tanggal_kunjung}}</td>
<td><img src="{{ asset('image/ticket/ticket.png') }}" style="height: 150px; width: 200px; "> </td> <td><img src="{{ asset('image/ticket/ticket.png') }}" style="height: 150px; width: 200px; "> </td>
<td>Tiket berlaku paling lama 2 hari sejak dikonfirmasinya pemesanan tiket</td> <td>Tiket berlaku sampai Tanggal berkunjung. Masa penggunaan tiket hangus apabila lewat dari batas tanggal berkunjung</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
<div class="x_content"> <div class="x_content">
@if(Session::has('alert-success')) @if(Session::has('alert-success'))
<div class="alert alert-success"> <div class="alert alert-danger">
{{ Session::get('alert-success') }} {{ Session::get('alert-success') }}
</div> </div>
@endif @endif
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<td>{{$order->nama}}</td> <td>{{$order->nama}}</td>
<td>{{$order->tanggal_kunjung}}</td> <td>{{$order->tanggal_kunjung}}</td>
<td>{{$order->jumlah}}</td> <td>{{$order->jumlah}}</td>
<td>Rp {{$order->harga}},-</td> <td>IDR {{$order->harga}},-</td>
<td><img src="{{ asset('image/'. $order->images) }}" style="height: 150px; width: 200px; "> </td> <td><img src="{{ asset('image/'. $order->images) }}" style="height: 150px; width: 200px; "> </td>
<td> <td>
<a href="{{url('data_order/upload', $order->id)}}" class="btn btn-primary">Upload Resi Pembayaran</a> <a href="{{url('data_order/upload', $order->id)}}" class="btn btn-primary">Upload Resi Pembayaran</a>
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<title>TB Silalahi Center</title> <title>TB Silalahi Center</title>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="{{asset('/vendors/bootstrap/dist/css/bootstrap.min.css')}}" rel="stylesheet"> <link href="{{asset('../vendors/bootstrap/dist/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- Font Awesome --> <!-- Font Awesome -->
<link href="{{asset('/vendors/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet"> <link href="{{asset('../vendors/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
<!-- NProgress --> <!-- NProgress -->
<link href="{{asset('/vendors/nprogress/nprogress.css')}}" rel="stylesheet"> <link href="{{asset('../vendors/nprogress/nprogress.css')}}" rel="stylesheet">
<!-- Custom Theme Style --> <!-- Custom Theme Style -->
<link href="{{asset('/build/css/custom.min.css')}}" rel="stylesheet"> <link href="{{asset('../build/css/custom.min.css')}}" rel="stylesheet">
</head> </head>
<body class="nav-md"> <body class="nav-md">
...@@ -39,15 +39,15 @@ ...@@ -39,15 +39,15 @@
</div> </div>
<!-- jQuery --> <!-- jQuery -->
<script src="{{asset('/vendors/jquery/dist/jquery.min.js')}}"></script> <script src="{{asset('../vendors/jquery/dist/jquery.min.js')}}"></script>
<!-- Bootstrap --> <!-- Bootstrap -->
<script src="{{asset('/vendors/bootstrap/dist/js/bootstrap.min.js')}}"></script> <script src="{{asset('../vendors/bootstrap/dist/js/bootstrap.min.js')}}"></script>
<!-- FastClick --> <!-- FastClick -->
<script src="{{asset('/vendors/fastclick/lib/fastclick.js')}}"></script> <script src="{{asset('../vendors/fastclick/lib/fastclick.js')}}"></script>
<!-- NProgress --> <!-- NProgress -->
<script src="{{asset('/vendors/nprogress/nprogress.js')}}"></script> <script src="{{asset('../vendors/nprogress/nprogress.js')}}"></script>
<!-- Custom Theme Scripts --> <!-- Custom Theme Scripts -->
<script src="{{asset('/build/js/custom.min.js')}}"></script> <script src="{{asset('../build/js/custom.min.js')}}"></script>
</body> </body>
</html> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TB Silalahi Center</title>
<!-- Bootstrap -->
<link href="{{asset('../vendors/bootstrap/dist/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- Font Awesome -->
<link href="{{asset('../vendors/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
<!-- NProgress -->
<link href="{{asset('../vendors/nprogress/nprogress.css')}}" rel="stylesheet">
<!-- bootstrap-daterangepicker -->
<link href="{{asset('../vendors/bootstrap-daterangepicker/daterangepicker.css')}}" rel="stylesheet">
<!-- iCheck -->
<link href="{{asset('../vendors/iCheck/skins/flat/green.css')}}" rel="stylesheet">
<!-- Datatables -->
<link href="{{asset('../vendors/datatables.net-bs/css/dataTables.bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('../vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('../vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('../vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('../vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css')}}" rel="stylesheet">
<!-- Custom Theme Style -->
<link href="{{asset('../build/css/custom.min.css')}}" rel="stylesheet">
</head>
<body class="nav-md">
@yield('content')
<!-- jQuery -->
<script src="{{asset('../vendors/jquery/dist/jquery.min.js')}}"></script>
<!-- Bootstrap -->
<script src="{{asset('../vendors/bootstrap/dist/js/bootstrap.min.js')}}"></script>
<!-- FastClick -->
<script src="{{asset('../vendors/fastclick/lib/fastclick.js')}}"></script>
<!-- NProgress -->
<script src="{{asset('../vendors/nprogress/nprogress.js')}}"></script>
<!-- Chart.js -->
<script src="{{asset('../vendors/Chart.js/dist/Chart.min.js')}}"></script>
<!-- jQuery Sparklines -->
<script src="{{asset('../vendors/jquery-sparkline/dist/jquery.sparkline.min.js')}}"></script>
<!-- Flot -->
<script src="{{asset('../vendors/Flot/jquery.flot.js')}}"></script>
<script src="{{asset('../vendors/Flot/jquery.flot.pie.js')}}"></script>
<script src="{{asset('../vendors/Flot/jquery.flot.time.js')}}"></script>
<script src="{{asset('../vendors/Flot/jquery.flot.stack.js')}}"></script>
<script src="{{asset('../vendors/Flot/jquery.flot.resize.js')}}"></script>
<!-- Flot plugins -->
<script src="{{asset('../vendors/flot.orderbars/js/jquery.flot.orderBars.js')}}"></script>
<script src="{{asset('../vendors/flot-spline/js/jquery.flot.spline.min.js')}}"></script>
<script src="{{asset('../vendors/flot.curvedlines/curvedLines.js')}}"></script>
<!-- DateJS -->
<script src="{{asset('../vendors/DateJS/build/date.js')}}"></script>
<!-- bootstrap-daterangepicker -->
<script src="{{asset('../vendors/moment/min/moment.min.js')}}"></script>
<script src="{{asset('../vendors/bootstrap-daterangepicker/daterangepicker.js')}}"></script>
<!-- iCheck -->
<script src="{{asset('../vendors/iCheck/icheck.min.js')}}"></script>
<!-- Datatables -->
<script src="{{asset('../vendors/datatables.net/js/jquery.dataTables.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-bs/js/dataTables.bootstrap.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-buttons/js/dataTables.buttons.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-buttons/js/buttons.flash.min.js')}}"></script>
<script src="{{asset ('../vendors/datatables.net-buttons/js/buttons.html5.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-buttons/js/buttons.print.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-keytable/js/dataTables.keyTable.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-responsive/js/dataTables.responsive.min.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js')}}"></script>
<script src="{{asset('../vendors/datatables.net-scroller/js/dataTables.scroller.min.js')}}"></script>
<script src="{{asset('../vendors/jszip/dist/jszip.min.js')}}"></script>
<script src="{{asset('../vendors/pdfmake/build/pdfmake.min.js')}}"></script>
<script src="{{asset('../vendors/pdfmake/build/vfs_fonts.js')}}"></script>
<!-- Custom Theme Scripts -->
<script src="{{asset('../build/js/custom.min.js')}}"></script>
</body>
</html>
...@@ -85,18 +85,21 @@ ...@@ -85,18 +85,21 @@
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small"> <div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings"> <a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/customer')}}">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen"> <a data-toggle="tooltip" data-placement="top" title="Pesan Tiket" href="{{url('/ticket')}}">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span> <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="Lock"> <a data-toggle="tooltip" data-placement="top" title="Feedback" href="{{url('/feedback')}}">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a> </a>
<form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }}
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#" onclick="document.getElementById('logout-form').submit()">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a>
</form>
</div> </div>
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
</div> </div>
...@@ -118,7 +121,7 @@ ...@@ -118,7 +121,7 @@
</a> </a>
<ul class="dropdown-menu dropdown-usermenu pull-right"> <ul class="dropdown-menu dropdown-usermenu pull-right">
<li> <li>
<a href="#" class="fa fa-lock"> Change Password</a> <a href="{{url('/password')}}" class="fa fa-lock"> Change Password</a>
</li> </li>
<li> <li>
<form action="{{url('/logout')}}" method="POST" id="logout-form"> <form action="{{url('/logout')}}" method="POST" id="logout-form">
......
...@@ -84,18 +84,21 @@ ...@@ -84,18 +84,21 @@
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small"> <div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings"> <a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/manager')}}">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen"> <a data-toggle="tooltip" data-placement="top" title="Data Penjualan Tiket" href="{{url('/penjualan')}}">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span> <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="Lock"> <a data-toggle="tooltip" data-placement="top" title="Daftar Pengunjung" href="{{url('/viewpengunjung')}}">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> <span class="glyphicon glyphicon-stats" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#"> <form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }}
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#" onclick="document.getElementById('logout-form').submit()">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span> <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a> </a>
</form>
</div> </div>
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
</div> </div>
...@@ -116,7 +119,7 @@ ...@@ -116,7 +119,7 @@
<span class=" fa fa-angle-down"></span> <span class=" fa fa-angle-down"></span>
</a> </a>
<ul class="dropdown-menu dropdown-usermenu pull-right"> <ul class="dropdown-menu dropdown-usermenu pull-right">
<li><a href="#" class="fa fa-lock"> Change Password</a></li> <li><a href="/gantipassword" class="fa fa-lock"> Change Password</a></li>
<li> <li>
<form action="{{url('/logout')}}" method="POST" id="logout-form"> <form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }} {{ csrf_field() }}
......
...@@ -89,18 +89,21 @@ ...@@ -89,18 +89,21 @@
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small"> <div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings"> <a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/staff')}}">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen"> <a data-toggle="tooltip" data-placement="top" title="Data Pemesanan Tiket" href="{{url('/pemesanan')}}">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span> <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a> </a>
<a data-toggle="tooltip" data-placement="top" title="Lock"> <a data-toggle="tooltip" data-placement="top" title="Pengunjung" href="{{url('/pengunjung')}}">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> <span class="glyphicon glyphicon-stats" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a> </a>
<form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }}
<a data-toggle="tooltip" data-placement="top" title="Logout" href="#" onclick="document.getElementById('logout-form').submit()">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a>
</form>
</div> </div>
<!-- /menu footer buttons --> <!-- /menu footer buttons -->
</div> </div>
...@@ -121,7 +124,7 @@ ...@@ -121,7 +124,7 @@
<span class=" fa fa-angle-down"></span> <span class=" fa fa-angle-down"></span>
</a> </a>
<ul class="dropdown-menu dropdown-usermenu pull-right"> <ul class="dropdown-menu dropdown-usermenu pull-right">
<li><a href="" class="fa fa-lock"> Change Password</a></li> <li><a href="{{url('/changepassword')}}" class="fa fa-lock"> Change Password</a></li>
<li> <li>
<form action="{{url('/logout')}}" method="POST" id="logout-form"> <form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }} {{ csrf_field() }}
......
@if(Sentinel::check())
@extends('layouts.master-manager')
@section('content')
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h4> <a href="{{url('/manager')}}" class="fa fa-home"> Home</a> / <a href="{{url('/gantipassword')}}"> Change Password</a> </h4>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Change Password </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
@if(Session::has('alert-success'))
<div class="alert alert-success">
{{ Session::get('alert-success') }}
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('/gantipassword') }}">
{{ csrf_field() }}
{{ method_field('put') }}
<div class="form-group{{ $errors->has('current_password') ? ' has-error' : '' }}">
<label for="current_password" class="col-md-4 control-label">Current Password</label>
<div class="col-md-6">
<input id="current_password" type="password" class="form-control" name="current_password" autofocus>
<span class="help-block">{{ $errors->first('current_password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">New Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password">
<span class="help-block">{{ $errors->first('password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password_confirmation" class="col-md-4 control-label">New Password Confirmation</label>
<div class="col-md-6">
<input id="password_confirmation" type="password" class="form-control" name="password_confirmation">
<span class="help-block">{{ $errors->first('password_confirmation') }}</span>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Change Password
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@endif
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</div> </div>
<div class="x_content"> <div class="x_content">
@if(Session::has('alert-success')) @if(Session::has('alert-success'))
<div class="alert alert-success"> <div class="alert alert-danger">
{{ Session::get('alert-success') }} {{ Session::get('alert-success') }}
</div> </div>
@endif @endif
...@@ -47,12 +47,14 @@ ...@@ -47,12 +47,14 @@
<td>{{$order->user_id}}</td> <td>{{$order->user_id}}</td>
<td>{{$order->first_name}}</td> <td>{{$order->first_name}}</td>
<td>{{$order->jumlah}}</td> <td>{{$order->jumlah}}</td>
<td>{{$order->harga}}</td> <td>IDR {{$order->harga}},-</td>
<td><img src="{{ asset('image/'. $order->images) }}" style="height: 150px; width: 200px; "> </td> <td><img src="{{ asset('image/'. $order->images) }}" style="height: 150px; width: 200px; "> </td>
<td>{{$order->tanggal_kunjung}}</td> <td>{{$order->tanggal_kunjung}}</td>
<td> <td>
<a href="{{url('/lunas',$order->id)}}" class="btn btn-primary" <a href="{{url('/lunas',$order->id)}}" class="btn btn-primary"
onclick="return confirm('Are you sure to confirm now??')">Konfirmasi</a> onclick="return confirm('Are you sure to confirm now??')">Konfirmasi</a>
<a href="{{url('/pemesanan/destroy',$order->id)}}" class="btn btn-danger"
onclick="return confirm('Are you sure to abort order??')">Tolak</a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="col-md-12 col-sm-12 col-xs-12"> <div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel"> <div class="x_panel">
<div class="x_title"> <div class="x_title">
<h2>Input Data Pengunjung <small>1 Tiket = Rp10000,-</small></h2> <h2>Input Data Pengunjung <small>1 Tiket = IDR10000,-</small></h2>
<ul class="nav navbar-right panel_toolbox"> <ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a> <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li> </li>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<td>{{$no++}}</td> <td>{{$no++}}</td>
<td>{{$peng->nama_pengunjung}}</td> <td>{{$peng->nama_pengunjung}}</td>
<td>{{$peng->jumlah}}</td> <td>{{$peng->jumlah}}</td>
<td>{{$peng->total_harga}}</td> <td>IDR{{$peng->total_harga}},-</td>
<td>{{$peng->created_at}}</td> <td>{{$peng->created_at}}</td>
<td>Lunas</td> <td>Lunas</td>
</tr> </tr>
......
@if(Sentinel::check())
@extends('layouts.master-manager')
@section('content')
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h4> <a href="{{url('/staff')}}" class="fa fa-home"> Home</a> / <a href="{{url('/changepassword')}}"> Change Password</a> </h4>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Change Password </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
@if(Session::has('alert-success'))
<div class="alert alert-success">
{{ Session::get('alert-success') }}
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('/changepassword') }}">
{{ csrf_field() }}
{{ method_field('put') }}
<div class="form-group{{ $errors->has('current_password') ? ' has-error' : '' }}">
<label for="current_password" class="col-md-4 control-label">Current Password</label>
<div class="col-md-6">
<input id="current_password" type="password" class="form-control" name="current_password" autofocus>
<span class="help-block">{{ $errors->first('current_password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">New Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password">
<span class="help-block">{{ $errors->first('password') }}</span>
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password_confirmation" class="col-md-4 control-label">New Password Confirmation</label>
<div class="col-md-6">
<input id="password_confirmation" type="password" class="form-control" name="password_confirmation">
<span class="help-block">{{ $errors->first('password_confirmation') }}</span>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Change Password
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@endif
\ No newline at end of file
@if(Sentinel::check()) @if(Sentinel::check())
@extends('layouts.master-staff') @extends('layouts.master-staff')
@section('content') @section('content')
<!-- page content --> <!-- page content -->
<div class="right_col" role="main"> <div class="right_col" role="main">
......
...@@ -17,32 +17,39 @@ Route::group(['middleware' => 'visitors'], function() ...@@ -17,32 +17,39 @@ Route::group(['middleware' => 'visitors'], function()
Route::post('/logout', 'LoginController@logout'); Route::post('/logout', 'LoginController@logout');
Route::group(['middleware' => ''], function()
{
Route::get('/password', 'PasswordController@changePassword');
Route::put('/password', 'PasswordController@changePasswordPost');
});
Route::group(['middleware' => 'manager'], function() Route::group(['middleware' => 'manager'], function()
{ {
Route::get('/manager', 'ManagerController@index'); Route::get('/manager', 'ManagerController@index');
// Route::get('/', 'ManagerController@index');
Route::get('/penjualan', 'ManagerController@penjualan'); Route::get('/penjualan', 'ManagerController@penjualan');
Route::get('/viewpengunjung', 'ManagerController@pengunjung'); Route::get('/viewpengunjung', 'ManagerController@pengunjung');
Route::get('/viewfeedback', 'ManagerController@viewFeedback'); Route::get('/viewfeedback', 'ManagerController@viewFeedback');
Route::get('/gantipassword', 'ManagerController@changePassword');
Route::put('/gantipassword', 'ManagerController@changePasswordPost');
}); });
Route::group(['middleware' => 'staff'], function () Route::group(['middleware' => 'staff'], function ()
{ {
Route::get('/staff', 'StaffController@index'); Route::get('/staff', 'StaffController@index');
// Route::get('/', 'StaffController@index');
// Route::resource('/ticket', 'TicketController');
Route::get('/pemesanan', 'TicketController@datapesanan'); Route::get('/pemesanan', 'TicketController@datapesanan');
Route::get('/lunas/{id}','TicketController@lunas'); Route::get('/lunas/{id}','TicketController@lunas');
Route::get('/pemesanan/destroy/{id}', 'TicketController@destroypemesanan');
Route::get('/data_transaksi','TicketController@datatransaksi'); Route::get('/data_transaksi','TicketController@datatransaksi');
Route::get('/pengunjung', 'StaffController@pengunjung'); Route::get('/pengunjung', 'StaffController@pengunjung');
Route::post('/pengunjung/store', 'StaffController@storepengunjung'); Route::post('/pengunjung/store', 'StaffController@storepengunjung');
Route::get('/member', 'StaffController@viewMember'); Route::get('/member', 'StaffController@viewMember');
Route::get('/changepassword', 'StaffController@changePassword');
Route::put('/changepassword', 'StaffController@changePasswordPost');
}); });
Route::group(['middleware' => 'customer'], function () Route::group(['middleware' => 'customer'], function ()
{ {
Route::get('/customer', 'CustomerController@index'); Route::get('/customer', 'CustomerController@index');
// Route::get('/', 'CustomerController@index');
Route::resource('/ticket', 'TicketController'); Route::resource('/ticket', 'TicketController');
Route::get('/ticket/beli/{id}','TicketController@beli'); Route::get('/ticket/beli/{id}','TicketController@beli');
Route::post('/ticket/beli','TicketController@storeorder'); Route::post('/ticket/beli','TicketController@storeorder');
...@@ -54,4 +61,6 @@ Route::group(['middleware' => 'customer'], function () ...@@ -54,4 +61,6 @@ Route::group(['middleware' => 'customer'], function ()
Route::get('/data_konfirmasi','TicketController@datakonfirmasi'); Route::get('/data_konfirmasi','TicketController@datakonfirmasi');
Route::get('/feedback', 'CustomerController@feedbackIndex'); Route::get('/feedback', 'CustomerController@feedbackIndex');
Route::post('/feedback/create', 'CustomerController@createFeedback'); Route::post('/feedback/create', 'CustomerController@createFeedback');
Route::get('/password', 'CustomerController@changePassword');
Route::put('/password', 'CustomerController@changePasswordPost');
}); });
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