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.
69 lines
3.7 KiB
69 lines
3.7 KiB
1 year ago
|
@extends('layouts.main')
|
||
|
@section('title', 'Update Data User')
|
||
|
@section('content')
|
||
1 year ago
|
<div class="card shadow mb-4">
|
||
|
<div class="card-header py-3">
|
||
|
<div class="row">
|
||
|
<div class="col-6">
|
||
|
<h5 class="m-0 font-weight-bold text-primary mt-2">Edit User</h5>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<form action="{{ route('dashboard.user.update', [$user->id]) }}" method="POST" enctype="multipart/form-data">
|
||
1 year ago
|
@csrf
|
||
|
@method('PUT')
|
||
|
<div class="form-group">
|
||
1 year ago
|
<label for="username" class="col-form-label">Username:</label>
|
||
|
<input class="form-control" name="username" type="text" id="username" value="{{ $user->username }}"
|
||
|
placeholder="Masukan Username user" required>
|
||
1 year ago
|
|
||
1 year ago
|
<label for="fullname" class="col-form-label">Nama Lengkap:</label>
|
||
|
<input class="form-control" name="fullname" type="text" id="fullname" value="{{ $user->fullname }}"
|
||
|
placeholder="Masukan Nama Lengkap user" pattern="[^0-9]+"
|
||
|
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
|
||
1 year ago
|
|
||
|
<label for="email" class="col-form-label">Email:</label>
|
||
1 year ago
|
<input class="form-control" name="email" type="email" id="email" value="{{ $user->email }}"
|
||
|
placeholder="Masukan email user" required>
|
||
1 year ago
|
|
||
|
<label for="divisi" class="col-form-label">Divisi:</label>
|
||
1 year ago
|
<input class="form-control" name="divisi" type="text" id="divisi" value="{{ $user->divisi }}"
|
||
|
placeholder="Masukan Divisi user" pattern="[^0-9]+"
|
||
|
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
|
||
1 year ago
|
|
||
|
<label for="role_id" class="col-form-label">Hak Akses:</label>
|
||
|
<select class="form-control" name="role_id" type="text" id="role_id">
|
||
|
<option disabled selected>Pilih Hak Akses</option>
|
||
|
@foreach ($role as $data)
|
||
1 year ago
|
<option value="{{ $data->id }}"
|
||
|
@if ($data->id == $user->role_id) selected
|
||
|
@else @endif>
|
||
|
{{ $data->name }}</option>
|
||
1 year ago
|
@endforeach
|
||
|
</select>
|
||
|
|
||
1 year ago
|
<label for="warehouse_id" class="col-form-label">Ditugaskan digudnag:</label>
|
||
1 year ago
|
<select class="form-control" name="warehouse_id" type="text" id="warehouse_id">
|
||
|
<option disabled selected>Pilih DItugaskan</option>
|
||
|
@foreach ($warehouse as $data)
|
||
1 year ago
|
<option value="{{ $data->id }}"
|
||
|
@if ($data->id == $user->warehouse_id) selected
|
||
|
@else @endif>
|
||
|
{{ $data->name }}</option>
|
||
1 year ago
|
@endforeach
|
||
|
</select>
|
||
1 year ago
|
|
||
|
<label for="password" class="col-form-label">Password:</label>
|
||
|
<input class="form-control" name="password" type="text" id="password" value="{{ old('password') }}"
|
||
|
placeholder="Masukan password user" required>
|
||
1 year ago
|
</div>
|
||
1 year ago
|
<div class="modal-footer d-flex justify-content-center">
|
||
|
<a href="{{ route('dashboard.user.index') }}" class="btn btn-secondary">Kembali</a>
|
||
1 year ago
|
<button type="submit" class="btn btn-primary">Simpan</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|