Commit c3499f34 by Triyah Fatmawati

Delete poin kategori

parent 625a5b77
...@@ -27,7 +27,7 @@ public function store(Request $request){ ...@@ -27,7 +27,7 @@ public function store(Request $request){
$rule = [ $rule = [
'kodekategori' => 'required|string', 'kodekategori' => 'required|string',
'namakategori' => 'required|string', 'namakategori' => 'required|string',
'poinsaku' => 'required|string' // 'poinsaku' => 'required|string'
]; ];
$request->validate($rule, ValidationRule::getErrorMessage($rule)); $request->validate($rule, ValidationRule::getErrorMessage($rule));
...@@ -38,7 +38,7 @@ public function store(Request $request){ ...@@ -38,7 +38,7 @@ public function store(Request $request){
$kategori = [ $kategori = [
'kode_kategori' => strip_tags($request->kodekategori), 'kode_kategori' => strip_tags($request->kodekategori),
'nama_kategori' => strip_tags($request->namakategori), 'nama_kategori' => strip_tags($request->namakategori),
'poin_saku' => strip_tags($request->poinsaku), // 'poin_saku' => strip_tags($request->poinsaku),
'status' => $request->status 'status' => $request->status
]; ];
...@@ -62,7 +62,7 @@ public function update(Request $request, $id){ ...@@ -62,7 +62,7 @@ public function update(Request $request, $id){
$rule = [ $rule = [
'kodekategori' => 'required|string', 'kodekategori' => 'required|string',
'namakategori' => 'required|string', 'namakategori' => 'required|string',
'poinsaku' => 'required|string' // 'poinsaku' => 'required|string'
]; ];
$request->validate($rule, ValidationRule::getErrorMessage($rule)); $request->validate($rule, ValidationRule::getErrorMessage($rule));
...@@ -75,7 +75,7 @@ public function update(Request $request, $id){ ...@@ -75,7 +75,7 @@ public function update(Request $request, $id){
$kategori = [ $kategori = [
'kode_kategori' => strip_tags($request->kodekategori), 'kode_kategori' => strip_tags($request->kodekategori),
'nama_kategori' => strip_tags($request->namakategori), 'nama_kategori' => strip_tags($request->namakategori),
'poin_saku' => strip_tags($request->poinsaku), // 'poin_saku' => strip_tags($request->poinsaku),
'status' => $request->status 'status' => $request->status
]; ];
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<th>No.</th> <th>No.</th>
<th>Kode Kategori</th> <th>Kode Kategori</th>
<th>Nama Kategori</th> <th>Nama Kategori</th>
<th>Poin SAKU</th> {{-- <th>Poin SAKU</th> --}}
<th>Status</th> <th>Status</th>
<th>Aksi</th> <th>Aksi</th>
</tr> </tr>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<td>{{ $no }}</td> <td>{{ $no }}</td>
<td style="text-align: center">{{ $kat->kode_kategori }}</td> <td style="text-align: center">{{ $kat->kode_kategori }}</td>
<td>{{ $kat->nama_kategori }}</td> <td>{{ $kat->nama_kategori }}</td>
<td>{{ $kat->poin_saku }}</td> {{-- <td>{{ $kat->poin_saku }}</td> --}}
<td>{{ $status }}</td> <td>{{ $status }}</td>
<td> <td>
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#editKategoriModal{{$kat->id}}">Edit</button> <button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#editKategoriModal{{$kat->id}}">Edit</button>
...@@ -63,20 +63,20 @@ ...@@ -63,20 +63,20 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-12">
<label class="form-label" for="kodekategori">Kode Kategori</label> <label class="form-label" for="kodekategori">Kode Kategori</label>
<input type="text" class="form-control" id="kodekategori" name="kodekategori" placeholder="Kode Kategori" data-msg="Masukkan Kode Kategori" value="{{$kat->kode_kategori}}" required /> <input type="text" class="form-control" id="kodekategori" name="kodekategori" placeholder="Kode Kategori" data-msg="Masukkan Kode Kategori" value="{{$kat->kode_kategori}}" required />
@if ($errors->has('kodekategori')) @if ($errors->has('kodekategori'))
<label id="login-error" class="error" for="kodekategori" style="color: red">{{$errors->first('kodekategori')}}</label> <label id="login-error" class="error" for="kodekategori" style="color: red">{{$errors->first('kodekategori')}}</label>
@endif @endif
</div> </div>
<div class="col-md-6"> {{-- <div class="col-md-6">
<label class="form-label" for="poinsaku">Poin Saku</label> <label class="form-label" for="poinsaku">Poin Saku</label>
<input type="text" id="poinsaku" name="poinsaku" class="form-control" placeholder="Poin SAKU" data-msg="Masukkan Poin SAKU" value="{{$kat->poin_saku}}" required /> <input type="text" id="poinsaku" name="poinsaku" class="form-control" placeholder="Poin SAKU" data-msg="Masukkan Poin SAKU" value="{{$kat->poin_saku}}" required />
@if ($errors->has('poinsaku')) @if ($errors->has('poinsaku'))
<label id="login-error" class="error" for="poinsaku" style="color: red">{{$errors->first('poinsaku')}}</label> <label id="login-error" class="error" for="poinsaku" style="color: red">{{$errors->first('poinsaku')}}</label>
@endif @endif
</div> </div> --}}
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="form-label" for="namakategori">Nama Kategori</label> <label class="form-label" for="namakategori">Nama Kategori</label>
...@@ -150,20 +150,20 @@ ...@@ -150,20 +150,20 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-12">
<label class="form-label" for="kodekategori">Kode Kategori</label> <label class="form-label" for="kodekategori">Kode Kategori</label>
<input type="text" class="form-control" id="kodekategori" name="kodekategori" placeholder="Kode Kategori" data-msg="Masukkan Kode Kategori" value="" required /> <input type="text" class="form-control" id="kodekategori" name="kodekategori" placeholder="Kode Kategori" data-msg="Masukkan Kode Kategori" value="" required />
@if ($errors->has('kodekategori')) @if ($errors->has('kodekategori'))
<label id="login-error" class="error" for="kodekategori" style="color: red">{{$errors->first('kodekategori')}}</label> <label id="login-error" class="error" for="kodekategori" style="color: red">{{$errors->first('kodekategori')}}</label>
@endif @endif
</div> </div>
<div class="col-md-6"> {{-- <div class="col-md-6">
<label class="form-label" for="poinsaku">Poin Saku</label> <label class="form-label" for="poinsaku">Poin Saku</label>
<input type="text" id="poinsaku" name="poinsaku" class="form-control" placeholder="Poin SAKU" data-msg="Masukkan Poin SAKU" required /> <input type="text" id="poinsaku" name="poinsaku" class="form-control" placeholder="Poin SAKU" data-msg="Masukkan Poin SAKU" required />
@if ($errors->has('poinsaku')) @if ($errors->has('poinsaku'))
<label id="login-error" class="error" for="poinsaku" style="color: red">{{$errors->first('poinsaku')}}</label> <label id="login-error" class="error" for="poinsaku" style="color: red">{{$errors->first('poinsaku')}}</label>
@endif @endif
</div> </div> --}}
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label class="form-label" for="namakategori">Nama Kategori</label> <label class="form-label" for="namakategori">Nama Kategori</label>
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
<label id="login-error" class="error" for="namakategori" style="color: red">{{$errors->first('namakategori')}}</label> <label id="login-error" class="error" for="namakategori" style="color: red">{{$errors->first('namakategori')}}</label>
@endif @endif
</div> </div>
<hr>
<div class="col-md-12"> <div class="col-md-12">
<label class="form-label" for="status">Status</label> <label class="form-label" for="status">Status</label>
<select name="status" id="status" class="form-control"> <select name="status" id="status" class="form-control">
......
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