Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simlitabmas
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
Farendi Giotivano R.P
simlitabmas
Commits
bede6672
Commit
bede6672
authored
3 years ago
by
Muhammad Iskandar Java
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit kekayaan intelektual
parent
eb4163ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
131 deletions
+68
-131
app/Http/Controllers/User/KekayaanIntelController.php
+27
-2
app/Models/User/KekayaanIntelektual.php
+6
-0
resources/views/user/kekayaan/create.blade.php
+16
-13
resources/views/user/kekayaan/index.blade.php
+19
-116
No files found.
app/Http/Controllers/User/KekayaanIntelController.php
View file @
bede6672
...
...
@@ -19,7 +19,9 @@ class KekayaanIntelController extends Controller
*/
public
function
index
()
{
return
view
(
'user.kekayaan.index'
);
$data
=
KekayaanIntelektual
::
query
()
->
orderBy
(
'updated_at'
,
'desc'
)
->
get
();
return
view
(
'user.kekayaan.index'
,
[
'data'
=>
$data
]);
}
/**
...
...
@@ -29,7 +31,7 @@ class KekayaanIntelController extends Controller
*/
public
function
create
()
{
return
view
(
'user.kekayaan.create'
);
return
view
(
'user.kekayaan.create'
,
[
'edit'
=>
false
]
);
}
/**
...
...
@@ -74,6 +76,16 @@ class KekayaanIntelController extends Controller
*/
public
function
edit
(
$id
)
{
try
{
$data
=
KekayaanIntelektual
::
query
()
->
find
(
decrypt
(
$id
));
return
view
(
'user.kekayaan.create'
,
[
'edit'
=>
true
,
'data'
=>
$data
,
]);
}
catch
(
Exception
$ex
)
{
return
redirect
()
->
back
();
}
}
/**
...
...
@@ -85,6 +97,19 @@ class KekayaanIntelController extends Controller
*/
public
function
update
(
Request
$request
,
$id
)
{
$data
=
$request
->
except
(
'_token'
);
Validator
::
make
(
$data
,
KekayaanIntelektual
::
RULES
,
KekayaanIntelektual
::
ERROR_MESSAGES
)
->
validate
();
try
{
$biodata
=
Biodata
::
query
()
->
where
(
'nidn'
,
$request
->
nidn
)
->
firstOrFail
();
$kekayaan
=
KekayaanIntelektual
::
query
()
->
findOrFail
(
decrypt
(
$id
));
$data
[
'userid_updated'
]
=
Auth
::
user
()
->
id
;
$kekayaan
->
update
(
$data
);
}
catch
(
Exception
$ex
)
{
return
redirect
()
->
back
()
->
withInput
();
}
return
redirect
()
->
route
(
'kekayaanintelek.index'
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
app/Models/User/KekayaanIntelektual.php
View file @
bede6672
...
...
@@ -2,6 +2,7 @@
namespace
App\Models\User
;
use
App\Models\Biodata
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Model
;
...
...
@@ -30,4 +31,9 @@ class KekayaanIntelektual extends Model
'nopendaftaran.required'
=>
'No pendaftaran tidak boleh kosong'
,
'nidn.required'
=>
'NIDN tidak tervalidasi atau kosong'
,
];
public
function
dosen
()
{
return
$this
->
belongsTo
(
Biodata
::
class
,
'nidn'
,
'nidn'
);
}
}
This diff is collapsed.
Click to expand it.
resources/views/user/kekayaan/create.blade.php
View file @
bede6672
...
...
@@ -15,7 +15,10 @@
$menu
= 'dashboard';
@endphp
<div class="
account
-
settings
-
container
layout
-
top
-
spacing
">
<form action="
{{
route
(
'kekayaanintelek.store'
)
}}
" method="
POST
">
<form action="
{{
$edit
?
route
(
'kekayaanintelek.update'
,
[
'kekayaanintelek'
=>
encrypt
(
$data
->
id
)])
:
route
(
'kekayaanintelek.store'
)
}}
" method="
POST
">
@if (
$edit
)
{{ method_field('PUT') }}
@endif
@csrf
<div class="
account
-
content
">
<div class="
scrollspy
-
example
" data-spy="
scroll
" data-target="
#account-settings-scroll" data-offset="-100">
...
...
@@ -29,8 +32,8 @@
<div class="
col
-
lg
-
11
mx
-
auto
">
<div class="
form
-
group
mb
-
4
">
<div class="
input
-
group
@
if
(
$errors
->
has
(
'nidn'
))
has
-
error
@
endif
">
<input type="
text
" class="
form
-
control
" id="
input_nidn_dosen
" placeholder="
NIDN
" aria-label="
nidn
">
<input type="
text
" class="
form
-
control
" name="
nidn
" id="
nidn_dosen
" placeholder="
NIDN
" aria-label="
nidn
" hidden>
<input type="
text
" class="
form
-
control
" id="
input_nidn_dosen
"
value="
{{
$edit
?
$data
->
nidn
:
''
}}
"
placeholder="
NIDN
" aria-label="
nidn
">
<input type="
text
" class="
form
-
control
" name="
nidn
"
value="
{{
$edit
?
$data
->
nidn
:
''
}}
"
id="
nidn_dosen
" placeholder="
NIDN
" aria-label="
nidn
" hidden>
<div class="
input
-
group
-
append
">
<button class="
btn
btn
-
info
" onclick="
checkNidn
(
'nidn_dosen'
)
" type="
button
">Cek</button>
</div>
...
...
@@ -65,7 +68,7 @@
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'judul_hki'
))
has
-
error
@
endif
">
<label>Judul HKI</label>
<textarea class="
form
-
control
" id="
judulhki
" name="
judul_hki
" placeholder="
Judul
" rows="
3
" required>{!! old('judul_hki') !!}</textarea>
<textarea class="
form
-
control
" id="
judulhki
" name="
judul_hki
" placeholder="
Judul
" rows="
3
" required>{!!
$edit
?
$data->judul_hki
:
old('judul_hki') !!}</textarea>
@if(
$errors->has
('judul_hki'))
<label id="
login
-
error
" class="
text
-
danger
" for="
login
">{{
$errors->first
('judul_hki') }}</label>
@endif
...
...
@@ -75,12 +78,12 @@
<div class="
form
-
group
@
if
(
$errors
->
has
(
'jenis'
))
has
-
error
@
endif
">
<label>Jenis</label>
<select name="
jenis
" class="
form
-
control
" id="
jenis
" required>
<option {{
old('jenis') ? (old('jenis') == 'Paten' ? 'selected' :'') : ''
}}>Paten</option>
<option {{
old('jenis') ? (old('jenis') == 'Paten Sederhana' ? 'selected' :'') : ''
}}>Paten Sederhana</option>
<option {{
old('jenis') ? (old('jenis') == 'Hak Cipta' ? 'selected' :'') : ''
}}>Hak Cipta</option>
<option {{
old('jenis') ? (old('jenis') == 'Desain Produksi Industri' ? 'selected' :'') : ''
}}>Desain Produksi Industri</option>
<option {{
old('jenis') ? (old('jenis') == 'Perlindungan Varietas Tanaman' ? 'selected' :'') : ''
}}>Perlindungan Varietas Tanaman</option>
<option {{
old('jenis') ? (old('jenis') == 'Desain Tata Letak Sirkuit Terpadu' ? 'selected' :'') : ''
}}>Desain Tata Letak Sirkuit Terpadu</option>
<option {{
$edit
? (
$data->jenis
== 'Paten' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Paten' ? 'selected' :'') : '')
}}>Paten</option>
<option {{
$edit
? (
$data->jenis
== 'Paten Sederhana' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Paten Sederhana' ? 'selected' :'') : '')
}}>Paten Sederhana</option>
<option {{
$edit
? (
$data->jenis
== 'Hak Cipta' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Hak Cipta' ? 'selected' :'') : '')
}}>Hak Cipta</option>
<option {{
$edit
? (
$data->jenis
== 'Desain Produksi Industri' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Desain Produksi Industri' ? 'selected' :'') : '')
}}>Desain Produksi Industri</option>
<option {{
$edit
? (
$data->jenis
== 'Perlindungan Varietas Tanaman' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Perlindungan Varietas Tanaman' ? 'selected' :'') : '')
}}>Perlindungan Varietas Tanaman</option>
<option {{
$edit
? (
$data->jenis
== 'Desain Tata Letak Sirkuit Terpadu' ? 'selected' : '') : (old('jenis') ? (old('jenis') == 'Desain Tata Letak Sirkuit Terpadu' ? 'selected' :'') : '')
}}>Desain Tata Letak Sirkuit Terpadu</option>
</select>
@if(
$errors->has
('jenis'))
<label id="
login
-
error
" class="
text
-
danger
" for="
login
">{{
$errors->first
('jenis') }}</label>
...
...
@@ -91,8 +94,8 @@
<div class="
form
-
group
@
if
(
$errors
->
has
(
'status'
))
has
-
error
@
endif
">
<label>Status</label>
<select name="
status
" class="
form
-
control
" id="
status
" required>
<option {{
old('status') ? (old('status') == 'Terdaftar' ? 'selected' :'') : ''
}}>Terdaftar</option>
<option {{
old('status') ? (old('status') == 'Granted/Bersertifikat' ? 'selected' :'') : ''
}}>Granted/Bersertifikat</option>
<option {{
$edit
? (
$data->status
== 'Terdaftar' ? 'selected' : '') : (old('status') ? (old('status') == 'Terdaftar' ? 'selected' :'') : '')
}}>Terdaftar</option>
<option {{
$edit
? (
$data->status
== 'Granted/Bersertifikat' ? 'selected' : '') : (old('status') ? (old('status') == 'Granted/Bersertifikat' ? 'selected' :'') : '')
}}>Granted/Bersertifikat</option>
</select>
@if(
$errors->has
('status'))
<label id="
login
-
error
" class="
text
-
danger
" for="
login
">{{
$errors->first
('status') }}</label>
...
...
@@ -102,7 +105,7 @@
<div class="
col
-
md
-
4
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'nopendaftaran'
))
has
-
error
@
endif
">
<label>No. Pendaftaran</label>
<input type="
text
" class="
form
-
control
" id="
nopendaftaran
" value="
{{
old
(
'nopendaftaran'
)
}}
" name="
nopendaftaran
" placeholder="
No
.
Pendaftaran
" required>
<input type="
text
" class="
form
-
control
" id="
nopendaftaran
" value="
{{
$edit
?
$data
->
nopendaftaran
:
old
(
'nopendaftaran'
)
}}
" name="
nopendaftaran
" placeholder="
No
.
Pendaftaran
" required>
@if(
$errors->has
('nopendaftaran'))
<label id="
login
-
error
" class="
text
-
danger
" for="
login
">{{
$errors->first
('nopendaftaran') }}</label>
@endif
...
...
This diff is collapsed.
Click to expand it.
resources/views/user/kekayaan/index.blade.php
View file @
bede6672
...
...
@@ -21,127 +21,30 @@
<table id="
zero
-
config
" class="
table
table
-
hover
" style="
width
:
100
%
">
<thead>
<tr>
<th>
Name
</th>
<th>
Position
</th>
<th>
Office
</th>
<th>
Age
</th>
<th>
Start date
</th>
<th>
Salary
</th>
<th>
Judul
</th>
<th>
Jenis
</th>
<th>
Status
</th>
<th>
No Pendaftaran
</th>
<th>
Dosen
</th>
<th>
Aksi
</th>
</tr>
</thead>
<tbody>
@foreach (
$data
as
$item
)
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>2012/03/29</td>
<td>$433,060</td>
</tr>
<tr>
<td>Airi Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
</tr>
<tr>
<td>Brielle Williamson</td>
<td>Integration Specialist</td>
<td>New York</td>
<td>61</td>
<td>2012/12/02</td>
<td>$372,000</td>
</tr>
<tr>
<td>Herrod Chandler</td>
<td>Sales Assistant</td>
<td>San Francisco</td>
<td>59</td>
<td>2012/08/06</td>
<td>$137,500</td>
</tr>
<tr>
<td>Rhona Davidson</td>
<td>Integration Specialist</td>
<td>Tokyo</td>
<td>55</td>
<td>2010/10/14</td>
<td>$327,900</td>
</tr>
<tr>
<td>Colleen Hurst</td>
<td>Javascript Developer</td>
<td>San Francisco</td>
<td>39</td>
<td>2009/09/15</td>
<td>$205,500</td>
</tr>
<tr>
<td>Sonya Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>2008/12/13</td>
<td>$103,600</td>
</tr>
<tr>
<td>Jena Gaines</td>
<td>Office Manager</td>
<td>London</td>
<td>30</td>
<td>2008/12/19</td>
<td>$90,560</td>
</tr>
<tr>
<td>Quinn Flynn</td>
<td>Support Lead</td>
<td>Edinburgh</td>
<td>22</td>
<td>2013/03/03</td>
<td>$342,000</td>
</tr>
<tr>
<td>Charde Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$470,600</td>
</tr>
<tr>
<td>Haley Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>2012/12/18</td>
<td>$313,500</td>
<td>{{
$item->judul_hki
}}</td>
<td>{{
$item->jenis
}}</td>
<td>{{
$item->status
}}</td>
<td>{{
$item->nopendaftaran
}}</td>
<td>
{{
$item->dosen
->name }} <br>
{{
$item->nidn
}}
</td>
<td>
<a class="
btn
btn
-
warning
" href="
{{
route
(
'kekayaanintelek.edit'
,
[
'kekayaanintelek'
=>
encrypt
(
$item
->
id
)])
}}
"> Edit</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
...
...
This diff is collapsed.
Click to expand it.
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