Browse Source

update validasi setiap inputan

master
Gunawan19621 1 year ago
parent
commit
cbeaf76466
  1. 5
      app/Http/Controllers/CustomerController.php
  2. 24
      app/Http/Controllers/PeminjamanController.php
  3. 47
      app/Http/Controllers/PengembalianController.php
  4. 4
      app/Http/Requests/ValidasiCreateCustomer.php
  5. 45
      app/Http/Requests/ValidasiCreatePeminjaman.php
  6. 45
      app/Http/Requests/ValidasiUpdatePeminjaman.php
  7. 54
      app/Http/Requests/ValidasiUpdatePengembalian.php
  8. 18
      app/Models/asset_status.php
  9. 20
      resources/views/dashboard/Master_Data/Customer/create.blade.php
  10. 22
      resources/views/dashboard/Master_Data/Customer/edit.blade.php
  11. 27
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php
  12. 29
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/edit.blade.php
  13. 10
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/create.blade.php
  14. 10
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/edit.blade.php
  15. 20
      resources/views/dashboard/Master_Data/Role/index.blade.php
  16. 57
      resources/views/dashboard/Master_Data/User/create.blade.php
  17. 18
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  18. 28
      resources/views/dashboard/Peminjaman/create.blade.php
  19. 16
      resources/views/dashboard/Peminjaman/edit.blade.php
  20. 12
      resources/views/dashboard/Peminjaman/index.blade.php
  21. 26
      resources/views/dashboard/Pengembalian/edit.blade.php
  22. 1
      resources/views/dashboard/Pengembalian/index.blade.php
  23. 8
      resources/views/layouts/navbar.blade.php
  24. 13
      resources/views/layouts/sidebar.blade.php
  25. 26
      resources/views/pages/layouts/sidebar_user.blade.php
  26. 9
      resources/views/profil/profil.blade.php
  27. 77
      resources/views/profil/setting.blade.php

5
app/Http/Controllers/CustomerController.php

