Commit ed86a820 by rizky

finish

parent 285fa55e
...@@ -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.');
}
} }
...@@ -30,6 +30,5 @@ class RegistrationController extends Controller ...@@ -30,6 +30,5 @@ class RegistrationController extends Controller
$role->users()->attach($user); $role->users()->attach($user);
return redirect('/login')->with('alert-success', 'Akun anda telah terdaftar. Silahkan login.'); return redirect('/login')->with('alert-success', 'Akun anda telah terdaftar. Silahkan login.');
} }
} }
...@@ -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);
}
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="x_panel"> <div class="x_panel">
<div class="x_title"> <div class="x_title">
<h2>Media Gallery </h2> <h2>Gallery </h2>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<div class="x_content"> <div class="x_content">
......
@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>
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<h2> <h2>
<ul> <ul>
<li> <li>
Pesan tiket terlebih dahulu. Pembayaran tiket dilakukan melalui via transfer bank ke nomor Rekening 111-111-111 (Bank ABC) Pesan tiket terlebih dahulu. Pembayaran tiket dilakukan melalui via transfer bank ke nomor Rekening 111-111-111 <br>(Bank ABC)
atas nama Museum TB Silalahi Center. a.n. Museum TB Silalahi Center.
</li> </li>
<li> <li>
Foto atau screenshot bukti pembayaran. Foto atau screenshot bukti pembayaran.
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
<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">
<h1>Data Pemesanan tiket <small>Upload resi pembayaran</small></h1> <h2>Data Pemesanan tiket <small>Upload resi pembayaran</small></h2>
<div class="clearfix"></div> <div class="clearfix"></div>
</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>
......
...@@ -49,15 +49,45 @@ ...@@ -49,15 +49,45 @@
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
@if(Sentinel::guest())
<li> <li>
<a class="page-scroll" href="{{url('/login')}}">Login</a> <a class="page-scroll" href="{{url('/login')}}">Login</a>
</li> </li>
<li> <li>
<a class="page-scroll" href="{{url('/register')}}">Register</a> <a class="page-scroll" href="{{url('/register')}}">Register</a>
</li> </li>
@else
@if(Sentinel::getUser()->roles()->first()->slug=='customer')
<li>
<a class="fa fa-book" href="{{url('/ticket')}}">Pesan Tiket</a>
</li>
<li>
<a class="fa fa-user" href="{{url('/customer')}}"> {{Sentinel::getUser()->first_name}}'s page</a>
</li>
@elseif(Sentinel::getUser()->roles()->first()->slug=='staff')
<li>
<a class="fa fa-book" href="{{url('/pemesanan')}}"> Data Pemesanan</a>
</li>
<li>
<a class="fa fa-book" href="{{url('/pengunjung')}}"> Data Pengunjung</a>
</li>
<li>
<a class="fa fa-user" href="{{url('/staff')}}"> {{Sentinel::getUser()->first_name}}'s page</a>
</li>
@elseif(Sentinel::getUser()->roles()->first()->slug=='manager')
<li>
<a class="fa fa-book" href="{{url('/penjualan')}}"> Data Penjualan Tiket</a>
</li>
<li>
<a class="fa fa-user" href="{{url('/manager')}}"> {{Sentinel::getUser()->first_name}}'s page</a>
</li>
@endif
@endif
</ul> </ul>
</div> </div>
<!-- /.navbar-collapse --> <!-- /.navbar-collapse -->
</div> </div>
<!-- /.container-fluid --> <!-- /.container-fluid -->
...@@ -327,11 +357,11 @@ ...@@ -327,11 +357,11 @@
</div> </div>
<div class="col-lg-2 col-lg-offset-2 text-center"> <div class="col-lg-2 col-lg-offset-2 text-center">
<i class="fa fa-phone fa-3x sr-contact"></i> <i class="fa fa-phone fa-3x sr-contact"></i>
<p>123-456-6789</p> <p>0632-21588</p>
</div> </div>
<div class="col-lg-3 text-center"> <div class="col-lg-3 text-center">
<i class="fa fa-envelope-o fa-3x sr-contact"></i> <i class="fa fa-envelope-o fa-3x sr-contact"></i>
<p><a href="#">museumtbsc@gmail.com</a></p> <p>museumtbsc@gmail.com</p>
</div> </div>
<div class="col-lg-3 text-center"> <div class="col-lg-3 text-center">
<i class="fa fa-map-marker fa-3x sr-contact"></i> <i class="fa fa-map-marker fa-3x sr-contact"></i>
......
...@@ -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,12 +119,12 @@ ...@@ -116,12 +119,12 @@
<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() }}
<a href="#" onclick="document.getElementById('logout-form').submit()"><i class="fa fa-sign-out fa-fw"></i>Logout</a> <a href="#" onclick="document.getElementById('logout-form').submit()"><i class="fa fa-sign-out fa-fw"></i>Logout</a>
{{--<a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>--}}</form> </form>
</li> </li>
</ul> </ul>
</li> </li>
......
...@@ -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">
......
...@@ -20,29 +20,30 @@ Route::post('/logout', 'LoginController@logout'); ...@@ -20,29 +20,30 @@ Route::post('/logout', 'LoginController@logout');
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 +55,6 @@ Route::group(['middleware' => 'customer'], function () ...@@ -54,4 +55,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