Siopas Inventory PETI for ISTW Website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
8.3 KiB

1 year ago
@extends('layouts.main')
@section('title', 'Profil')
@section('content')
@include('layouts.components.alert-prompt')
1 year ago
<div class="card">
<div class="card-body">
1 year ago
<form action="{{ route('profile.updateprofile', auth()->user()->id) }}" method="POST"
enctype="multipart/form-data">
1 year ago
@csrf
1 year ago
@method('PUT')
1 year ago
<div class="row">
<div class="col-9">
1 year ago
<label for="fullname" class="col-form-label" style="font-size: 14px;">Nama</label>
1 year ago
<div class="mb-2">
<input pattern="[^0-9]+" required oninput="this.value=this.value.replace(/[0-9]/g,'');"
1 year ago
class="form-control" type="text" id="fullname" name="fullname"
value="{{ old('fullname', auth()->user()->fullname) }}" placeholder="Masukan nama anda">
@error('fullname')
1 year ago
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
<label for="email" class="col-form-label" style="font-size: 14px;">Alamat
Email</label>
<div class="mb-2">
<input class="form-control" type="email" id="email" name="email"
value="{{ old('email', auth()->user()->email) }}" readonly>
@error('email')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
<label for="no_hp" class="col-form-label" style="font-size: 14px;">No.
1 year ago
Handphone</label>
<div class="mb-2">
1 year ago
<input class="form-control" type="text" id="no_hp" name="no_hp"
value="{{ old('no_hp', auth()->user()->no_hp) }}" placeholder="Masukan nomor telepon anda"
required>
1 year ago
@error('no_hp')
1 year ago
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
</div>
1 year ago
<div class="col-3 text-center">
<label for="foto">Foto Profil</label><br>
@if (auth()->user()->foto == null)
1 year ago
<img src="{{ asset('assets/img/default-profile.png') }}" alt="{{ auth()->user()->name }}"
class="rounded-circle thumb-xl profile-image"
style="width: 155px; height: 155px; cursor: pointer;"><br>
1 year ago
@else
<img src="{{ asset('storage/' . auth()->user()->foto) }}" alt="{{ auth()->user()->name }}"
class="rounded-circle img-thumbnail thumb-xl profile-image"
style="width: 155px; height: 155px; cursor: pointer;"><br>
1 year ago
@endif
<div class="button-items mt-2">
<label for="photo" class="btn btn-sm col-4 btn-info mt-2">
<input type="file" name="foto" id="photo" class="d-none" accept="image/*">
Upload
</label>
<button type="button" class="btn btn-sm col-4 btn-danger"
onclick="window.location.reload()">Batal</button>
</div>
1 year ago
</div>
1 year ago
<div class="col-12">
<div class="mb-2">
<label for="tgl_lahir" class="col-form-label" style="font-size: 14px;">Tanggal Lahir</label>
1 year ago
<input class="form-control" name="tgl_lahir" type="date" id="tgl_lahir"
value="{{ \Carbon\Carbon::parse(old('tgl_lahir', auth()->user()->tgl_lahir))->format('Y-m-d') }}"
placeholder="Masukan Tanggal Asset" required>
1 year ago
@error('tgl_lahir')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
<label for="jenis_kelamin" class="col-form-label" style="font-size: 14px;">Jenis
Kelamin</label>
<div class="mb-2">
<select class="form-control" id="jenis_kelamin" name="jenis_kelamin" required>
1 year ago
<option selected disabled>Pilih jenis kelamin</option>
<option value="L"
{{ old('jenis_kelamin', auth()->user()->jenis_kelamin) == 'L' ? 'selected' : '' }}>
Laki-laki</option>
<option value="P"
{{ old('jenis_kelamin', auth()->user()->jenis_kelamin) == 'P' ? 'selected' : '' }}>
Perempuan</option>
</select>
@error('jenis_kelamin')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
<label for="agama" class="col-form-label" style="font-size: 14px;">Agama</label>
<div class="mb-2">
<select class="form-control" id="agama" name="agama" required>
1 year ago
<option selected disabled>Pilih agama</option>
<option value="Islam"
{{ old('agama', auth()->user()->agama) == 'Islam' ? 'selected' : '' }}>
Islam</option>
<option value="Kristen"
{{ old('agama', auth()->user()->agama) == 'Kristen' ? 'selected' : '' }}>Kristen
</option>
<option value="Katolik"
{{ old('agama', auth()->user()->agama) == 'Katolik' ? 'selected' : '' }}>Katolik
</option>
<option value="Hindu"
{{ old('agama', auth()->user()->agama) == 'Hindu' ? 'selected' : '' }}>
Hindu</option>
<option value="Buddha"
{{ old('agama', auth()->user()->agama) == 'Buddha' ? 'selected' : '' }}>
Buddha
</option>
<option value="Konghucu"
{{ old('agama', auth()->user()->agama) == 'Konghucu' ? 'selected' : '' }}>Konghucu
</option>
</select>
@error('agama')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
<label for="address" class="col-form-label" style="font-size: 14px;">Alamat</label>
1 year ago
<div class="mb-2">
<textarea pattern="[^0-9]+" required oninput="this.value=this.value.replace(/[0-9]/g,'');" class="form-control"
1 year ago
id="address" name="address" placeholder="Masukkan alamat Anda">{{ old('address', auth()->user()->address) }}</textarea>
@error('address')
1 year ago
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
1 year ago
1 year ago
</div>
<div class="col-12 d-flex justify-content-end">
<button type="button" class="btn btn-primary mt-2"
onclick="window.location.href = '{{ route('profile.setting') }}';">EDIT PASSWORD</button>
1 year ago
<button type="submit" class="btn btn-success mt-2 ml-2 col-1">SIMPAN</button>
</div>
1 year ago
</div>
1 year ago
</form>
1 year ago
</div>
</div>
1 year ago
@endsection