@ -38,11 +38,12 @@ class CustomerController extends Controller
*/
public function store(ValidasiCreateCustomer $request)
{
// dd($request);
try {
$currentUser = Auth::user();
$validatedData = $request->except('_token');
$validatedData['created_by'] = $currentUser->id; // Menggunakan nama pengguna sebagai created_by
$validatedData['updated_by'] = $currentUser->id; // Menggunakan nama pengguna sebagai updated_by
$validatedData['created_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai created_by
$validatedData['updated_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai updated_by
Customer::create($validatedData);
return redirect()->route('dashboard.customer.index')->with('success', 'Data customer berhasil ditambahkan');
} catch (\Throwable $th) {

24
app/Http/Controllers/PeminjamanController.php

@ -2,6 +2,8 @@
namespace App\Http\Controllers;
use App\Http\Requests\ValidasiCreatePeminjaman;
use App\Http\Requests\ValidasiUpdatePeminjaman;
use App\Models\Peti;
use App\Models\m_asset;
use App\Models\m_warehouse;
@ -38,6 +40,7 @@ class PeminjamanController extends Controller
'asset' => m_asset::all(),
'peminjaman' => asset_status::get(),
'warehouse' => m_warehouse::get(),
'existingPeti' => asset_status::pluck('peti_id')->toArray(),
'active' => 'menu-peminjaman',
];
return view('dashboard.Peminjaman.create', $data);
@ -46,17 +49,8 @@ class PeminjamanController extends Controller
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
public function store(ValidasiCreatePeminjaman $request)
{
// dd('oke');
// dd($request->all());
$request->validate([
'peti_id' => 'required',
'exit_at' => 'required',
'est_pengembalian' => 'required',
'exit_warehouse' => 'required',
]);
// dd($request);
try {
$currentUser = Auth::user();
@ -97,16 +91,8 @@ class PeminjamanController extends Controller
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
public function update(ValidasiUpdatePeminjaman $request, $id)
{
// dd('oke');
// dd($request->all());
$request->validate([
'peti_id' => 'required',
'exit_at' => 'required',
'est_pengembalian' => 'required',
'exit_warehouse' => 'required',
]);
// dd($request);
try {
$peminjaman = asset_status::findOrFail($id);

47
app/Http/Controllers/PengembalianController.php

@ -2,8 +2,8 @@
namespace App\Http\Controllers;
use App\Http\Requests\ValidasiUpdatePengembalian;
use App\Models\Peti;
use App\Models\m_asset;
use App\Models\m_warehouse;
use App\Models\asset_status;
use Illuminate\Http\Request;
@ -60,24 +60,14 @@ class PengembalianController extends Controller
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
public function update(ValidasiUpdatePengembalian $request, $id)
{
$request->validate([
'peti_id' => 'required',
'exit_at' => 'required',
'est_pengembalian' => 'required',
'exit_warehouse' => 'required',
'enter_at' => 'required',
'enter_warehouse' => 'required',
'kondisi_peti' => 'required',
]);
try {
$peminjaman = asset_status::findOrFail($id);
// Update atribut-atribut yang diperlukan
$peminjaman->enter_pic = Auth::user()->id;
$peminjaman->updated_by = Auth::user()->id;
$peminjaman->enter_pic = Auth::user()->fullname;
$peminjaman->updated_by = Auth::user()->fullname;
$peminjaman->peti_id = $request->input('peti_id');
$peminjaman->exit_at = $request->input('exit_at');
@ -87,7 +77,6 @@ class PengembalianController extends Controller
$peminjaman->enter_warehouse = $request->input('enter_warehouse');
$peminjaman->kondisi_peti = $request->input('kondisi_peti');
// dd($peminjaman);
$peminjaman->save();
return redirect()->route('dashboard.pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
@ -97,34 +86,6 @@ class PengembalianController extends Controller
}
}
// public function update(Request $request, $id)
// {
// // dd($request->all());
// $request->validate([
// 'peti_id' => 'required',
// 'exit_at' => 'required',
// 'est_pengembalian' => 'required',
// 'exit_warehouse' => 'required',
// 'enter_at' => 'required',
// 'enter_warehouse' => 'required',
// 'kondisi_peti' => 'required',
// ]);
// // dd($request);
// try {
// $peminjaman = asset_status::findOrFail($id);
// $peminjaman['enter_pic'] = Auth::user()->id; // Menambahkan ID pengguna sebagai updated_by
// $peminjaman['updated_by'] = Auth::user()->id; // Menambahkan ID pengguna sebagai updated_by
// dd($peminjaman);
// $peminjaman->update($request->all());
// return redirect()->route('dashboard.pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
// } catch (\Throwable $th) {
// // Tampilkan pesan kesalahan untuk debugging
// return redirect()->back()->with('error', 'Data peminjaman gagal diperbaharui: ' . $th->getMessage());
// }
// }
/**
* Remove the specified resource from storage.
*/

4
app/Http/Requests/ValidasiCreateCustomer.php

@ -25,7 +25,7 @@ class ValidasiCreateCustomer extends FormRequest
'name' => 'required|string|max:50',
'code_customer' => 'required|string|max:15|unique:customers,code_customer',
'lot_no' => 'required|string|max:50',
'no_tlp' => 'required|numeric',
'no_tlp' => 'required',
'address' => 'required|string',
];
}
@ -43,7 +43,7 @@ class ValidasiCreateCustomer extends FormRequest
'lot_no.required' => 'Kolom lot_no wajib diisi.',
'lot_no.string' => 'Kolom lot_no harus berupa teks.',
'no_tlp.required' => 'Kolom no_tlp wajib diisi.',
'no_tlp.numeric' => 'Kolom no_tlp harus berisi angka.',
// 'no_tlp.numeric' => 'Kolom no_tlp harus berisi angka.',
'no_tlp.max' => 'Kolom no_tlp tidak boleh lebih dari :max karakter.',
'address.required' => 'Kolom address wajib diisi.',
'address.string' => 'Kolom address harus berupa teks.',

45
app/Http/Requests/ValidasiCreatePeminjaman.php

@ -0,0 +1,45 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ValidasiCreatePeminjaman extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'peti_id' => 'required|integer', // Pastikan peti_id ada dalam tabel petis
'exit_at' => 'required|date',
'est_pengembalian' => 'required|date', // Estimasi pengembalian harus setelah exit_at
'exit_warehouse' => 'required|integer',
];
}
public function messages()
{
return [
'peti_id.required' => 'Bidang Detail Peti wajib diisi.',
'peti_id.integer' => 'Detail Peti harus berupa angka.',
'exit_at.required' => 'Bidang Tanggal Peminjaman wajib diisi.',
'exit_at.date' => 'Bidang Tanggal Peminjaman harus berupa tanggal.',
'est_pengembalian.required' => 'Bidang Estimasi Tanggal Pengembalian wajib diisi.',
'est_pengembalian.date' => 'Bidang Estimasi Tanggal Pengembalian harus berupa tanggal.',
'exit_warehouse.required' => 'Bidang Asal Gudang wajib diisi.',
'exit_warehouse.integer' => 'Asal Gudang harus berupa angka.',
];
}
}

45
app/Http/Requests/ValidasiUpdatePeminjaman.php

@ -0,0 +1,45 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ValidasiUpdatePeminjaman extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'peti_id' => 'required|integer', // Pastikan peti_id ada dalam tabel petis
'exit_at' => 'required|date',
'est_pengembalian' => 'required|date', // Estimasi pengembalian harus setelah exit_at
'exit_warehouse' => 'required|integer',
];
}
public function messages()
{
return [
'peti_id.required' => 'Bidang Detail Peti wajib diisi.',
'peti_id.integer' => 'Detail Peti harus berupa angka.',
'exit_at.required' => 'Bidang Tanggal Peminjaman wajib diisi.',
'exit_at.date' => 'Bidang Tanggal Peminjaman harus berupa tanggal.',
'est_pengembalian.required' => 'Bidang Estimasi Tanggal Pengembalian wajib diisi.',
'est_pengembalian.date' => 'Bidang Estimasi Tanggal Pengembalian harus berupa tanggal.',
'exit_warehouse.required' => 'Bidang Asal Gudang wajib diisi.',
'exit_warehouse.integer' => 'Asal Gudang harus berupa angka.',
];
}
}

54
app/Http/Requests/ValidasiUpdatePengembalian.php

