Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpmw
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
Alfiro Pratama
simpmw
Commits
99efbd1b
Commit
99efbd1b
authored
a year ago
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Usulan Dana (Role Mhs)
parent
5935b0bc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
16 deletions
+100
-16
app/Http/Controllers/Mahasiswa/ProposalController.php
+2
-0
app/Models/Proposal.php
+1
-0
resources/views/backend/mahasiswa/kelompok/createkel.blade.php
+1
-1
resources/views/backend/mahasiswa/kelompok/index.blade.php
+1
-1
resources/views/backend/mahasiswa/proposal/create.blade.php
+69
-2
resources/views/backend/mahasiswa/proposal/index.blade.php
+26
-12
No files found.
app/Http/Controllers/Mahasiswa/ProposalController.php
View file @
99efbd1b
...
...
@@ -117,6 +117,7 @@ class ProposalController extends Controller
*/
public
function
store
(
Request
$request
)
{
// dd($request->all());
//
$proposal
=
$request
->
except
(
'_token'
);
...
...
@@ -148,6 +149,7 @@ class ProposalController extends Controller
'judul'
=>
$proposal
[
'judul'
],
'status'
=>
'0'
,
'upload_dokumen'
=>
$file_nama
,
'usulan_dana'
=>
$proposal
[
'usulan_dana'
],
'date_upload'
=>
now
(),
'created_user'
=>
Auth
::
user
()
->
id
]);
...
...
This diff is collapsed.
Click to expand it.
app/Models/Proposal.php
View file @
99efbd1b
...
...
@@ -45,6 +45,7 @@ class Proposal extends Model
'laporan_akhir_file'
,
'laporan_akhir_date'
,
'laporan_akhir_approval'
,
'usulan_dana'
,
];
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/kelompok/createkel.blade.php
View file @
99efbd1b
...
...
@@ -74,7 +74,7 @@
@foreach (
$kelompok->rAnggota
as
$item
)
<tr>
<td>{{
$loop->iteration
}}</td>
<td>{{
$item->nama
}}</td>
<td>{{
ucwords(strtolower(
$item->nama
))
}}</td>
<td>{{
$item->nim
}}</td>
<td>{{
$item->fakultas
}}</td>
<td>{{
$item->prodi
}}</td>
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/kelompok/index.blade.php
View file @
99efbd1b
...
...
@@ -128,7 +128,7 @@
@foreach (
$item->rAnggota
as
$value
)
<tr>
<td>{{
$loop->iteration
}}</td>
<td>{{
$value->nama
}}</td>
<td>{{
ucwords(strtolower(
$value->nama
))
}}</td>
<td>{{
$value->nim
}}</td>
<td>{{
$value->fakultas
}}</td>
<td>{{
$value->prodi
}}</td>
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/proposal/create.blade.php
View file @
99efbd1b
...
...
@@ -83,10 +83,23 @@
<textarea class="
form
-
control
" type="
text
" id="
deskripsi
" name="
deskripsi
" placeholder="
Deskripsi
...
" required>{{ old('deskripsi') }}</textarea>
</div>
</div>
<div class="
mb
-
0
">
<div class="
row
mb
-
3
">
<label for="
usulan_dana
" class="
col
-
sm
-
2
col
-
form
-
label
">Usulan Pendanaan<span style="
color
:
red
;
"> *</span></label>
<div class="
col
-
sm
-
10
col
-
lg
-
10
">
<div class="
input
-
group
">
<span class="
input
-
group
-
text
">Rp</span>
<input class="
form
-
control
" type="
text
" id="
usulan_dana
" name="
usulan_dana
" value="
{{
old
(
'usulan_dana'
)
}}
" placeholder="
Dana
yang
ingin
diajukan
(
cth
:
12345678
atau
123456.78
)
" required onkeypress="
return
isNumberKey
(
event
)
" onkeyup="
formatRupiah
(
this
)
">
</div>
<small id="
invalidInput
" class="
text
-
danger
" style="
display
:
none
;
">Harap masukkan angka atau desimal (contoh: 12345678 atau 123456.78)</small>
<small id="
dotWarning
" style="
display
:
none
;
color
:
red
;
">Simbol titik (.) tidak boleh diinputkan lebih dari 1</small>
</div>
</div>
</div>
<div class="
mb
-
0
d
-
flex
justify
-
content
-
end
">
<div>
<button type="
submit
" class="
btn
btn
-
primary
waves
-
effect
waves
-
light
me
-
1
"> Submit </button>
<button type="
reset
" class="
btn
btn
-
secondary
waves
-
effect
"> Cancel </button>
<button type="
reset
" class="
btn
btn
-
secondary
waves
-
effect
me
-
1
"> Reset </button>
<a href="
{{
URL
::
previous
()
}}
" class="
btn
btn
-
danger
waves
-
effect
"> Cancel </a>
</div>
</div>
{{ Form::close() }}
...
...
@@ -212,7 +225,61 @@
});
});
</script>
<script>
var rpAdded = false; // Flag untuk menandai apakah 'Rp' sudah ditambahkan
var dotCount = 0; // Menghitung jumlah titik (.) yang sudah dimasukkan
function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
// Cek apakah karakter yang dimasukkan adalah angka atau titik (.) dan batasi jumlah titik menjadi 1
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
document.getElementById('invalidInput').style.display = 'block';
document.getElementById('dotWarning').style.display = 'none'; // Sembunyikan peringatan titik (.) berlebihan
return false;
}
document.getElementById('invalidInput').style.display = 'none';
return true;
}
function formatRupiah(el) {
var val = el.value.trim();
// Jika input kosong, reset flag 'rpAdded' dan hitungan titik
if (val === '') {
rpAdded = false;
dotCount = 0;
return;
}
// Tambahkan 'Rp0.' jika input diawali dengan titik (.) dan 'Rp' belum ditambahkan sebelumnya
if (val.startsWith('.') && !rpAdded) {
val = '0.';
rpAdded = true; // Set flag 'rpAdded' menjadi true
dotCount = 1; // Tambahkan satu titik
} else if (!rpAdded) {
// Tambahkan 'Rp' jika 'Rp' belum ditambahkan sebelumnya
val;
rpAdded = true; // Set flag 'rpAdded' menjadi true
}
// Hitung jumlah titik (.) dalam input
dotCount = (val.match(/\./g) || []).length;
// Tampilkan peringatan jika terdapat lebih dari satu titik (.) dan sembunyikan peringatan input tidak valid
if (dotCount > 1) {
document.getElementById('dotWarning').style.display = 'block';
document.getElementById('invalidInput').style.display = 'none'; // Sembunyikan peringatan input tidak valid
var secondDotIndex = val.indexOf('.', val.indexOf('.') + 1);
val = val.slice(0, secondDotIndex) + val.slice(secondDotIndex + 1); // Hapus titik (.) yang berlebihan dari input
dotCount = 1; // Set jumlah titik kembali menjadi 1
} else {
document.getElementById('dotWarning').style.display = 'none'; // Sembunyikan peringatan titik (.) berlebihan
}
el.value = val;
}
</script>
@endsection
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/proposal/index.blade.php
View file @
99efbd1b
...
...
@@ -58,7 +58,13 @@
<br>
<div class="
table
-
responsive
">
<table id="
datatable
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<thead>
<thead style="
text
-
align
:
center
;
vertical
-
align
:
middle
;
">
{{-- <style>
th {
text-align: center;
vertical-align: middle;
}
</style> --}}
<tr>
<th>No</th>
<th width="
5
%
">Kode Kelompok</th>
...
...
@@ -66,6 +72,7 @@
<th>Identitas Dosen Pembimbing</th>
<th>Kategori PMW</th>
<th>Judul Proposal</th>
<th>Usulan Dana</th>
<th>Status</th>
<th>Aksi</th>
</tr>
...
...
@@ -74,39 +81,46 @@
@foreach (
$proposal
as
$item
)
@php
$token
= Str::random(30); @endphp
<tr id="
row
-
{{
$token
}}
">
<td
>{{
$loop->iteration
}}
</td>
<td>{{
$item->rKelompok
->kode }}</td>
<td
style="
text
-
align
:
center
;
">{{
$loop->iteration
}}.
</td>
<td
style="
text
-
align
:
center
;
"
>{{
$item->rKelompok
->kode }}</td>
<td>{{
$item->rKelompok
->rBiodata->name }} <br> {{
$item->rKelompok
->rBiodata->noidentitas }} <br> {{
$item->rKelompok
->rBiodata->fakultas }} <br> {{
$item->rKelompok
->rBiodata->prodi }}</td>
<td>{{
$item->rKelompok
->nama_dosen }} <br> {{
$item->rKelompok
->nidn_dosen }}</td>
<td>{{
$item->rJenis
->nama }}</td>
<td>{{
$item->judul
}}</td>
<td style="
text
-
align
:
center
;
">{{
$item->rKelompok
->nama_dosen }} <br> {{
$item->rKelompok
->nidn_dosen }}</td>
<td style="
text
-
align
:
center
;
">{{
$item->rJenis
->nama }}</td>
<td style="
text
-
align
:
center
;
">{{
$item->judul
}}</td>
<td style="
text
-
align
:
center
;
">
@if(substr(number_format(
$item->usulan_dana
, 2, ',', '.'), -3) === ',00')
Rp{{ substr(number_format(
$item->usulan_dana
, 2, ',', '.'), 0, -3) }},-
@else
Rp{{ number_format(
$item->usulan_dana
, 2, ',', '.') }}
@endif
</td>
<td>
@if(is_null(
$item->upload_dokumen
))
<span class="
badge
bg
-
danger
">Belum Upload Proposal</span><br>
<strong> Keterangan : </strong>
<br>
<strong> Keterangan : </strong><br>
Upload proposal pada : -<br>
Disetujui proposal pada : -<br>
@else
@if(
$item->status
== '0')
<span class="
badge
bg
-
warning
">Menunggu Persetujuan Dosen</span><br>
<strong> Keterangan : </strong>
<br>
<strong> Keterangan : </strong><br>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Disetujui proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_approval
}} </h6>
@elseif(
$item->status
== '2')
<span class="
badge
bg
-
danger
">Ditolak Dosen</span><br>
<strong> Keterangan : </strong>
<br>
<strong> Keterangan : </strong><br>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Komentar : <h6 class="
text
-
primary
"> {{
$item->alasan_revisi
}} </h6>
@else
<span class="
badge
bg
-
success
">Sudah Disetujui Dosen</span>
<br>
<span class="
badge
bg
-
success
">Sudah Disetujui Dosen</span><br>
{{-- <span class="
badge
bg
-
warning
">Menunggu Persetujuan Dosen</span> <br> --}}
<strong> Keterangan : </strong>
<br>
<strong> Keterangan : </strong><br>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Disetujui proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_approval
}} </h6>
@endif
@endif
</td>
<td>
<td
style="
text
-
align
:
center
;
"
>
<button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
proposal_id
}}
" href="
{{
URL
::
to
(
'mahasiswa/kelompok-new'
,
encrypt
(
$item
->
proposal_id
))
}}
" class="
btn
btn
-
info
btn
-
sm
"><i class="
far
fa
-
eye
"></i> Lihat</button>
@if(is_null(
$item->status
) ||
$item->status
== '2')
...
...
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