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
3124c62f
Commit
3124c62f
authored
Apr 23, 2021
by
Farendi Giotivano R.P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buku ajar, dashboard, update
parent
5009c008
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
396 additions
and
473 deletions
+396
-473
app/Http/Controllers/User/BukuAjarController.php
+91
-8
app/Models/User/BukuAjar.php
+43
-0
app/Repositories/User/BukuAjarRepository.php
+31
-0
resources/views/dashboard.blade.php
+70
-258
resources/views/layouts/css.blade.php
+2
-0
resources/views/layouts/master.blade.php
+4
-1
resources/views/user/bukuajar/create.blade.php
+108
-82
resources/views/user/bukuajar/index.blade.php
+46
-116
routes/web.php
+1
-8
No files found.
app/Http/Controllers/User/BukuAjarController.php
View file @
3124c62f
...
...
@@ -3,20 +3,35 @@
namespace
App\Http\Controllers\User
;
use
App\Http\Controllers\Controller
;
use
App\Models\Biodata
;
use
App\Models\User\BukuAjar
;
use
App\Repositories\User\BukuAjarRepository
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Auth
;
use
Alert
;
use
Exception
;
use
Crypt
;
use
Validator
;
class
BukuAjarController
extends
Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
private
$bukuajarRepo
;
public
function
__construct
(
BukuAjarRepository
$bukuajarRepo
)
{
$this
->
bukuajarRepo
=
$bukuajarRepo
;
}
public
function
index
()
{
//
$data
=
'Buku Ajar'
;
return
view
(
'user.bukuajar.index'
);
$menu
=
'bukuajar'
;
$bukuajar
=
$this
->
bukuajarRepo
->
get
([
'rDosen'
]);
$data
=
[
'bukuajar'
=>
$bukuajar
,
'menu'
=>
$menu
];
return
view
(
'user.bukuajar.index'
,
$data
);
}
/**
...
...
@@ -27,7 +42,14 @@ class BukuAjarController extends Controller
public
function
create
()
{
//
return
view
(
'user.bukuajar.create'
);
$menu
=
'bukuajar'
;
$edit
=
false
;
$data
=
[
'menu'
=>
$menu
,
'edit'
=>
$edit
];
return
view
(
'user.bukuajar.create'
,
$data
);
}
/**
...
...
@@ -39,6 +61,24 @@ class BukuAjarController extends Controller
public
function
store
(
Request
$request
)
{
//
$data
=
$request
->
except
(
'_token'
);
Validator
::
make
(
$data
,
BukuAjar
::
RULES
,
BukuAjar
::
ERROR_MESSAGES
)
->
validate
();
try
{
$biodata
=
Biodata
::
query
()
->
where
(
'nidn'
,
$request
->
nidn
)
->
firstOrFail
();
$data
[
'userid_created'
]
=
Auth
::
user
()
->
id
;
$data
[
'userid_updated'
]
=
Auth
::
user
()
->
id
;
//dd($data);
$bukuajar
=
$this
->
bukuajarRepo
->
store
(
$data
);
}
catch
(
Exception
$ex
)
{
return
redirect
()
->
back
()
->
withInput
();
}
$data
=
[
'bukuajar'
=>
$bukuajar
->
id
,
];
return
redirect
()
->
route
(
'bukuajar.index'
,
$data
);
}
/**
...
...
@@ -61,6 +101,24 @@ class BukuAjarController extends Controller
public
function
edit
(
$id
)
{
//
$menu
=
'unitbisnis'
;
$edit
=
true
;
try
{
$menu
=
'unitbisnis'
;
$bukuajar
=
$this
->
bukuajarRepo
->
findId
(
null
,
$id
);
$data
=
[
'menu'
=>
$menu
,
'edit'
=>
$edit
,
'bukuajar'
=>
$bukuajar
,
];
return
view
(
'user.bukuajar.create'
,
$data
);
}
catch
(
Exception
$ex
)
{
return
redirect
()
->
back
();
}
}
/**
...
...
@@ -73,6 +131,25 @@ class BukuAjarController extends Controller
public
function
update
(
Request
$request
,
$id
)
{
//
$data
=
$request
->
except
(
'_token'
);
Validator
::
make
(
$data
,
BukuAjar
::
RULES
,
BukuAjar
::
ERROR_MESSAGES
)
->
validate
();
try
{
$biodata
=
Biodata
::
query
()
->
where
(
'nidn'
,
$request
->
nidn
)
->
firstOrFail
();
$data
[
'userid_updated'
]
=
auth
()
->
user
()
->
id
;
$bukuajar
=
$this
->
bukuajarRepo
->
findId
(
null
,
decrypt
(
$id
));
//dd($bukuajar);
$this
->
bukuajarRepo
->
update
(
$data
,
$bukuajar
);
}
catch
(
Exception
$ex
)
{
return
redirect
()
->
back
()
->
withInput
();
}
$data
=
[
'bukuajar'
=>
$bukuajar
->
id
,
];
return
redirect
()
->
route
(
'bukuajar.index'
,
$data
);
}
/**
...
...
@@ -84,5 +161,11 @@ class BukuAjarController extends Controller
public
function
destroy
(
$id
)
{
//
$model
=
$this
->
bukuajarRepo
->
findId
(
null
,
Crypt
::
decrypt
(
$id
));
$this
->
bukuajarRepo
->
destroy
(
$model
);
Alert
::
success
(
'Data berhasil dihapus'
)
->
persistent
(
'Ok'
);
return
redirect
()
->
route
(
'bukuajar.index'
);
}
}
app/Models/User/BukuAjar.php
0 → 100644
View file @
3124c62f
<?php
namespace
App\Models\User
;
use
App\Models\Biodata
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Model
;
class
BukuAjar
extends
Model
{
use
UuidTrait
;
public
$incrementing
=
false
;
protected
$table
=
'bukuajar'
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
'id'
,
'nidn'
,
'kategori'
,
'judul'
,
'isbn'
,
'jumlah_hal'
,
'penerbit'
,
'url'
,
'userid_created'
,
'userid_updated'
,
'created_at'
,
'updated_at'
,
];
public
const
RULES
=
[
'kategori'
=>
'required'
,
'judul'
=>
'required'
,
'isbn'
=>
'required'
,
'jumlah_hal'
=>
'required'
,
'penerbit'
=>
'required'
,
'url'
=>
'required'
,
];
public
const
ERROR_MESSAGES
=
[
'kategori'
=>
'Kategori tidak boleh kosong'
,
'judul'
=>
'Judul tidak boleh kosong'
,
'isbn'
=>
'ISBN tidak boleh kosong'
,
'jumlah_hal'
=>
'Jumlah Halaman tidak boleh kosong'
,
'penerbit'
=>
'Penerbit tidak boleh kosong'
,
'url'
=>
'URL tidak boleh kosong'
,
];
public
function
rDosen
()
{
return
$this
->
belongsTo
(
Biodata
::
class
,
'nidn'
,
'nidn'
);
}
}
app/Repositories/User/BukuAjarRepository.php
0 → 100644
View file @
3124c62f
<?php
namespace
App\Repositories\User
;
use
App\Models\User\BukuAjar
;
use
App\Repositories\Repository
;
class
BukuAjarRepository
extends
Repository
{
protected
$model
;
public
function
__construct
(
BukuAjar
$model
)
{
$this
->
model
=
$model
;
}
public
function
get
(
$with
=
null
,
$search
=
null
,
$id
=
null
)
{
return
$this
->
model
->
when
(
$with
,
function
(
$query
)
use
(
$with
)
{
return
$query
->
with
(
$with
);
})
->
when
(
$search
,
function
(
$query
)
use
(
$search
)
{
return
$query
->
where
(
'search'
,
$search
);
})
->
when
(
$id
,
function
(
$query
)
use
(
$id
)
{
return
$query
->
where
(
'id'
,
$id
);
})
->
get
();
}
}
resources/views/dashboard.blade.php
View file @
3124c62f
...
...
@@ -6,18 +6,7 @@
@
section
(
'header'
)
<
div
class
="
page
-
title
">
<h3>Analytics Dashboard</h3>
</div>
<div class="
dropdown
filter
custom
-
dropdown
-
icon
">
<a class="
dropdown
-
toggle
btn
" href="
#" role="button" id="filterDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="text"><span>Show</span> : Daily Analytics</span> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></a>
<
div
class
="
dropdown
-
menu
dropdown
-
menu
-
right
" aria-labelledby="
filterDropdown
">
<a class="
dropdown
-
item
" data-value="
<
span
>
Show
</
span
>
:
Daily
Analytics
" href="
javascript
:
void
(
0
);
">Daily Analytics</a>
<a class="
dropdown
-
item
" data-value="
<
span
>
Show
</
span
>
:
Weekly
Analytics
" href="
javascript
:
void
(
0
);
">Weekly Analytics</a>
<a class="
dropdown
-
item
" data-value="
<
span
>
Show
</
span
>
:
Monthly
Analytics
" href="
javascript
:
void
(
0
);
">Monthly Analytics</a>
<a class="
dropdown
-
item
" data-value="
Download
All
" href="
javascript
:
void
(
0
);
">Download All</a>
<a class="
dropdown
-
item
" data-value="
Share
Statistics
" href="
javascript
:
void
(
0
);
">Share Statistics</a>
</div>
<h3>Dashboard</h3>
</div>
@endsection
...
...
@@ -26,253 +15,77 @@
$menu
= 'dashboard';
@endphp
<div class="
row
layout
-
top
-
spacing
">
<div class="
col
-
xl
-
4
col
-
lg
-
6
col
-
md
-
6
col
-
sm
-
12
col
-
12
layout
-
spacing
">
<div class="
widget
-
four
">
<div class="
widget
-
heading
">
<h5 class="">Visitors by Browser</h5>
</div>
<div class="
widget
-
content
">
<div class="
vistorsBrowser
">
<div class="
browser
-
list
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
chrome
"><circle cx="
12
" cy="
12
" r="
10
"></circle><circle cx="
12
" cy="
12
" r="
4
"></circle><line x1="
21.17
" y1="
8
" x2="
12
" y2="
8
"></line><line x1="
3.95
" y1="
6.06
" x2="
8.54
" y2="
14
"></line><line x1="
10.88
" y1="
21.94
" x2="
15.46
" y2="
14
"></line></svg>
</div>
<div class="
w
-
browser
-
details
">
<div class="
w
-
browser
-
info
">
<h6>Chrome</h6>
<p class="
browser
-
count
">65%</p>
</div>
<div class="
w
-
browser
-
stats
">
<div class="
progress
">
<div class="
progress
-
bar
bg
-
gradient
-
primary
" role="
progressbar
" style="
width
:
65
%
" aria-valuenow="
90
" aria-valuemin="
0
" aria-valuemax="
100
"></div>
</div>
</div>
</div>
</div>
<div class="
browser
-
list
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
compass
"><circle cx="
12
" cy="
12
" r="
10
"></circle><polygon points="
16.24
7.76
14.12
14.12
7.76
16.24
9.88
9.88
16.24
7.76
"></polygon></svg>
</div>
<div class="
w
-
browser
-
details
">
<div class="
w
-
browser
-
info
">
<h6>Safari</h6>
<p class="
browser
-
count
">25%</p>
</div>
<div class="
w
-
browser
-
stats
">
<div class="
progress
">
<div class="
progress
-
bar
bg
-
gradient
-
danger
" role="
progressbar
" style="
width
:
35
%
" aria-valuenow="
65
" aria-valuemin="
0
" aria-valuemax="
100
"></div>
</div>
</div>
</div>
</div>
<div class="
browser
-
list
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
globe
"><circle cx="
12
" cy="
12
" r="
10
"></circle><line x1="
2
" y1="
12
" x2="
22
" y2="
12
"></line><path d="
M12
2
a15
.
3
15.3
0
0
1
4
10
15.3
15.3
0
0
1
-
4
10
15.3
15.3
0
0
1
-
4
-
10
15.3
15.3
0
0
1
4
-
10
z
"></path></svg>
</div>
<div class="
w
-
browser
-
details
">
<div class="
w
-
browser
-
info
">
<h6>Others</h6>
<p class="
browser
-
count
">15%</p>
</div>
<div class="
w
-
browser
-
stats
">
<div class="
progress
">
<div class="
progress
-
bar
bg
-
gradient
-
warning
" role="
progressbar
" style="
width
:
15
%
" aria-valuenow="
15
" aria-valuemin="
0
" aria-valuemax="
100
"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
xl
-
8
col
-
lg
-
12
col
-
md
-
12
col
-
sm
-
12
col
-
12
layout
-
spacing
">
<div class="
row
widget
-
statistic
">
<div class="
col
-
xl
-
4
col
-
lg
-
4
col
-
md
-
4
col
-
sm
-
4
col
-
12
">
<div class="
widget
widget
-
one_hybrid
widget
-
followers
">
<div class="
widget
-
heading
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
users
"><path d="
M17
21
v
-
2
a4
4
0
0
0
-
4
-
4
H5a4
4
0
0
0
-
4
4
v2
"></path><circle cx="
9
" cy="
7
" r="
4
"></circle><path d="
M23
21
v
-
2
a4
4
0
0
0
-
3
-
3.87
"></path><path d="
M16
3.13
a4
4
0
0
1
0
7.75
"></path></svg>
</div>
<p class="
w
-
value
">31.6K</p>
<h5 class="">Followers</h5>
</div>
<div class="
widget
-
content
">
<div class="
w
-
chart
">
<div id="
hybrid_followers
"></div>
</div>
</div>
</div>
</div>
<div class="
col
-
xl
-
4
col
-
lg
-
4
col
-
md
-
4
col
-
sm
-
4
col
-
12
">
<div class="
widget
widget
-
one_hybrid
widget
-
referral
">
<div class="
widget
-
heading
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
link
"><path d="
M10
13
a5
5
0
0
0
7.54
.
54
l3
-
3
a5
5
0
0
0
-
7.07
-
7.07
l
-
1.72
1.71
"></path><path d="
M14
11
a5
5
0
0
0
-
7.54
-.
54
l
-
3
3
a5
5
0
0
0
7.07
7.07
l1
.
71
-
1.71
"></path></svg>
</div>
<p class="
w
-
value
">1,900</p>
<h5 class="">Referral</h5>
</div>
<div class="
widget
-
content
">
<div class="
w
-
chart
">
<div id="
hybrid_followers1
"></div>
</div>
</div>
</div>
</div>
<div class="
col
-
xl
-
4
col
-
lg
-
4
col
-
md
-
4
col
-
sm
-
4
col
-
12
">
<div class="
widget
widget
-
one_hybrid
widget
-
engagement
">
<div class="
widget
-
heading
">
<div class="
w
-
icon
">
<svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
message
-
circle
"><path d="
M21
11.5
a8
.
38
8.38
0
0
1
-.
9
3.8
8.5
8.5
0
0
1
-
7.6
4.7
8.38
8.38
0
0
1
-
3.8
-.
9
L3
21
l1
.
9
-
5.7
a8
.
38
8.38
0
0
1
-.
9
-
3.8
8.5
8.5
0
0
1
4.7
-
7.6
8.38
8.38
0
0
1
3.8
-.
9
h
.
5
a8
.
48
8.48
0
0
1
8
8
v
.
5
z
"></path></svg>
</div>
<p class="
w
-
value
">18.2%</p>
<h5 class="">Engagement</h5>
</div>
<div class="
widget
-
content
">
<div class="
w
-
chart
">
<div id="
hybrid_followers3
"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
xl
-
9
col
-
lg
-
12
col
-
md
-
12
col
-
sm
-
12
col
-
12
layout
-
spacing
">
<div class="
widget
widget
-
chart
-
three
">
<div class="
widget
-
heading
">
<div class="">
<h5 class="">Unique Visitors</h5>
</div>
<div class="
dropdown
custom
-
dropdown
">
<a class="
dropdown
-
toggle
" href="
#" role="button" id="uniqueVisitors" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
width
=
"24"
height
=
"24"
viewBox
=
"0 0 24 24"
fill
=
"none"
stroke
=
"currentColor"
stroke
-
width
=
"2"
stroke
-
linecap
=
"round"
stroke
-
linejoin
=
"round"
class
="
feather
feather
-
more
-
horizontal
"><circle cx="
12
" cy="
12
" r="
1
"></circle><circle cx="
19
" cy="
12
" r="
1
"></circle><circle cx="
5
" cy="
12
" r="
1
"></circle></svg>
</a>
<div class="
dropdown
-
menu
dropdown
-
menu
-
right
" aria-labelledby="
uniqueVisitors
">
<a class="
dropdown
-
item
" href="
javascript
:
void
(
0
);
">View</a>
<a class="
dropdown
-
item
" href="
javascript
:
void
(
0
);
">Update</a>
<a class="
dropdown
-
item
" href="
javascript
:
void
(
0
);
">Download</a>
<div id="
custom_carousel
" class="
col
-
lg
-
12
layout
-
spacing
">
<div class="
statbox
widget
box
box
-
shadow
">
<div class="
widget
-
header
">
<div class="
row
">
<div class="
col
-
xl
-
12
col
-
md
-
12
col
-
sm
-
12
col
-
12
">
<h4>SimLitabmas</h4>
</div>
</div>
</div>
<div class="
widget
-
content
">
<div id="
uniqueVisits
"></div>
</div>
</div>
</div>
<div class="
col
-
xl
-
3
col
-
lg
-
6
col
-
md
-
6
col
-
sm
-
12
col
-
12
layout
-
spacing
">
<div class="
widget
widget
-
activity
-
three
">
<div class="
widget
-
heading
">
<h5 class="">Notifications</h5>
</div>
<div class="
widget
-
content
">
<div class="
mt
-
container
mx
-
auto
">
<div class="
timeline
-
line
">
<div class="
item
-
timeline
timeline
-
new
">
<div class="
t
-
dot
">
<div class="
t
-
primary
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
check
"><polyline points="
20
6
9
17
4
12
"></polyline></svg></div>
</div>
<div class="
t
-
content
">
<div class="
t
-
uppercontent
">
<h5>Logs</h5>
<span class="">27 Feb, 2020</span>
</div>
<p><span>Updated</span> Server Logs</p>
<div class="
tags
">
<div class="
badge
badge
-
primary
">Logs</div>
<div class="
badge
badge
-
success
">CPanel</div>
<div class="
badge
badge
-
warning
">Update</div>
</div>
</div>
</div>
<div class="
item
-
timeline
timeline
-
new
">
<div class="
t
-
dot
">
<div class="
t
-
success
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
mail
"><path d="
M4
4
h16c1
.
1
0
2
.
9
2
2
v12c0
1.1
-.
9
2
-
2
2
H4c
-
1.1
0
-
2
-.
9
-
2
-
2
V6c0
-
1.1
.
9
-
2
2
-
2
z
"></path><polyline points="
22
,
6
12
,
13
2
,
6
"></polyline></svg></div>
</div>
<div class="
t
-
content
">
<div class="
t
-
uppercontent
">
<h5>Mail</h5>
<span class="">28 Feb, 2020</span>
</div>
<p>Send Mail to <a href="
javascript
:
void
(
0
);
">HR</a> and <a href="
javascript
:
void
(
0
);
">Admin</a></p>
<div class="
tags
">
<div class="
badge
badge
-
primary
">Admin</div>
<div class="
badge
badge
-
success
">HR</div>
<div class="
badge
badge
-
warning
">Mail</div>
</div>
</div>
</div>
<div class="
item
-
timeline
timeline
-
new
">
<div class="
t
-
dot
">
<div class="
t
-
danger
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
check
"><polyline points="
20
6
9
17
4
12
"></polyline></svg></div>
</div>
<div class="
t
-
content
">
<div class="
t
-
uppercontent
">
<h5>Task Completed</h5>
<span class="">01 Mar, 2020</span>
</div>
<p>Backup <span>Files EOD</span></p>
<div class="
tags
">
<div class="
badge
badge
-
primary
">Backup</div>
<div class="
badge
badge
-
success
">EOD</div>
</div>
</div>
</div>
<div class="
item
-
timeline
timeline
-
new
">
<div class="
t
-
dot
">
<div class="
t
-
warning
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
file
"><path d="
M13
2
H6a2
2
0
0
0
-
2
2
v16a2
2
0
0
0
2
2
h12a2
2
0
0
0
2
-
2
V9z
"></path><polyline points="
13
2
13
9
20
9
"></polyline></svg></div>
</div>
<div class="
t
-
content
">
<div class="
t
-
uppercontent
">
<h5>Collect Docs</h5>
<span class="">10 Mar, 2020</span>
</div>
<p>Collected documents from <a href="
javascript
:
void
(
0
);
">Sara</a></p>
<div class="
tags
">
<div class="
badge
badge
-
success
">Collect</div>
<div class="
badge
badge
-
warning
">Docs</div>
</div>
</div>
</div>
<div class="
item
-
timeline
timeline
-
new
">
<div class="
t
-
dot
">
<div class="
t
-
dark
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
server
"><rect x="
2
" y="
2
" width="
20
" height="
8
" rx="
2
" ry="
2
"></rect><rect x="
2
" y="
14
" width="
20
" height="
8
" rx="
2
" ry="
2
"></rect><line x1="
6
" y1="
6
" x2="
6
" y2="
6
"></line><line x1="
6
" y1="
18
" x2="
6
" y2="
18
"></line></svg></div>
</div>
<div class="
t
-
content
">
<div class="
t
-
uppercontent
">
<h5>Reboot</h5>
<span class="">06 Apr, 2020</span>
</div>
<p>Server rebooted successfully</p>
<div class="
tags
">
<div class="
badge
badge
-
warning
">Reboot</div>
<div class="
badge
badge
-
primary
">Server</div>
<div class="
widget
-
content
widget
-
content
-
area
style
-
custom
-
1
">
<div class="
container
" style="
max
-
width
:
928
px
;
">
<div class="
row
">
<div class="
col
-
lg
-
12
col
-
md
-
12
mb
-
5
p
-
0
">
<div id="
style1
" class="
carousel
slide
style
-
custom
-
1
" data-ride="
carousel
">
<ol class="
carousel
-
indicators
">
<li data-target="
#style1" data-slide-to="0" class="active"></li>
<
li
data
-
target
=
"#style1"
data
-
slide
-
to
=
"1"
></
li
>
<
li
data
-
target
=
"#style1"
data
-
slide
-
to
=
"2"
></
li
>
</
ol
>
<
div
class
="
carousel
-
inner
">
<div class="
carousel
-
item
active
">
<img class="
d
-
block
w
-
100
slide
-
image
" src="
{{
url
(
'theme/assets/img/600x300.jpg'
)
}}
" alt="
First
slide
">
<div class="
carousel
-
caption
">
<span class="
badge
">Lifestyle</span>
<h3>How To Make More Blog By Doing Less</h3>
<div class="
media
">
<img src="
assets
/
img
/
90
x90
.
jpg
" class="" alt="
avatar
">
<div class="
media
-
body
">
<h6 class="
user
-
name
">User name</h6>
<p class="
meta
-
time
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
calendar
"><rect x="
3
" y="
4
" width="
18
" height="
18
" rx="
2
" ry="
2
"></rect><line x1="
16
" y1="
2
" x2="
16
" y2="
6
"></line><line x1="
8
" y1="
2
" x2="
8
" y2="
6
"></line><line x1="
3
" y1="
10
" x2="
21
" y2="
10
"></line></svg> Jan, 14 2020</p>
</div>
</div>
</div>
</div>
<div class="
carousel
-
item
">
<img class="
d
-
block
w
-
100
slide
-
image
" src="
{{
url
(
'theme/assets/img/600x300.jpg'
)
}}
" alt="
Second
slide
">
<div class="
carousel
-
caption
">
<span class="
badge
">Lifestyle</span>
<h3>How To Make Blog</h3>
<div class="
media
">
<img src="
assets
/
img
/
90
x90
.
jpg
" class="" alt="
avatar
">
<div class="
media
-
body
">
<h6 class="
user
-
name
">User name</h6>
<p class="
meta
-
time
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
calendar
"><rect x="
3
" y="
4
" width="
18
" height="
18
" rx="
2
" ry="
2
"></rect><line x1="
16
" y1="
2
" x2="
16
" y2="
6
"></line><line x1="
8
" y1="
2
" x2="
8
" y2="
6
"></line><line x1="
3
" y1="
10
" x2="
21
" y2="
10
"></line></svg> Jan, 14 2020</p>
</div>
</div>
</div>
</div>
<div class="
carousel
-
item
">
<img class="
d
-
block
w
-
100
slide
-
image
" src="
{{
url
(
'theme/assets/img/600x300.jpg'
)
}}
" alt="
Third
slide
">
<div class="
carousel
-
caption
">
<span class="
badge
">Lifestyle</span>
<h3>Best Blog Android Apps</h3>
<div class="
media
">
<img src="
assets
/
img
/
90
x90
.
jpg
" class="" alt="
avatar
">
<div class="
media
-
body
">
<h6 class="
user
-
name
">User name</h6>
<p class="
meta
-
time
"><svg xmlns="
http
://
www
.
w3
.
org
/
2000
/
svg
" width="
24
" height="
24
" viewBox="
0
0
24
24
" fill="
none
" stroke="
currentColor
" stroke-width="
2
" stroke-linecap="
round
" stroke-linejoin="
round
" class="
feather
feather
-
calendar
"><rect x="
3
" y="
4
" width="
18
" height="
18
" rx="
2
" ry="
2
"></rect><line x1="
16
" y1="
2
" x2="
16
" y2="
6
"></line><line x1="
8
" y1="
2
" x2="
8
" y2="
6
"></line><line x1="
3
" y1="
10
" x2="
21
" y2="
10
"></line></svg> Jan, 14 2020</p>
</div>
</div>
</div>
</div>
</div>
<a class="
carousel
-
control
-
prev
" href="
#style1" role="button" data-slide="prev">
<
span
class
="
carousel
-
control
-
prev
-
icon
" aria-hidden="
true
"></span>
<span class="
sr
-
only
">Previous</span>
</a>
<a class="
carousel
-
control
-
next
" href="
#style1" role="button" data-slide="next">
<
span
class
="
carousel
-
control
-
next
-
icon
" aria-hidden="
true
"></span>
<span class="
sr
-
only
">Next</span>
</a>
</div>
</div>
</div>
...
...
@@ -280,12 +93,11 @@
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script src="
{{
url
(
'theme/plugins/
apex/apexcharts.min.js'
)
}}
"></script>
<script src="
{{
url
(
'theme/assets/js/
dashboard/dash_2.js'
)
}}
"></script>
<script src="
{{
url
(
'theme/plugins/
highlight/highlight.pack.js'
)
}}
"></script>
<script src="
{{
url
(
'theme/assets/js/
scrollspyNav.js'
)
}}
"></script>
@endsection
resources/views/layouts/css.blade.php
View file @
3124c62f
...
...
@@ -32,3 +32,5 @@
<link
href=
"{{ url('theme/plugins/noUiSlider/custom-nouiSlider.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"{{ url('theme/plugins/bootstrap-range-Slider/bootstrap-slider.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"{{ url('theme/assets/css/components/custom-carousel.css') }}"
rel=
"stylesheet"
type=
"text/css"
/>
resources/views/layouts/master.blade.php
View file @
3124c62f
...
...
@@ -50,7 +50,10 @@
<a
class=
""
href=
"user_profile.html"
><svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-user"
><path
d=
"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
></path><circle
cx=
"12"
cy=
"7"
r=
"4"
></circle></svg>
My Profile
</a>
</div>
<div
class=
"dropdown-item"
>
<a
class=
""
href=
"auth_login.html"
><svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-log-out"
><path
d=
"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
></path><polyline
points=
"16 17 21 12 16 7"
></polyline><line
x1=
"21"
y1=
"12"
x2=
"9"
y2=
"12"
></line></svg>
Sign Out
</a>
<a
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();document.getElementById('logout-form').submit();"
><i
data-feather=
"log-out"
></i>
Logout
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</div>
</div>
...
...
resources/views/user/bukuajar/create.blade.php
View file @
3124c62f
...
...
@@ -15,115 +15,141 @@
$menu
= 'dashboard';
@endphp
<div class="
account
-
settings
-
container
layout
-
top
-
spacing
">
<form action="
{{
$edit
?
route
(
'bukuajar.update'
,
[
'bukuajar'
=>
encrypt
(
$bukuajar
->
id
)])
:
route
(
'bukuajar.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">
<
div
class
="
row
">
<div class="
account
-
content
">
<div class="
scrollspy
-
example
" data-spy="
scroll
" data-target="
#account-settings-scroll" data-offset="-100">
<
div
class
="
row
">
<div class="
col
-
xl
-
12
col
-
lg
-
12
col
-
md
-
12
layout
-
spacing
">
<form id="
general
-
info
" class="
section
general
-
info
">
<div class="
info
">
<h6 class="">Data Dosen</h6>
<div class="
row
">
<div class="
col
-
lg
-
11
mx
-
auto
">
<div class="
input
-
group
mb
-
4
">
<input type="
text
" class="
form
-
control
" placeholder="
NIDN
" aria-label="
nidn
">
<div class="
input
-
group
-
append
">
<button class="
btn
btn
-
info
" type="
button
">Cek</button>
</div>
</div>
<div class="
form
-
row
mb
-
4
">
<div class="
form
-
group
col
-
md
-
6
">
<label for="
inputEmail4
">Nama Dosen</label>
<input type="
text
" class="
form
-
control
" id="
namadosen
">
<div class="
col
-
xl
-
12
col
-
lg
-
12
col
-
md
-
12
layout
-
spacing
">
<div id="
general
-
info
" class="
section
general
-
info
">
<div class="
info
">
<h6 class="">Data Dosen</h6>
<div class="
row
">
<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
" value="
{{
$edit
?
$bukuajar
->
nidn
:
''
}}
" placeholder="
NIDN
" aria-label="
nidn
">
<input type="
text
" class="
form
-
control
" name="
nidn
" value="
{{
$edit
?
$bukuajar
->
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>
</div>
@if(
$errors->has
('nidn'))
<label id="
login
-
error
" class="
text
-
danger
" for="
login
">{{
$errors->first
('nidn') }}</label>
@endif
</div>
<div class="
form
-
group
col
-
md
-
6
">
<label for="
inputPassword4
">Program Studi</label>
<input type="
text
" class="
form
-
control
" id="
programstudi
">
<div class="
form
-
row
mb
-
4
">
<div class="
form
-
group
col
-
md
-
6
">
<label>Nama Dosen</label>
<input type="
text
" id="
nama_nidn_dosen
" class="
form
-
control
" id="
namadosen
" disabled>
</div>
<div class="
form
-
group
col
-
md
-
6
">
<label>Program Studi</label>
<input type="
text
" id="
prodi_nidn_dosen
" class="
form
-
control
" id="
programstudi
" disabled>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="
col
-
xl
-
12
col
-
lg
-
12
col
-
md
-
12
layout
-
spacing
">
<form id="
contact
" class="
section
contact
">
<div class="
info
">
<h5 class="">Data Buku Ajar / Buku Teks</h5>
<div class="
row
">
<div class="
col
-
md
-
11
mx
-
auto
">
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label>Pilih Kategori</label>
<select class="
form
-
control
" id="
kategori
">
<option>All Countries</option>
<option selected>United States</option>
<option>India</option>
<option>Japan</option>
<option>China</option>
<option>Brazil</option>
<option>Norway</option>
<option>Canada</option>
</select>
<div class="
col
-
xl
-
12
col
-
lg
-
12
col
-
md
-
12
layout
-
spacing
">
<div id="
general
-
info
" class="
section
general
-
info
">
<div class="
info
">
<h5 class="">Data Buku Ajar / Buku Teks</h5>
<div class="
row
">
<div class="
col
-
md
-
11
mx
-
auto
">
<div class="
row
">
@php
$kategori
=array('Buku Teks' => 'Buku Teks', 'Monograf' => 'Monograf', 'Buku Ajar' => 'Buku Ajar', 'Book Chapter' => 'Book Chapter', 'Buku Hasil Penelitian Lainnya' => 'Buku Hasil Penelitian Lainnya'); @endphp
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label>Pilih Kategori</label>
<select class="
form
-
control
" id="
kategori
" name="
kategori
">
@foreach(
$kategori
as
$item
)
@if(
$edit
)
<option value="
{{
$item
}}
" {{ (
$bukuajar->kategori
==
$item
) ? 'selected' : '' }}>
{
{$item}
}
</option>
@else
<option value="
{{
$item
}}
">
{
{$item}
}
</option>
@endif
@endforeach
</select>
</div>
</div>
</div>
<div class="
col
-
md
-
6
">
</div>
<div class="
col
-
md
-
12
">
<div class="
form
-
group
">
<label>Judul</label>
<textarea class="
form
-
control
" id="
judul
" placeholder="
Judul
" rows="
5
"></textarea>
<div class="
col
-
md
-
6
">
</div>
</div
>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
"
>
<label>ISBN</label
>
<
input type="
text
" class="
form
-
control
mb
-
4
" id="
isbn
" placeholder="
ISBN
"
>
<div class="
col
-
md
-
12
"
>
<div class="
form
-
group
">
<label>Judul</label
>
<textarea class="
form
-
control
" id="
judul
" name="
judul
" placeholder="
Judul
" rows="
5
">{!!
$edit
?
$bukuajar->judul
: old('judul') !!}</textarea
>
<
/div
>
</div>
</div
>
<div class="
col
-
md
-
4
">
<div class="
form
-
group
"
>
<label>Jumlah Halaman</label
>
<
input type="
text
" class="
form
-
control
mb
-
4
" id="
jumlahhalaman
" placeholder="
Jumlah
Halaman
"
>
<div class="
col
-
md
-
6
"
>
<div class="
form
-
group
">
<label>ISBN</label
>
<input type="
text
" class="
form
-
control
mb
-
4
" id="
isbn
" name="
isbn
" placeholder="
ISBN
" value="
{{
$edit
?
$bukuajar
->
isbn
:
old
(
'isbn'
)
}}
"
>
<
/div
>
</div>
</div
>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
"
>
<label>Penerbit</label
>
<
input type="
text
" class="
form
-
control
mb
-
4
" id="
penerbit
" placeholder="
Penerbit
"
>
<div class="
col
-
md
-
4
"
>
<div class="
form
-
group
">
<label>Jumlah Halaman</label
>
<input type="
text
" class="
form
-
control
mb
-
4
" id="
jumlahhalaman
" name="
jumlah_hal
" placeholder="
Jumlah
Halaman
" value="
{{
$edit
?
$bukuajar
->
jumlah_hal
:
old
(
'jumlah_hal'
)
}}
"
>
<
/div
>
</div>
</div>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label>URL</label>
<input type="
text
" class="
form
-
control
mb
-
4
" id="
website1
" placeholder="
http
://
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label>Penerbit</label>
<input type="
text
" class="
form
-
control
mb
-
4
" id="
penerbit
" name="
penerbit
" placeholder="
Penerbit
" value="
{{
$edit
?
$bukuajar
->
penerbit
:
old
(
'penerbit'
)
}}
">
</div>
</div>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label>URL</label>
<input type="
text
" class="
form
-
control
mb
-
4
" id="
url
" name="
url
" placeholder="
http
://
" value="
{{
$edit
?
$bukuajar
->
url
:
old
(
'url'
)
}}
">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
account
-
settings
-
footer
">
<div class="
as
-
footer
-
container
">
<button id="
multiple
-
reset
" class="
btn
btn
-
warning
">Batal</button>
<button id="
multiple
-
messages
" class="
btn
btn
-
primary
">Save Changes</button>
<div class="
account
-
settings
-
footer
">
<div class="
as
-
footer
-
container
">
<button id="
multiple
-
reset
" class="
btn
btn
-
warning
">Batal</button>
<button id="
multiple
-
messages
" class="
btn
btn
-
primary
">Save Changes</button>
</div>
</div>
</
div
>
</
form
>
</div>
@endsection
@section('js')
<script src="
{{
url
(
'theme/plugins/apex/apexcharts.min.js'
)
}}
"></script>
<script src="
{{
url
(
'theme/assets/js/dashboard/dash_2.js'
)
}}
"></script>
<script>
function checkNidn(id){
var value = $('#input_'+id).val();
var request = $.ajax({
url: "
{{
route
(
'get-biodata'
)
}}
",
type: "
get
",
dataType: "
json
",
data:
{
nidn:value
}
,
success: function(result){
$('#nama_'+id).val(result['name']);
$('#prodi_'+id).val(result['prodi']);
$('#'+id).val(result['nidn']);
}
})
}
</script>
@endsection
resources/views/user/bukuajar/index.blade.php
View file @
3124c62f
...
...
@@ -18,130 +18,36 @@
<div class="
col
-
xl
-
12
col
-
lg
-
12
col
-
sm
-
12
layout
-
spacing
">
<div class="
widget
-
content
widget
-
content
-
area
br
-
6
">
<div class="
table
-
responsive
mb
-
4
mt
-
4
">
<a href="
{{
url
(
'bukuajar/create'
)
}}
" class="
btn
btn
-
primary
mb
-
2
"><i data-feather="
file
-
plus
"></i> Tambah</a>
<table id="
zero
-
config
" class="
table
table
-
hover
" style="
width
:
100
%
">
<thead>
<tr>
<th>N
ame
</th>
<th>
Position
</th>
<th>
Office
</th>
<th>
Age
</th>
<th>
Start date
</th>
<th>
Salary
</th>
<th>N
o
</th>
<th>
Judul
</th>
<th>
Kategori
</th>
<th>
Penerbit
</th>
<th>
Nama Dosen
</th>
<th>
Aksi
</th>
</tr>
</thead>
<tbody>
@php
$no
= 1; @endphp
@foreach(
$bukuajar
as
$value
)
<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>
{
{$no++}
}
</td>
<td>Judul :
{
{$value->judul}
}
<br>ISBN :
{
{$value->isbn}
}
<br>Jumlah Halaman :
{
{$value->jumlah_hal}
}
</td>
<td>
{
{$value->kategori}
}
</td>
<td>
{
{$value->penerbit}
}
</td>
<td>
{
{$value->rDosen->name}
}
</td>
<td>
<a href="
{{
url
(
'bukuajar/'
.
$value
->
id
.
'/edit'
)
}}
" class="
btn
btn
-
warning
mb
-
2
"><i data-feather="
edit
"></i> Edit</a> |
<button class="
btn
btn
-
danger
mb
-
2
delete
" data-id="
{{
$value
->
id
}}
" data-file="
{{
$value
->
id
}}
"><i data-feather="
trash
-
2
"></i> Delete</button>
{{ Form::open(['url'=>route('bukuajar.destroy', [Crypt::encrypt(
$value->id
)]), 'method'=>'delete', 'id' =>
$value->id
, 'style' => 'display: none;']) }}
{{ csrf_field() }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
...
...
@@ -167,5 +73,29 @@
"
lengthMenu
": [10, 20, 50],
"
pageLength
": 10
});
var url = "
{{
route
(
'bukuajar.index'
)
}}
";
$("
body
").on("
click
", "
.
delete
", function (e) {
e.preventDefault();
var id = $(this).data('id');
Swal.fire({
title: "
Apakah
Anda
Yakin
?
",
text: "
Anda
akan
menghapus
data
ini
!
",
icon: "
warning
",
showCancelButton: true,
confirmButtonColor: "
#DD6B55",
confirmButtonText
:
"Yes"
,
cancelButtonText
:
"No"
})
.
then
((
result
)
=>
{
if
(
result
.
value
)
{
Swal
.
close
();
$
(
"#"
+
id
)
.
submit
();
}
else
if
(
result
.
dismiss
===
Swal
.
DismissReason
.
cancel
)
{
Swal
.
fire
(
'Dibatalkan'
,
'Data batal dihapus'
,
'error'
);
}
});
});
</
script
>
@
endsection
routes/web.php
View file @
3124c62f
...
...
@@ -46,22 +46,15 @@ Route::middleware(['auth:sanctum', 'verified'])->group(function () {
Route
::
resource
(
'/fasilitas'
,
FasilitasController
::
class
);
Route
::
resource
(
'/kekayaanintelek'
,
KekayaanIntelController
::
class
);
Route
::
resource
(
'/kontrakkerja'
,
KontrakKerjaController
::
class
);
Route
::
resource
(
'/penelitiansumber'
,
PenelitianSumberDanaController
::
class
);
Route
::
get
(
'/penelitiansumber/next-form/{id}'
,
[
PenelitianSumberDanaController
::
class
,
'nextForm'
])
->
name
(
'penelitiansumber.next-form'
);
Route
::
get
(
'/penelitiansumber/edit-anggota/{id}'
,
[
PenelitianSumberDanaController
::
class
,
'editAnggota'
])
->
name
(
'penelitiansumber.edit-anggota'
);
Route
::
post
(
'/penelitiansumber/simpan-anggota/{id}'
,
[
PenelitianSumberDanaController
::
class
,
'simpanAnggota'
])
->
name
(
'penelitiansumber.simpan-anggota'
);
Route
::
post
(
'/penelitiansumber/delete-anggota'
,
[
PenelitianSumberDanaController
::
class
,
'deleteAnggota'
])
->
name
(
'penelitiansumber.delete-anggota'
);
Route
::
post
(
'/penelitiansumber/cek-simpan-anggota'
,
[
PenelitianSumberDanaController
::
class
,
'cekSimpanAnggota'
])
->
name
(
'penelitiansumber.cek-simpan-anggota'
);
Route
::
resource
(
'/penelitiasing'
,
PenelitiAsingController
::
class
);
Route
::
resource
(
'/publikasiartikel'
,
PublikasiArtikelController
::
class
);
Route
::
resource
(
'/publikasijurnal'
,
PublikasiJurnalController
::
class
);
Route
::
get
(
'/publikasijurnal/next-form/{id}'
,
[
PublikasiJurnalController
::
class
,
'nextForm'
])
->
name
(
'publikasijurnal.next-form'
);
Route
::
get
(
'/publikasijurnal/edit-anggota/{id}'
,
[
PublikasiJurnalController
::
class
,
'editAnggota'
])
->
name
(
'publikasijurnal.edit-anggota'
);
Route
::
post
(
'/publikasijurnal/simpan-anggota/{id}'
,
[
PublikasiJurnalController
::
class
,
'simpanAnggota'
])
->
name
(
'publikasijurnal.simpan-anggota'
);
Route
::
post
(
'/publikasijurnal/delete-anggota'
,
[
PublikasiJurnalController
::
class
,
'deleteAnggota'
])
->
name
(
'publikasijurnal.delete-anggota'
);
Route
::
resource
(
'/penyelenggaraseminar'
,
PenyelenggaraanSeminarController
::
class
);
Route
::
resource
(
'/stafpendukung'
,
StafPendukungController
::
class
);
Route
::
resource
(
'/unitbisnis'
,
UnitBisnisController
::
class
);
...
...
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