@ -0,0 +1,54 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ValidasiUpdatePengembalian extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'peti_id' => 'required|integer',
'exit_at' => 'required|date',
'est_pengembalian' => 'required|date',
'exit_warehouse' => 'required|integer',
'enter_at' => 'required|date',
'enter_warehouse' => 'required|integer',
'kondisi_peti' => 'required|string',
];
}
public function messages()
{
return [
'peti_id.required' => 'Kolom peti_id wajib diisi.',
'peti_id.integer' => 'Kolom peti_id harus berupa angka bulat.',
'exit_at.required' => 'Kolom exit_at wajib diisi.',
'exit_at.date' => 'Kolom exit_at harus berupa tanggal.',
'est_pengembalian.required' => 'Kolom est_pengembalian wajib diisi.',
'est_pengembalian.date' => 'Kolom est_pengembalian harus berupa tanggal.',
'exit_warehouse.required' => 'Kolom exit_warehouse wajib diisi.',
'exit_warehouse.integer' => 'Kolom exit_warehouse harus berupa angka bulat.',
'enter_at.required' => 'Kolom enter_at wajib diisi.',
'enter_at.date' => 'Kolom enter_at harus berupa tanggal.',
'enter_warehouse.required' => 'Kolom enter_warehouse wajib diisi.',
'enter_warehouse.integer' => 'Kolom enter_warehouse harus berupa angka bulat.',
'kondisi_peti.required' => 'Kolom kondisi_peti wajib diisi.',
'kondisi_peti.string' => 'Kolom kondisi_peti harus berupa teks.',
];
}
}

18
app/Models/asset_status.php

@ -14,15 +14,15 @@ class asset_status extends Model
protected $table = 'asset_statuses';
protected $fillable = [
'peti_id', //sudah
'exit_at', //sudah
'est_pengembalian', //sudah
'exit_pic', // di controler
'exit_warehouse', //sudah
'enter_at', // //sudah
'enter_pic', // //sudah
'enter_warehouse', // //sudah
'kondisi_peti', // //sudah
'peti_id',
'exit_at',
'est_pengembalian',
'exit_pic',
'exit_warehouse',
'enter_at',
'enter_pic',
'enter_warehouse',
'kondisi_peti',
'created_by',
'updated_by',
];

20
resources/views/dashboard/Master_Data/Customer/create.blade.php

@ -14,23 +14,27 @@
<form action="{{ route('dashboard.customer.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="name" class="col-form-label">Nama Customer:</label>
<label for="name" class="col-form-label">Nama Customer: <span class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name" value="{{ old('name') }}"
placeholder="Masukan nama customer" required>
placeholder="Masukan nama customer" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
<label for="code_customer" class="col-form-label">Kode Customer:</label>
<label for="code_customer" class="col-form-label">Kode Customer: <span
class="text-danger">*</span></label>
<input class="form-control" name="code_customer" type="text" id="code_customer"
value="{{ old('code_customer') }}" placeholder="Masukan kode customer" required>
<label for="lot_no" class="col-form-label">Lot Number:</label>
<label for="lot_no" class="col-form-label">Lot Number: <span class="text-danger">*</span></label>
<input class="form-control" name="lot_no" type="text" id="lot_no" value="{{ old('lot_no') }}"
placeholder="Masukan lot number" required>
<label for="no_tlp" class="col-form-label">Nomor Telepon Customer:</label>
<input class="form-control" name="no_tlp" type="text" id="no_tlp" value="{{ old('no_tlp') }}"
placeholder="Masukan Nomor Telepon customer" required>
<label for="no_tlp" class="col-form-label">Nomor Telepon Customer: <span
class="text-danger">*</span></label>
<input class="form-control" name="no_tlp" type="tel" id="no_tlp" value="{{ old('no_tlp') }}"
placeholder="Masukkan Nomor Telepon customer" pattern="[^A-Za-z]+"
title="Hanya karakter selain huruf yang diperbolehkan" required>
<label for="address" class="col-form-label">Alamat Customer:</label>
<label for="address" class="col-form-label">Alamat Customer: <span class="text-danger">*</span></label>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan alamat customer" required></textarea>
</div>
<div class="modal-footer d-flex justify-content-center">

22
resources/views/dashboard/Master_Data/Customer/edit.blade.php

@ -16,24 +16,30 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="name" class="col-form-label">Nama Customer:</label>
<label for="name" class="col-form-label">Nama Customer: <span class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name" value="{{ $customer->name }}"
placeholder="Masukan nama customer" required>
placeholder="Masukan nama customer" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
<label for="code_customer" class="col-form-label">Kode Customer:</label>
<label for="code_customer" class="col-form-label">Kode Customer: <span
class="text-danger">*</span></label>
<input class="form-control" name="code_customer" type="text" id="code_customer"
value="{{ $customer->code_customer }}" placeholder="Masukan kode customer" required>
<label for="lot_no" class="col-form-label">Lot Number:</label>
<label for="lot_no" class="col-form-label">Lot Number: <span class="text-danger">*</span></label>
<input class="form-control" name="lot_no" type="text" id="lot_no" value="{{ $customer->lot_no }}"
placeholder="Masukan lot number" required>
<label for="no_tlp" class="col-form-label">No. Telepon Customer:</label>
<input class="form-control" name="no_tlp" type="text" id="no_tlp" value="{{ $customer->no_tlp }}"
placeholder="Masukan nomor telepon customer" required>
<label for="no_tlp" class="col-form-label">Nomor Telepon Customer: <span
class="text-danger">*</span></label>
<input class="form-control" name="no_tlp" type="tel" id="no_tlp" value="{{ $customer->no_tlp }}"
placeholder="Masukkan Nomor Telepon customer" pattern="[^A-Za-z]+"
title="Hanya karakter selain huruf yang diperbolehkan" required>
<label for="address" class="col-form-label">Alamat Customer:</label>
<label for="address" class="col-form-label">Alamat Customer: <span class="text-danger">*</span></label>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan alamat customer" required>{{ $customer->address }}</textarea>
</div>
<div class="modal-footer d-flex justify-content-center">
<a href="{{ route('dashboard.customer.index') }}" class="btn btn-secondary">Kembali</a>

27
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php

