Commit eea96b68 by jhon

Merge branch 'master' of https://gitlab.del.ac.id/charles/pa21617d4ti08

# Conflicts: # app/Http/Controllers/InventoriController.php
parents c5d1f3ff 226a4f92
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Customer extends Model
{
protected $fillable = [
'name', 'email', 'username','password','saldo',
];
}
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
use App\Transaksi;
use App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class AdminController extends Controller class AdminController extends Controller
{ {
public function laporanTransaksi() public function laporanTransaksi()
{ {
return view('adminlte::admin.laporanTransaksi.index'); $transaksis = Transaksi::all();
return view('adminlte::admin.laporanTransaksi.index', compact('transaksis'));
} }
public function listPetugas() public function listPetugas()
{ {
return view('adminlte::admin.listPetugas.index'); $users = User::where([['status','!=','customer'], ['status','!=', 'admin']])->get();
return view('adminlte::admin.listPetugas.index', compact('users'));
}
public function createPetugas()
{
return view('adminlte::admin.listPetugas.create');
}
public function storePetugas(Request $request)
{
$this->validate($request, [
'name' => 'required',
'email' => 'required',
'username' => 'required',
'password' => 'required',
'status' => 'required',
]);
$users = new User();
$users->name = $request['name'];
$users->email = $request['email'];
$users->username =$request['username'];
$users->password =bcrypt($request['password']);
$users->status = $request['status'];
$users->save();
return redirect('listPetugas');
}
public function destroyPetugas($id)
{
$users = User::find($id);
$users->delete();
return redirect('listPetugas');
}
public function editPetugas($id)
{
$users = User::where('id', $id)->first();
return view('adminlte::admin.listPetugas.edit')->with('users', $users);
}
public function updatePetugas(Request $request, $id)
{
$this->validate($request, [
'name' => 'required',
'email' => 'required',
'username' => 'required',
'password' => 'required',
'status' => 'required',
]);
$users = User::findOrFail($id);
$users->name = $request->name;
$users->email = $request->email;
$users->username = $request->username;
$users->password = bcrypt($request->password);
$users->status = $request->status;
$users->save();
return redirect('listPetugas');
} }
} }
\ No newline at end of file
...@@ -9,9 +9,8 @@ use App\RequestBarang; ...@@ -9,9 +9,8 @@ use App\RequestBarang;
use App\DataRequest; use App\DataRequest;
use App\Http\Requests; use App\Http\Requests;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Auth;
class CustomerController extends Controller class CustomerController extends Controller
{ {
...@@ -76,17 +75,20 @@ class CustomerController extends Controller ...@@ -76,17 +75,20 @@ class CustomerController extends Controller
public function saveRequest(Request $request) public function saveRequest(Request $request)
{ {
$input = $request->all(); $request_barangs = new RequestBarang();
RequestBarang::create($input); $request_barangs->user_id = $request->user_id;
// $this->data['request_barang']=DB::table('request_barangs')->where('status','==',1)->get(); $request_barangs->username = $request->username;
// $transaksi = new Transaksi(); $request_barangs->nama_barang = $request->nama_barang;
// $transaksi->tempat = $request->tempat; $request_barangs->kategori = $request->kategori;
// $transaksi->kerusakan = $request->kerusakan; $request_barangs->harga =$request->harga;
// $transaksi->petugas = $request->petugas; $request_barangs->jumlah = $request->jumlah;
// $transaksi->schedule = $request->schedule; $harga = $request->harga;
// $transaksi->user_id = $request->user_id; $jumlah = $request->jumlah;
// $transaksi->save(); $total_harga = $harga * $jumlah;
// return redirect('dataOrder',$this->data); $request_barangs->total_harga = $total_harga;
$request_barangs->status_request = $request->status_request;
$request_barangs->status_pengantaran = $request->status_pengantaran;
$request_barangs->save();
return redirect('RequestBarang'); return redirect('RequestBarang');
} }
...@@ -105,6 +107,7 @@ class CustomerController extends Controller ...@@ -105,6 +107,7 @@ class CustomerController extends Controller
//----------------------------Histori Transaksi----------------------// //----------------------------Histori Transaksi----------------------//
public function HistoryTransaksi() public function HistoryTransaksi()
{ {
return view('adminlte::customer.HistoryTransaksi.index'); $request_barangs = RequestBarang::all();
return view('adminlte::customer.HistoryTransaksi.index')->with('request_barangs', $request_barangs);
} }
} }
\ No newline at end of file
...@@ -7,6 +7,9 @@ use Illuminate\Http\Request; ...@@ -7,6 +7,9 @@ use Illuminate\Http\Request;
use App\Http\Requests; use App\Http\Requests;
use App\Barang; use App\Barang;
use App\RequestBarang;
use App\DataRequest;
use App\RequestBarang; use App\RequestBarang;
...@@ -32,7 +35,6 @@ class InventoriController extends Controller ...@@ -32,7 +35,6 @@ class InventoriController extends Controller
'nama' => 'required', 'nama' => 'required',
'jumlah' => 'required', 'jumlah' => 'required',
'harga' => 'required', 'harga' => 'required',
'deskripsi' => 'required',
'kategori' => 'required', 'kategori' => 'required',
'gambar' => 'required', 'gambar' => 'required',
]); ]);
...@@ -41,7 +43,6 @@ class InventoriController extends Controller ...@@ -41,7 +43,6 @@ class InventoriController extends Controller
$barangs->nama = $request['nama']; $barangs->nama = $request['nama'];
$barangs->jumlah = $request['jumlah']; $barangs->jumlah = $request['jumlah'];
$barangs->harga = $request['harga']; $barangs->harga = $request['harga'];
$barangs->deskripsi = $request['deskripsi'];
$barangs->kategori = $request['kategori']; $barangs->kategori = $request['kategori'];
$barangs->gambar = $request['gambar']; $barangs->gambar = $request['gambar'];
$barangs->save(); $barangs->save();
...@@ -62,7 +63,6 @@ class InventoriController extends Controller ...@@ -62,7 +63,6 @@ class InventoriController extends Controller
'nama' => 'required', 'nama' => 'required',
'jumlah' => 'required', 'jumlah' => 'required',
'harga' => 'required', 'harga' => 'required',
'deskripsi' => 'required',
'kategori' => 'required', 'kategori' => 'required',
'gambar' => 'required', 'gambar' => 'required',
]); ]);
...@@ -71,7 +71,6 @@ class InventoriController extends Controller ...@@ -71,7 +71,6 @@ class InventoriController extends Controller
$barangs->nama = $request->nama; $barangs->nama = $request->nama;
$barangs->jumlah = $request->jumlah; $barangs->jumlah = $request->jumlah;
$barangs->harga = $request->harga; $barangs->harga = $request->harga;
$barangs->deskripsi = $request->deskripsi;
$barangs->kategori = $request->kategori; $barangs->kategori = $request->kategori;
$barangs->gambar = $request->gambar; $barangs->gambar = $request->gambar;
$barangs->save(); $barangs->save();
...@@ -87,8 +86,14 @@ class InventoriController extends Controller ...@@ -87,8 +86,14 @@ class InventoriController extends Controller
return redirect('ListBarang'); return redirect('ListBarang');
} }
public function ListRequest()
{
$request_barangs = RequestBarang::all();
return view('adminlte::inventori.ListRequest.index', compact('request_barangs'));
}
<<<<<<< HEAD
//----------------------------List Request----------------------// //----------------------------List Request----------------------//
public function ListRequest() public function ListRequest()
...@@ -100,6 +105,10 @@ class InventoriController extends Controller ...@@ -100,6 +105,10 @@ class InventoriController extends Controller
public function editRequest($id) public function editRequest($id)
{ {
=======
public function editRequest($id)
{
>>>>>>> 226a4f92be2de6ce884543bf9425346660a5031f
$request_barangs = RequestBarang::where('id', $id)->first(); $request_barangs = RequestBarang::where('id', $id)->first();
return view('adminlte::inventori.ListRequest.edit')->with('request_barangs', $request_barangs); return view('adminlte::inventori.ListRequest.edit')->with('request_barangs', $request_barangs);
} }
...@@ -133,6 +142,7 @@ class InventoriController extends Controller ...@@ -133,6 +142,7 @@ class InventoriController extends Controller
$data_requests->harga = $request['harga']; $data_requests->harga = $request['harga'];
$data_requests->save(); $data_requests->save();
return redirect('DataRequest'); return redirect('DataRequest');
<<<<<<< HEAD
} }
...@@ -166,5 +176,42 @@ class InventoriController extends Controller ...@@ -166,5 +176,42 @@ 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');
=======
>>>>>>> 226a4f92be2de6ce884543bf9425346660a5031f
} }
public function editDataRequest($id)
{
$data_requests = DataRequest::where('id', $id)->first();
return view('adminlte::inventori.DataRequest.editDataRequest')->with('data_requests', $data_requests);
}
public function updateDataRequest(Request $request, $id)
{
$this->validate($request, [
'nama_barang' => 'required',
'kategori' => 'required',
'harga' => 'required',
]);
$data_requests = DataRequest::findOrFail($id);
$data_requests->nama_barang = $request->nama_barang;
$data_requests->kategori = $request->kategori;
$data_requests->harga = $request->harga;
$data_requests->save();
return redirect('DataRequest');
}
public function destroyDataRequest($id)
{
$data_requests = DataRequest::find($id);
$data_requests->delete();
return redirect('DataRequest');
}
} }
\ No newline at end of file
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
use App\Transaksi;
class KasirController extends Controller class KasirController extends Controller
{ {
public function ListCustomer() public function ListCustomer()
{ {
return view('adminlte::kasir.ListCustomer.index'); $users = User::where('status', 'like', 'customer')->get();
return view('adminlte::kasir.ListCustomer.index', compact('users'));
} }
public function ListTransaksi()
{
$transaksis = Transaksi::all();
return view('adminlte::kasir.ListTransaksi.index', compact('transaksis'));
}
public function addSaldo($id)
{
$users = User::where('id', $id)->first();
return view('adminlte::kasir.ListCustomer.addSaldo')->with('users', $users);
}
public function saldo(Request $request,$id){
$data = User::find($id);
$data->saldo = $data->saldo+$request['saldo'];
$data->update();
return redirect('ListCustomer');
}
public function KonfirmasiBarang($id){
DB::table('request_barangs')->where('id', $id)->update(['status_request'=> 1]);
return redirect()->back();
}
} }
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Petugas extends Model
{
protected $table = 'petugass';
protected $fillable = [
'name', 'email', 'username','password',
];
}
...@@ -8,7 +8,7 @@ class RequestBarang extends Model ...@@ -8,7 +8,7 @@ class RequestBarang extends Model
{ {
protected $table = 'request_barangs'; protected $table = 'request_barangs';
protected $fillable = [ protected $fillable = [
'username', 'nama_barang', 'kategori','jumlah','harga','total_harga','status_request','status_pengantaran', 'username', 'nama_barang', 'kategori','jumlah','harga','total_harga','user_id','status_request','status_pengantaran',
]; ];
public function user(){ public function user(){
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Transaksi extends Model
{
protected $fillable = [
'username', 'nama_barang', 'kategori','jumlah','total_harga','status_pengantaran',
];
}
...@@ -15,7 +15,7 @@ class User extends Authenticatable ...@@ -15,7 +15,7 @@ class User extends Authenticatable
* @var array * @var array
*/ */
protected $fillable = [ protected $fillable = [
'name','email','username', 'status', 'password','saldo', 'name','email','username', 'status', 'password','saldo'
]; ];
/** /**
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Laporan Transaksi</center>
@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>
</div>
</div>
</div>
@endsection
@extends('adminlte::layouts.auth')
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Register Petugas</center>
@section('main-content')
<body class="hold-transition register-page">
<div id="app">
<div class="register-box">
<!-- @if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
-->
<div class="register-box-body">
<p class="login-box-msg">{{ trans('adminlte_lang::message.registermember') }}</p>
<form action="{{ url('/storePetugas') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="{{ trans('adminlte_lang::message.fullname') }}" name="name" value="{{ old('name') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="{{ trans('adminlte_lang::message.email') }}" name="email" value="{{ old('email') }}"/>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="Username" name="username" value="{{ old('username') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="{{ trans('adminlte_lang::message.password') }}" name="password"/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="{{ trans('adminlte_lang::message.retrypepassword') }}" name="password_confirmation"/>
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="hidden" class="form-control" placeholder="0" name="saldo" readonly/>
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<select name="status" class="form-control">
<option value="kasir">Kasir</option>
<option value="inventori">Inventori</option>
</select>
</div>
<div class="row">
<div class="col-xs-1">
<label>
</label>
</div><!-- /.col -->
<div class="col-xs-6">
<div class="form-group">
</div>
</div><!-- /.col -->
<div class="col-xs-4 col-xs-push-1">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('adminlte_lang::message.register') }}</button>
</div><!-- /.col -->
</div>
</form>
</div><!-- /.form-box -->
</div><!-- /.register-box -->
</div>
@include('adminlte::layouts.partials.scripts_auth')
@include('adminlte::auth.terms')
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>
</body>
@endsection
@endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Edit
@endsection
@section('contentheader_title')
Page Edit Request
@endsection
@section('main-content')
<div class="container">
<div class="col-md-8 col-md-offset-2">
<div class="panel-body">
<form class="form-horizontal" action="{{ url('/updatePetugas', $users->id) }}" method="POST">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Nama</label>
<div class="col-md-6">
<input type="text" class="form-control" name="name" value="{{ $users->name}}" >
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Email</label>
<div class="col-md-6">
<input type="text" class="form-control" name="email" value="{{ $users->email}}" >
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</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="username" value="{{ $users->username }}" >
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Password</label>
<div class="col-md-6">
<input type="password" class="form-control" name="password" value="{{ $users->password }}" >
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('status') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label" value="{{ $users->status }}">Status</label>
@if ($errors->has('status'))
<span class="help-block">
<strong>{{ $errors->first('status') }}</strong>
</span>
@endif
<div class="col-md-6">
<select name="status" class="form-control">
<option value="kasir">Kasir</option>
<option value="inventori">Inventori</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Simpan
</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
\ No newline at end of file
...@@ -9,24 +9,30 @@ ...@@ -9,24 +9,30 @@
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <table class="table table-striped">
<div class="row"> <thead>
<div class="col-md-8 col-md-offset-2"> <tr>
<div class="panel panel-default"> <th>Nama</th>
<!-- <div class="panel-heading">Home</div> <th>Email</th>
<div class="panel-body"> <th>Username</th>
<label style="font-weight:bolder;color:black;font-size: 17px">List Pegawai</label><br> <th>Status</th>
Merupakan halaman list pegawai UD Antoni. Admin dapat melihat daftar pegawai dan melakukan penghapusan dan penambahan pegawai baru. <th>Action</th>
<br><br> </tr>
</thead>
<label style="font-weight:bolder;color:black;font-size: 17px">Laporan Transaksi</label><br> <tbody>
Merupakan halaman list transaksi dari layanan admin. User dapat melihat daftar member cafe dan melakukan penghapusan terhadap member. @foreach($users as $user)
</li> <tr>
{{ trans('adminlte_lang::message.logged') }} <td>{{$user->name}}</td>
</div> --> <td>{{$user->email}}</td>
</div> <td>{{$user->username}}</td>
</div> <td>{{$user->status}}</td>
</div> <td>
</div> <a href="{{ url('/editPetugas', $user->id) }}" type="submit" button type="button" class="btn btn-warning">Edit</a>
<a href="{{ url('/deletePetugas', $user->id) }}" type="submit" button type="button" class="btn btn-warning">Delete</a>
</tr>
@endforeach
</tbody>
</table>
<a href="{{ url('/createPetugas') }}" button type="button" class="btn btn-info">Create</a></button>
@endsection @endsection
...@@ -49,15 +49,12 @@ ...@@ -49,15 +49,12 @@
<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="int" class="form-control" placeholder="0" ame="saldo"readonly/> <input type="hidden" class="form-control" placeholder="0" ame="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"> <select name="status" class="form-control">
<option value="user">User</option> <option value="user">User</option>
<option value="admin">Admin</option>
<option value="kasir">Kasir</option>
<option value="inventori">Inventori</option>
</select> </select>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -9,14 +9,32 @@ ...@@ -9,14 +9,32 @@
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <table class="table table-striped">
<div class="row"> <thead>
<div class="col-md-8 col-md-offset-2"> <tr>
<div class="panel panel-default"> <th>Username</th>
<th>Nama Barang</th>
<th>Kategori</th>
<th>Harga</th>
<th>Jumlah</th>
<th>Total Harga</th>
<th>Status Request</th>
</tr>
</thead>
</div> <tbody>
</div> @foreach($request_barangs as $requestBarang)
</div> <tr>
</div> <td>{{$requestBarang->username}}</td>
<td>{{$requestBarang->nama_barang}}</td>
<td>{{$requestBarang->kategori}}</td>
<td>{{$requestBarang->harga}}</td>
<td>{{$requestBarang->jumlah}}</td>
<td>{{$requestBarang->total_harga}}</td>
<td>{{$requestBarang->status_request}}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection @endsection
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
</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="user_id" class="form-control" type="hidden" value="{{$user->username}}" readonly> <input name="username" class="form-control" type="text" value="{{$user->username}}" readonly>
</div> </div>
</div> </div>
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
Dashboard User SI UD-Anthoni Dashboard User SI UD-Anthoni
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <div class="container-fluid spark-screen">
<div class="row"> <div class="row">
......
...@@ -50,19 +50,6 @@ ...@@ -50,19 +50,6 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('deskripsi') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Deskripsi</label>
<div class="col-md-6">
<input type="text" class="form-control" name="deskripsi" value="{{ old('deskripsi') }}" >
@if ($errors->has('deskripsi'))
<span class="help-block">
<strong>{{ $errors->first('deskripsi') }}</strong>
</span>
@endif
</div>
</div>
<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">Kategori</label> <label for="title" class="col-md-4 control-label">Kategori</label>
<div class="col-md-6"> <div class="col-md-6">
...@@ -81,18 +68,19 @@ ...@@ -81,18 +68,19 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('gambar') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('images') ? ' 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="text" class="form-control" name="gambar" value="{{ old('gambar') }}" > <input type="file" class="inputimages" name="gambar" value="{{ old('gambar') }}" >
@if ($errors->has('gambar')) @if ($errors->has('image'))
<span class="help-block"> <span class="help-block">
<strong>{{ $errors->first('gambar') }}</strong> <strong>{{ $errors->first('image') }}</strong>
</span> </span>
@endif @endif
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-6 col-md-offset-4"> <div class="col-md-6 col-md-offset-4">
<input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}">
......
...@@ -51,18 +51,6 @@ ...@@ -51,18 +51,6 @@
</div> </div>
</div> </div>
<div class="form-group{{ $errors->has('deskripsi') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Deskripsi</label>
<div class="col-md-6">
<input type="text" class="form-control" name="deskripsi" value="{{ $barangs->deskripsi }}" >
@if ($errors->has('deskripsi'))
<span class="help-block">
<strong>{{ $errors->first('deskripsi') }}</strong>
</span>
@endif
</div>
</div>
<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->gambar }}">Kategori</label>
...@@ -82,20 +70,14 @@ ...@@ -82,20 +70,14 @@
</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="text" class="form-control" name="gambar" value="{{ $barangs->gambar }}" > <input type="file" class="inputimages" name="gambar" value="{{ $barangs->gambar }}" >
@if ($errors->has('gambar')) {!! $errors->first('gambar', '<p class="help-block">:message</p>') !!}
<span class="help-block">
<strong>{{ $errors->first('gambar') }}</strong>
</span>
@endif
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-6 col-md-offset-4"> <div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<th>Nama Barang</th> <th>Nama Barang</th>
<th>Stock</th> <th>Stock</th>
<th>Harga</th> <th>Harga</th>
<th>Deskripsi</th>
<th>Kategori</th> <th>Kategori</th>
<th>Gambar</th> <th>Gambar</th>
<th>Action</th> <th>Action</th>
...@@ -28,9 +27,8 @@ ...@@ -28,9 +27,8 @@
<td>{{$barang->nama}}</td> <td>{{$barang->nama}}</td>
<td>{{$barang->jumlah}}</td> <td>{{$barang->jumlah}}</td>
<td>{{$barang->harga}}</td> <td>{{$barang->harga}}</td>
<td>{{$barang->deskripsi}}</td>
<td>{{$barang->kategori}}</td> <td>{{$barang->kategori}}</td>
<td>{{$barang->gambar}}</td> <td><img src="{{ asset('image/'. $barang->gambar) }}" style="height: 150px; width: 200px; "> </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>
......
...@@ -5,28 +5,39 @@ ...@@ -5,28 +5,39 @@
@endsection @endsection
@section('contentheader_title') @section('contentheader_title')
<center>List Request</center> <center>Request Barang</center>
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <table class="table table-striped">
<div class="row"> <thead>
<div class="col-md-8 col-md-offset-2"> <tr>
<div class="panel panel-default"> <th>Username</th>
<!-- <div class="panel-heading">Home</div> <th>Nama Barang</th>
<div class="panel-body"> <th>Kategori</th>
<label style="font-weight:bolder;color:black;font-size: 17px">List Pegawai</label><br> <th>Harga</th>
Merupakan halaman list pegawai UD Antoni. Admin dapat melihat daftar pegawai dan melakukan penghapusan dan penambahan pegawai baru. <th>Jumlah</th>
<br><br> <th>Total Harga</th>
<th>Status Request</th>
<th>Action</th>
</tr>
</thead>
<label style="font-weight:bolder;color:black;font-size: 17px">Laporan Transaksi</label><br> <tbody>
Merupakan halaman list transaksi dari layanan admin. User dapat melihat daftar member cafe dan melakukan penghapusan terhadap member. @foreach($request_barangs as $requestBarang)
</li> <tr>
{{ trans('adminlte_lang::message.logged') }} <td>{{$requestBarang->username}}</td>
</div> --> <td>{{$requestBarang->nama_barang}}</td>
</div> <td>{{$requestBarang->kategori}}</td>
</div> <td>{{$requestBarang->harga}}</td>
</div> <td>{{$requestBarang->jumlah}}</td>
</div> <td>{{$requestBarang->total_harga}}</td>
<td>{{$requestBarang->status_request}}</td>
<td>
<a href="{{ url('/KonfirmasiBarang', $requestBarang->id) }}" type="submit" button type="button" class="btn btn-warning">Konfirmasi</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection @endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>Add Saldo</center>
@endsection
@section('main-content')
<div class="container">
<div class="col-md-8 col-md-offset-2">
<div class="panel-body">
<form class="form-horizontal" action="{{ url('/saldo', $users->id) }}" method="POST">
<input type="hidden" name="_method" value="put">
{!! csrf_field() !!}
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Name</label>
<div class="col-md-6">
<input type="text" class="form-control" name="name" value="{{ $users->name}}" readonly>
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('saldo') ? ' has-error' : '' }}">
<label for="title" class="col-md-4 control-label">Saldo</label>
<div class="col-md-6">
<input type="number" class="form-control" name="saldo" value="{{ $users->saldo}}" readonly>
@if ($errors->has('saldo'))
<span class="help-block">
<strong>{{ $errors->first('saldo') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="title" class="col-md-4 control-label">Add Saldo</label>
<div class="col-md-6">
<input type="number" class="form-control" name="saldo" min="50000" class="form-control" required >
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Simpan
</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
...@@ -9,24 +9,28 @@ ...@@ -9,24 +9,28 @@
@endsection @endsection
@section('main-content') @section('main-content')
<div class="container-fluid spark-screen"> <table class="table table-striped">
<div class="row"> <thead>
<div class="col-md-8 col-md-offset-2"> <tr>
<div class="panel panel-default"> <th>Nama</th>
<!-- <div class="panel-heading">Home</div> <th>Email</th>
<div class="panel-body"> <th>username</th>
<label style="font-weight:bolder;color:black;font-size: 17px">List Pegawai</label><br> <th>Saldo</th>
Merupakan halaman list pegawai UD Antoni. Admin dapat melihat daftar pegawai dan melakukan penghapusan dan penambahan pegawai baru. </tr>
<br><br> </thead>
<label style="font-weight:bolder;color:black;font-size: 17px">Laporan Transaksi</label><br> <tbody>
Merupakan halaman list transaksi dari layanan admin. User dapat melihat daftar member cafe dan melakukan penghapusan terhadap member. @foreach($users as $user)
</li> <tr>
{{ trans('adminlte_lang::message.logged') }} <td>{{$user->name}}</td>
</div> --> <td>{{$user->email}}</td>
</div> <td>{{$user->username}}</td>
</div> <td>{{$user->saldo}}</td>
</div> <td>
</div> <a href="{{ url('/addSaldo', $user->id) }}" type="submit" button type="button" class="btn btn-warning">Add Saldo</a>
</tr>
@endforeach
</tbody>
</table>
@endsection @endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('contentheader_title')
<center>List Customer</center>
@endsection
@section('main-content')
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>Nama Barang</th>
<th>Kategori</th>
<th>Jumlah</th>
<th>Total Harga</th>
<!-- <th>Status Pengantaran</th> -->
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($transaksis as $transaksi)
<tr>
<td>{{$transaksi->username}}</td>
<td>{{$transaksi->nama_barang}}</td>
<td>{{$transaksi->kategori}}</td>
<td>{{$transaksi->jumlah}}</td>
<td>{{$transaksi->total_harga}}</td>
<!-- <td>{{$transaksi->status_pengantaran}}</td> -->
<td>
<a href="{{ url('/konfirmasiAntar', $transaksi->id) }}" type="submit" button type="button" class="btn btn-warning">Konfirmasi</a>
<td>
</tr>
@endforeach
</tbody>
</table>
@endsection
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
@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> <!-- <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>
......
...@@ -37,6 +37,12 @@ Route::group(['middleware' => ['web','auth']], function(){ ...@@ -37,6 +37,12 @@ Route::group(['middleware' => ['web','auth']], function(){
Route::group(['middleware' => ['web','auth','admin']], function () { Route::group(['middleware' => ['web','auth','admin']], function () {
Route::get('/laporanTransaksi', 'AdminController@laporanTransaksi'); Route::get('/laporanTransaksi', 'AdminController@laporanTransaksi');
Route::get('/listPetugas', 'AdminController@listPetugas'); Route::get('/listPetugas', 'AdminController@listPetugas');
Route::get('/listPetugas', 'AdminController@listPetugas');
Route::get('/createPetugas', 'AdminController@createPetugas');
Route::post('/storePetugas', 'AdminController@storePetugas');
Route::get('/editPetugas/{id}', 'AdminController@editPetugas');
Route::post('/updatePetugas/{id}', 'AdminController@updatePetugas');
Route::get('/deletePetugas/{id}', 'AdminController@destroyPetugas');
}); });
...@@ -52,8 +58,6 @@ Route::group(['middleware' => ['web','auth','customer']], function () { ...@@ -52,8 +58,6 @@ Route::group(['middleware' => ['web','auth','customer']], function () {
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');
Route::get('/HistoryTransaksi', 'CustomerController@HistoryTransaksi'); Route::get('/HistoryTransaksi', 'CustomerController@HistoryTransaksi');
}); });
...@@ -89,5 +93,7 @@ Route::group(['middleware' => ['web','auth','inventori']], function () { ...@@ -89,5 +93,7 @@ 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');
Route::get('/ListTransaksi', 'KasirController@ListTransaksi');
}); Route::get('/addSaldo/{id}','KasirController@addSaldo');
\ No newline at end of file Route::put('/saldo/{id}','KasirController@saldo');
});
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