Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sipeka
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
sipeka
Commits
c3499f34
Commit
c3499f34
authored
Jun 07, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete poin kategori
parent
625a5b77
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
app/Http/Controllers/Admin/KategoriController.php
+4
-4
resources/views/Admin/Kategori/index.blade.php
+9
-8
No files found.
app/Http/Controllers/Admin/KategoriController.php
View file @
c3499f34
...
@@ -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
];
];
...
...
resources/views/Admin/Kategori/index.blade.php
View file @
c3499f34
...
@@ -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
">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment