Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Reyhan Naufal Hakim
servicedesk-pbl-kominfo-skh
Commits
5a45038d
Commit
5a45038d
authored
2 years ago
by
reyhannaufalh
Browse files
Options
Download
Email Patches
Plain Diff
Ticket Aduan
parent
244c233c
main
backend
frontend-ui
1 merge request
!3
Ticket aduan
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
app/Http/Controllers/AdminController.php
+4
-3
app/Http/Controllers/AdminController.php
app/Http/Controllers/AuthController.php
+1
-1
app/Http/Controllers/AuthController.php
app/Http/Controllers/PostController.php
+1
-0
app/Http/Controllers/PostController.php
app/Http/Controllers/TicketController.php
+30
-25
app/Http/Controllers/TicketController.php
app/Http/Controllers/UserController.php
+2
-2
app/Http/Controllers/UserController.php
public/css/animation.css
+81
-0
public/css/animation.css
resources/css/app.css
+4
-0
resources/css/app.css
resources/views/dashboard/admin/index.blade.php
+2
-8
resources/views/dashboard/admin/index.blade.php
resources/views/dashboard/layouts/partials/sidebar.blade.php
+3
-4
resources/views/dashboard/layouts/partials/sidebar.blade.php
resources/views/dashboard/layouts/partials/ticketAdmin.blade.php
+24
-11
...es/views/dashboard/layouts/partials/ticketAdmin.blade.php
resources/views/dashboard/ticket/index.blade.php
+6
-9
resources/views/dashboard/ticket/index.blade.php
resources/views/forum/index.blade.php
+27
-0
resources/views/forum/index.blade.php
resources/views/forum/partials/post.blade.php
+0
-15
resources/views/forum/partials/post.blade.php
resources/views/index.blade.php
+49
-42
resources/views/index.blade.php
resources/views/layouts/main.blade.php
+3
-1
resources/views/layouts/main.blade.php
resources/views/layouts/partials/navbar.blade.php
+12
-4
resources/views/layouts/partials/navbar.blade.php
resources/views/layouts/partials/sidebarSettings.blade.php
+3
-3
resources/views/layouts/partials/sidebarSettings.blade.php
routes/web.php
+3
-0
routes/web.php
with
255 additions
and
128 deletions
+255
-128
app/Http/Controllers/AdminController.php
View file @
5a45038d
...
...
@@ -8,7 +8,6 @@
use
App\Models\Ticket
;
use
App\Models\Topic
;
use
App\Models\Unit
;
use
App\Models\User
;
use
Illuminate\Http\Request
;
class
AdminController
extends
Controller
...
...
@@ -41,6 +40,7 @@ public function index()
return
view
(
'dashboard.admin.index'
,
[
'posts'
=>
$posts
,
'all_posts'
=>
Post
::
all
()
->
where
(
'unit_id'
,
auth
()
->
user
()
->
unit_id
),
'unit'
=>
Unit
::
all
(),
'tickets'
=>
Ticket
::
all
(),
'topics'
=>
$topic
,
...
...
@@ -55,8 +55,9 @@ public function index()
public
function
superAdmin
()
{
return
view
(
'dashboard.admin.index'
,
[
'posts'
=>
Post
::
all
(),
return
view
(
'dashboard.ticket.index'
,
[
'posts'
=>
Post
::
all
()
->
paginate
(
4
)
->
withQueryString
(),
'post_categories'
=>
PostCategory
::
all
(),
'notFinished'
=>
Post
::
unfinished
()
->
count
(),
'finished'
=>
Post
::
finished
()
->
count
(),
'title'
=>
'Dashboard Super Admin'
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/AuthController.php
View file @
5a45038d
...
...
@@ -25,7 +25,7 @@ public function authenticate(Request $request)
}
else
if
(
$user
->
role
->
name
==
'admin'
)
{
return
redirect
(
'/dashboard'
);
}
else
{
return
redirect
(
'/dashboard/
superadmin
'
);
return
redirect
(
'/dashboard/
tickets
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/PostController.php
View file @
5a45038d
...
...
@@ -20,6 +20,7 @@ public function home()
return
view
(
'index'
,
[
'posts'
=>
Post
::
all
(),
'faqs'
=>
Faq
::
all
(),
'topics'
=>
Topic
::
all
(),
'finished'
=>
Post
::
finished
()
->
count
(),
'title'
=>
'Forum Diskusi'
]);
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/TicketController.php
View file @
5a45038d
...
...
@@ -4,6 +4,7 @@
use
App\Models\PostCategory
;
use
App\Models\Ticket
;
use
App\Models\Unit
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Str
;
...
...
@@ -39,20 +40,37 @@ public function store(Request $request)
return
back
()
->
with
(
'toast_success'
,
"Ticket berhasil dibuat"
);
}
//
public function index() {
//
$tickets = Ticket::latest()->where('unit_id', auth()->user()->unit_id)->get();
public
function
index
Admin
()
{
$tickets
=
Ticket
::
latest
()
->
where
(
'unit_id'
,
auth
()
->
user
()
->
unit_id
)
->
get
();
//
if(auth()->user()->role == 'superadmin') {
//
$tickets = Ticket::all();
//
}
if
(
auth
()
->
user
()
->
role
->
name
==
'superadmin'
)
{
$tickets
=
Ticket
::
all
();
}
// return view('dashboard.ticket.index', [
// 'tickets' => $tickets,
// 'post_categories' => PostCategory::all(),
// 'units' => Unit::all(),
// 'title' => 'Ticket'
// ]);
// }
return
view
(
'dashboard.ticket.index'
,
[
'tickets'
=>
$tickets
,
'post_categories'
=>
PostCategory
::
all
(),
'units'
=>
Unit
::
all
(),
'title'
=>
'Ticket'
]);
}
public
function
update
(
Request
$request
,
Ticket
$ticket
)
{
if
(
$request
->
is_aduan
==
0
||
$request
->
is_aduan
==
1
)
{
$dataPost
=
Ticket
::
findorfail
(
$ticket
->
id
);
if
(
$request
->
is_aduan
==
0
)
{
$dataPost
->
update
([
'is_aduan'
=>
1
]);
}
else
if
(
$request
->
is_aduan
==
1
)
{
$dataPost
->
update
([
'is_aduan'
=>
0
]);
}
return
back
()
->
with
(
'toast_success'
,
"Ticket berhasil diadukan"
);
}
return
back
()
->
with
(
'toast_error'
,
'Tiket gagal diadukan'
);
}
// public function show(Unit $unit) {
// return view('dashboard.ticket.show', [
...
...
@@ -62,17 +80,4 @@ public function store(Request $request)
// 'title' => 'Ticket'
// ]);
// }
// public function store(Request $request)
// {
// $validatedData = $request->validate([
// 'user_id' => 'required',
// 'post_id' => 'required',
// ]);
// $validatedData['unit_id'] = auth()->user()->unit_id;
// Ticket::create($validatedData);
// return back()->with('success', 'Berhasil membuat aduan!');
// }
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/Http/Controllers/UserController.php
View file @
5a45038d
...
...
@@ -14,7 +14,7 @@ class UserController extends Controller
public
function
index
()
{
return
view
(
'dashboard.admin.user.users'
,
[
'users'
=>
User
::
where
(
'unit_id'
,
auth
()
->
user
()
->
unit_id
)
->
where
(
'role
'
,
'user'
)
->
get
(),
'users'
=>
User
::
where
(
'unit_id'
,
auth
()
->
user
()
->
unit_id
)
->
where
(
'role
_id'
,
3
)
->
get
(),
'title'
=>
'Manajemen User'
]);
}
...
...
@@ -44,7 +44,7 @@ public function store(Request $request)
$validatedData
=
$request
->
validate
([
'name'
=>
'required|max:255'
,
'email'
=>
'required|email:dns|unique:users'
,
'password'
=>
'required|min:
3
'
,
'password'
=>
'required|min:
8
'
,
]);
$validatedData
[
'password'
]
=
bcrypt
(
$validatedData
[
'password'
]);
...
...
This diff is collapsed.
Click to expand it.
public/css/animation.css
View file @
5a45038d
...
...
@@ -100,3 +100,84 @@ @keyframes fadeIn {
opacity
:
1
;
}
}
/* SLIDER */
.card
{
background
:
#fff
;
padding
:
1.5rem
;
max-width
:
35rem
;
border-radius
:
0.5rem
;
position
:
absolute
;
pointer-events
:
none
;
opacity
:
0
;
animation
:
animate
15s
infinite
linear
;
animation-delay
:
calc
(
3s
*
var
(
--delay
));
}
.profile
,
.header
{
display
:
flex
;
align-items
:
center
;
}
.header
{
justify-content
:
space-between
;
}
.profile
{
margin-bottom
:
0.5rem
;
}
.profile
.img
{
height
:
50px
;
width
:
50px
;
border-radius
:
50%
;
padding
:
5px
;
background
:
#fff
;
box-shadow
:
0
8px
24px
rgba
(
0
,
0
,
0
,
0.178
);
}
.profile
.img
img
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
border-radius
:
50%
;
}
.profile
.details
{
margin-left
:
10px
;
}
.op-star
{
color
:
#28223f
;
font-size
:
1.1rem
;
}
/* .outer:hover .card {
animation-play-state: paused;
} */
.cards
.card
:last-child
{
animation-delay
:
calc
(
-3s
*
var
(
--delay
));
}
@keyframes
animate
{
0
%
{
opacity
:
0
;
transform
:
translateY
(
100%
)
scale
(
0.5
);
}
5
%,
20
%
{
opacity
:
0.4
;
transform
:
translateY
(
100%
)
scale
(
0.7
);
}
25
%,
40
%
{
opacity
:
1
;
pointer-events
:
all
;
transform
:
translateY
(
0%
)
scale
(
1
);
}
45
%,
60
%
{
opacity
:
0.4
;
transform
:
translateY
(
-100%
)
scale
(
0.7
);
}
65
%,
100
%
{
opacity
:
0
;
transform
:
translateY
(
-100%
)
scale
(
0.5
);
}
}
This diff is collapsed.
Click to expand it.
resources/css/app.css
View file @
5a45038d
...
...
@@ -26,6 +26,10 @@ @layer components {
@apply
text-white
bg-red-700
hover
:
bg-red-800
focus
:
ring-4
focus
:
outline-none
focus
:
ring-red-300
font-medium
rounded-lg
text-sm
px-5
py-2
.5
text-center
flex
place-content-center
dark
:
bg-red-600
dark
:
hover
:
bg-red-700
dark
:
focus
:
ring-red-800
h-fit
;
}
.btn-link-orange
{
@apply
text-white
bg-orange-500
hover
:
bg-orange-600
focus
:
ring-4
focus
:
outline-none
focus
:
ring-orange-300
font-medium
rounded-lg
text-sm
px-5
py-2
.5
text-center
flex
place-content-center
dark
:
bg-orange-600
dark
:
hover
:
bg-orange-700
dark
:
focus
:
ring-orange-800
h-fit
;
}
.btn-gradient-blue
{
@apply
text-white
bg-gradient-to-r
from-blue-500
via-blue-600
to-blue-700
hover
:
bg-gradient-to-br
focus
:
ring-4
focus
:
outline-none
focus
:
ring-blue-300
dark
:
focus
:
ring-blue-800
font-medium
rounded-lg
text-sm
px-5
py-2
.5
text-center
;
}
...
...
This diff is collapsed.
Click to expand it.
resources/views/dashboard/admin/index.blade.php
View file @
5a45038d
...
...
@@ -32,12 +32,6 @@ class="inline-block p-4 border-b-2 {{ Request::get('category') == $category->slu
@
include
(
'forum.partials.post'
)
</
div
>
<
div
class
=
"col-span-3 flex flex-col gap-4"
>
<!--
CTA
-->
<
button
data
-
modal
-
target
=
"authentication-modal"
data
-
modal
-
toggle
=
"authentication-modal"
class
=
"btn-gradient-blue mb-4"
type
=
"button"
>
<
i
class
=
"fa-solid fa-plus mr-2"
></
i
>
Buat
tiket
aduan
</
button
>
<!--
END
CTA
-->
<
div
class
=
"flex items-center justify-center rounded bg-gray-50 dark:bg-gray-800"
>
<
a
href
=
"#"
class
=
"block w-full p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700"
>
...
...
@@ -45,7 +39,7 @@ class="block w-full p-6 bg-white border border-gray-200 rounded-lg shadow hover:
Jumlah
Diskusi
</
p
>
<
h1
class
=
"mt-2 text-blue-700 text-5xl font-bold tracking-tight dark:text-white"
>
{{
$posts
->
count
()
}}
{{
$
all_
posts
->
count
()
}}
</
h1
>
</
a
>
</
div
>
...
...
@@ -56,7 +50,7 @@ class="block w-full p-6 bg-white border border-gray-200 rounded-lg shadow hover:
Diskusi
Berlangsung
</
p
>
<
h1
class
=
"mt-2 text-red-600 text-5xl font-bold tracking-tight dark:text-white"
>
{{
$
notFinished
}}
{{
$
all_posts
->
count
()
}}
</
h1
>
</
a
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/dashboard/layouts/partials/sidebar.blade.php
View file @
5a45038d
...
...
@@ -4,7 +4,7 @@ class="fixed top-0 left-0 z-40 w-64 h-screen pt-20 transition-transform -transla
<div
class=
"h-full px-3 pb-4 overflow-y-auto bg-white dark:bg-gray-800"
>
<ul
class=
"space-y-2"
>
<li>
<a
href=
"{{ auth()->user()->role == 'admin' ? '/dashboard' : '/dashboard/superadmin' }}"
<a
href=
"{{ auth()->user()->role
->name
== 'admin' ? '/dashboard' : '/dashboard/superadmin' }}"
class=
"flex gap-1 items-center py-2 px-4 text-base font-normal rounded-lg {{ Request::is('dashboard') || Request::is('dashboard/superadmin') || Request::is('dashboard/post*') ? 'bg-blue-700 text-white dark:text-white hover:bg-blue-800 dark:hover:bg-blue-700' : 'text-gray-900 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700' }} "
>
<div
class=
"w-5"
>
<i
...
...
@@ -89,15 +89,14 @@ class="fa-solid fa-question {{ Request::is('dashboard/faq*') ? 'text-white' : 't
<li>
<a
href=
"{{ url('/dashboard/tickets') }}"
class=
"
hidden
gap-1 items-center py-2 px-4 text-base font-normal rounded-lg {{ Request::is('dashboard/tickets
*
') ? 'bg-blue-700 text-white dark:text-white hover:bg-blue-800 dark:hover:bg-blue-700' : 'text-gray-900 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700' }}"
>
class=
"
flex
gap-1 items-center py-2 px-4 text-base font-normal rounded-lg {{ Request::is('dashboard/tickets') ? 'bg-blue-700 text-white dark:text-white hover:bg-blue-800 dark:hover:bg-blue-700' : 'text-gray-900 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700' }}
"
>
<div
class=
"w-5"
>
<i
class=
"fa-solid fa-ticket {{ Request::is('dashboard/tickets*') ? 'text-white' : 'text-gray-500' }}"
></i>
</div>
<span
class=
"
flex-1 ml-3 whitespace-nowrap
"
>
Tickets
</span>
<span
class=
"
ml-3
"
>
Tickets
</span>
</a>
</li>
</ul>
</div>
</aside>
This diff is collapsed.
Click to expand it.
resources/views/dashboard/layouts/partials/ticketAdmin.blade.php
View file @
5a45038d
...
...
@@ -23,19 +23,19 @@ class="inline-block p-4 border-b-2 {{ Request::get('category') == $category->slu
<div
class=
"flex flex-col gap-5"
>
@if ($tickets->count())
@foreach ($tickets as $ticket)
<
a
href=
"/forum/{{ $ticket->post->slug }}"
<
div
class=
"block p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700"
>
<div
class=
"header flex gap-2 align-middle justify-between"
>
<div
class=
"flex gap-4 mb-6"
>
<img
class=
"w-10 h-10 rounded-full"
src=
"{{ $ticket->
post->
image ?? url('img/default.png') }}"
<img
class=
"w-10 h-10 rounded-full"
src=
"{{ $ticket->image ?? url('img/default.png') }}"
alt=
"Rounded avatar"
/>
<div>
<p
class=
"text-sm font-semibold h-fit text-secondary-700"
>
{{ $ticket->
post->
user->name }}
{{ $ticket->user->name }}
</p>
<p
class=
"font-normal text-xs text-secondary-400"
>
{{ $ticket->
post->
created_at->diffForHumans() }}
{{ $ticket->created_at->diffForHumans() }}
</p>
</div>
</div>
...
...
@@ -54,20 +54,33 @@ class="bg-red-100 text-red-800 text-sm font-medium mr-2 px-3 py-1 rounded dark:b
</div>
</div>
<h5
class=
"mb-2 text-xl font-bold tracking-tight text-gray-900 dark:text-white"
>
{{ $ticket->
post->
title }}
{{ $ticket->title }}
</h5>
<p
class=
"font-normal text-gray-700 dark:text-gray-400"
>
{{ $ticket->
post->
excerpt }}
{{ $ticket->excerpt }}
</p>
<!-- FOOTER -->
<div
class=
"flex
gap-5
mt-6"
>
<div
class=
"flex
justify-between
mt-6"
>
<span
class=
"flex items-center text-sm font-medium text-gray-900 dark:text-white"
><span
class=
"flex w-2.5 h-2.5 bg-primary-500 rounded-full mr-1.5 flex-shrink-0"
></span>
{{ $ticket->post->category->name }}
</span>
<span
class=
"flex items-center text-sm font-medium text-gray-900 dark:text-white"
><span
class=
"flex w-2.5 h-2.5 bg-indigo-500 rounded-full mr-1.5 flex-shrink-0"
></span>
{{ $ticket->post->topic->title }}
</span>
class=
"flex w-2.5 h-2.5 bg-primary-500 rounded-full mr-1.5 flex-shrink-0"
></span>
{{ $ticket->category->name }}
</span>
<div
class=
"flex gap-4"
>
<a
href=
"/dashboard/tickets/{{ $ticket->slug }}"
class=
"btn-link"
>
Lihat Tiket
</a>
@if ($ticket->is_aduan == 0)
<form
action=
"/dashboard/tickets/{{ $ticket->slug }}"
method=
"post"
>
@csrf
@method('PUT')
<input
type=
"hidden"
name=
"is_aduan"
value=
"{{ $ticket->is_aduan }}"
>
<button
type=
"submit"
class=
"btn-link bg-green-600"
>
Mengadukan diskusi
</button>
</form>
@else
<div
class=
"btn-link-orange"
>
Diskusi dalam pengaduan
</div>
@endif
</div>
</div>
</
a
>
</
div
>
@endforeach
@else
<p
class=
"text-center fs-4 mt-5"
>
Belum ada diskusi.
</p>
...
...
This diff is collapsed.
Click to expand it.
resources/views/dashboard/ticket/index.blade.php
View file @
5a45038d
...
...
@@ -24,12 +24,12 @@ class="mb-7 text-3xl font-bold leading-none tracking-tight text-gray-900 md:text
<
tr
>
<
th
scope
=
"col"
class
=
"px-6 py-3"
>
No
.
</
th
>
<
th
scope
=
"col"
class
=
"px-6 py-3"
>
Judul
</
th
>
<
th
scope
=
"col"
class
=
"px-6 py-3"
>
Jumlah
aduan
</
th
>
<
th
scope
=
"col"
class
=
"px-6 py-3"
>
Action
</
th
>
<
th
scope
=
"col"
class
=
"px-6 py-3
text-center
"
>
Jumlah
aduan
(
Tiket
)
</
th
>
<
th
scope
=
"col"
class
=
"px-6 py-3
text-center
"
>
Action
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$units
as
$
opd
)
@
foreach
(
$units
as
$
unit
)
<
tr
class
=
"bg-white border-b dark:bg-gray-900 dark:border-gray-700"
>
<
th
scope
=
"row"
class
=
"px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"
>
...
...
@@ -37,13 +37,10 @@ class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
</
th
>
<
td
class
=
"px-6 py-4"
>
{{
$unit
->
name
}}
</
td
>
@
foreach
(
$unit
->
tickets
as
$ticket
)
@
if
(
$ticket
->
unit
->
id
==
$unit
->
id
)
<
td
>
{{
$ticket
->
unit
->
count
()
??
'Belum ada'
}}
</
td
>
@
endif
@
endforeach
<
td
class
=
"px-6 py-4 text-center"
>
{{
$unit
->
tickets
->
count
()
??
''
}}
</
td
>
<
td
><
a
href
=
"/dashboard/tickets/{{
$unit->slug
}}"
class
=
"btn-link"
>
Pratinjau
</
a
>
<
td
><
a
href
=
"/dashboard/tickets/{{
$unit->slug
}}"
class
=
"btn-link-orange mx-6"
>
Pratinjau
</
a
>
</
td
>
</
tr
>
@
endforeach
...
...
This diff is collapsed.
Click to expand it.
resources/views/forum/index.blade.php
View file @
5a45038d
@
extends
(
'layouts.main'
)
@
section
(
'container'
)
{{
--
HEADER
--
}}
<
header
class
=
"overflow-hidden relative md:w-11/12 lg:w-4/5 m-auto flex-center py-12 px-6 md:rounded-lg bg-gradient-to-bl from-blue-400 via-blue-600 to-blue-700"
>
<
div
class
=
"text-left md:text-center text-white z-10 "
>
<
h2
class
=
"text-lg lg:text-2xl mb-2"
>
Selamat
Datang
di
Forum
Diskusi
</
h2
>
<
h2
class
=
"text-3xl lg:text-4xl font-semibold mb-4"
>
{{
auth
()
->
user
()
->
unit
->
name
}}
</
h2
>
<
p
class
=
"text-sm text-blue-300"
>
Diskusi
seputar
aplikasi
,
jaringan
dan
keamanan
di
Sukoharjo
</
p
>
</
div
>
<
div
class
=
"hidden lg:block"
>
<
div
class
=
"bg-gradient-to-br from-blue-400 to-blue-600 w-12 h-12 md:w-12 md:h-12 rounded-full absolute bottom-24 left-48"
>
</
div
>
<
div
class
=
"bg-gradient-to-br from-blue-400 to-blue-600 w-12 h-12 md:w-12 md:h-12 rounded-full absolute top-24 right-64"
>
</
div
>
<
div
class
=
"bg-gradient-to-br from-blue-400 to-blue-600 w-20 h-20 md:w-36 md:h-36 rounded-full absolute bottom-0 left-10"
>
</
div
>
<
div
class
=
"bg-gradient-to-br from-blue-400 to-blue-600 w-20 h-20 md:w-36 md:h-36 rounded-full absolute top-0 right-10"
>
</
div
>
</
div
>
</
header
>
{{
--
END
HEADER
--
}}
<!--
TABS
-->
<
div
class
=
"relative text-sm font-medium text-center text-gray-500 dark:text-gray-400 mb-4 "
>
<
ul
class
=
"md:w-11/12 lg:w-4/5 m-auto flex -mb-px overflow-x-auto"
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/forum/partials/post.blade.php
View file @
5a45038d
...
...
@@ -45,21 +45,6 @@ class="bg-red-100 text-red-800 text-sm font-medium px-3 py-1 rounded dark:bg-red
Selesai
</span>
@endif
</div>
@can('admin')
@foreach ($tickets as $ticket)
@if ($ticket->post->id == $post->id)
<button
data-tooltip-target=
"tooltip-default"
type=
"submit"
class=
"w-8 h-8 bg-orange-100 rounded-full"
><i
class=
"fa-sharp fa-solid fa-info"
></i></button>
<div
id=
"tooltip-default"
role=
"tooltip"
class=
"absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-75 tooltip dark:bg-gray-700"
>
Diskusi dalam pengaduan
<div
class=
"tooltip-arrow"
data-popper-arrow
></div>
</div>
@endif
@endforeach
@endcan
</div>
</div>
<h5
class=
"mb-2 text-xl font-bold tracking-tight text-gray-900"
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/index.blade.php
View file @
5a45038d
...
...
@@ -4,14 +4,13 @@
<!--
MAIN
-->
<
main
class
=
"bg-gray-50"
>
<!--
HERO
-->
<
div
class
=
" hero flex py-16 mb-10 items-center md:py-12 gap-8 flex-col-reverse container-main lg:flex-row lg:gap-16"
>
<
div
class
=
" hero flex mb-10 items-center md:py-12 gap-8 flex-col-reverse container-main lg:flex-row lg:gap-16"
>
<
div
class
=
"lg:w-[calc(100%/2)]"
>
<
div
class
=
"relative"
>
<
div
class
=
"bg-gradient-to-br from-blue-500 to-blue-800 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 w-32 h-32 rounded-full absolute -z-[1] top-0 right-0"
>
</
div
>
<
p
class
=
"text-center text-gray-900 lg:text-left
leading-normal title-text
text-4xl mb-6"
>
<
p
class
=
"text-center text-gray-900 lg:text-left
title-text text-3xl md:
text-4xl mb-6"
>
Layanan
<
span
class
=
"text-transparent bg-clip-text bg-gradient-to-r from-orange-500 to-purple-700"
>
Service
Desk
</
span
>
...
...
@@ -19,21 +18,26 @@ class="text-transparent bg-clip-text bg-gradient-to-r from-orange-500 to-purple-
yang
Mudah
dan
Efektif
untuk
Kebutuhan
Anda
</
p
>
<
div
class
=
"hidden lg:block my-8 w-32 h-1 border border-gray-200 bg-gray-200 rounded-full "
></
div
>
<
div
class
=
"hidden md:block md:mx-auto lg:mx-0 my-8 w-32 h-1 border border-gray-200 bg-gray-200 rounded-full "
>
</
div
>
<
div
class
=
"text-center lg:text-left flex gap-
2
"
>
<
div
class
=
"text-center lg:text-left flex
flex-col md:flex-row md:justify-center lg:justify-start
gap-
5
"
>
@
if
(
!
Auth
::
guest
())
<
a
href
=
"/forum"
class
=
"btn-gradient-blue m-auto text-lg bg-blue-800 lg:m-0"
>
Kirim
Aduan
</
a
>
<
a
href
=
"/forum"
class
=
"text-gray-500 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-lg px-5 py-2.5 h-fit m-auto lg:m-0"
>
Forum
class
=
"btn-gradient-blue m-auto md:m-0 text-base w-full md:w-fit lg:text-lg bg-blue-800 lg:m-0"
>
Kirim
Aduan
</
a
>
<
a
href
=
"/forum"
class
=
"text-gray-500 bg-white border w-full md:w-fit border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-base lg:text-lg px-5 py-2.5 h-fit m-auto md:m-0 lg:m-0"
>
Forum
Diskusi
</
a
>
@
else
<
button
data
-
modal
-
target
=
"authentication-modal"
data
-
modal
-
toggle
=
"authentication-modal"
class
=
"btn-gradient-blue m-auto text-lg bg-blue-800 lg:m-0"
type
=
"button"
>
class
=
"btn-gradient-blue m-auto text-base lg:text-lg w-full md:w-fit bg-blue-800 md:m-0"
type
=
"button"
>
Kirim
Aduan
</
button
>
<
button
data
-
modal
-
target
=
"authentication-modal"
data
-
modal
-
toggle
=
"authentication-modal"
class
=
"text-gray-500 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-
lg
px-5 py-2.5 h-fit m-auto
lg
:m-0"
class
=
"text-gray-500 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-
base lg:text-lg w-full md:w-fit
px-5 py-2.5 h-fit m-auto
md
:m-0"
type
=
"button"
>
Forum
Diskusi
</
button
>
...
...
@@ -43,28 +47,31 @@ class="text-gray-500 bg-white border border-gray-300 focus:outline-none hover:bg
</
div
>
<
div
class
=
"lg:w-[calc(100%/2)] flex flex-col place-content-center h-fit lg:justify-center items-center"
>
<
div
class
=
"w-
10/12 md:w-4/5
lg:w-full relative text-center h-[450px]"
>
<
div
class
=
"w-
full
lg:w-full relative text-center h-[450px]"
>
<
img
src
=
"{{ url('img/hero/layer-1.png') }}"
class
=
"animation-1 fadeInBottom absolute bottom-0 right-0 left-0 m-auto my-0"
alt
=
"image-header"
>
class
=
"animation-1 fadeInBottom absolute scale-125 bottom-0 right-0 left-0 m-auto my-0"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/layer-2.png') }}"
class
=
"animation-1 fadeInBottom absolute bottom-0 right-0 left-0 m-auto my-0"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/layer-3.svg') }}"
class
=
"animation-ticket fadeInBottom absolute bottom-16 right-0 left-0 m-auto"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/message.png') }}"
class
=
"vert-move-2 absolute top-40 left-0"
class
=
"animation-ticket fadeInBottom scale-125 md:scale-150 lg:scale-100 absolute bottom-20 md:bottom-12 right-0 left-0 m-auto"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/inbox.png') }}"
class
=
"vert-move absolute top-60 right-8"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/plant.png') }}"
class
=
"animation-4 fadeInBottom absolute bottom-0 right-24"
<
img
src
=
"{{ url('img/hero/message.png') }}"
class
=
"vert-move-2 w-16 md:w-fit absolute top-20 left-0 md:-left-12 lg:left-0"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/inbox.png') }}"
class
=
"vert-move absolute bottom-8 right-2 md:right-8"
alt
=
"image-header"
>
<
img
src
=
"{{ url('img/hero/plant.png') }}"
class
=
"animation-4 fadeInBottom absolute bottom-0 left-2 md:right-24"
alt
=
"image-header"
>
</
div
>
<
div
class
=
"w-full animation-1 fadeInBottom py-4 px-8 bg-white rounded-full bottom-0 left-0 shadow-lg flex justify-between items-center"
>
class
=
"w-full
md:w-[60vw] lg:w-full
animation-1 fadeInBottom py-4 px-8 bg-white rounded-full bottom-0 left-0 shadow-lg flex justify-between items-center"
>
<
div
class
=
"flex gap-4 w-[calc(100%/3)] justify-center items-center"
>
{{
--
<
div
class
=
"bg-blue-100 w-12 h-12 flex justify-center items-center rounded-full"
>
<
i
class
=
"fa-sharp fa-solid fa-inbox fa-lg text-blue-800"
></
i
>
</
div
>
--
}}
<
div
class
=
"text-center"
>
<
p
class
=
"font-semibold text-orange-500 text-2xl"
>
{{
$posts
->
count
()
}}
</
p
>
<
p
class
=
"text-gray-500 text-center text-sm"
>
Aduan
Masuk
</
p
>
<
p
class
=
"text-gray-500 text-center
text-xs md:
text-sm"
>
Aduan
Masuk
</
p
>
</
div
>
</
div
>
...
...
@@ -74,7 +81,7 @@ class="w-full animation-1 fadeInBottom py-4 px-8 bg-white rounded-full bottom-0
<
div
class
=
"text-center"
>
<
p
class
=
"font-semibold text-2xl text-purple-600"
>
{{
$posts
->
count
()
-
$finished
}}
</
p
>
<
p
class
=
"text-gray-500 text-center text-sm"
>
Aduan
Diproses
</
p
>
<
p
class
=
"text-gray-500 text-center
text-xs md:
text-sm"
>
Aduan
Diproses
</
p
>
</
div
>
</
div
>
...
...
@@ -87,7 +94,7 @@ class="w-full animation-1 fadeInBottom py-4 px-8 bg-white rounded-full bottom-0
</
div
>
--
}}
<
div
class
=
"text-center"
>
<
p
class
=
"font-semibold text-2xl text-blue-600"
>
{{
$finished
}}
</
p
>
<
p
class
=
"text-gray-500 text-center text-sm"
>
Aduan
Selesai
</
p
>
<
p
class
=
"text-gray-500 text-center
text-xs md:
text-sm"
>
Aduan
Selesai
</
p
>
</
div
>
</
div
>
</
div
>
...
...
@@ -220,26 +227,27 @@ class="bg-gradient-to-br from-purple-400 to-purple-600 w-28 h-28 md:w-48 md:h-48
<!--
END
STATISTIC
-->
{{
--
FORUM
--
}}
<
div
class
=
"container-main m-auto flex gap-10 items-center lg:h-screen"
>
<
div
class
=
"lg:w-[calc(100%/2)] pr-10"
>
<
div
class
=
"flex flex-col gap-6"
>
<
div
class
=
"container-main m-auto flex
flex-col lg:flex-row
gap-10 items-center
py-24
lg:h-screen"
>
<
div
class
=
"lg:w-[calc(100%/2)]
lg:
pr-10"
>
<
div
class
=
"flex flex-col gap-6
mb-10 lg:mb-0
"
>
<
h1
class
=
"title-text"
>
Forum
Diskusi
</
h1
>
<
p
class
=
"text-sm text-gray-500"
>
Lorem
ipsum
dolor
sit
amet
consectetur
adipisicing
elit
.
Quas
harum
<
p
class
=
"text-sm text-gray-500"
>
Lorem
ipsum
dolor
sit
amet
consectetur
adipisicing
elit
.
Quas
harum
consequatur
dolores
corporis
hic
quisquam
consectetur
officia
quibusdam
,
enim
nesciunt
unde
natus
ipsam
nobis
repudiandae
nihil
inventore
culpa
,
amet
explicabo
.
</
p
>
<
button
data
-
modal
-
target
=
"authentication-modal"
data
-
modal
-
toggle
=
"authentication-modal"
class
=
"btn-link m-
auto
bg-orange-500
w-fit lg:m-0
"
type
=
"button"
>
class
=
"btn-link m-
0
bg-orange-500
hover:bg-orange-600 w-fit
"
type
=
"button"
>
Lihat
Forum
Diskusi
</
button
>
</
div
>
<
div
class
=
"hidden lg:block my-8 w-32 h-1 border border-gray-200 bg-gray-200 rounded-full "
></
div
>
<
div
class
=
"w-full flex gap-8"
>
<
div
class
=
"flex gap-4 justify-center items-center"
>
<
div
class
=
"w-full flex
lg:
gap-8"
>
<
div
class
=
"flex gap-4 justify-center
items-start lg:
items-center"
>
<
div
class
=
"bg-blue-100 w-12 h-12 flex justify-center items-center rounded-full"
>
<
i
class
=
"fa-sharp fa-solid fa-inbox fa-lg text-blue-600"
></
i
>
</
div
>
...
...
@@ -249,7 +257,7 @@ class="btn-link m-auto bg-orange-500 w-fit lg:m-0" type="button">
</
div
>
</
div
>
<
div
class
=
"flex gap-4 justify-center items-center"
>
<
div
class
=
"flex gap-4 justify-center
items-start lg:
items-center"
>
<
div
class
=
"bg-purple-100 w-12 h-12 flex justify-center items-center rounded-full"
>
<
i
class
=
"fa-regular fa-circle-check fa-lg text-purple-500"
></
i
>
</
div
>
...
...
@@ -260,23 +268,22 @@ class="btn-link m-auto bg-orange-500 w-fit lg:m-0" type="button">
</
div
>
</
div
>
</
div
>
<
div
class
=
"lg:w-[calc(100%/2)] flex flex-col items-end gap-4 reveal transition-2"
>
<
div
class
=
"bg-gray-300 w-10/12 rounded-md shadow-lg py-4 px-6"
>
<
h1
class
=
"text-md font-semibold text-gray-500 mb-2"
>
Aplikasi
SIMPUS
</
h1
>
<
p
class
=
"text-sm text-gray-500"
>
50
Diskusi
</
p
>
</
div
>
<
div
class
=
"relative bg-white rounded-md shadow-lg py-4 px-6 w-full"
>
<
h1
class
=
"text-md font-semibold text-gray-800 mb-2"
>
Aplikasi
Data
Pokok
Pendidikan
(
Dapodik
)
</
h1
>
<
p
class
=
"text-sm text-gray-500"
>
100
Diskusi
</
p
>
<
div
class
=
"absolute w-2 h-12 rounded-full bg-purple-600 right-0 my-auto top-0 bottom-0 translate-x-1/2"
>
</
div
>
</
div
>
<
div
class
=
"bg-gray-300 w-10/12 rounded-md shadow-lg py-4 px-6"
>
<
h1
class
=
"text-md font-semibold text-gray-500 mb-2"
>
Aplikasi
PEPAK
</
h1
>
<
p
class
=
"text-sm text-gray-500"
>
120
Diskusi
</
p
>
<
div
class
=
"cards h-[150px] mt-36 lg:w-[calc(100%/2)]"
>
<
div
class
=
"flex-center outer"
>
@
foreach
(
$topics
as
$topic
)
<
div
class
=
"card bg-white rounded-md shadow-lg py-4 px-6 w-11/12 md:w-full"
style
=
"--delay: {{
$loop->index
+ 1 }}"
>
<
h1
class
=
"text-md font-semibold text-gray-800 mb-2"
>
{{
$topic
->
title
}}
</
h1
>
<
p
class
=
"text-sm text-gray-500"
>
{{
$topic
->
posts
->
count
()
}}
</
p
>
<
div
class
=
"absolute w-2 h-12 rounded-full bg-purple-600 right-0 my-auto top-0 bottom-0 translate-x-1/2"
>
</
div
>
</
div
>
@
endforeach
</
div
>
</
div
>
</
div
>
{{
--
END
FORUM
--
}}
...
...
This diff is collapsed.
Click to expand it.
resources/views/layouts/main.blade.php
View file @
5a45038d
...
...
@@ -7,7 +7,9 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
{{ $title }} | Kominfo Sukoharjo
</title>
<link
rel=
"stylesheet"
href=
"{{ url('css/animation.css') }}"
>
@if (Request::is('/'))
<link
rel=
"stylesheet"
href=
"{{ url('css/animation.css') }}"
>
@endif
{{-- TAILWIND --}}
@vite(['resources/css/app.css', 'resources/js/app.js'])
...
...
This diff is collapsed.
Click to expand it.
resources/views/layouts/partials/navbar.blade.php
View file @
5a45038d
<!-- NAVBAR -->
<nav
class=
"bg-white border-gray-200 border-b px-2 sm:px-4 py-2.5 rounded dark:bg-gray-900"
>
<div
class=
"container md:w-11/12 lg:w-4/5 flex flex-wrap items-center justify-between mx-auto"
>
<a
href=
"https://flowbite.com/"
class=
"flex md:w-auto lg:
w-[calc(100%/3)]
items-center"
>
<a
href=
"https://flowbite.com/"
class=
"flex md:w-auto lg:
basis-1/4
items-center"
>
<img
src=
"{{ url('img/logo.png') }}"
class=
"h-6 mr-3 sm:h-8"
alt=
"Logo Diskominfo Sukoharjo"
/>
<span
class=
"self-center text-md text-gray-800 font-semibold whitespace-nowrap dark:text-white"
>
Diskominfo
<span
class=
"text-transparent bg-clip-text bg-gradient-to-r to-blue-800 from-blue-700"
>
Sukoharjo
</span>
</span>
</a>
<div
class=
"flex justify-end items-center md:w-auto lg:
w-[calc(100%/3)]
md:order-2"
>
<div
class=
"flex justify-end items-center md:w-auto lg:
basis-1/4
md:order-2"
>
@auth
<!-- PROFILE -->
<button
type=
"button"
...
...
@@ -48,6 +48,14 @@ class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gra
</li>
@endcan
@can('superadmin')
<li>
<a
href=
"{{ url('/dashboard/tickets') }}"
class=
"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
>
Kembali
ke Dashboard Super Admin
</a>
</li>
@endcan
<li>
<div>
<form
action=
"/logout"
method=
"POST"
>
...
...
@@ -96,10 +104,10 @@ class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg md:hid
</button>
<!-- END HAMBURGER MENU -->
</div>
<div
class=
"items-center justify-between hidden w-full md:flex md:order-1 md:w-auto lg:
w-[calc(100%/3)]
lg:items-center"
<div
class=
"items-center justify-between hidden w-full md:flex md:order-1 md:w-auto lg:
basis-1/2
lg:items-center"
id=
"mobile-menu-2"
>
<ul
class=
"flex flex-col p-4 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700 lg:justify-center lg:w-full"
>
class=
"flex flex-col p-4 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8
md:text-center
md:mt-0 md:text-sm md:font-medium md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700 lg:justify-center lg:w-full"
>
<li>
<a
href=
"{{ url('/') }}"
class=
"block py-2 pl-3 pr-4 rounded md:p-0 {{ Request::is('/') ? ' text-white bg-blue-700 md:bg-transparent md:text-blue-700 md:p-0 dark:text-white' : 'text-gray-700 hover:bg-gray-100 md:hover:bg-transparent md:hover:text-blue-700 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700' }}"
...
...
This diff is collapsed.
Click to expand it.
resources/views/layouts/partials/sidebarSettings.blade.php
View file @
5a45038d
...
...
@@ -27,15 +27,15 @@ class="inline-block p-4 px-8 border-b-2 rounded-t-lg {{ Request::get('settings/h
class=
"hidden lg:block lg:col-span-3 h-fit text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg overflow-hidden"
>
<a
href=
"/settings"
aria-current=
"true"
class=
"flex items-center gap-4 w-full px-4 py-4 border-b rounded-t-lg cursor-pointer {{ Request::is('settings') ? 'text-white bg-blue-700 border-gray-200' : 'border-gray-200 hover:bg-gray-100 hover:text-blue-700' }} "
>
<i
data-feather=
"
user"
></i>
Profile
<i
class=
"fa-solid fa-
user"
></i>
Profile
</a>
<a
href=
"/settings/riwayat-tiket"
class=
"flex items-center gap-4 w-full px-4 py-4 cursor-pointer {{ Request::is('settings/riwayat-tiket') ? 'text-white bg-blue-700 border-gray-200' : 'border-gray-200 hover:bg-gray-100 hover:text-blue-700' }} "
>
<i
data-feather=
"rotate-ccw
"
></i>
Tiket
<i
class=
"fa-solid fa-ticket
"
></i>
Tiket
</a>
<a
href=
"/settings/riwayat-diskusi"
class=
"flex items-center gap-4 w-full px-4 py-4 border-b rounded-b-lg cursor-pointer {{ Request::is('settings/riwayat-diskusi') ? 'text-white bg-blue-700 border-gray-200' : 'border-gray-200 hover:bg-gray-100 hover:text-blue-700' }} "
>
<i
data-feather=
"
rotate-
ccw
"
></i>
Riwayat
<i
class=
"fa-solid fa-clock-
rotate-
left
"
></i>
Riwayat
</a>
</div>
<!-- END SIDEBAR -->
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
5a45038d
...
...
@@ -64,12 +64,15 @@
// TOPIC
Route
::
resource
(
'/dashboard/topics'
,
TopicController
::
class
);
Route
::
get
(
'/dashboard/editModal'
,
[
TopicController
::
class
,
'edit'
]);
});
// ADUAN
Route
::
get
(
'/tickets'
,
[
TicketController
::
class
,
'index'
]);
Route
::
post
(
'/tickets/create'
,
[
TicketController
::
class
,
'store'
]);
Route
::
get
(
'/dashboard/tickets'
,
[
TicketController
::
class
,
'indexAdmin'
]);
Route
::
put
(
'/dashboard/tickets/{ticket:slug}'
,
[
TicketController
::
class
,
'update'
]);
// SUPER ADMIN
...
...
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
Menu
Projects
Groups
Snippets
Help