@ -14,7 +14,7 @@
<form action="{{ route('dashboard.peti.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="tipe_peti_id" class="col-form-label">Tipe Peti:</label>
<label for="tipe_peti_id" class="col-form-label">Tipe Peti: <span class="text-danger">*</span></label>
<select class="form-control" name="tipe_peti_id" id="tipe_peti_id" required>
<option disabled selected>Pilih Tipe Peti</option>
@foreach ($typepeti as $data_type)
@ -22,11 +22,12 @@
@endforeach
</select>
<label for="warna" class="col-form-label">Warna Peti:</label>
<label for="warna" class="col-form-label">Warna Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="warna" type="text" id="warna" value="{{ old('warna') }}"
placeholder="Masukan Warna Peti" required>
placeholder="Masukkan Warna Peti (contoh: merah)" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" title="Hanya huruf diperbolehkan" required>
<label for="customer_id" class="col-form-label">Customer:</label>
<label for="customer_id" class="col-form-label">Customer: <span class="text-danger">*</span></label>
<select class="form-control" name="customer_id" id="customer_id" required>
<option disabled selected>Pilih Customer</option>
@foreach ($customer as $data_customer)
@ -34,7 +35,7 @@
@endforeach
</select>
<label for="warehouse_id" class="col-form-label">Warehouse:</label>
<label for="warehouse_id" class="col-form-label">Gudang: <span class="text-danger">*</span></label>
<select class="form-control" name="warehouse_id" id="warehouse_id" required>
<option disabled selected>Pilih Warehouse</option>
@foreach ($warehouse as $data_warehouse)
@ -42,15 +43,21 @@
@endforeach
</select>
<label for="status_disposal" class="col-form-label">Status Peti:</label>
<input class="form-control" name="status_disposal" type="text" id="status_disposal"
value="{{ old('status_disposal') }}" placeholder="Masukan status Peti">
<label for="status_disposal" class="col-form-label">Kondisi Peti:</label>
<select class="form-control" name="status_disposal" id="status_disposal">
<option disabled selected>Pilih Kondisi Peti</option>
<option value="Baru">Baru</option>
<option value="Bekas">Bekas</option>
<option value="Recycle">Recycle</option>
<option value="Lainnya">Lainnya</option>
</select>
<label for="jumlah" class="col-form-label">Jumlah Peti:</label>
<label for="jumlah" class="col-form-label">Jumlah Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="jumlah" type="number" id="jumlah" value="{{ old('jumlah') }}"
placeholder="Masukan jumlah Peti" required>
<label for="date_pembuatan" class="col-form-label">Tanggal Pembuatan Peti:</label>
<label for="date_pembuatan" class="col-form-label">Tanggal Pembuatan Peti: <span
class="text-danger">*</span></label>
<input class="form-control" name="date_pembuatan" type="date" id="date_pembuatan"
value="{{ old('date_pembuatan') }}" required>

29
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/edit.blade.php

@ -15,8 +15,8 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="tipe_peti_id" class="col-form-label">Tipe Peti:</label>
<select class="form-control" name="tipe_peti_id" id="tipe_peti_id">
<label for="tipe_peti_id" class="col-form-label">Tipe Peti: <span class="text-danger">*</span></label>
<select class="form-control" name="tipe_peti_id" id="tipe_peti_id" required>
<option disabled selected>Pilih Warehouse</option>
@foreach ($typepeti as $data_type)
<option value="{{ $data_type->id }}"
@ -26,11 +26,12 @@
@endforeach
</select>
<label for="warna" class="col-form-label">Warna Peti:</label>
<label for="warna" class="col-form-label">Warna Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="warna" type="text" id="warna" value="{{ $peti->warna }}"
placeholder="Masukan Warna Peti" required>
placeholder="Masukkan Warna Peti (contoh: merah)" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" title="Hanya huruf diperbolehkan" required>
<label for="customer_id" class="col-form-label">Customer:</label>
<label for="customer_id" class="col-form-label">Customer: <span class="text-danger">*</span></label>
<select class="form-control" name="customer_id" id="customer_id">
<option disabled selected>Pilih Warehouse</option>
@foreach ($customer as $data_customer)
@ -41,7 +42,7 @@
@endforeach
</select>
<label for="warehouse_id" class="col-form-label">Warehouse:</label>
<label for="warehouse_id" class="col-form-label">Gudang: <span class="text-danger">*</span></label>
<select class="form-control" name="warehouse_id" id="warehouse_id">
<option disabled selected>Pilih Warehouse</option>
@foreach ($warehouse as $data_warehouse)
@ -52,11 +53,19 @@
@endforeach
</select>
<label for="status_disposal" class="col-form-label">Status Peti:</label>
<input class="form-control" name="status_disposal" type="text" id="status_disposal"
value="{{ $peti->status_disposal }}" placeholder="Masukan status Peti">
<label for="status_disposal" class="col-form-label">Kondisi Peti:</label>
<select class="form-control" name="status_disposal" id="status_disposal">
<option disabled>Pilih Kondisi Peti</option>
<option value="Baru" {{ old('status_disposal') == 'Baru' ? 'selected' : '' }}>Baru</option>
<option value="Bekas" {{ old('status_disposal') == 'Bekas' ? 'selected' : '' }}>Bekas</option>
<option value="Recycle" {{ old('status_disposal') == 'Recycle' ? 'selected' : '' }}>Recycle
</option>
<option value="Lainnya" {{ old('status_disposal') == 'Lainnya' ? 'selected' : '' }}>Lainnya
</option>
</select>
<label for="date_pembuatan" class="col-form-label">Tanggal Pembuatan Peti:</label>
<label for="date_pembuatan" class="col-form-label">Tanggal Pembuatan Peti: <span
class="text-danger">*</span></label>
<input class="form-control" name="date_pembuatan" type="date" id="date_pembuatan"
value="{{ $peti->date_pembuatan }}" required>

