123 lines
7.1 KiB
PHP
123 lines
7.1 KiB
PHP
@extends('admin.layouts.layout')
|
|
@section('title', 'Edit Data Pegawai | Skripsi 2024')
|
|
@section('nav', 'Edit Data Pegawai')
|
|
@section('content')
|
|
<div class="pagetitle">
|
|
<nav>
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{{ route('dashboard') }}" class="text-decoration-none text-black">Dashboard</a></li>
|
|
<li class="breadcrumb-item"><a href="{{route('setting.index')}}" class="text-decoration-none text-black">Pegawai</a></li>
|
|
<li class="breadcrumb-item active">Edit Data Pegawai</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
|
|
<section class="section">
|
|
<div class="row">
|
|
<div class="col-lg-11 mb-3">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title text-center">Ubah Data Pegawai di bawah ini</h5>
|
|
@if (Session::has('error'))
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-exclamation-triangle me-1"></i> {{ Session::get('error') }}.
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
@endif
|
|
@if (Session::has('success'))
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-exclamation-triangle me-1"></i> {{ Session::get('success') }}.
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
<form class="row g-3" action="{{ route('setting.update', ['setting' => $user->id]) }}" method="POST" enctype="multipart/form-data" autocomplete="off">
|
|
@csrf
|
|
@method('put')
|
|
<div class="col-md-12">
|
|
<label for="name" class="form-label">*Nama</label>
|
|
<input type="text" class="form-control"id="name" name="name" value="{{$user->name}}"/>
|
|
@error('name')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
@if (Auth::user()->role == 'Operator')
|
|
<div class="col-md-12">
|
|
<label for="role" class="form-label">*Posisi</label>
|
|
<select name="role" id="role" class="form-select">
|
|
<option value="{{$user->role}}" selected>{{$user->role}}</option>
|
|
<option value="Kurir">Kurir</option>
|
|
<option value="Operator">Operator</option>
|
|
</select>
|
|
</div>
|
|
@endif
|
|
<div class="col-md-12">
|
|
<label for="address" class="form-label">*Alamat</label>
|
|
<input type="text" class="form-control"id="address" name="address" value="{{$user->address}}" />
|
|
@error('address')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label for="phone" class="form-label">*No Telp</label>
|
|
<input type="text" class="form-control"id="phone" name="phone" value="{{$user->phone}}"/>
|
|
@error('phone')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label for="email" class="form-label">*Email</label>
|
|
<input type="text" class="form-control"id="email" name="email" value="{{$user->email}}" />
|
|
@error('email')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label for="password" class="form-label">*Password</label>
|
|
<input type="password" class="form-control"id="password" name="password" value="{{$user->password}}" />
|
|
@error('password')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label for="date_of_birth" class="form-label">*TTL</label>
|
|
<input type="date" class="form-control"id="date_of_birth" name="date_of_birth" value="{{$user->date_of_birth}}" />
|
|
@error('date_of_birth')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label for="photos" class="form-label">*Photo</label>
|
|
<input type="file" class="form-control"id="photos" name="photos" />
|
|
@error('photos')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-md-12 mt-4 text-end">
|
|
<button type="submit" class="btn btn-success">
|
|
Simpan
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|