update revisi profile dan register
This commit is contained in:
parent
23dbc40097
commit
2722f470e9
|
@ -10,12 +10,13 @@ class GejalaController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$gejala_list = DB::table('gejala')->get();
|
||||
$gejala_list = DB::table('gejala')
|
||||
->orderBy('kode_gejala') // Mengurutkan berdasarkan kolom 'kode_gejala'
|
||||
->get();
|
||||
return view('layouts.diagnosa.diagnosalay')->with('gejala_list', $gejala_list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function fetch(Request $request)
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
<select name="gejala[]" class="form-control input-lg mt-2 gejala-select">
|
||||
<option value="">Pilih Gejala</option>
|
||||
@foreach($gejala_list as $gejala)
|
||||
<option value="{{ $gejala->id }}">{{ $gejala->nama_gejala }}</option>
|
||||
<option value="{{ $gejala->id }}">{{ $gejala->kode_gejala }} - {{ $gejala->nama_gejala }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
@ -143,6 +143,7 @@
|
|||
<option value="0.8">Hampir Pasti (80%)</option>
|
||||
<option value="0.6">Kemungkinan Besar (60%)</option>
|
||||
<option value="0.4">Mungkin (40%)</option>
|
||||
<option value="0.2">Tidak Yakin (20%)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -155,7 +156,7 @@
|
|||
<li><strong>Hampir Pasti (80%)</strong>: Anda cukup yakin gejala ini terjadi</li>
|
||||
<li><strong>Kemungkinan Besar (60%)</strong>: Anda melihat gejala ini ada tapi tidak terlalu jelas</li>
|
||||
<li><strong>Mungkin (40%)</strong>: Anda tidak yakin tapi ada kemungkinan gejala ini terjadi</li>
|
||||
<li><strong>Tidak Yakin (20%)</strong>: Anda sama sekali tidak yakin/tidak tahu</li>
|
||||
<li><strong>Tidak Yakin (20%)</strong>: Anda sama sekali tidak yakin/tidak tahu</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -231,8 +232,10 @@ function updateDropdownOptions() {
|
|||
}) => {
|
||||
const currentValue = $(el).val();
|
||||
|
||||
// Pastikan hanya dropdown gejala yang diproses untuk pilihan gejala
|
||||
if ($(el).hasClass('gejala-select')) {
|
||||
// Urutkan gejalaList berdasarkan kode_gejala
|
||||
const sortedGejala = gejalaList.sort((a, b) => a.kode_gejala.localeCompare(b.kode_gejala));
|
||||
|
||||
instance.clearChoices();
|
||||
instance.setChoices(
|
||||
[{
|
||||
|
@ -240,9 +243,9 @@ function updateDropdownOptions() {
|
|||
label: 'Pilih Gejala',
|
||||
selected: currentValue === ''
|
||||
}].concat(
|
||||
gejalaList.map(g => ({
|
||||
sortedGejala.map(g => ({
|
||||
value: g.id,
|
||||
label: `${g.kode_gejala} - ${g.nama_gejala}`, // <- update label jadi kode - nama
|
||||
label: `${g.kode_gejala} - ${g.nama_gejala}`, // Pastikan label berisi kode dan nama gejala
|
||||
disabled: selectedValues.includes(String(g.id)) && String(g.id) !== currentValue,
|
||||
selected: String(g.id) === currentValue
|
||||
}))
|
||||
|
@ -253,7 +256,6 @@ function updateDropdownOptions() {
|
|||
);
|
||||
}
|
||||
|
||||
// Pastikan dropdown kepastian (cf-select) tidak terpengaruh
|
||||
if ($(el).hasClass('cf-select')) {
|
||||
instance.clearChoices();
|
||||
instance.setChoices(
|
||||
|
@ -261,6 +263,10 @@ function updateDropdownOptions() {
|
|||
value: '',
|
||||
label: 'Kondisi',
|
||||
selected: currentValue === ''
|
||||
}, {
|
||||
value: '1',
|
||||
label: 'Pasti (100%)',
|
||||
selected: currentValue === '0.1'
|
||||
}, {
|
||||
value: '0.8',
|
||||
label: 'Hampir Pasti (80%)',
|
||||
|
@ -290,6 +296,8 @@ function updateDropdownOptions() {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
// Inisialisasi Choices untuk gejala
|
||||
$(".gejala-select").each(function() {
|
||||
|
@ -313,7 +321,7 @@ function updateDropdownOptions() {
|
|||
</div>
|
||||
<div class="select-wrapper">
|
||||
<select name="cf_user[]" class="form-control input-lg mt-2 cf-select">
|
||||
<option value="">Kondisi</option>
|
||||
<option value="1">Pasti (100%)</option>
|
||||
<option value="0.8">Hampir Pasti (80%)</option>
|
||||
<option value="0.6">Kemungkinan Besar (60%)</option>
|
||||
<option value="0.4">Mungkin (40%)</option>
|
||||
|
|
|
@ -338,11 +338,11 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="umur">Umur</label>
|
||||
<input class="form-input" type="number" id="umur" name="umur" value="{{ Auth::user()->umur ?? '' }}">
|
||||
<input class="form-input" type="date" id="umur" name="umur" value="{{ Auth::user()->umur ?? '' }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="telp">Telp</label>
|
||||
<input class="form-input" type="text" id="telp" name="telp" value="{{ Auth::user()->telp ?? '' }}">
|
||||
<input class="form-input" type="text" id="telp" name="telp" value="{{ Auth::user()->telp ?? '' }}" pattern="\d+" title="Hanya angka yang diperbolehkan" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -353,11 +353,11 @@ function reloadHomePage() {
|
|||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="umur">Umur</label>
|
||||
<input class="form-input" type="number" id="umur" name="umur" value="{{ Auth::user()->umur ?? '' }}">
|
||||
<input class="form-input" type="date" id="umur" name="umur" value="{{ Auth::user()->umur ?? '' }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="telp">Telp</label>
|
||||
<input class="form-input" type="text" id="telp" name="telp" value="{{ Auth::user()->telp ?? '' }}">
|
||||
<input class="form-input" type="text" id="telp" name="telp" value="{{ Auth::user()->telp ?? '' }}" pattern="\d+" title="Hanya angka yang diperbolehkan" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -39,16 +39,15 @@
|
|||
<svg class="form-icon-left" width="14" height="14" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
||||
<path d="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z" />
|
||||
</svg>
|
||||
<input class="form-input" type="text" name="umur" placeholder="Umur" id="umur" required>
|
||||
<input class="form-input" type="date" name="umur" placeholder="Umur" id="umur" required>
|
||||
</div>
|
||||
<label class="form-label" for="alamat">Telp</label>
|
||||
<label class="form-label" for="telp">Telp</label>
|
||||
<div class="form-group">
|
||||
<svg class="form-icon-left" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
|
||||
<svg class="form-icon-left" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 512 512">
|
||||
<path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z" />
|
||||
</svg>
|
||||
<input class="form-input" type="text" name="telp" placeholder="Telp" id="telp" required>
|
||||
<input class="form-input" type="text" name="telp" placeholder="Telp" id="telp" pattern="\d+" title="Hanya angka yang diperbolehkan" required>
|
||||
</div>
|
||||
|
||||
<label class="form-label" for="password">Password</label>
|
||||
<div class="form-group mar-bot-5">
|
||||
<svg class="form-icon-left" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
||||
|
|
Loading…
Reference in New Issue