10
resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/create.blade.php

@ -14,15 +14,17 @@
<form action="{{ route('dashboard.typepeti.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="type" class="col-form-label">Tipe Peti:</label>
<label for="type" class="col-form-label">Tipe Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="type" type="text" id="type" value="{{ old('type') }}"
placeholder="Masukan Tipe Peti" required>
<label for="size_peti" class="col-form-label">Ukuran Peti:</label>
<label for="size_peti" class="col-form-label">Ukuran Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="size_peti" type="text" id="size_peti"
value="{{ old('size_peti') }}" placeholder="Masukan Ukuran Peti" required>
value="{{ old('size_peti') }}" placeholder="Masukkan Ukuran Peti (contoh: 5 x 5 x 5)"
pattern="\d+\s*x\s*\d+\s*x\s*\d+" title="Format yang diperbolehkan: 5 x 5 x 5" required>
<label for="description" class="col-form-label">Deskripsi Peti:</label>
<label for="description" class="col-form-label">Deskripsi Peti: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Peti" required></textarea>
</div>
<div class="modal-footer d-flex justify-content-center">

10
resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/edit.blade.php

@ -16,15 +16,17 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="type" class="col-form-label">Tipe Peti:</label>
<label for="type" class="col-form-label">Tipe Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="type" type="text" id="type" value="{{ $typepeti->type }}"
placeholder="Masukan Tipe Peti" required>
<label for="size_peti" class="col-form-label">Ukuran Peti:</label>
<label for="size_peti" class="col-form-label">Ukuran Peti: <span class="text-danger">*</span></label>
<input class="form-control" name="size_peti" type="text" id="size_peti"
value="{{ $typepeti->size_peti }}" placeholder="Masukan Ukuran Peti" required>
value="{{ $typepeti->size_peti }}" placeholder="Masukkan Ukuran Peti (contoh: 5 x 5 x 5)"
pattern="\d+\s*x\s*\d+\s*x\s*\d+" title="Format yang diperbolehkan: 5 x 5 x 5" required>
<label for="description" class="col-form-label">Deskripsi Peti:</label>
<label for="description" class="col-form-label">Deskripsi Peti: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Peti" required>{{ $typepeti->description }}</textarea>
</div>
<div class="modal-footer d-flex justify-content-center">

20
resources/views/dashboard/Master_Data/Role/index.blade.php

@ -80,11 +80,15 @@
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">Nama Hak Akses:</label>
<label for="name" class="col-form-label">Nama Hak Akses: <span
class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name"
value="{{ old('name') }}" placeholder="Masukan Nama Hak Akses" required>
value="{{ old('name') }}" placeholder="Masukan Nama Hak Akses" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');"
title="Hanya karakter selain huruf yang diperbolehkan" required>
<label for="description" class="col-form-label">Deskripsi Hak Akses:</label>
<label for="description" class="col-form-label">Deskripsi Hak Akses: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Hak Akses" required>{{ old('description') }}</textarea>
</div>
</div>
@ -116,11 +120,15 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="name" class="col-form-label">Nama Hak Akses:</label>
<label for="name" class="col-form-label">Nama Hak Akses: <span
class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name"
value="{{ $data->name }}" placeholder="Masukan Nama Hak Akses" required>
value="{{ $data->name }}" placeholder="Masukan Nama Hak Akses" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');"
title="Hanya karakter selain huruf yang diperbolehkan" required>
<label for="description" class="col-form-label">Deskripsi Hak Akses:</label>
<label for="description" class="col-form-label">Deskripsi Hak Akses: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Hak Akses"
required>{{ $data->description }}</textarea>
</div>

57
resources/views/dashboard/Master_Data/User/create.blade.php

