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
248c7caa
Commit
248c7caa
authored
May 21, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get filename dan reset password user
parent
67330ad3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
49 deletions
+39
-49
app/Http/Controllers/Admin/SakuController.php
+1
-25
app/Http/Controllers/Admin/UserController.php
+9
-9
resources/views/saku/index.blade.php
+29
-15
No files found.
app/Http/Controllers/Admin/SakuController.php
View file @
248c7caa
...
...
@@ -23,33 +23,9 @@ public function index() {
->
orderBy
(
'id_pengajuan'
)
->
get
();
if
(
$penelaah
){
foreach
(
$penelaah
as
$key
=>
$pen
)
{
$nosurat
=
explode
(
'/'
,
$pen
->
no_sk
);
$noagenda
=
$nosurat
[
0
];
$tahun
=
$nosurat
[
3
];
$arrPenelaah
[
$key
]
=
[
'id'
=>
$pen
->
id
,
'id_pengajuan'
=>
$pen
->
id_pengajuan
,
'nik'
=>
$pen
->
nik
,
'nama'
=>
$pen
->
nama
,
'nip'
=>
$pen
->
nip
,
'id_pengajuan_epk'
=>
$pen
->
id_pengajuan_epk
,
'judul'
=>
$pen
->
judul
,
'peneliti'
=>
$pen
->
peneliti
,
'nama_kategori'
=>
$pen
->
nama_kategori
,
'klasifikasi'
=>
$pen
->
klasifikasi
,
'file_ec'
=>
$pen
->
file_ec
,
'tahun'
=>
$pen
->
tahun
,
'nosurat'
=>
$noagenda
,
'tahunsk'
=>
$tahun
,
'namafile'
=>
$this
->
getFileName
(
$tahun
,
$noagenda
)
];
}
}
$data
=
[
'penelaah'
=>
$
arrP
enelaah
,
'penelaah'
=>
$
p
enelaah
,
];
return
view
(
'saku.index'
,
$data
);
...
...
app/Http/Controllers/Admin/UserController.php
View file @
248c7caa
...
...
@@ -38,7 +38,7 @@ public function store(Request $request){
$user
=
[
'name'
=>
strip_tags
(
$request
->
name
),
'email'
=>
strip_tags
(
$request
->
email
),
'password'
=>
strip_tags
(
$request
->
password
),
'password'
=>
Hash
::
make
(
strip_tags
(
$request
->
password
)
),
];
User
::
query
()
->
create
(
$user
);
...
...
@@ -71,13 +71,13 @@ public function update(Request $request, $id){
try
{
$id
=
decrypt
(
$id
);
$passwordbaru
=
bcrypt
(
strip_tags
(
$request
->
passwordbaru
));
$passwordbaru
=
Hash
::
make
(
strip_tags
(
$request
->
passwordbaru
));
$passwordlama
=
strip_tags
(
$request
->
passwordlama
);
$oldpassword
=
User
::
where
(
'id'
,
$id
)
->
first
();
//
if (Hash::check($passwordlama, $oldpassword->password)) {
//
// Passwords match
if
(
Hash
::
check
(
$passwordlama
,
$oldpassword
->
password
))
{
// Passwords match
$user
=
[
'name'
=>
strip_tags
(
$request
->
name
),
'email'
=>
strip_tags
(
$request
->
email
),
...
...
@@ -90,11 +90,11 @@ public function update(Request $request, $id){
return
Redirect
::
route
(
'user.index'
)
->
with
(
'success'
,
'User berhasil diupdate'
);
//
} else {
//
// Passwords do not match
//
return Redirect::route('user.index')
// ->with('error', 'Password lama tidak valid
');
//
}
}
else
{
// Passwords do not match
return
Redirect
::
route
(
'user.index'
)
->
with
(
'error'
,
'Password lama yang dimasukkan salah
'
);
}
}
catch
(
Exception
$e
){
Log
::
error
(
$e
);
...
...
resources/views/saku/index.blade.php
View file @
248c7caa
...
...
@@ -30,7 +30,7 @@
<thead>
<tr>
<th>No</th>
<th>ID Pengajuan</th>
{{-- <th>ID Pengajuan</th> --}}
<th style="
text
-
align
:
left
">File SK</th>
<th style="
text
-
align
:
left
">Nama/NIP</th>
<th style="
text
-
align
:
left
">Judul</th>
...
...
@@ -43,29 +43,43 @@
<tbody>
@php
$no
= 1;
$nomorsurat
=
$penelaah[0]
->no_sk;
$no_surat
= explode('/',
$nomorsurat
);
$noagenda
=
$no_surat[0]
;
$tahun
=
$no_surat[3]
;
$nama_file
= app(App\Http\Controllers\Admin\SakuController::class)->getFileName(
$tahun
,
$noagenda
);
@endphp
@foreach(
$penelaah
as
$key
=>
$item
)
{{-- @php
$pengajuan
= DB::table('tr_pengajuan')->where('id',
$item->id_pengajuan
)->first();
@endphp --}}
@php
//
$pengajuan
= DB::table('tr_pengajuan')->where('id',
$item->id_pengajuan
)->first();
if(
$item->no_sk
==
$nomorsurat
){
$namafile
=
$nama_file
;
}
else{
$nosurat
= explode('/',
$item->no_sk
);
$noagenda
=
$nosurat[0]
;
$tahun
=
$nosurat[3]
;
$namafile
= app(App\Http\Controllers\Admin\SakuController::class)->getFileName(
$tahun
,
$noagenda
);
}
@endphp
<tr>
<td>
{
{
$no
}
}
</td>
<td>{{
$item['id_pengajuan_epk']
}}</td>
<td style="
text
-
align
:
left
"><a href="
https
://
e
-
office
.
unesa
.
ac
.
id
/
dokumen
/
surat_keluar
/
{{
$
item
[
'namafile'
]
}}
" target="
_blank
"><img src="
{{
url
(
'assets/img/icons/misc/pdf.png'
)
}}
" alt="
pdf
" height="
60
" class="
me
-
3
" /></a></td>
<td style="
text
-
align
:
left
">{{
$item
['nama']
}}<br>
<strong>{{
$item
['nip']
}}</strong></td>
<td style="
text
-
align
:
left
">{{
$item
['judul']
}}</td>
<td style="
text
-
align
:
left
">{{
$item
['tahun']
}}</td>
<td style="
text
-
align
:
left
">{{
$item
['klasifikasi']
}}</td>
<td>{{
$no
}}</td>
{{-- <td>{{
$item->id_pengajuan_epk
}}</td> --}}
<td style="
text
-
align
:
left
"><a href="
https
://
e
-
office
.
unesa
.
ac
.
id
/
dokumen
/
surat_keluar
/
{{
$
namafile
}}
" target="
_blank
"><img src="
{{
url
(
'assets/img/icons/misc/pdf.png'
)
}}
" alt="
pdf
" height="
60
" class="
me
-
3
" /></a></td>
<td style="
text
-
align
:
left
">{{
$item
->nama
}}<br>
<strong>{{
$item
->nip
}}</strong></td>
<td style="
text
-
align
:
left
">{{
$item
->judul
}}</td>
<td style="
text
-
align
:
left
">{{
$item
->tahun
}}</td>
<td style="
text
-
align
:
left
">{{
$item
->klasifikasi
}}</td>
<td style="
text
-
align
:
left
">
@if(!empty(
$item
['file_ec']
))
<strong><a href="
https
://
sipeka
.
unesa
.
ac
.
id
/
sipeka
/
file
/
{
!!
$item
[
'file_ec'
]
!!
}
" target="
_blank
" class="
btn
btn
-
success
btn
-
md
">Lihat</a></strong>
@if(!empty(
$item
->file_ec
))
<strong><a href="
https
://
sipeka
.
unesa
.
ac
.
id
/
sipeka
/
file
/
{
!!
$item
->
file_ec
!!
}
" target="
_blank
" class="
btn
btn
-
success
btn
-
md
">Lihat</a></strong>
@endif
</td>
{{-- @php
$kategori
= DB::table('ms_kategori')->where('id',
$pengajuan->id_kategori
)->first();
@endphp --}}
<td style="
text
-
align
:
left
">{{
$item
['nama_kategori']
}}</td>
<td style="
text
-
align
:
left
">{{
$item
->nama_kategori
}}</td>
</tr>
@php
$no
++;
...
...
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