feat(profilNasabah): add Photo Edit & Jenis nasabah field
parent
f6d15f8306
commit
be8b33defd
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<div class="flex flex-col items-center justify-between gap-4 rounded bg-white p-6 md:flex-row">
|
||||
<div class="flex w-full flex-col items-center gap-4 md:flex-row">
|
||||
<figure>
|
||||
<figure id="profile-photo">
|
||||
<img src="https://placehold.co/81x81"
|
||||
alt="Profile Photo"
|
||||
width="80"
|
||||
|
|
@ -86,6 +86,31 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 space-y-2 md:grid-cols-4 md:space-x-2">
|
||||
<div class="flex flex-col">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">
|
||||
Foto Profil
|
||||
<span class="text-red-500">*</span>
|
||||
</legend>
|
||||
<input type="file" id="photoInput" class="file-input" />
|
||||
<label class="label">Ukuran Maksimal 5MB</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">
|
||||
Jenis Nasabah
|
||||
<span class="text-red-500">*</span>
|
||||
</legend>
|
||||
<select id="status" class="select w-full" required>
|
||||
<option value="" disabled>Pilih Jenis</option>
|
||||
<option value="Perorangan" selected>Perorangan</option>
|
||||
<option value="Organisasi">Organisasi</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
|
|
@ -206,3 +231,19 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#photoInput').on('change', function(event) {
|
||||
const [file] = event.target.files;
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
$('#profile-photo img').attr('src', e.target.result);
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
Loading…
Reference in New Issue