@ -15,25 +15,28 @@
<form action="{{ route('dashboard.user.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="username" class="col-form-label">Username:</label>
<label for="username" class="col-form-label">Username: <span class="text-danger">*</span></label>
<input class="form-control" name="username" type="text" id="username" value="{{ old('username') }}"
placeholder="Masukan Username user" required>
placeholder="Masukan Username user" pattern="[A-Za-z0-9]+"
title="Hanya karakter huruf dan angka yang diperbolehkan" required>
<label for="fullname" class="col-form-label">Nama Lengkap:</label>
<label for="fullname" class="col-form-label">Nama Lengkap: <span class="text-danger">*</span></label>
<input class="form-control" name="fullname" type="text" id="fullname" value="{{ old('fullname') }}"
placeholder="Masukan Nama Lengkap user" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
oninput="this.value=this.value.replace(/[0-9]/g,'');" required
title="Hanya karakter selain angka yang diperbolehkan">
<label for="email" class="col-form-label">Email:</label>
<label for="email" class="col-form-label">Email: <span class="text-danger">*</span></label>
<input class="form-control" name="email" type="email" id="email" value="{{ old('email') }}"
placeholder="Masukan email user" required>
placeholder="Masukan email user" title="Format email yang valid diperlukan" required>
<label for="divisi" class="col-form-label">Divisi:</label>
<label for="divisi" class="col-form-label">Divisi: <span class="text-danger">*</span></label>
<input class="form-control" name="divisi" type="text" id="divisi" value="{{ old('divisi') }}"
placeholder="Masukan Divisi user" pattern="[^0-9]+"
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
oninput="this.value=this.value.replace(/[0-9]/g,'');" required
title="Hanya karakter selain angka yang diperbolehkan">
<label for="role_id" class="col-form-label">Hak Akses:</label>
<label for="role_id" class="col-form-label">Hak Akses: <span class="text-danger">*</span></label>
<select class="form-control" name="role_id" id="role_id" required>
<option disabled selected>Pilih Hak Akses User</option>
@foreach ($role as $dt_role)
@ -41,17 +44,28 @@
@endforeach
</select>
<label for="warehouse_id" class="col-form-label">Ditugaskan:</label>
<label for="warehouse_id" class="col-form-label">Ditugaskan: <span class="text-danger">*</span></label>
<select class="form-control" name="warehouse_id" id="warehouse_id" required>
<option disabled selected>Pilih Hak Akses User</option>
<option disabled selected>Pilih Gudang</option>
@foreach ($warehouse as $dt_warehouse)
<option value="{{ $dt_warehouse->id }}">{{ $dt_warehouse->name }}</option>
@endforeach
</select>
<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>
<div class="form-group">
<label for="password" class="col-form-label">Password: <span class="text-danger">*</span></label>
<div class="input-group">
<input class="form-control" name="password" type="password" id="password"
value="{{ old('password') }}" placeholder="Masukkan password user" minlength="8"
pattern="^(?=.*[A-Za-z])(?=.*\d).*$" required
title="Minimal 8 karakter dengan kombinasi huruf dan angka">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="showPasswordButton">
Tampilkan
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<a href="{{ route('dashboard.user.index') }}" class="btn btn-secondary">Kembali</a>
@ -60,4 +74,19 @@
</form>
</div>
</div>
<script>
const passwordInput = document.getElementById("password");
const showPasswordButton = document.getElementById("showPasswordButton");
showPasswordButton.addEventListener("click", function() {
if (passwordInput.type === "password") {
passwordInput.type = "text";
showPasswordButton.textContent = "Sembunyikan";
} else {
passwordInput.type = "password";
showPasswordButton.textContent = "Tampilkan";
}
});
</script>
@endsection

18
resources/views/dashboard/Master_Data/Warehouse/index.blade.php

@ -84,14 +84,17 @@
<form action="{{ route('dashboard.warehouse.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="name" class="col-form-label">Nama:</label>
<label for="name" class="col-form-label">Nama Gudang: <span
class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name"
value="{{ old('name') }}" placeholder="Masukan Nama Gudang" required>
<label for="description" class="col-form-label">Deskripsi:</label>
<label for="description" class="col-form-label">Deskripsi Gudang: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Gudang" required>{{ old('description') }}</textarea>
<label for="address" class="col-form-label">Alamat:</label>
<label for="address" class="col-form-label">Alamat Gudang: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan Alamat Gudang" required>{{ old('address') }}</textarea>
</div>
<div class="modal-footer">
@ -122,14 +125,17 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="name" class="col-form-label">Nama:</label>
<label for="name" class="col-form-label">Nama Gudang: <span
class="text-danger">*</span></label>
<input class="form-control" name="name" type="text" id="name"
value="{{ $data->name }}" placeholder="Masukan Nama Gudang" required>
<label for="description" class="col-form-label">Deskripsi:</label>
<label for="description" class="col-form-label">Deskripsi Gudang: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Gudang" required>{{ $data->description }}</textarea>
<label for="address" class="col-form-label">Alamat:</label>
<label for="address" class="col-form-label">Alamat Gudang: <span
class="text-danger">*</span></label>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan Alamat Gudang" required>{{ $data->address }}</textarea>
</div>
<div class="modal-footer">

28
resources/views/dashboard/Peminjaman/create.blade.php

@ -13,25 +13,31 @@
<form action="{{ route('dashboard.peminjaman.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="peti_id" class="col-form-label">Pilih Detail Peti:</label>
<select class="form-control" name="peti_id" type="text" id="peti_id">
<label for="peti_id" class="col-form-label">Pilih Detail Peti: <span
class="text-danger">*</span></label>
<select class="form-control" name="peti_id" type="text" id="peti_id" required>
<option disabled selected>Pilih Detail Peti</option>
@foreach ($peti as $data_peti)
<option value="{{ $data_peti->id }}" data-warehouse-id="{{ $data_peti->warehouse_id }}">
{{ $data_peti->fix_lot }}
</option>
@if (!in_array($data_peti->id, $existingPeti))
<option value="{{ $data_peti->id }}" data-warehouse-id="{{ $data_peti->warehouse_id }}">
{{ $data_peti->fix_lot }}
</option>
@endif
@endforeach
</select>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman: <span
class="text-danger">*</span></label>
<input class="form-control" name="exit_at" type="date" id="exit_at" value="{{ old('exit_at') }}"
placeholder="Masukan Tanggal Peminjaman" required>
required>
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label>
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian: <span
class="text-danger">*</span></label>
<input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian"
value="{{ old('est_pengembalian') }}" placeholder="Masukan Estimasi Tanggal Peminjaman" required>
value="{{ old('est_pengembalian') }}" required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<select class="form-control" name="exit_warehouse" type="text" id="exit_warehouse">
<label for="exit_warehouse" class="col-form-label">Asal Gudang: <span
class="text-danger">*</span></label>
<select class="form-control" name="exit_warehouse" type="text" id="exit_warehouse" required>
<option disabled selected>Pilih Asal Gudang</option>
@foreach ($warehouse as $data)
<option value="{{ $data->id }}">{{ $data->name }}</option>

