Commit a987de7d by jhon

Fix Product

parent af4ce88a
...@@ -3,33 +3,25 @@ ...@@ -3,33 +3,25 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\User;
use App\Barang; use App\Barang;
use App\Pembelian; use App\Pembelian;
use App\RequestBarang; use App\RequestBarang;
use App\DataRequest; use App\DataRequest;
use App\Http\Requests; use App\Http\Requests;
use DB;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use App\User;
class CustomerController extends Controller class CustomerController extends Controller
{ {
public function BeliBarang() public function BeliBarang()
{ {
$barangs = Barang::all(); $barangs = Barang::all();
return view('adminlte::customer.BeliBarang.index', compact('barangs')); return view('adminlte::customer.BeliBarang.index', compact('barangs'));
} }
<<<<<<< HEAD
public function createPembelian($id)
=======
public function createPembelian($id) public function createPembelian($id)
{ {
...@@ -54,6 +46,7 @@ class CustomerController extends Controller ...@@ -54,6 +46,7 @@ class CustomerController extends Controller
{ {
$pembelians = new Pembelian(); $pembelians = new Pembelian();
$pembelians->user_id = $request->user_id; $pembelians->user_id = $request->user_id;
$pembelians->barang_id = $request->barang_id;
$pembelians->username = $request->username; $pembelians->username = $request->username;
$pembelians->nama_barang = $request->nama_barang; $pembelians->nama_barang = $request->nama_barang;
$pembelians->kategori = $request->kategori; $pembelians->kategori = $request->kategori;
...@@ -64,72 +57,79 @@ class CustomerController extends Controller ...@@ -64,72 +57,79 @@ class CustomerController extends Controller
$total_harga = $harga * $jumlah; $total_harga = $harga * $jumlah;
$pembelians->total_harga = $total_harga; $pembelians->total_harga = $total_harga;
$pembelians->status_pengantaran = $request->status_pengantaran; $pembelians->status_pengantaran = $request->status_pengantaran;
$user = User::find($request->user_id);
if($user->saldo >= $total_harga ){
$user->saldo=$user->saldo-$total_harga;
}else{
$user->saldo=$user->saldo;
return redirect('BeliBarang')->with('message','Saldo Anda Tidak Mencukupi');
}
$barang= Barang::find($request->barang_id);
if($barang->stock >= $jumlah){
$barang->stock= $barang->stock-$pembelians->jumlah;
}else{
$barang->stock= $barang->stock;
return redirect('BeliBarang')->with('message','Stock Barang Tidak Mencukupi');
}
$user->update();
$barang->update();
$pembelians->save(); $pembelians->save();
return redirect('BeliBarang'); return redirect('BeliBarang')->with('message','Pembelian Berhasil Dilakukan');
} }
public function create() public function create()
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
{ {
$barangs = Barang::where('id', $id)->first(); return view('adminlte::inventori.BeliBarang.create');
return view('adminlte::customer.BeliBarang.createPembelian')->with('barangs', $barangs);
} }
public function savePembelian(Request $request) public function store(Request $request)
{ {
$pembelians = new Pembelian(); $this->validate($request, [
$pembelians->user_id = $request->user_id; 'nama' => 'required',
$pembelians->username = $request->username; 'jumlah' => 'required',
$pembelians->nama_barang = $request->nama_barang; 'harga' => 'required',
$pembelians->kategori = $request->kategori; 'deskripsi' => 'required',
$pembelians->harga =$request->harga; 'kategori' => 'required',
$pembelians->jumlah = $request->jumlah; 'gambar' => 'required',
$harga = $request->harga; ]);
$jumlah = $request->jumlah;
$total_harga = $harga * $jumlah; $barangs = new Barang();
$pembelians->total_harga = $total_harga; $barangs->nama = $request['nama'];
$pembelians->status_pengantaran = $request->status_pengantaran; $barangs->jumlah = $request['jumlah'];
$pembelians->save(); $barangs->harga = $request['harga'];
$barangs->deskripsi = $request['deskripsi'];
$barangs->kategori = $request['kategori'];
$barangs->gambar = $request['gambar'];
$barangs->save();
return redirect('BeliBarang'); return redirect('BeliBarang');
} }
<<<<<<< HEAD public function RequestBarang()
public function cariBarang(){
$key = Input::get('search');
if(isset($key)){
$this->data['barangs'] = Barang::where('nama_barang','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['barangs'] = Barang::orderBy('id','desc')->paginate(10);
}
return view('adminlte::customer.BeliBarang.index',$this->data);
}
//----------------------------Data Request----------------------//
=======
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
public function RequestBarang()
{ {
$data_requests = DataRequest::all(); $data_requests = DataRequest::all();
return view('adminlte::customer.RequestBarang.index', compact('data_requests')); return view('adminlte::customer.RequestBarang.index', compact('data_requests'));
} }
public function createRequest($id) public function createRequest($id)
{ {
$data_requests = DataRequest::where('id', $id)->first(); $data_requests = DataRequest::where('id', $id)->first();
// dd($data_requests);
return view('adminlte::customer.RequestBarang.createRequest')->with('data_requests', $data_requests); return view('adminlte::customer.RequestBarang.createRequest')->with('data_requests', $data_requests);
} }
public function saveRequest(Request $request) public function saveRequest(Request $request)
{ {
$request_barangs = new RequestBarang(); $request_barangs = new RequestBarang();
$request_barangs->user_id = $request->user_id; $request_barangs->user_id = $request->user_id;
$request_barangs->id_data_request = $request->id_data_request;
$request_barangs->username = $request->username; $request_barangs->username = $request->username;
$request_barangs->nama_barang = $request->nama_barang; $request_barangs->nama_barang = $request->nama_barang;
$request_barangs->kategori = $request->kategori; $request_barangs->kategori = $request->kategori;
...@@ -147,41 +147,34 @@ class CustomerController extends Controller ...@@ -147,41 +147,34 @@ class CustomerController extends Controller
public function CheckSaldo() public function CheckSaldo()
{ {
$users = User::all();
return view('adminlte::customer.CheckSaldo.index'); return view('adminlte::customer.CheckSaldo.index');
} }
<<<<<<< HEAD
//----------------------------Histori Transaksi----------------------//
public function HistoryRequest()
{
$username = Auth::user()->username;
$user = DB::table('users')->where('username' , $username)->first();
$id = $user->id;
$this->data['request_barang'] = DB::table('request_barangs')->where('user_id','=',$id)->get();
return view('adminlte::customer.HistoryRequest.index', $this->data);
=======
public function HistoryRequest() public function HistoryRequest()
{ {
$request_barangs = RequestBarang::all(); $request_barangs = RequestBarang::all();
return view('adminlte::customer.HistoryRequest.index', compact('request_barangs')); return view('adminlte::customer.HistoryRequest.index', compact('request_barangs'));
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
public function HistoryPembelian() public function HistoryPembelian()
{ {
<<<<<<< HEAD
$username = Auth::user()->username;
$user = DB::table('users')->where('username' , $username)->first();
$id = $user->id;
$this->data['pembelian'] = DB::table('pembelians')->where('user_id','=',$id)->get();
// dd($this->data);
return view('adminlte::customer.HistoryPembelian.index', $this->data);
=======
$pembelians = Pembelian::all(); $pembelians = Pembelian::all();
return view('adminlte::customer.HistoryPembelian.index', compact('pembelians')); return view('adminlte::customer.HistoryPembelian.index', compact('pembelians'));
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
public function cariBarang(){
// $barangs = Barang::all();
// $barang = DB::table('barangs');
$key = Input::get('search');
if(isset($key)){
$this->data['barangs'] = Barang::where('nama_barang','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['barangs'] = Barang::orderBy('id','desc')->paginate(10);
}
return view('adminlte::customer.BeliBarang.index',$this->data);
}
} }
\ No newline at end of file
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Requests; use App\Http\Requests;
use App\Barang;
<<<<<<< HEAD
=======
use App\RequestBarang;
use App\DataRequest;
<<<<<<< HEAD
=======
use App\Pembelian;
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65 use App\Barang;
use App\RequestBarang; use App\RequestBarang;
use App\DataRequest; use App\DataRequest;
use App\Pembelian; use App\Pembelian;
use App\User;
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
class InventoriController extends Controller class InventoriController extends Controller
{ {
public function ListBarang() public function ListBarang()
{ {
$barangs = Barang::all(); $barangs = Barang::all();
return view('adminlte::inventori.ListBarang.index', compact('barangs')); return view('adminlte::inventori.ListBarang.index', compact('barangs'));
} }
public function create() public function create()
{ {
return view('adminlte::inventori.ListBarang.create'); return view('adminlte::inventori.ListBarang.create');
...@@ -54,7 +40,7 @@ class InventoriController extends Controller ...@@ -54,7 +40,7 @@ class InventoriController extends Controller
$barangs->kategori = $request['kategori']; $barangs->kategori = $request['kategori'];
$barangs->gambar = $request['gambar']; $barangs->gambar = $request['gambar'];
$barangs->save(); $barangs->save();
return redirect('ListBarang'); return redirect('ListBarang')->with('message','Data Barang Berhasil Di Tambah');
} }
...@@ -82,7 +68,7 @@ class InventoriController extends Controller ...@@ -82,7 +68,7 @@ class InventoriController extends Controller
$barangs->kategori = $request->kategori; $barangs->kategori = $request->kategori;
$barangs->gambar = $request->gambar; $barangs->gambar = $request->gambar;
$barangs->save(); $barangs->save();
return redirect('ListBarang'); return redirect('ListBarang')->with('message','Data Barang Berhasil Di Ubah');
} }
...@@ -91,12 +77,37 @@ class InventoriController extends Controller ...@@ -91,12 +77,37 @@ class InventoriController extends Controller
{ {
$barangs = Barang::find($id); $barangs = Barang::find($id);
$barangs->delete(); $barangs->delete();
return redirect('ListBarang'); return redirect('ListBarang')->with('message','Data Barang Berhasil Di Hapus');
} }
//----------------------------List Request----------------------//
public function ListRequest() //----------------------------Cetak PDF----------------------------//
public function pdfpembelian($id)
{
$this->data['title'] = 'Pembelian';
$this->data['pembelians'] = Pembelian::find($id);
return view('adminlte::inventori.ListPembelian.pdfpembelian',$this->data);
}
//----------------------------Cetak PDF----------------------------//
public function pdfrequest($id)
{
$this->data['title'] = 'Cetak Request';
$this->data['request_barangs'] = RequestBarang::find($id);
return view('adminlte::inventori.ListRequest.pdfrequest',$this->data);
}
public function ListRequest()
{ {
$request_barangs = RequestBarang::all(); $request_barangs = RequestBarang::all();
return view('adminlte::inventori.ListRequest.index', compact('request_barangs')); return view('adminlte::inventori.ListRequest.index', compact('request_barangs'));
...@@ -142,11 +153,9 @@ class InventoriController extends Controller ...@@ -142,11 +153,9 @@ class InventoriController extends Controller
$data_requests->kategori = $request['kategori']; $data_requests->kategori = $request['kategori'];
$data_requests->harga = $request['harga']; $data_requests->harga = $request['harga'];
$data_requests->save(); $data_requests->save();
return redirect('DataRequest'); return redirect('DataRequest')->with('message','Data Request Berhasil Di Tambah');
} }
<<<<<<< HEAD
=======
public function editDataRequest($id) public function editDataRequest($id)
{ {
...@@ -168,7 +177,7 @@ class InventoriController extends Controller ...@@ -168,7 +177,7 @@ class InventoriController extends Controller
$data_requests->kategori = $request->kategori; $data_requests->kategori = $request->kategori;
$data_requests->harga = $request->harga; $data_requests->harga = $request->harga;
$data_requests->save(); $data_requests->save();
return redirect('DataRequest'); return redirect('DataRequest')->with('message','Data Request Berhasil Di Ubah');
} }
...@@ -177,13 +186,9 @@ class InventoriController extends Controller ...@@ -177,13 +186,9 @@ class InventoriController extends Controller
{ {
$data_requests = DataRequest::find($id); $data_requests = DataRequest::find($id);
$data_requests->delete(); $data_requests->delete();
return redirect('DataRequest'); return redirect('DataRequest')->with('message','Data Barang Berhasil Di Hapus');
} }
<<<<<<< HEAD
=======
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
public function konfirmasiBarang($id) public function konfirmasiBarang($id)
{ {
...@@ -193,7 +198,7 @@ class InventoriController extends Controller ...@@ -193,7 +198,7 @@ class InventoriController extends Controller
$datauP->update(); $datauP->update();
return redirect('ListRequest'); return redirect('ListRequest')->with('message','Data Barang Berhasil Di Konfirmasi');
} }
...@@ -202,11 +207,15 @@ class InventoriController extends Controller ...@@ -202,11 +207,15 @@ class InventoriController extends Controller
$datauP = RequestBarang::find ($id); $datauP = RequestBarang::find ($id);
$datauP->status_request = 'Rejected'; $datauP->status_request = 'Rejected';
// $user = User::find($request_barangs->user_id);
// $user->saldo=$user->saldo+$total_harga;
$datauP->update(); $datauP->update();
return redirect('ListRequest'); return redirect('ListRequest')->with('message','Data Barang Berhasil Di Tolak');
} }
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
} }
\ No newline at end of file
...@@ -6,11 +6,7 @@ use Illuminate\Database\Eloquent\Model; ...@@ -6,11 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class Pembelian extends Model class Pembelian extends Model
{ {
<<<<<<< HEAD
protected $table = 'pembelians';
=======
protected $table = 'pembelians'; protected $table = 'pembelians';
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
protected $fillable = [ protected $fillable = [
'username','nama_barang', 'kategori','jumlah','total_harga','user_id','status_pengantaran', 'username','nama_barang', 'kategori','jumlah','total_harga','user_id','status_pengantaran',
]; ];
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Transaksi extends Model
{
protected $fillable = [
'username', 'nama_barang', 'kategori','jumlah','total_harga','status_pengantaran',
];
}
...@@ -49,13 +49,11 @@ ...@@ -49,13 +49,11 @@
<span class="glyphicon glyphicon-log-in form-control-feedback"></span> <span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="hidden" class="form-control" placeholder="0" ame="saldo"readonly/> <input type="hidden" class="form-control" placeholder="0" name="saldo"readonly/>
<span class="glyphicon glyphicon-log-in form-control-feedback"></span> <span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<select name="status" class="form-control"> <input type="text" class="form-control" name="status" value="customer" readonly/>
<option value="customer">Customer</option>
</select>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-1"> <div class="col-xs-1">
......
...@@ -17,16 +17,14 @@ ...@@ -17,16 +17,14 @@
<div class="col-md-9 personal-info"> <div class="col-md-9 personal-info">
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">User ID</label>
<div class="col-lg-6"> <div class="col-lg-6">
<input name="user_id" class="form-control" type="integer" value="{{$user->id}}" readonly> <input name="user_id" class="form-control" type="hidden" value="{{$user->id}}" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Username</label>
<div class="col-lg-6"> <div class="col-lg-6">
<input name="username" class="form-control" type="text" value="{{$user->username}}" readonly> <input name="username" class="form-control" type="hidden" value="{{$user->username}}" readonly>
</div> </div>
</div> </div>
...@@ -75,11 +73,7 @@ ...@@ -75,11 +73,7 @@
<label for="title" class="col-md-4 control-label">Status Pengantaran</label> <label for="title" class="col-md-4 control-label">Status Pengantaran</label>
<div class="col-md-6"> <div class="col-md-6">
<select name="status_pengantaran" class="form-control"> <select name="status_pengantaran" class="form-control">
<<<<<<< HEAD
<option value="Belum">Belum</option>
=======
<option value="Request">Request</option> <option value="Request">Request</option>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</select> </select>
@if ($errors->has('status_pengantaran')) @if ($errors->has('status_pengantaran'))
...@@ -90,6 +84,13 @@ ...@@ -90,6 +84,13 @@
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-lg-6">
<input name="barang_id" class="form-control" type="hidden" value="{{$barangs->id}}" readonly>
</div>
</div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
......
...@@ -5,42 +5,26 @@ ...@@ -5,42 +5,26 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<form action="{{url('/cariBarang')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Username</label>
<input type="text" name="search" placeholder="Nama Barang" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
</form>
<form action="{{url('/cariBarang')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Username</label>
<input type="text" name="search" placeholder="Nama Barang" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
</form>
<!-- <form action="{{url('/customer/menu')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Nama Menu</label>
<input type="text" name="search" placeholder="Nama Menu" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
<button type="submit" id="button-filter" class="btn btn-danger pull-right" style="margin-right: 20px">
<i class="fa fa-search"></i> Search
</button>
</form> -->
<center>Beli Barang</center> <center>Beli Barang</center>
@endsection @endsection
@section('main-content') @section('main-content')
<<<<<<< HEAD
<table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
=======
<form action="{{url('/list')}}">
<div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Username</label>
<input type="text" name="search" placeholder="Nama Barang" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div>
<button type="submit" id="button-filter" class="btn btn-danger pull-right" style="margin-right: 20px">
<i class="fa fa-search"></i> Search
</button>
</form>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Nama Barang</th> <th>Nama Barang</th>
...@@ -62,7 +46,6 @@ ...@@ -62,7 +46,6 @@
<td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 50px; width: 50px; "></td> <td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 50px; width: 50px; "></td>
<td> <td>
<a href="{{ url('/createPembelian', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Beli</a> <a href="{{ url('/createPembelian', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Beli</a>
<!-- <a href="{{ url('/delete', $barang->id) }}" <onclick="return confirm('Yakin mau hapus data ini sob?')" class="btn btn-warning">Delete</a> -->
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
@extends('adminlte::layouts.app') @extends('adminlte::layouts.app')
@section('htmlheader_title') @section('htmlheader_title')
<<<<<<< HEAD
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Histori Transaksi</center>
=======
{{ trans('adminlte_lang::message.home') }} {{ trans('adminlte_lang::message.home') }}
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>Histori Pembelian</center> <center>Histori Pembelian</center>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
@endsection @endsection
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<<<<<<< HEAD
<tr>
<th>Username</th>
=======
<tr> <tr>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Kategori</th> <th>Kategori</th>
<th>Harga</th> <th>Harga</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Total Harga</th> <th>Total Harga</th>
<<<<<<< HEAD
<th>Pengantaran</th>
=======
<th>Status Pengantaran</th> <th>Status Pengantaran</th>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<<<<<<< HEAD
@foreach($pembelian as $pembelians)
<tr>
<td>{{$pembelians->username}}</td>
<td>{{$pembelians->nama_barang}}</td>
<td>{{$pembelians->kategori}}</td>
<td>{{$pembelians->harga}}</td>
<td>{{$pembelians->jumlah}}</td>
<td>{{$pembelians->total_harga}}</td>
<td>{{$pembelians->status_pengantaran}}</td>
=======
@foreach($pembelians as $pembelian) @foreach($pembelians as $pembelian)
<tr> <tr>
<td>{{$pembelian->nama_barang}}</td> <td>{{$pembelian->nama_barang}}</td>
...@@ -58,7 +30,6 @@ ...@@ -58,7 +30,6 @@
<td>{{$pembelian->jumlah}}</td> <td>{{$pembelian->jumlah}}</td>
<td>{{$pembelian->total_harga}}</td> <td>{{$pembelian->total_harga}}</td>
<td>{{$pembelian->status_pengantaran}}</td> <td>{{$pembelian->status_pengantaran}}</td>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</thead> </thead>
<tbody> <tbody>
@foreach($request_barang as $requestBarang) @foreach($request_barangs as $requestBarang)
<tr> <tr>
<td>{{$requestBarang->nama_barang}}</td> <td>{{$requestBarang->nama_barang}}</td>
<td>{{$requestBarang->harga}}</td> <td>{{$requestBarang->harga}}</td>
......
...@@ -15,6 +15,13 @@ ...@@ -15,6 +15,13 @@
<form class="form-horizontal" role="form" method="POST" action="{{url('/saveRequest')}}" > <form class="form-horizontal" role="form" method="POST" action="{{url('/saveRequest')}}" >
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="col-md-9 personal-info"> <div class="col-md-9 personal-info">
<div class="form-group">
<div class="col-lg-6">
<input name="id_data_request" class="form-control" type="hidden" value="{{$data_requests->id}}" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<div class="col-lg-8"> <div class="col-lg-8">
...@@ -23,9 +30,8 @@ ...@@ -23,9 +30,8 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Username</label>
<div class="col-lg-8"> <div class="col-lg-8">
<input name="username" class="form-control" type="text" value="{{$user->username}}" readonly> <input name="username" class="form-control" type="hidden" value="{{$user->username}}" readonly>
</div> </div>
</div> </div>
......
...@@ -10,8 +10,16 @@ ...@@ -10,8 +10,16 @@
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead> <thead>
<tr> <tr>
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Kategori</th> <th>Kategori</th>
<th>Harga</th> <th>Harga</th>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
Dashboard User SI UD-Anthoni Dashboard Customer SI UD-Anthoni
@endsection @endsection
@section('main-content') @section('main-content')
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="panel-body"> <div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b> Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf <br>
</div> </div>
......
...@@ -10,6 +10,13 @@ ...@@ -10,6 +10,13 @@
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead> <thead>
<tr> <tr>
<th>Nama Barang</th> <th>Nama Barang</th>
......
...@@ -14,13 +14,8 @@ ...@@ -14,13 +14,8 @@
<div class="panel-body"> <div class="panel-body">
<form class="form-horizontal" action="{{ url('store') }}" method="POST"> <form class="form-horizontal" action="{{ url('store') }}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
<<<<<<< HEAD
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label>
=======
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama</label> <label for="title" class="col-md-4 control-label">Nama</label>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" > <input type="text" class="form-control" name="nama_barang" value="{{ old('nama_barang') }}" >
@if ($errors->has('nama_barang')) @if ($errors->has('nama_barang'))
...@@ -34,11 +29,7 @@ ...@@ -34,11 +29,7 @@
<div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Stock</label> <label for="title" class="col-md-4 control-label">Stock</label>
<div class="col-md-6"> <div class="col-md-6">
<<<<<<< HEAD
<input type="text" class="form-control" name="stock" value="{{ old('stock') }}" >
=======
<input type="integer" class="form-control" name="stock" value="{{ old('stock') }}" > <input type="integer" class="form-control" name="stock" value="{{ old('stock') }}" >
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
@if ($errors->has('stock')) @if ($errors->has('stock'))
<span class="help-block"> <span class="help-block">
<strong>{{ $errors->first('stock') }}</strong> <strong>{{ $errors->first('stock') }}</strong>
...@@ -67,7 +58,8 @@ ...@@ -67,7 +58,8 @@
<option value="makanan">Makanan</option> <option value="makanan">Makanan</option>
<option value="minuman">Minuman</option> <option value="minuman">Minuman</option>
<option value="alat tulis">Alat Tulis</option> <option value="alat tulis">Alat Tulis</option>
<option value="alat mandi">Alat Mandi</option> <option value="peralatan mandi">Peralatan Mandi</option>
<option value="peralatan mencuci">Peralatan Mencuci</option>
</select> </select>
@if ($errors->has('kategori')) @if ($errors->has('kategori'))
...@@ -78,13 +70,13 @@ ...@@ -78,13 +70,13 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('images') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Gambar</label> <label for="title" class="col-md-4 control-label">Gambar</label>
<div class="col-md-6"> <div class="col-md-6">
<input type="file" class="inputimages" name="gambar" value="{{ old('gambar') }}" > <input type="file" class="inputimages" name="gambar" value="{{ old('gambar') }}" >
@if ($errors->has('image')) @if ($errors->has('gambar'))
<span class="help-block"> <span class="help-block">
<strong>{{ $errors->first('image') }}</strong> <strong>{{ $errors->first('gambar') }}</strong>
</span> </span>
@endif @endif
</div> </div>
......
...@@ -15,11 +15,7 @@ ...@@ -15,11 +15,7 @@
<form class="form-horizontal" action="{{ url('update', $barangs->id) }}" method="POST"> <form class="form-horizontal" action="{{ url('update', $barangs->id) }}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<<<<<<< HEAD
<label for="title" class="col-md-4 control-label">Nama</label>
=======
<label for="title" class="col-md-4 control-label">Nama Barang </label> <label for="title" class="col-md-4 control-label">Nama Barang </label>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $barangs->nama_barang}}" > <input type="text" class="form-control" name="nama_barang" value="{{ $barangs->nama_barang}}" >
@if ($errors->has('nama_barang')) @if ($errors->has('nama_barang'))
...@@ -31,11 +27,7 @@ ...@@ -31,11 +27,7 @@
</div> </div>
<<<<<<< HEAD
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
=======
<div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('stock') ? ' has-error' : '' }}">
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<label for="title" class="col-md-4 control-label">Stock</label> <label for="title" class="col-md-4 control-label">Stock</label>
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" name="stock" value="{{ $barangs->stock}}" > <input type="text" class="form-control" name="stock" value="{{ $barangs->stock}}" >
...@@ -61,7 +53,7 @@ ...@@ -61,7 +53,7 @@
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label" value="{{ $barangs->gambar }}">Kategori</label> <label for="title" class="col-md-4 control-label" value="{{ $barangs->kategori }}">Kategori</label>
<div class="col-md-6"> <div class="col-md-6">
<select name="kategori" class="form-control"> <select name="kategori" class="form-control">
<option value="makanan">Makanan</option> <option value="makanan">Makanan</option>
...@@ -78,7 +70,7 @@ ...@@ -78,7 +70,7 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Gambar</label> <label for="title" class="col-md-4 control-label">Gambar</label>
<div class="col-md-6"> <div class="col-md-6">
<input type="file" class="inputimages" name="gambar" value="{{ $barangs->gambar }}" > <input type="file" class="inputimages" name="gambar" value="{{ $barangs->gambar }}" >
......
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead> <thead>
<tr> <tr>
<th>Nama Barang</th> <th>Nama Barang</th>
...@@ -28,11 +36,10 @@ ...@@ -28,11 +36,10 @@
<td>{{$barang->stock}}</td> <td>{{$barang->stock}}</td>
<td>{{$barang->harga}}</td> <td>{{$barang->harga}}</td>
<td>{{$barang->kategori}}</td> <td>{{$barang->kategori}}</td>
<td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 150px; width: 200px; "> </td> <td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 55px; width: 50px; "> </td>
<td> <td>
<a href="{{ url('/edit', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Edit</a> <a href="{{ url('/edit', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Edit</a>
<a href="{{ url('/delete', $barang->id) }}" class="btn btn-warning">Delete</a> <a href="{{ url('/delete', $barang->id) }}" class="btn btn-warning">Delete</a>
<!-- <a href="{{ url('/delete', $barang->id) }}" <onclick="return confirm('Yakin mau hapus data ini sob?')" class="btn btn-warning">Delete</a> -->
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
<td>{{$pembelian->harga}}</td> <td>{{$pembelian->harga}}</td>
<td>{{$pembelian->jumlah}}</td> <td>{{$pembelian->jumlah}}</td>
<td>{{$pembelian->total_harga}}</td> <td>{{$pembelian->total_harga}}</td>
<td>
<a href="{{url('/pdfpembelian', $pembelian->id)}}" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
<!DOCTYPE html>
<html idmmzcc-ext-docid="480679936" style="height: auto;">
<head>
<meta charset="utf-8">
<center><title>UD Antoni</title></center>
</head>
<body onload="window.print();">
<div class="wrapper">
<!-- Main content -->
<section class="invoice">
<!-- title row -->
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-globe"></i> Pembelian Barang
<small class="pull-right">Bukti Pembelian</small>
</h2>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info"></div>
<!-- Table row -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<form class="form-horizontal" action="{{ url('') }}" method="POST">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('id') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">ID</label>
<div class="col-md-6">
<input type="text" class="form-control" name="id" value="{{ $pembelians->id}}" readonly>
@if ($errors->has('id'))
<span class="help-block">
<strong>{{ $errors->first('id') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">username</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_bus" value="{{ $pembelians->username}}" readonly>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $pembelians->nama_barang}}" readonly>
@if ($errors->has('nama_barang'))
<span class="help-block">
<strong>{{ $errors->first('nama_barang') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Kategori</label>
<div class="col-md-6">
<input type="text" class="form-control" name="kategori" value="{{ $pembelians->kategori}}" readonly>
@if ($errors->has('kategori'))
<span class="help-block">
<strong>{{ $errors->first('kategori') }}</strong>
</span>
@endif
</div>
</div>
</form>
</table>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- ./wrapper -->
</body>
</html>
\ No newline at end of file
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
</form> </form>
@endif @endif
</td> </td>
<td>
@if($requestBarang->status_request=="Terkonfirmasi")
<a href="{{url('/pdfrequest', $requestBarang->id)}}" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
@endif
</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body onload="window.print();">
<div class="wrapper">
<!-- Main content -->
<section class="invoice">
<!-- title row -->
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-globe"></i> Pembelian Barang
<small class="pull-right">Bukti Pembelian</small>
</h2>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info"></div>
<!-- Table row -->
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<form class="form-horizontal" action="{{ url('') }}" method="POST">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">username</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_bus" value="{{ $request_barangs->username}}" readonly>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('nama_barang') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama Barang</label>
<div class="col-md-6">
<input type="text" class="form-control" name="nama_barang" value="{{ $request_barangs->nama_barang}}" readonly>
@if ($errors->has('nama_barang'))
<span class="help-block">
<strong>{{ $errors->first('nama_barang') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('kategori') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Kategori</label>
<div class="col-md-6">
<input type="text" class="form-control" name="kategori" value="{{ $request_barangs->kategori}}" readonly>
@if ($errors->has('kategori'))
<span class="help-block">
<strong>{{ $errors->first('kategori') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="harga" value="{{ $request_barangs->harga}}" readonly>
@if ($errors->has('harga'))
<span class="help-block">
<strong>{{ $errors->first('harga') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">jumlah</label>
<div class="col-md-6">
<input type="text" class="form-control" name="jumlah" value="{{ $request_barangs->jumlah}}" readonly>
@if ($errors->has('jumlah'))
<span class="help-block">
<strong>{{ $errors->first('jumlah') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="harga" value="{{ $request_barangs->harga}}" readonly>
@if ($errors->has('harga'))
<span class="help-block">
<strong>{{ $errors->first('harga') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('jumlah') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">jumlah</label>
<div class="col-md-6">
<input type="text" class="form-control" name="jumlah" value="{{ $request_barangs->jumlah}}" readonly>
@if ($errors->has('jumlah'))
<span class="help-block">
<strong>{{ $errors->first('jumlah') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('total_harga') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">total_harga</label>
<div class="col-md-6">
<input type="text" class="form-control" name="total_harga" value="{{ $request_barangs->total_harga}}" readonly>
@if ($errors->has('total_harga'))
<span class="help-block">
<strong>{{ $errors->first('total_harga') }}</strong>
</span>
@endif
</div>
</div>
</form>
</table>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- ./wrapper -->
</body>
</html>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
Dashboard User SI UD-Anthoni Dashboard Inventori SI UD-Anthoni
@endsection @endsection
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="panel-body"> <div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b> Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf <br>
</div> </div>
......
...@@ -5,17 +5,22 @@ ...@@ -5,17 +5,22 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<form action="{{url('/cariCustomer')}}"> <form action="{{url('/cariCustomer')}}">
<div class="form-group"> <div class="form-group">
<label style="margin: 20px 20px 0;font-size: 15px">Search by Email Username</label> <label style="margin: 20px 20px 0;font-size: 15px">Search by Email Username</label>
<input type="text" name="search" placeholder="Email Customer" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/> <input type="text" name="search" placeholder="Email Customer" id="search" class="form-control" style="font-size: 15px;color:white;background-color:rgba(0,0,0,0.4)"/>
</div> </div>
</form> </form>
<center>List Customer</center> <center>List Customer</center>
@endsection @endsection
@section('main-content') @section('main-content')
<table class="table table-striped"> <table class="table table-striped">
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<thead> <thead>
<tr> <tr>
<th>Nama</th> <th>Nama</th>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
Dashboard User SI UD-Anthoni Dashboard Kasir SI UD-Anthoni
@endsection @endsection
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="panel-body"> <div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b> Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf <br>
</div> </div>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
Dashboard User SI UD-Anthoni
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-body">
Selamat Datang : <b>{{ Auth::user()->name }}</b>
<br> fdgf
</div>
</div>
</div>
</div>
</div>
<center> <img src="/Admin_lte_Repair/public/images/coba.jpg" style="height: 450px; width: 1000px;" /></center>
@endsection
...@@ -4,8 +4,5 @@ ...@@ -4,8 +4,5 @@
@yield('contentheader_title', 'Page Header here') @yield('contentheader_title', 'Page Header here')
<small>@yield('contentheader_description')</small> <small>@yield('contentheader_description')</small>
</h1> </h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> {{ trans('adminlte_lang::message.level') }}</a></li>
<li class="active">{{ trans('adminlte_lang::message.here') }}</li>
</ol>
</section> </section>
\ No newline at end of file
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<!-- Logo --> <!-- Logo -->
<a href="{{ url('/home') }}" class="logo"> <a href="{{ url('/home') }}" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels --> <!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>A</b>LT</span> <span class="logo-mini"><b>IS</b>U</span>
<!-- logo for regular state and mobile devices --> <!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Admin</b>LTE Laravel </span> <span class="logo-lg"><b>IS</b>UD Antoni</span>
</a> </a>
<!-- Header Navbar --> <!-- Header Navbar -->
...@@ -24,41 +24,15 @@ ...@@ -24,41 +24,15 @@
<li><a href="{{ url('/login') }}">{{ trans('adminlte_lang::message.login') }}</a></li> <li><a href="{{ url('/login') }}">{{ trans('adminlte_lang::message.login') }}</a></li>
@else @else
<!-- User Account Menu --> <!-- User Account Menu -->
<li class="dropdown user user-menu"> <li class="link">
<!-- Menu Toggle Button --> <a href="{{url('/logout')}}"onclick="event.preventDefault();
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> document.getElementById('logout-form').submit();" style="font-weight: bold; color:white;">Logout</a>
<!-- The user image in the navbar--> <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
<img src="{{ Gravatar::get($user->email) }}" class="user-image" alt="User Image"/> {{ csrf_field() }}
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs">{{ Auth::user()->name }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('/settings') }}" class="btn btn-default btn-flat">{{ trans('adminlte_lang::message.profile') }}</a>
</div>
<div class="pull-right">
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ trans('adminlte_lang::message.signout') }}
</a>
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
<input type="submit" value="logout" style="display: none;"> <input type="submit" value="logout" style="display: none;">
</form> </form>
</li>
</div>
</li>
</ul>
</li>
@endif @endif
</ul> </ul>
......
...@@ -8,47 +8,31 @@ ...@@ -8,47 +8,31 @@
@if (! Auth::guest()) @if (! Auth::guest())
<div class="user-panel"> <div class="user-panel">
<div class="pull-left image"> <div class="pull-left image">
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" /> <img src="/p2d4ti08/public/image/avatar5.png" class="img-circle" alt="User Image" />
</div> </div>
<div class="pull-left info"> <div class="pull-left info">
<p>{{ Auth::user()->name }}</p> <br>
<!-- Status --> <p>{{ Auth::user()->username }}</p>
<a href="#"><i class="fa fa-circle text-success"></i> {{ trans('adminlte_lang::message.online') }}</a>
</div> </div>
</div> </div>
@endif @endif
<!-- search form (Optional) -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="{{ trans('adminlte_lang::message.search') }}..."/>
<span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- Sidebar Menu --> <!-- Sidebar Menu -->
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li class="header">{{ trans('adminlte_lang::message.header') }}</li> <li class="header">{{ trans('adminlte_lang::message.header') }}</li>
@if(Auth::user()->status=="admin") @if(Auth::user()->status=="admin")
<li><a href="{{ url('listPetugas') }}"><i class='fa fa-link'></i> <span>Daftar Pegawai</span></a></li> <li><a href="{{ url('listPetugas') }}"><i class='fa fa-link'></i> <span>Daftar Pegawai</span></a></li>
<!-- <li><a href="{{ url('laporanTransaksi') }}"><i class='fa fa-link'></i> <span>Laporan Transaksi</span></a></li> -->
@elseif(Auth::user()->status=="customer") @elseif(Auth::user()->status=="customer")
<li><a href="{{ url('/BeliBarang') }}"><i class='fa fa-link'></i> <span>Beli Barang</span></a></li> <li><a href="{{ url('/BeliBarang') }}"><i class='fa fa-link'></i> <span>Beli Barang</span></a></li>
<li><a href="{{ url('/RequestBarang') }}"><i class='fa fa-link'></i> <span>Request Barang</span></a></li> <li><a href="{{ url('/RequestBarang') }}"><i class='fa fa-link'></i> <span>Request Barang</span></a></li>
<<<<<<< HEAD
<li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li>
<li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li>
=======
<li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li> <li><a href="{{ url('/CheckSaldo') }}"><i class='fa fa-link'></i> <span>Check Saldo</span></a></li>
<li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li> <li><a href="{{ url('/HistoryPembelian') }}"><i class='fa fa-link'></i> <span>History Pembelian</span></a></li>
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
<li><a href="{{ url('/HistoryRequest') }}"><i class='fa fa-link'></i> <span>History Request</span></a></li> <li><a href="{{ url('/HistoryRequest') }}"><i class='fa fa-link'></i> <span>History Request</span></a></li>
......
...@@ -51,35 +51,24 @@ Route::group(['middleware' => ['web','auth','admin']], function () { ...@@ -51,35 +51,24 @@ Route::group(['middleware' => ['web','auth','admin']], function () {
Route::group(['middleware' => ['web','auth','customer']], function () { Route::group(['middleware' => ['web','auth','customer']], function () {
Route::get('/BeliBarang', 'CustomerController@BeliBarang'); Route::get('/BeliBarang', 'CustomerController@BeliBarang');
Route::get('/createPembelian/{id}', 'CustomerController@createPembelian');
Route::post('/storePembelian', 'CustomerController@storePembelian');
Route::post('/savePembelian', 'CustomerController@savePembelian');
Route::get('/cariBarang','CustomerController@cariBarang');
Route::get('/CheckSaldo', 'CustomerController@CheckSaldo'); Route::get('/CheckSaldo', 'CustomerController@CheckSaldo');
Route::get('/createPembelian/{id}', 'CustomerController@createPembelian'); Route::get('/createPembelian/{id}', 'CustomerController@createPembelian');
Route::post('/storePembelian', 'CustomerController@storePembelian'); Route::post('/storePembelian', 'CustomerController@storePembelian');
Route::post('/savePembelian', 'CustomerController@savePembelian'); Route::post('/savePembelian', 'CustomerController@savePembelian');
Route::get('/list','CustomerController@list'); Route::get('/cariBarang','CustomerController@cariBarang');
Route::get('/RequestBarang', 'CustomerController@RequestBarang'); Route::get('/RequestBarang', 'CustomerController@RequestBarang');
Route::get('/createRequest/{id}', 'CustomerController@createRequest'); Route::get('/createRequest/{id}', 'CustomerController@createRequest');
Route::post('/storeRequest', 'CustomerController@storeRequest'); Route::post('/storeRequest', 'CustomerController@storeRequest');
Route::post('/saveRequest', 'CustomerController@saveRequest'); Route::post('/saveRequest', 'CustomerController@saveRequest');
<<<<<<< HEAD
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
});
=======
Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian'); Route::get('/HistoryPembelian', 'CustomerController@HistoryPembelian');
Route::get('/HistoryRequest', 'CustomerController@HistoryRequest'); Route::get('/HistoryRequest', 'CustomerController@HistoryRequest');
}); });
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
...@@ -109,6 +98,9 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -109,6 +98,9 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::post('/RejectedBarang/{id}', 'InventoriController@RejectedBarang'); Route::post('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
Route::put('/RejectedBarang/{id}', 'InventoriController@RejectedBarang'); Route::put('/RejectedBarang/{id}', 'InventoriController@RejectedBarang');
Route::get('/pdfpembelian/{id}', 'InventoriController@pdfpembelian');
Route::get('/pdfrequest/{id}', 'InventoriController@pdfrequest');
}); });
...@@ -116,17 +108,13 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -116,17 +108,13 @@ Route::group(['middleware' => ['web','auth','inventori']], function () {
Route::group(['middleware' => ['web','auth','kasir']], function () { Route::group(['middleware' => ['web','auth','kasir']], function () {
Route::get('/ListCustomer', 'KasirController@ListCustomer'); Route::get('/ListCustomer', 'KasirController@ListCustomer');
<<<<<<< HEAD
Route::get('/ListTransaksi', 'KasirController@ListTransaksi');
Route::get('/cariCustomer','KasirController@cariCustomer');
=======
Route::get('/ListPembelians', 'KasirController@ListPembelians'); Route::get('/ListPembelians', 'KasirController@ListPembelians');
Route::get('/ListRequests', 'KasirController@ListRequests'); Route::get('/ListRequests', 'KasirController@ListRequests');
>>>>>>> a17ddf8bc12377e6e5ef35936262631b43110865
Route::get('/addSaldo/{id}','KasirController@addSaldo'); Route::get('/addSaldo/{id}','KasirController@addSaldo');
Route::put('/saldo/{id}','KasirController@saldo'); Route::put('/saldo/{id}','KasirController@saldo');
Route::post('/konfPengantaran/{id}', 'KasirController@konfPengantaran'); Route::post('/konfPengantaran/{id}', 'KasirController@konfPengantaran');
Route::put('/konfPengantaran/{id}', 'KasirController@konfPengantaran'); Route::put('/konfPengantaran/{id}', 'KasirController@konfPengantaran');
Route::post('/konfAntar/{id}', 'KasirController@konfAntar'); Route::post('/konfAntar/{id}', 'KasirController@konfAntar');
Route::put('/konfAntar/{id}', 'KasirController@konfAntar'); Route::put('/konfAntar/{id}', 'KasirController@konfAntar');
Route::get('/cariCustomer','KasirController@cariCustomer');
}); });
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