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;
use Sentinel;
use App\User;
use DB;
use Hash;
use Validator;
class CustomerController extends Controller
......@@ -23,11 +26,6 @@ class CustomerController extends Controller
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();
return view('customers.feedback', compact('feedbacks'));
}
......@@ -43,4 +41,44 @@ class CustomerController extends Controller
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;
use Illuminate\Http\Request;
use DB;
use App\User;
use Sentinel;
use Validator;
use Hash;
class ManagerController extends Controller
{
......@@ -30,5 +34,42 @@ class ManagerController extends Controller
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;
use Sentinel;
use DB;
use App\Pengunjung;
use App\User;
use Hash;
use Validator;
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.',
];
// validate form
$validator = Validator::make(request()->all(), [
'current_password' => 'required|password',
'password' => 'required|min:6|confirmed',
'password_confirmation' => 'required',
// public function viewmember()
// {
// $customers = Sentinel::findRoleBySlug('customer');
// $customers = DB::table('users')->orderby(
// 'id','desc')->get();
// 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
Then, upload it in Data Pemesanan ');
}
public function destroyorder($id)
{
$orders = Order::findOrFail($id);
$orders->delete();
return redirect()->back();
}
public function lunas($id){
DB::table('orders')->where('id' , $id)->update(['status' => 1]);
......@@ -136,6 +130,13 @@ class TicketController extends Controller
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()
{
$orders = DB::table('orders')->orderby(
......@@ -143,6 +144,14 @@ class TicketController extends Controller
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()
{
$transactions = DB::table('orders')->orderby(
......
......@@ -31,4 +31,10 @@ class User extends Authenticatable
{
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 @@
<th>Jumlah</th>
<th>Total Harga</th>
<th>Status dan Waktu Konfirmasi</th>
<td>Tanggal Berkunjung</td>
<th>Image</th>
<th>Tanggal Berkunjung</th>
<th></th>
<th>Keterangan</th>
</tr>
</thead>
......@@ -50,11 +50,11 @@
<td>{{$trans->user_id}}</td>
<td>{{$trans->first_name}}</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>{{$trans->tanggal_kunjung}}</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>
@endforeach
</tbody>
......
......@@ -51,7 +51,7 @@
</div>
<div class="x_content">
@if(Session::has('alert-success'))
<div class="alert alert-success">
<div class="alert alert-danger">
{{ Session::get('alert-success') }}
</div>
@endif
......@@ -76,7 +76,7 @@
<td>{{$order->nama}}</td>
<td>{{$order->tanggal_kunjung}}</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>
<a href="{{url('data_order/upload', $order->id)}}" class="btn btn-primary">Upload Resi Pembayaran</a>
......
......@@ -10,14 +10,14 @@
<title>TB Silalahi Center</title>
<!-- 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 -->
<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 -->
<link href="{{asset('/vendors/nprogress/nprogress.css')}}" rel="stylesheet">
<link href="{{asset('../vendors/nprogress/nprogress.css')}}" rel="stylesheet">
<!-- Custom Theme Style -->
<link href="{{asset('/build/css/custom.min.css')}}" rel="stylesheet">
<link href="{{asset('../build/css/custom.min.css')}}" rel="stylesheet">
</head>
<body class="nav-md">
......@@ -39,15 +39,15 @@
</div>
<!-- jQuery -->
<script src="{{asset('/vendors/jquery/dist/jquery.min.js')}}"></script>
<script src="{{asset('../vendors/jquery/dist/jquery.min.js')}}"></script>
<!-- Bootstrap -->
<script src="{{asset('/vendors/bootstrap/dist/js/bootstrap.min.js')}}"></script>
<script src="{{asset('../vendors/bootstrap/dist/js/bootstrap.min.js')}}"></script>
<!-- FastClick -->
<script src="{{asset('/vendors/fastclick/lib/fastclick.js')}}"></script>
<script src="{{asset('../vendors/fastclick/lib/fastclick.js')}}"></script>
<!-- NProgress -->
<script src="{{asset('/vendors/nprogress/nprogress.js')}}"></script>
<script src="{{asset('../vendors/nprogress/nprogress.js')}}"></script>
<!-- Custom Theme Scripts -->
<script src="{{asset('/build/js/custom.min.js')}}"></script>
<script src="{{asset('../build/js/custom.min.js')}}"></script>
</body>
</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 @@
<!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/customer')}}">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Pesan Tiket" href="{{url('/ticket')}}">
<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Lock">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Feedback" href="{{url('/feedback')}}">
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
</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>
</a>
</form>
</div>
<!-- /menu footer buttons -->
</div>
......@@ -118,7 +121,7 @@
</a>
<ul class="dropdown-menu dropdown-usermenu pull-right">
<li>
<a href="#" class="fa fa-lock"> Change Password</a>
<a href="{{url('/password')}}" class="fa fa-lock"> Change Password</a>
</li>
<li>
<form action="{{url('/logout')}}" method="POST" id="logout-form">
......
......@@ -84,18 +84,21 @@
<!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/manager')}}">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Data Penjualan Tiket" href="{{url('/penjualan')}}">
<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Lock">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Daftar Pengunjung" href="{{url('/viewpengunjung')}}">
<span class="glyphicon glyphicon-stats" aria-hidden="true"></span>
</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>
</a>
</form>
</div>
<!-- /menu footer buttons -->
</div>
......@@ -116,7 +119,7 @@
<span class=" fa fa-angle-down"></span>
</a>
<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>
<form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ csrf_field() }}
......
......@@ -89,18 +89,21 @@
<!-- /menu footer buttons -->
<div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Home" href="{{url('/staff')}}">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Data Pemesanan Tiket" href="{{url('/pemesanan')}}">
<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Lock">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
<a data-toggle="tooltip" data-placement="top" title="Pengunjung" href="{{url('/pengunjung')}}">
<span class="glyphicon glyphicon-stats" aria-hidden="true"></span>
</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>
</a>
</form>
</div>
<!-- /menu footer buttons -->
</div>
......@@ -121,7 +124,7 @@
<span class=" fa fa-angle-down"></span>
</a>
<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>
<form action="{{url('/logout')}}" method="POST" id="logout-form">
{{ 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 @@
</div>
<div class="x_content">
@if(Session::has('alert-success'))
<div class="alert alert-success">
<div class="alert alert-danger">
{{ Session::get('alert-success') }}
</div>
@endif
......@@ -47,12 +47,14 @@
<td>{{$order->user_id}}</td>
<td>{{$order->first_name}}</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>{{$order->tanggal_kunjung}}</td>
<td>
<a href="{{url('/lunas',$order->id)}}" class="btn btn-primary"
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>
</tr>
@endforeach
......
......@@ -17,7 +17,7 @@
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<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">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
......@@ -116,7 +116,7 @@
<td>{{$no++}}</td>
<td>{{$peng->nama_pengunjung}}</td>
<td>{{$peng->jumlah}}</td>
<td>{{$peng->total_harga}}</td>
<td>IDR{{$peng->total_harga}},-</td>
<td>{{$peng->created_at}}</td>
<td>Lunas</td>
</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())
@extends('layouts.master-staff')
@extends('layouts.master-staff')
@section('content')
<!-- page content -->
<div class="right_col" role="main">
......
......@@ -17,32 +17,39 @@ Route::group(['middleware' => 'visitors'], function()
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::get('/manager', 'ManagerController@index');
// Route::get('/', 'ManagerController@index');
Route::get('/penjualan', 'ManagerController@penjualan');
Route::get('/viewpengunjung', 'ManagerController@pengunjung');
Route::get('/viewfeedback', 'ManagerController@viewFeedback');
Route::get('/gantipassword', 'ManagerController@changePassword');
Route::put('/gantipassword', 'ManagerController@changePasswordPost');
});
Route::group(['middleware' => 'staff'], function ()
{
Route::get('/staff', 'StaffController@index');
// Route::get('/', 'StaffController@index');
// Route::resource('/ticket', 'TicketController');
Route::get('/pemesanan', 'TicketController@datapesanan');
Route::get('/lunas/{id}','TicketController@lunas');
Route::get('/pemesanan/destroy/{id}', 'TicketController@destroypemesanan');
Route::get('/data_transaksi','TicketController@datatransaksi');
Route::get('/pengunjung', 'StaffController@pengunjung');
Route::post('/pengunjung/store', 'StaffController@storepengunjung');
Route::get('/member', 'StaffController@viewMember');
Route::get('/changepassword', 'StaffController@changePassword');
Route::put('/changepassword', 'StaffController@changePasswordPost');
});
Route::group(['middleware' => 'customer'], function ()
{
Route::get('/customer', 'CustomerController@index');
// Route::get('/', 'CustomerController@index');
Route::resource('/ticket', 'TicketController');
Route::get('/ticket/beli/{id}','TicketController@beli');
Route::post('/ticket/beli','TicketController@storeorder');
......@@ -54,4 +61,6 @@ Route::group(['middleware' => 'customer'], function ()
Route::get('/data_konfirmasi','TicketController@datakonfirmasi');
Route::get('/feedback', 'CustomerController@feedbackIndex');
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