16
resources/views/dashboard/Peminjaman/edit.blade.php

@ -15,7 +15,8 @@
@csrf
@method('PUT')
<div class="form-group">
<label for="peti_id" class="col-form-label">Pilih Detail Peti:</label>
<label for="peti_id" class="col-form-label">Pilih Detail Peti: <span
class="text-danger">*</span></label>
<select class="form-control" name="peti_id" id="peti_id">
<option disabled selected>Pilih Detail Peti</option>
@foreach ($peti as $data_peti)
@ -28,20 +29,23 @@
</div>
<div class="form-group">
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman: <span
class="text-danger">*</span></label>
<input class="form-control" name="exit_at" type="date" id="exit_at"
value="{{ $peminjaman->exit_at }}" required>
</div>
<div class="form-group">
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label>
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian: <span
class="text-danger">*</span></label>
<input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian"
value="{{ $peminjaman->est_pengembalian }}" required>
</div>
<div class="form-group">
<label for="exit_warehouse" class="col-form-label">Asal Gudang:</label>
<select class="form-control" name="exit_warehouse" id="exit_warehouse">
<label for="exit_warehouse" class="col-form-label">Asal Gudang: <span
class="text-danger">*</span></label>
<select class="form-control" name="exit_warehouse" id="exit_warehouse" required>
<option disabled selected>Pilih Asal Gudang</option>
@foreach ($warehouse as $data)
<option value="{{ $data->id }}"
@ -52,7 +56,7 @@
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<a href="{{ route('dashboard.peminjaman.index') }}" class="btn btn-secondary">Kembali</a>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>

12
resources/views/dashboard/Peminjaman/index.blade.php

@ -1,5 +1,6 @@
@extends('layouts.main')
@section('content')
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
@ -62,17 +63,6 @@
@empty
<p>Data Kosong</p>
@endforelse
{{--
@foreach ($peminjaman as $data)
<tr>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data->asset->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d-m-Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>{{ $data->warehouse->name }}</td>
</tr>
@endforeach --}}
</tbody>
</table>
</div>

26
resources/views/dashboard/Pengembalian/edit.blade.php

@ -37,12 +37,14 @@
<input class="form-control" value="{{ $peminjaman->warehouse->name }}" readonly>
</div>
<label for="enter_at" class="col-form-label">Tanggal Pengembalian:</label>
<label for="enter_at" class="col-form-label">Tanggal Pengembalian: <span
class="text-danger">*</span></label>
<input class="form-control" name="enter_at" type="date" id="enter_at"
value="{{ \Carbon\Carbon::parse($peminjaman->enter_at)->format('Y-m-d') }}" required>
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang:</label>
<select class="form-control" name="enter_warehouse" type="text" id="enter_warehouse">
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang: <span
class="text-danger">*</span></label>
<select class="form-control" name="enter_warehouse" type="text" id="enter_warehouse" required>
<option disabled selected>Pilih Tujuan Gudang</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@ -52,26 +54,12 @@
@endforeach
</select>
<label for="kondisi_peti" class="col-form-label">Kondisi Peti:</label>
<label for="kondisi_peti" class="col-form-label">Kondisi Peti: <span
class="text-danger">*</span></label>
<input class="form-control" name="kondisi_peti" type="text" id="kondisi_peti"
value="{{ old('kondisi_peti', $peminjaman->kondisi_peti) }}" placeholder="Masukan kondisi peti"
pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
</div>
{{--
</div> --}}
<div class="modal-footer d-flex justify-content-center">
<a href="{{ route('dashboard.pengembalian.index') }}" class="btn btn-secondary">Kembali</a>
<button type="submit" class="btn btn-primary">Simpan</button>

1
resources/views/dashboard/Pengembalian/index.blade.php

@ -1,5 +1,6 @@
@extends('layouts.main')
@section('content')
@include('layouts.components.alert-prompt')
<style>
.table th {
white-space: nowrap;

8
resources/views/layouts/navbar.blade.php

@ -33,7 +33,6 @@
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-primary">
<!-- <i class="fas fa-file-alt text-white"></i> -->
<i class="fas fa-download text-white"></i>
</div>
</div>
@ -77,13 +76,10 @@
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ auth()->user()->fullname }}</span>
{{-- <img class="img-profile rounded-circle" src="{{ asset('assets/img/default-profile.png') }}"> --}}
@if (auth()->user()->foto == null)
<img src="{{ asset('assets/img/default-profile.png') }}" alt="{{ auth()->user()->fullname }}"
class="img-profile rounded-circle">
@else
{{-- <img src="{{ Storage::url(Auth::user()->foto) }}" alt="{{ auth()->user()->id }}"
class="rounded-circle"> --}}
<img src="{{ asset('storage/' . auth()->user()->foto) }}" alt="{{ auth()->user()->fullname }}"
class="img-profile rounded-circle">
@endif
@ -98,10 +94,6 @@
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
Settings
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
Activity Log
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>

13
resources/views/layouts/sidebar.blade.php

@ -93,6 +93,19 @@
<span>Warehouse</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsereport"
aria-expanded="{{ $isUserActive ? 'true' : 'false' }}" aria-controls="collapseTwo">
<i class="fas fa-fw fa-user"></i>
<span>Report</span>
</a>
<div id="collapsereport" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-user' ? 'active' : '' }}" href="#">Data Peti</a>
</div>
</div>
</li>
@else
@include('pages.layouts.sidebar_user')
@endif

26
resources/views/pages/layouts/sidebar_user.blade.php

@ -38,32 +38,6 @@
<div class="sidebar-heading">
Master Data
</div>
@php
$isUserActive = in_array($active, ['menu-user', 'menu-role']);
@endphp
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
aria-expanded="{{ $isUserActive ? 'true' : 'false' }}" aria-controls="collapseTwo">
<i class="fas fa-fw fa-user"></i>
<span>Manajemen User</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-user' ? 'active' : '' }}"
href="{{ route('dashboard.user.index') }}">User</a>
<a class="collapse-item {{ $active == 'menu-role' ? 'active' : '' }}"
href="{{ route('dashboard.role.index') }}">Role</a>
</div>
</div>
</li>
<li class="nav-item {{ $active == 'menu-customer' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.customer.index') }}">
<i class="fas fa-fw fa-users"></i>
<span>Customer</span>
</a>
</li>
@php
$isPetiActive = in_array($active, ['menu-user', 'menu-role']);
@endphp

9
resources/views/profil/profil.blade.php

@ -1,6 +1,8 @@
@extends('layouts.main')
@section('title', 'Profil')
@section('content')
@include('layouts.components.alert-prompt')
<div class="card">
<div class="card-body">
<form action="{{ route('profile.updateprofile', auth()->user()->id) }}" method="POST"
@ -33,7 +35,8 @@
Handphone</label>
<div class="mb-2">
<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">
value="{{ old('no_hp', auth()->user()->no_hp) }}" placeholder="Masukan nomor telepon anda"
required>
@error('no_hp')
<div class="text-danger">{{ $message }}</div>
@enderror
@ -74,7 +77,7 @@
<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">
<select class="form-control" id="jenis_kelamin" name="jenis_kelamin" required>
<option selected disabled>Pilih jenis kelamin</option>
<option value="L"
{{ old('jenis_kelamin', auth()->user()->jenis_kelamin) == 'L' ? 'selected' : '' }}>
@ -90,7 +93,7 @@
<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">
<select class="form-control" id="agama" name="agama" required>
<option selected disabled>Pilih agama</option>
<option value="Islam"
{{ old('agama', auth()->user()->agama) == 'Islam' ? 'selected' : '' }}>

77
resources/views/profil/setting.blade.php

@ -1,6 +1,6 @@
@extends('layouts.main')
@section('title', 'Setting Akun')
@section('content')
<!-- Informasi Akun -->
<div class="card mb-2">
<div class="card-body">
<header>
@ -20,41 +20,52 @@
@csrf
@method('patch')
<div>
<label for="fullname" class="block font-semibold text-gray-800">
Nama
</label>
<input id="fullname" name="fullname" type="text" class="mt-1 block w-full"
value="{{ old('fullname', $user->fullname) }}" required autofocus autocomplete="fullname">
@if ($errors->has('fullname'))
<p class="text-red-500">{{ $errors->first('fullname') }}</p>
@endif
<div class="mb-4">
<div class="row">
<div class="col-2">
<label for="fullname" class="block text-gray-700 text-sm font-bold mt-2 ml-3">Full
Name</label>
</div>
<div class="col-10">
<input id="fullname" name="fullname" type="text"
class="p-2 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500"
value="{{ old('fullname', $user->fullname) }}" required autofocus
autocomplete="fullname">
@if ($errors->has('fullname'))
<p class="text-red-500 text-sm mt-1">{{ $errors->first('fullname') }}</p>
@endif
</div>
</div>
</div>
<div class="mb-4">
<div class="row">
<div class="col-2">
<label for="email" class="block text-gray-700 text-sm font-bold mt-2 ml-3">Email</label>
</div>
<div class="col-10">
<input id="email" name="email" type="email"
class="mt-1 p-2 w-full border border-gray-300 rounded-md focus:outline-none focus:border-indigo-500"
value="{{ old('email', $user->email) }}" required autocomplete="email">
@if ($errors->has('email'))
<p class="text-red-500 text-sm mt-1">{{ $errors->first('email') }}</p>
@endif
<div>
<label for="email" class="block font-semibold text-gray-800">
Email
</label>
<input id="email" name="email" type="email" class="mt-1 block w-full"
value="{{ old('email', $user->email) }}" required autocomplete="email">
@if ($errors->has('email'))
<p class="text-red-500">{{ $errors->first('email') }}</p>
@endif
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && !$user->hasVerifiedEmail())
<div class="mt-2 text-gray-800">
Alamat email Anda belum diverifikasi.
<button form="send-verification"
class="underline text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Klik di sini untuk mengirim ulang email verifikasi.
</button>
@if (session('status') === 'verification-link-sent')
<p class="mt-2 font-medium text-green-600">
Tautan verifikasi baru telah dikirimkan ke alamat email Anda.
</p>
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && !$user->hasVerifiedEmail())
<div class="mt-2 text-gray-800">
Alamat email Anda belum diverifikasi.
<button form="send-verification"
class="underline text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Klik di sini untuk mengirim ulang email verifikasi.
</button>
@if (session('status') === 'verification-link-sent')
<p class="mt-2 font-medium text-green-600">
Tautan verifikasi baru telah dikirimkan ke alamat email Anda.
</p>
@endif
</div>
@endif
</div>
@endif
</div>
</div>
<div class="flex items-center space-x-4 mt-2">
@ -75,6 +86,7 @@
</div>
</div>
<!-- Ganti Password-->
<div class="card mb-2">
<div class="card-body">
<header>
@ -88,6 +100,7 @@
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6">
@csrf
@method('put')
<div>
<label for="current_password" class="block font-semibold text-gray-800">
kata sandi saat ini

Loading…
Cancel
Save