Browse Source

update conflict

master
ibnu 1 year ago
parent
commit
d53f33726a
  1. 137
      app/Http/Controllers/M_assetController.php
  2. 45
      app/Http/Controllers/M_userController.php
  3. 7
      app/Http/Controllers/PeminjamanController.php
  4. 34
      app/Http/Controllers/PengembalianController.php
  5. 107
      app/Http/Controllers/WarehouseController.php
  6. 5
      app/Models/asset_status.php
  7. 3
      composer.json
  8. 174
      composer.lock
  9. 11
      database/migrations/2023_09_20_163615_create_m_warehouses_table.php
  10. 15
      database/migrations/2023_09_20_163617_create_users_table.php
  11. 3
      database/migrations/2023_09_20_163618_create_m_assets_table.php
  12. 8
      database/migrations/2023_09_20_163641_create_asset_statuses_table.php
  13. 47
      resources/views/MasterData/asset.blade.php
  14. 61
      resources/views/MasterData/asset/show.blade.php
  15. 0
      resources/views/MasterData/asset_pdf.blade.php
  16. 0
      resources/views/MasterData/pengadaan.blade.php
  17. 0
      resources/views/MasterData/settingPlatform.blade.php
  18. 9
      resources/views/MasterData/update_user.blade.php
  19. 147
      resources/views/MasterData/user.blade.php
  20. 151
      resources/views/MasterData/warehouse.blade.php
  21. 86
      resources/views/addons/SettingPlatform/manajement_user.blade.php
  22. 20
      resources/views/dashboard/index.blade.php
  23. 54
      resources/views/dashboard/peminjaman.blade.php
  24. 82
      resources/views/dashboard/pengembalian.blade.php
  25. 31
      resources/views/dashboard/update_pengembalian.blade.php
  26. 18
      resources/views/layouts/main.blade.php
  27. 5
      resources/views/layouts/sidebar.blade.php
  28. 103
      resources/views/login.blade.php
  29. 26
      routes/web.php

137
app/Http/Controllers/M_assetController.php

@ -2,14 +2,17 @@
namespace App\Http\Controllers;
use App\Exports\AssetExport;
use Dompdf\Dompdf;
use App\Models\m_asset;
use Barryvdh\DomPDF\PDF;
use Dompdf\Dompdf;
use App\Models\m_warehouse;
use App\Exports\AssetExport;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
use Illuminate\Support\Facades\Storage;
// use SimpleSoftwareIO\QrCode\Facades\QrCode;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
class M_assetController extends Controller
{
@ -20,7 +23,7 @@ class M_assetController extends Controller
{
$asset = m_asset::get();
$warehouse = m_warehouse::all();
return view('addons.SettingPlatform.manajement_asset', compact('asset', 'warehouse'));
return view('MasterData.asset', compact('asset', 'warehouse'));
}
/**
@ -36,32 +39,122 @@ class M_assetController extends Controller
*/
// public function store(Request $request)
// {
// $latestAsset = \App\Models\m_asset::latest()->first();
// // Mendapatkan tahun saat ini
// $currentYear = date("Y");
// // Menghitung nomor urut untuk kode barang
// if ($latestAsset == null) {
// // Kode pertama
// $nomorUrut = 1;
// } else {
// // Kode berikutnya
// $lastCode = substr($latestAsset->seri, 7);
// $nomorUrut = intval($lastCode) + 1;
// }
// // Menggabungkan semua komponen kode barang
// $seri = 'AST' . $currentYear . str_pad($nomorUrut, STR_PAD_LEFT);
// // Validasi input
// $request->validate([
// 'name' => 'required',
// 'description' => 'required',
// 'warehouse_id' => 'required',
// 'date' => 'required',
// 'qr_count' => 'required',
// 'qr_count' => '',
// ]);
// // dd($request);
// try {
// $currentUser = Auth::user();
// // Menyiapkan data untuk disimpan
// $validatedData = $request->except('_token');
// $validatedData['seri'] = $seri;
// $validatedData['created_by'] = $currentUser->id; // Menambahkan ID pengguna sebagai created_by
// $validatedData['updated_by'] = $currentUser->id; // Menambahkan ID pengguna sebagai updated_by
// // Menyimpan data ke dalam database
// $newAsset = \App\Models\m_asset::create($validatedData);
// // Membuat QR code dan menyimpannya ke dalam basis data
// $dataForQR = [
// 'seri' => $newAsset->seri,
// 'name' => $newAsset->name,
// // ... tambahkan lebih banyak data sesuai kebutuhan ...
// ];
// $qrCode = QrCode::size(300)->generate(json_encode($dataForQR));
// // Menyimpan QR code ke dalam kolom 'qr_code' di tabel asset (perbaikan)
// $newAsset->update(['qr_count' => $qrCode]);
// return redirect()->back()->with('success', 'Data asset berhasil ditambah.');
// } catch (\Throwable $th) {
// return redirect()->back()->with('error', 'Data asset gagal ditambah.');
// }
// }
// public function store(Request $request)
// {
// $latestAsset = \App\Models\m_asset::latest()->first();
// // Mendapatkan tahun saat ini
// $currentYear = date("Y");
// // Menghitung nomor urut untuk kode barang
// if ($latestAsset == null) {
// // Kode pertama
// $nomorUrut = 1;
// } else {
// // Kode berikutnya
// $lastCode = substr($latestAsset->seri, 7);
// $nomorUrut = intval($lastCode) + 1;
// }
// // Menggabungkan semua komponen kode barang
// $seri = 'AST' . $currentYear . str_pad($nomorUrut, STR_PAD_LEFT);
// // Validasi input
// $request->validate([
// 'name' => 'required',
// 'description' => 'required',
// 'warehouse_id' => 'required',
// 'date' => 'required',
// 'qr_count' => '',
// ]);
// try {
// $currentUser = Auth::user();
// // Menyiapkan data untuk disimpan
// $validatedData = $request->except('_token');
// $validatedData['seri'] = $seri;
// $validatedData['created_by'] = $currentUser->id; // Menambahkan ID pengguna sebagai created_by
// $validatedData['updated_by'] = $currentUser->id; // Menambahkan ID pengguna sebagai updated_by
// dd($validatedData);
// m_asset::create($validatedData);
// return redirect()->back()->with('success', 'Data barang berhasil ditambah.');
// // Menyimpan data ke dalam database
// $newAsset = \App\Models\m_asset::create($validatedData);
// // Generate QR code and save it as an image in the public directory
// $dataForQR = [
// 'seri' => $newAsset->seri,
// 'name' => $newAsset->name,
// // ... tambahkan lebih banyak data sesuai kebutuhan ...
// ];
// $qrCode = QrCode::format('png')->size(300)->generate(json_encode($dataForQR));
// // Menyimpan QR code sebagai gambar di direktori penyimpanan publik
// $qrCodePath = 'qr_codes/' . $seri . '.png';
// Storage::disk('public')->put($qrCodePath, $qrCode);
// // Menyimpan URL gambar QR code ke dalam kolom 'qr_count'
// $newAsset->update(['qr_count' => $qrCodePath]);
// return redirect()->back()->with('success', 'Data asset berhasil ditambah.');
// } catch (\Throwable $th) {
// return redirect()->back()->with('error', 'Data barang gagal ditambah.');
// return redirect()->back()->with('error', 'Data asset gagal ditambah.');
// }
// return redirect()->back()->with('success', 'Data barang berhasil ditambah.');
// }
public function store(Request $request)
{
// dd($request);
// Mendapatkan produk terbaru
$latestAsset = \App\Models\m_asset::latest()->first();
// Mendapatkan tahun saat ini
$currentYear = date("Y-m-d");
@ -82,7 +175,6 @@ class M_assetController extends Controller
'description' => 'required',
'warehouse_id' => 'required',
'date' => 'required',
'qr_count' => 'required',
]);
try {
$currentUser = Auth::user();
@ -107,6 +199,18 @@ class M_assetController extends Controller
public function show($id)
{
// dd('oke');
$asset = m_asset::find($id);
$warehouse = m_warehouse::all();
return view('MasterData.asset.show', compact('asset', 'warehouse'));
}
// Menampilkan data QR
public function QR($id)
{
$asset = m_asset::find($id);
return QrCode::generate(
'Hello, World!',
);
}
/**
@ -165,7 +269,7 @@ class M_assetController extends Controller
// Buat objek Dompdf
$dompdf = new Dompdf();
// Render tampilan ke PDF
$html = view('addons.SettingPlatform.asset_pdf', compact('asset'))->render();
$html = view('MasterData.asset_pdf', compact('asset'))->render();
// Muat HTML ke Dompdf
$dompdf->loadHtml($html);
@ -177,11 +281,14 @@ class M_assetController extends Controller
$dompdf->render();
// Tampilkan PDF di browser
return $dompdf->stream('Laporan Barang');
return $dompdf->stream('Laporan Assets');
}
/**
* Cetak Exel.
*/
public function export()
{
return Excel::download(new AssetExport, 'Assets.xlsx');
return Excel::download(new AssetExport, 'Laporan Assets.xlsx');
}
}

45
app/Http/Controllers/M_userController.php

@ -6,6 +6,7 @@ use App\Models\User;
use App\Models\m_role;
use App\Models\m_warehouse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class M_userController extends Controller
{
@ -15,8 +16,10 @@ class M_userController extends Controller
public function index()
{
// dd('oke');
$warehouse = m_warehouse::get();
$role = m_role::get();
$user = User::get();
return view('addons.SettingPlatform.manajement_user', compact('user'));
return view('MasterData.user', compact('user', 'role', 'warehouse'));
}
/**
@ -32,7 +35,27 @@ class M_userController extends Controller
*/
public function store(Request $request)
{
// dd('oke');
$request->validate([
'username' => 'required',
'fullname' => 'required',
'email' => 'required|email',
'divisi' => 'required',
'role_id' => 'required',
'warehouse_id' => 'required',
'password' => 'required',
]);
try {
$currentUser = Auth::user();
$validatedData = $request->except('_token');
$validatedData['created_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai created_by
$validatedData['updated_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai updated_by
$validatedData['password'] = bcrypt($request->input('password')); // Enkripsi password
user::create($validatedData);
return redirect()->back()->with('success', 'Data User Berhasil Ditambah.');
} catch (\Throwable $th) {
return redirect()->back()->with('error', 'Data User Gagal Ditambah.');
}
}
/**
@ -44,7 +67,7 @@ class M_userController extends Controller
$user = User::find($id);
$role = m_role::get();
$warehouse = m_warehouse::get();
return view('addons.SettingPlatform.update_user', compact('user', 'role', 'warehouse'));
return view('MasterData.update_user', compact('user', 'role', 'warehouse'));
}
/**
@ -67,18 +90,30 @@ class M_userController extends Controller
'no_hp' => 'required',
'divisi' => 'required',
'address' => 'required',
'status' => 'required',
'role_id' => 'required',
'warehouse_id' => 'required',
]);
// dd($request->all());
try {
$user = User::findOrFail($id);
$user->update($request->all());
$userData = $request->all();
// Menambahkan nama pengguna yang melakukan pembaruan
$userData['updated_by'] = Auth::user()->fullname;
$user->update($userData);
return redirect()->route('user.index')->with('success', 'Data User berhasil diperbaharui');
} catch (\Throwable $th) {
return redirect()->back()->with('error', 'Data User gagal diperbaharui');
}
// try {
// $user = User::findOrFail($id);
// $user->update($request->all());
// return redirect()->route('user.index')->with('success', 'Data User berhasil diperbaharui');
// } catch (\Throwable $th) {
// return redirect()->back()->with('error', 'Data User gagal diperbaharui');
// }
}
/**

7
app/Http/Controllers/PeminjamanController.php

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\asset_status;
use App\Models\m_asset;
use App\Models\m_warehouse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@ -16,7 +17,8 @@ class PeminjamanController extends Controller
{
$asset = m_asset::all();
$peminjaman = asset_status::get();
return view('dashboard.peminjaman', compact('asset', 'peminjaman'));
$warehouse = m_warehouse::get();
return view('dashboard.peminjaman', compact('asset', 'peminjaman', 'warehouse'));
}
/**
@ -86,8 +88,7 @@ class PeminjamanController extends Controller
// dd($request);
try {
$peminjaman = asset_status::findOrFail($id);
// dd($peminjaman);
// dd($request->all());
$peminjaman['updated_by'] = Auth::user()->fullname; // Menambahkan ID pengguna sebagai updated_by
$peminjaman->update($request->all());
return redirect()->back()->with('success', 'Data peminjaman berhasil diperbaharui');
} catch (\Throwable $th) {

34
app/Http/Controllers/PengembalianController.php

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\asset_status;
use App\Models\m_asset;
use App\Models\m_warehouse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@ -37,8 +38,9 @@ class PengembalianController extends Controller
*/
public function show($id)
{
$warehouse = m_warehouse::get();
$peminjaman = asset_status::findOrFail($id);
return view('dashboard.update_pengembalian', compact('peminjaman'));
return view('dashboard.update_pengembalian', compact('peminjaman', 'warehouse'));
}
/**
@ -55,20 +57,18 @@ class PengembalianController extends Controller
public function update(Request $request, $id)
{
// dd('oke');
// dd($request->all());
$request->validate([
'asset_id' => 'required',
'exit_at' => 'required',
'exit_pic' => 'required',
'exit_warehouse' => 'required',
'enter_at' => 'required',
'enter_pic' => 'required',
'enter_warehouse' => 'required',
]);
// dd($request);
try {
$peminjaman = asset_status::findOrFail($id);
// dd($peminjaman);
// dd($request->all());
$peminjaman['updated_by'] = Auth::user()->fullname; // Menambahkan ID pengguna sebagai updated_by
$peminjaman->update($request->all());
return redirect()->route('pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
} catch (\Throwable $th) {
@ -76,6 +76,30 @@ class PengembalianController extends Controller
return redirect()->back()->with('error', 'Data peminjaman gagal diperbaharui');
}
}
// public function update(Request $request, $id)
// {
// // dd('oke');
// $request->validate([
// 'asset_id' => 'required',
// 'exit_at' => 'required',
// 'exit_pic' => 'required',
// 'exit_warehouse' => 'required',
// 'enter_at' => 'required',
// 'enter_pic' => 'required',
// 'enter_warehouse' => 'required',
// ]);
// // dd($request);
// try {
// $peminjaman = asset_status::findOrFail($id);
// // dd($peminjaman);
// // dd($request->all());
// $peminjaman->update($request->all());
// return redirect()->route('pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
// } catch (\Throwable $th) {
// // dd($th->getMessage());
// return redirect()->back()->with('error', 'Data peminjaman gagal diperbaharui');
// }
// }
/**
* Remove the specified resource from storage.

107
app/Http/Controllers/WarehouseController.php

@ -0,0 +1,107 @@
<?php
namespace App\Http\Controllers;
use App\Models\m_warehouse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class WarehouseController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$warehouses = m_warehouse::all();
return view('MasterData.warehouse', compact('warehouses'));
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
// dd('oke');
// dd($request);
$request->validate([
'name' => 'required',
'description' => 'required',
'address' => 'required',
]);
try {
$currentUser = Auth::user();
$validatedData = $request->except('_token');
$validatedData['created_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai created_by
$validatedData['updated_by'] = $currentUser->fullname; // Menggunakan nama pengguna sebagai updated_by
m_warehouse::create($validatedData);
return redirect()->back()->with('success', 'Data gudang berhasil ditambah.');
} catch (\Throwable $th) {
return redirect()->back()->with('error', 'Data gudang gagal ditambah.');
}
return redirect()->back()->with('success', 'Data gudang berhasil ditambah.');
}
/**
* Display the specified resource.
*/
public function show($id)
{
// dd('oke');
}
/**
* Show the form for editing the specified resource.
*/
public function edit()
{
// dd('oke');
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
// dd('oke');
$request->validate([
'name' => 'required',
'description' => 'required',
'address' => 'required',
]);
// dd($request);
try {
$warehouse = m_warehouse::findOrFail($id);
$warehouse->update($request->all());
// Menambahkan nama pengguna yang melakukan pembaruan
$userData['updated_by'] = Auth::user()->fullname;
return redirect()->back()->with('success', 'Data Gudang Berhasil Diperbaharui');
} catch (\Throwable $th) {
return redirect()->back()->with('error', 'Data Gudang Gagal Diperbaharui');
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
// dd("oke");
try {
$asset = m_warehouse::findOrFail($id);
$asset->delete();
return redirect()->back()->with('success', 'Data Gudang berhasil dihapus');
} catch (\Throwable $th) {
return redirect()->back()->with('error', 'Data Gudang gagal dihapus');
}
}
}

5
app/Models/asset_status.php

@ -14,4 +14,9 @@ class asset_status extends Model
{
return $this->belongsTo(m_asset::class, 'asset_id');
}
public function warehouse()
{
return $this->belongsTo(m_warehouse::class, 'exit_warehouse');
}
}

3
composer.json

@ -11,7 +11,8 @@
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"maatwebsite/excel": "^3.1"
"maatwebsite/excel": "^3.1",
"simplesoftwareio/simple-qrcode": "^4.2"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",

174
composer.lock generated

@ -4,8 +4,62 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "52a35cd301acc3e94305f4149d559010",
"content-hash": "eebc71566b355489dede69a8f81b8d19",
"packages": [
{
"name": "bacon/bacon-qr-code",
"version": "2.0.8",
"source": {
"type": "git",
"url": "https://github.com/Bacon/BaconQrCode.git",
"reference": "8674e51bb65af933a5ffaf1c308a660387c35c22"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22",
"reference": "8674e51bb65af933a5ffaf1c308a660387c35c22",
"shasum": ""
},
"require": {
"dasprid/enum": "^1.0.3",
"ext-iconv": "*",
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phly/keep-a-changelog": "^2.1",
"phpunit/phpunit": "^7 | ^8 | ^9",
"spatie/phpunit-snapshot-assertions": "^4.2.9",
"squizlabs/php_codesniffer": "^3.4"
},
"suggest": {
"ext-imagick": "to generate QR code images"
},
"type": "library",
"autoload": {
"psr-4": {
"BaconQrCode\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Ben Scholzen 'DASPRiD'",
"email": "mail@dasprids.de",
"homepage": "https://dasprids.de/",
"role": "Developer"
}
],
"description": "BaconQrCode is a QR code generator for PHP.",
"homepage": "https://github.com/Bacon/BaconQrCode",
"support": {
"issues": "https://github.com/Bacon/BaconQrCode/issues",
"source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8"
},
"time": "2022-12-07T17:46:57+00:00"
},
{
"name": "barryvdh/laravel-dompdf",
"version": "v2.0.1",
@ -219,6 +273,56 @@
],
"time": "2023-08-31T09:50:34+00:00"
},
{
"name": "dasprid/enum",
"version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/DASPRiD/Enum.git",
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016",
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016",
"shasum": ""
},
"require": {
"php": ">=7.1 <9.0"
},
"require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9",
"squizlabs/php_codesniffer": "*"
},
"type": "library",
"autoload": {
"psr-4": {
"DASPRiD\\Enum\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Ben Scholzen 'DASPRiD'",
"email": "mail@dasprids.de",
"homepage": "https://dasprids.de/",
"role": "Developer"
}
],
"description": "PHP 7.1 enum implementation",
"keywords": [
"enum",
"map"
],
"support": {
"issues": "https://github.com/DASPRiD/Enum/issues",
"source": "https://github.com/DASPRiD/Enum/tree/1.0.5"
},
"time": "2023-08-25T16:18:39+00:00"
},
{
"name": "dflydev/dot-access-data",
"version": "v3.0.2",
@ -3958,6 +4062,74 @@
},
"time": "2021-12-11T13:40:54+00:00"
},
{
"name": "simplesoftwareio/simple-qrcode",
"version": "4.2.0",
"source": {
"type": "git",
"url": "https://github.com/SimpleSoftwareIO/simple-qrcode.git",
"reference": "916db7948ca6772d54bb617259c768c9cdc8d537"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SimpleSoftwareIO/simple-qrcode/zipball/916db7948ca6772d54bb617259c768c9cdc8d537",
"reference": "916db7948ca6772d54bb617259c768c9cdc8d537",
"shasum": ""
},
"require": {
"bacon/bacon-qr-code": "^2.0",
"ext-gd": "*",
"php": ">=7.2|^8.0"
},
"require-dev": {
"mockery/mockery": "~1",
"phpunit/phpunit": "~9"
},
"suggest": {
"ext-imagick": "Allows the generation of PNG QrCodes.",
"illuminate/support": "Allows for use within Laravel."
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider"
],
"aliases": {
"QrCode": "SimpleSoftwareIO\\QrCode\\Facades\\QrCode"
}
}
},
"autoload": {
"psr-4": {
"SimpleSoftwareIO\\QrCode\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Simple Software LLC",
"email": "support@simplesoftware.io"
}
],
"description": "Simple QrCode is a QR code generator made for Laravel.",
"homepage": "https://www.simplesoftware.io/#/docs/simple-qrcode",
"keywords": [
"Simple",
"generator",
"laravel",
"qrcode",
"wrapper"
],
"support": {
"issues": "https://github.com/SimpleSoftwareIO/simple-qrcode/issues",
"source": "https://github.com/SimpleSoftwareIO/simple-qrcode/tree/4.2.0"
},
"time": "2021-02-08T20:43:55+00:00"
},
{
"name": "symfony/console",
"version": "v6.3.2",

11
database/migrations/2023_09_20_163615_create_m_warehouses_table.php

@ -16,16 +16,17 @@ return new class extends Migration
$table->id();
$table->string('name', 200);
$table->text('description')->nullable();
$table->text('address')->nullable();
$table->timestamps();
$table->softDeletes();
$table->string('created_by', 200)->nullable()->default('System');
$table->string('updated_by', 200)->nullable()->default('System');
$table->string('created_by', 200)->nullable();
$table->string('updated_by', 200)->nullable();
});
DB::table('m_warehouses')->insert([
['name' => 'Gudangsatu', 'description' => 'Gudang Barang'],
['name' => 'Gudangdua', 'description' => 'Gudang Makanan'],
['name' => 'Gudangtiga', 'description' => 'Gudang Pakaian'],
['name' => 'Gudangsatu', 'description' => 'Gudang Barang', 'address' => 'Jln. Raya Kesatu'],
['name' => 'Gudangdua', 'description' => 'Gudang Makanan', 'address' => 'Jln. Raya Kedua'],
['name' => 'Gudangtiga', 'description' => 'Gudang Pakaian', 'address' => 'Jln. Raya Ketiga'],
]);
}

15
database/migrations/2023_09_20_163617_create_users_table.php

@ -16,22 +16,19 @@ return new class extends Migration
$table->id();
$table->string('username', 50);
$table->string('fullname');
$table->string('nip', 20);
$table->string('nip', 20)->nullable();
$table->string('email')->unique();
$table->string('no_hp', 20);
$table->string('no_hp', 20)->nullable();
$table->string('divisi', 255);
$table->date('tgl_lahir')->nullable();
$table->enum('jenis_kelamin', ['L', 'P'])->nullable();
$table->enum('agama', ['Islam', 'Kristen', 'Katolik', 'Hindu', 'Budha', 'Konghucu'])->nullable();
$table->string('foto', 255)->nullable();
// $table->integer('role_id');
$table->bigInteger('role_id')->unsigned();
$table->foreign('role_id')->references('id')->on('m_roles');
// $table->integer('warehouse_id');
$table->bigInteger('warehouse_id')->unsigned();
$table->foreign('warehouse_id')->references('id')->on('m_warehouses');
$table->text('address');
$table->enum('status', ['aktif', 'tidak aktif']);
$table->text('address')->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
@ -42,9 +39,9 @@ return new class extends Migration
});
DB::table('users')->insert([
['username' => 'Gunawan19621', 'fullname' => 'Gunawan', 'nip' => '111111', 'email' => 'gunawan19621@gmail.com', 'no_hp' => '085159079010', 'divisi' => 'admin', 'role_id' => 1, 'warehouse_id' => 1, 'address' => 'Jl. Raya Gelarmendala', 'status' => 'aktif', 'password' => bcrypt('19062001')],
['username' => 'warehouse123', 'fullname' => 'warehouse', 'nip' => '222222', 'email' => 'warehouse@gmail.com', 'no_hp' => '085159079020', 'divisi' => 'admin', 'role_id' => 2, 'warehouse_id' => 2, 'address' => 'Jl. Raya Ciwatu', 'status' => 'aktif', 'password' => bcrypt('warehouse123')],
['username' => 'customer123', 'fullname' => 'customer', 'nip' => '333333', 'email' => 'customer@gmail.com', 'no_hp' => '085159079030', 'divisi' => 'admin', 'role_id' => 3, 'warehouse_id' => 3, 'address' => 'Jl. Raya Balongan', 'status' => 'aktif', 'password' => bcrypt('customer123')]
['username' => 'Gunawan19621', 'fullname' => 'Gunawan', 'nip' => '111111', 'email' => 'gunawan19621@gmail.com', 'no_hp' => '085159079010', 'divisi' => 'admin', 'role_id' => 1, 'warehouse_id' => 1, 'address' => 'Jl. Raya Gelarmendala', 'password' => bcrypt('19062001')],
['username' => 'warehouse123', 'fullname' => 'warehouse', 'nip' => '222222', 'email' => 'warehouse@gmail.com', 'no_hp' => '085159079020', 'divisi' => 'admin', 'role_id' => 2, 'warehouse_id' => 2, 'address' => 'Jl. Raya Ciwatu', 'password' => bcrypt('warehouse123')],
['username' => 'customer123', 'fullname' => 'customer', 'nip' => '333333', 'email' => 'customer@gmail.com', 'no_hp' => '085159079030', 'divisi' => 'admin', 'role_id' => 3, 'warehouse_id' => 3, 'address' => 'Jl. Raya Balongan', 'password' => bcrypt('customer123')]
]);
}

3
database/migrations/2023_09_20_163618_create_m_assets_table.php

@ -19,7 +19,8 @@ return new class extends Migration
$table->bigInteger('warehouse_id')->unsigned();
$table->foreign('warehouse_id')->references('id')->on('m_warehouses');
$table->datetime('date');
$table->integer('qr_count');
// $table->integer('qr_count');
$table->string('qr_count')->nullable();
$table->timestamps();
$table->softDeletes();
$table->string('created_by', 200);

8
database/migrations/2023_09_20_163641_create_asset_statuses_table.php

@ -17,10 +17,14 @@ return new class extends Migration
$table->foreign('asset_id')->references('id')->on('m_assets')->onDelete('cascade');
$table->datetime('exit_at');
$table->string('exit_pic', 200);
$table->string('exit_warehouse', 200);
// $table->string('exit_warehouse', 200);
$table->bigInteger('exit_warehouse')->unsigned()->nullable();
$table->foreign('exit_warehouse')->references('id')->on('m_warehouses')->onDelete('cascade');
$table->datetime('enter_at')->nullable();
$table->string('enter_pic', 200)->nullable();
$table->string('enter_warehouse', 200)->nullable();
// $table->string('enter_warehouse', 200)->nullable();
$table->bigInteger('enter_warehouse')->unsigned()->nullable();
$table->foreign('enter_warehouse')->references('id')->on('m_warehouses')->onDelete('cascade');
$table->timestamps();
$table->softDeletes();
$table->string('created_by', 200);

47
resources/views/addons/SettingPlatform/manajement_asset.blade.php → resources/views/MasterData/asset.blade.php

@ -2,14 +2,6 @@
@section('title', 'Setting Platform')
@section('content')
<div class="container-fluid">
<!-- <h1 class="h3 mb-2 text-gray-800">Tabel Asset</h1>
<div class="mb-4">
<p>Our Item Tables are enhanced with the help of the DataTables plugin. This is a powerful tool that allows you
to explore return data in a more interactive and efficient way</p>
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
</div> -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
@ -17,7 +9,8 @@
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Asset</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
<a href="{{ route('assetcetakpdf.cetakpdf') }}" class="btn btn-success btn-icon-split ml-auto"
@ -31,16 +24,6 @@
</div>
</div>
</div>
{{-- <div class="card-header py-3 d-flex justify-content-between align-items-center">
<h6 class="m-0 font-weight-bold text-primary">DataTables Asset</h6>
<a href="{{ route('assetcetakpdf.cetakpdf') }}" class="btn btn-success btn-icon-split ml-auto"
target="_blank">
<span class="text">CETAK PDF</span>
</a>
<a href="{{ route('assetexport.export') }}" class="btn btn-info btn-icon-split ml-auto" target="_blank">
<span class="text">CETAK Exel</span>
</a>
</div> --}}
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
@ -74,14 +57,19 @@
<td>{{ $data->description }}</td>
<td>{{ $data->warehouse->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->date)->format('d-m-Y') }}</td>
<td>{{ $data->qr_count }}</td>
<td>
{!! QrCode::size(80)->generate(route('asset.show', $data->id)) !!}
</td>
<td class="text-center">
<a href="{{ route('asset.show', $data->id) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>
</a>
<a href="#" data-toggle="modal"
data-target="#printQRModal{{ $data['id'] }}">
<i class="fa fa-qrcode text-warning mr-2" style="font-size: 20px"></i></a>
<a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data['id'] }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i></a>
data-target="#editDataModal{{ $data->id }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('hapusAsset.destroy', $data->id) }}"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
@ -131,10 +119,10 @@
<input class="form-control" name="date" type="date" id="date"
value="{{ old('date') }}" placeholder="Masukan Tanggal Asset" required>
<label for="qr_count" class="col-form-label">QR_Count:</label>
{{-- <label for="qr_count" class="col-form-label">QR_Count:</label>
<input class="form-control" name="qr_count" type="text" id="qr_count"
value="{{ old('qr_count') }}" placeholder="Masukan Kode QR"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required> --}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
@ -171,11 +159,6 @@
<label for="description" class="col-form-label">Deskripsi Asset:</label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Asset" required>{{ $data->description }}</textarea>
<label for="qr_count" class="col-form-label">QR_Count:</label>
<input class="form-control" name="qr_count" type="text" id="qr_count"
value="{{ $data->qr_count }}" placeholder="Masukan Kode QR"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
<label for="date" class="col-form-label">Tanggal:</label>
<input class="form-control" name="date" type="date" id="date"
value="{{ \Carbon\Carbon::parse($data->date)->format('Y-m-d') }}"

61
resources/views/MasterData/asset/show.blade.php

@ -0,0 +1,61 @@
@extends('layouts.main')
@section('title', 'Setting Platform')
@section('content')
<div class="container-fluid">
<div class="card">
<div class="card-body">
<h1 class="h3 mb-1 text-gray-800 mb-3">Detail Asset</h1>
<hr class="border">
<div class="form-group">
<label for="name" class="col-form-label">Nama Asset:</label>
<input class="form-control" name="name" type="text" id="name" value="{{ $asset->name }}"
placeholder="Masukan Nama Asset" required readonly>
<label for="description" class="col-form-label">Deskripsi Asset:</label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Asset" required
readonly>{{ $asset->description }}</textarea>
<label for="qr_count" class="col-form-label">QR:</label>
<div>
{{-- <img src="{{ asset($asset->qr_count) }}" alt="QR Code" /> --}}
{!! QrCode::size(75)->generate(
'Name: ' .
$asset->name .
"\n" .
'Description: ' .
$asset->description .
"\n" .
'QR Code: ' .
$asset->qr_count .
"\n" .
'Date: ' .
$asset->date .
"\n" .
'Warehouse ID: ' .
$asset->warehouse_id,
) !!}
</div>
<label for="date" class="col-form-label">Tanggal:</label>
<input class="form-control" name="date" type="date" id="date"
value="{{ \Carbon\Carbon::parse($asset->date)->format('Y-m-d') }}"
placeholder="Masukan Tanggal Asset" required readonly>
<label for="warehouse_id" class="col-form-label">Gudang:</label>
<select class="form-control" name="warehouse_id" id="warehouse_id" disabled>
<option disabled selected>Pilih Asal Gudang</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $asset->warehouse_id) selected
@else @endif>
{{ $data_warehouse->name }}</option>
@endforeach
</select>
</div>
<a href="{{ route('asset.index') }}" class="btn btn-primary ">Kembali</a>
</div>
</div>
</div>
@endsection

0
resources/views/addons/SettingPlatform/asset_pdf.blade.php → resources/views/MasterData/asset_pdf.blade.php

0
resources/views/addons/pengadaan.blade.php → resources/views/MasterData/pengadaan.blade.php

0
resources/views/addons/settingPlatform.blade.php → resources/views/MasterData/settingPlatform.blade.php

9
resources/views/addons/SettingPlatform/update_user.blade.php → resources/views/MasterData/update_user.blade.php

@ -37,15 +37,6 @@
<label for="address" class="col-form-label">Alamat:</label>
<textarea class="form-control" name="address" id="address" placeholder="Masukan detail alamat anda" required>{{ $user->address }}</textarea>
<label for="status" class="col-form-label">Status:</label>
<select class="form-control" name="status" type="text" id="status">
<option disabled selected>Pilih Status</option>
<option value="aktif" {{ old('status', $user->status) == 'aktif' ? 'selected' : '' }}>Aktif
</option>
<option value="tidak aktif" {{ old('status', $user->status) == 'tidak aktif' ? 'selected' : '' }}>
Tidak Aktif
</option>
</select>
<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>

147
resources/views/MasterData/user.blade.php

@ -0,0 +1,147 @@
@extends('layouts.main')
@section('title', 'Manajemen User')
@section('content')
{{-- <h1>Halaman Manajement User</h1> --}}
<div class="container-fluid">
<!-- <h1 class="h3 mb-2 text-gray-800">Tabel User</h1>
<div class="mb-4">
<p>Our User Tables are enhanced with the help of the DataTables plugin. This is a powerful tool that allows you
to explore return data in a more interactive and efficient way</p>
{{-- <a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">+ Tambah data</span> --}}
</a>
</div> -->
<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">Data User</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</tfoot>
<tbody>
@php
$noUser = 1;
@endphp
@forelse ($user as $data)
<tr>
<td class="text-center">{{ $noUser++ }}</td>
<td>{{ $data->fullname }}</td>
<td>{{ $data->email }}</td>
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td>
<td>{{ isset($data->address) ? $data->address : '-' }}</td>
<td>{{ $data->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('user.show', [$data->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('hapusUser.destroy', $data->id) }}"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Modal Tambah Asset-->
<div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Tambah Data</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('user.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="username" class="col-form-label">Username:</label>
<input class="form-control" name="username" type="text" id="username"
value="{{ old('username') }}" placeholder="Masukan Username user" required>
<label for="fullname" class="col-form-label">Nama Lengkap:</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>
<label for="email" class="col-form-label">Email:</label>
<input class="form-control" name="email" type="email" id="email"
value="{{ old('email') }}" placeholder="Masukan email user" required>
<label for="divisi" class="col-form-label">Divisi:</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>
<label for="role_id" class="col-form-label">Hak Akses:</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)
<option value="{{ $dt_role->id }}">{{ $dt_role->name }}</option>
@endforeach
</select>
<label for="warehouse_id" class="col-form-label">Ditugaskan:</label>
<select class="form-control" name="warehouse_id" id="warehouse_id" required>
<option disabled selected>Pilih Hak Akses User</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>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection

151
resources/views/MasterData/warehouse.blade.php

@ -0,0 +1,151 @@
@extends('layouts.main')
@section('title', 'Update Data User')
@section('content')
<div class="container-fluid">
<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">Data Asset</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
{{-- <a href="{{ route('assetcetakpdf.cetakpdf') }}" class="btn btn-success btn-icon-split ml-auto"
target="_blank">
<span class="text">Cetak PDF</span>
</a>
<a href="{{ route('assetexport.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank">
<span class="text">Cetak Exel</span> --}}
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center" style="width: 50px;">No.</th>
<th>Nama</th>
<th>Deskripsi</th>
<th>Alamat</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th class="text-center" style="width: 50px;">No.</th>
<th>Nama</th>
<th>Deskripsi</th>
<th>Alamat</th>
<th class="text-center">Action</th>
</tr>
</tfoot>
<tbody>
@php
$nowarehouses = 1;
@endphp
@foreach ($warehouses as $data)
<tr>
<td class="text-center" style="width: 50px;">{{ $nowarehouses++ }}</td>
<td>{{ $data->name }}</td>
<td>{{ $data->description }}</td>
<td>{{ $data->address }}</td>
<td class="text-center">
<a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data['id'] }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('hapuswarehouse.destroy', $data->id) }}"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Modal Tambah-->
<div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Tambah Data</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('warehouse.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="name" class="col-form-label">Nama:</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>
<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>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan Alamat Gudang" required>{{ old('address') }}</textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Edit Data-->
@foreach ($warehouses as $data)
<div class="modal fade" id="editDataModal{{ $data['id'] }}" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Edit Data Asset</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('warehouse.update', $data->id) }}" method="POST"
enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="form-group">
<label for="name" class="col-form-label">Nama:</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>
<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>
<textarea class="form-control" name="address" id="address" placeholder="Masukkan Alamat Gudang" required>{{ $data->address }}</textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endforeach
@endsection

86
resources/views/addons/SettingPlatform/manajement_user.blade.php

@ -1,86 +0,0 @@
@extends('layouts.main')
@section('title', 'Manajemen User')
@section('content')
{{-- <h1>Halaman Manajement User</h1> --}}
<div class="container-fluid">
<!-- <h1 class="h3 mb-2 text-gray-800">Tabel User</h1>
<div class="mb-4">
<p>Our User Tables are enhanced with the help of the DataTables plugin. This is a powerful tool that allows you
to explore return data in a more interactive and efficient way</p>
{{-- <a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">+ Tambah data</span> --}}
</a>
</div> -->
<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">Data User</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</tfoot>
<tbody>
@php
$noUser = 1;
@endphp
@forelse ($user as $data)
<tr>
<td>{{ $noUser++ }}</td>
<td>{{ $data->fullname }}</td>
<td>{{ $data->email }}</td>
<td>{{ $data->no_hp }}</td>
<td>{{ $data->address }}</td>
<td>{{ $data->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('user.show', [$data->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
{{-- <a href="{{ route('hapusUser.destroy', $data->id) }}">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
</a> --}}
<a href="{{ route('hapusUser.destroy', $data->id) }}"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

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

@ -1,6 +1,7 @@
@extends('layouts.main')
@section('title', 'Dashboard')
@section('content')
<div class="container-fluid">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1>
<a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
@ -12,10 +13,12 @@
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1" style="font-size: 14px;">
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1"
style="font-size: 14px;">
<strong>Pengadaan</strong>
</div>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">{{ $jumlahAsset }}
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">
{{ $jumlahAsset }}
</div>
</div>
<div class="col-auto">
@ -32,7 +35,8 @@
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-success text-uppercase mb-1" style="font-size: 14px;">
<div class="text-xs font-weight-bold text-success text-uppercase mb-1"
style="font-size: 14px;">
<strong>Peminjaman</strong>
</div>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">
@ -52,7 +56,8 @@
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1" style="font-size: 14px;">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1"
style="font-size: 14px;">
<strong>Pengembalian</strong>
</div>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">
@ -72,10 +77,12 @@
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1" style="font-size: 13px;">
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1"
style="font-size: 13px;">
<strong>Reminder Pengembalian</strong>
</div>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">28</div>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">
{{ $reminder }}</div>
</div>
<div class="col-auto">
<i class="fas fa-calendar fa-2x text-gray-300"></i>
@ -156,4 +163,5 @@
</div>
</div>
</div>
</div>
@endsection

54
resources/views/dashboard/peminjaman.blade.php

@ -5,16 +5,34 @@
<!-- <h1 class="h3 mb-2 text-gray-800">Tabel Peminjaman</h1> -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Data Peminjaman</h6>
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peminjaman</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">+ Tambah data</span>
</a>
{{-- <a href="{{ route('assetcetakpdf.cetakpdf') }}" class="btn btn-success btn-icon-split ml-auto"
target="_blank">
<span class="text">Cetak PDF</span>
</a>
<a href="{{ route('assetexport.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank">
<span class="text">Cetak Exel</span> --}}
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th class="text-center">No</th>
<th>Nama Asset</th>
<th>Tgl Keluar</th>
<th>Tgl Peminjaman</th>
<th>PJ Keluar</th>
<th>Asal Gudang</th>
<th class="text-center">Action</th>
@ -22,9 +40,9 @@
</thead>
<tfoot>
<tr>
<th>No</th>
<th class="text-center">No</th>
<th>Nama Asset</th>
<th>Tgl Keluar</th>
<th>Tgl Peminjaman</th>
<th>PJ Keluar</th>
<th>Asal Gudang</th>
<th class="text-center">Action</th>
@ -36,11 +54,11 @@
@endphp
@foreach ($peminjaman as $data)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<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->exit_warehouse }}</td>
<td>{{ $data->warehouse->name }}</td>
<td class="text-center">
<a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data['id'] }}">
@ -93,9 +111,15 @@
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
<select class="form-control" name="exit_warehouse" type="text" id="exit_warehouse">
<option disabled selected>Pilih Asal Gudang</option>
@foreach ($warehouse as $data)
<option value="{{ $data->id }}">{{ $data->name }}</option>
@endforeach
</select>
{{-- <input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ old('exit_warehouse') }}" placeholder="Masukan Asal gudang keluarnya asset"
required>
required> --}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
@ -134,7 +158,6 @@
@else @endif>
{{ $data_asset->name }}</option>
@endforeach
{{-- <option value="{{ $data->asset_id }}" selected>{{ $data->asset->name }}</option> --}}
</select>
<label for="exit_at" class="col-form-label">Tanggal:</label>
<input class="form-control" name="exit_at" type="date" id="exit_at"
@ -147,8 +170,15 @@
oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ $data->exit_warehouse }}" placeholder="Masukan Nama PJ Keluar" required>
<select class="form-control" name="exit_warehouse" type="text" id="exit_warehouse">
<option disabled selected>Pilih Nama Asset</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $data->id) selected
@else @endif>
{{ $data_warehouse->name }}</option>
@endforeach
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>

82
resources/views/dashboard/pengembalian.blade.php

@ -5,7 +5,7 @@
<!-- <h1 class="h3 mb-2 text-gray-800">Tabel Pengembalian</h1> -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Data Asset</h6>
<h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6>
</div>
<div class="card-body">
<div class="table-responsive">
@ -14,11 +14,11 @@
<tr>
<th>No</th>
<th>Nama Asset</th>
<th>Tgl Keluar</th>
<th>PJ Keluar</th>
<th>Tgl Peinjaman</th>
<th>PJ Peinjaman</th>
<th>Asal Gudang</th>
<th>Tgl Masuk</th>
<th>PJ Masuk</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan Gudang</th>
<th>Status</th>
<th class="text-center">Action</th>
@ -28,11 +28,11 @@
<tr>
<th>No</th>
<th>Nama Asset</th>
<th>Tgl Keluar</th>
<th>PJ Keluar</th>
<th>Tgl Peinjaman</th>
<th>PJ Peinjaman</th>
<th>Asal Gudang</th>
<th>Tgl Masuk</th>
<th>PJ Masuk</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan Gudang</th>
<th>Status</th>
<th class="text-center">Action</th>
@ -48,7 +48,7 @@
<td>{{ $data->asset->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d-m-Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>{{ $data->exit_warehouse }}</td>
<td>{{ $data->warehouse->name }}</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@ -65,7 +65,7 @@
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->enter_warehouse }}
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
@ -91,64 +91,4 @@
</div>
</div>
<!-- /.container-fluid -->
<!-- Modal Edit Asset-->
{{-- @foreach ($peminjaman as $data)
<div class="modal fade" id="editDataModal{{ $data['id'] }}" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update Tanggal Pengembalian</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('pengembalian.update', $data->id) }}" method="POST"
enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="form-group">
<label for="asset_id" class="col-form-label">Nama Asset:</label>
<input class="form-control" name="asset_id" type="text" id="asset_id"
value="{{ $data->asset->name }}" readonly required>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label>
<input class="form-control" name="exit_at" type="date" id="exit_at"
value="{{ \Carbon\Carbon::parse($data->exit_at)->format('Y-m-d') }}"
placeholder="Masukan Tanggal Keluar" readonly required>
<label for="exit_pic" class="col-form-label">PJ Keluar:</label>
<input class="form-control" name="exit_pic" type="text" id="exit_pic"
value="{{ $data->exit_pic }}" placeholder="Masukan Nama PJ Keluar" readonly required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ $data->exit_warehouse }}" placeholder="Masukan Nama PJ Keluar" readonly
required>
<label for="enter_at" class="col-form-label">Tanggal Pengembalian:</label>
<input class="form-control" name="enter_at" type="date" id="enter_at"
value="{{ old('enter_at') }}" placeholder="Masukan Tanggal Pengembalian" required>
<label for="enter_pic" class="col-form-label">PJ Pengembalian:</label>
<input class="form-control" name="enter_pic" type="text" id="enter_pic"
value="{{ old('enter_pic') }}" placeholder="Masukan Nama PJ Pengembalian" required>
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian GUdang:</label>
<input class="form-control" name="enter_warehouse" type="text" id="enter_warehouse"
value="{{ old('enter_warehouse') }}" placeholder="Masukan tujuan pengembalian"
required>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endforeach --}}
@endsection

31
resources/views/dashboard/update_pengembalian.blade.php

@ -27,13 +27,22 @@
value="{{ $peminjaman->exit_pic }}" placeholder="Masukan Nama PJ Keluar" readonly required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ $peminjaman->exit_warehouse }}" placeholder="Masukan Nama PJ Keluar" readonly required>
{{-- <select class="form-control" name="enter_warehouse" id="enter_warehouse" required>
<option disabled selected>Pilih Nama Asset</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
{{ $data_warehouse->id == $peminjaman->enter_warehouse ? 'selected' : '' }}>
{{ $data_warehouse->name }}
</option>
@endforeach
</select> --}}
<input type="hidden" name="exit_warehouse" id="exit_warehouse"
value="{{ $peminjaman->exit_warehouse }}">
<input class="form-control" type="text" value="{{ $peminjaman->warehouse->name }}" readonly required>
{{-- <input class="form-control" name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ $peminjaman->warehouse->id }}" placeholder="Masukan Nama PJ Keluar" readonly required> --}}
<label for="enter_at" class="col-form-label">Tanggal Pengembalian:</label>
{{-- <input class="form-control" name="enter_at" type="date" id="enter_at"
value="{{ old('enter_at', $peminjaman->enter_at) }}" placeholder="Masukan Tanggal Pengembalian"
required> --}}
<input class="form-control" name="enter_at" type="date" id="enter_at"
value="{{ \Carbon\Carbon::parse($peminjaman->enter_at)->format('Y-m-d') }}"
placeholder="Masukan Tanggal Asset" required>
@ -44,9 +53,15 @@
pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang:</label>
<input class="form-control" name="enter_warehouse" type="text" id="enter_warehouse"
value="{{ old('enter_warehouse', $peminjaman->enter_warehouse) }}"
placeholder="Masukan tujuan pengembalian" required>
<select class="form-control" name="enter_warehouse" type="text" id="enter_warehouse">
<option disabled selected>Pilih Nama Asset</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $peminjaman->enter_warehouse) selected
@else @endif>
{{ $data_warehouse->name }}</option>
@endforeach
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"

18
resources/views/layouts/main.blade.php

@ -28,9 +28,9 @@
@include('layouts.navbar')
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- <div class="container-fluid"> -->
<!-- allert update data foto -->
{{-- @if (session()->has('success'))
@if (session()->has('success'))
<div id="success-alert" class="alert alert-success floating-alert">
{{ session()->get('success') }}
</div>
@ -38,20 +38,8 @@
<div id="error-alert" class="alert alert-danger floating-alert">
X {{ session()->get('error') }}
</div>
@endif --}}
@if (session()->has('success'))
<div id="success-alert" class="alert alert-success">
{{ session()->get('success') }}
</div>
@elseif(session()->has('error'))
<div id="success-alert" class="alert alert-danger">
X {{ session()->get('error') }}
</div>
@endif
<!-- allert update data foto -->
@yield('content')
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
@ -60,7 +48,7 @@
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Your Website 2021</span>
<span>Copyright &copy; SIOPAS</span>
</div>
</div>
</footer>

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

@ -68,4 +68,9 @@
<span class="ml-4">User</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ route('warehouse.index') }}">
<span class="ml-4">Warehouse</span>
</a>
</li>
</ul>

103
resources/views/login.blade.php

@ -1,103 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Login SIOPAS</title>
<!-- Custom fonts for this template-->
<link href="{{ asset('assets/vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="{{ asset('assets/css/sb-admin-2.min.css') }}" rel="stylesheet">
</head>
<body class="bg-gradient-primary">
<div class="container">
<!-- Outer Row -->
<div class="row justify-content-center">
<div class="col-xl-10 col-lg-12 col-md-9">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg-6 d-none d-lg-block bg-login-image"></div>
<div class="col-lg-6">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Welcome Back!</h1>
</div>
<form class="user">
<div class="form-group">
<input type="email" class="form-control form-control-user"
id="exampleInputEmail" aria-describedby="emailHelp"
placeholder="Enter Email Address...">
</div>
<div class="form-group">
<input type="password" class="form-control form-control-user"
id="exampleInputPassword" placeholder="Password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="customCheck">
<label class="custom-control-label" for="customCheck">Remember
Me</label>
</div>
</div>
<a href="{{ url('/') }}" class="btn btn-primary btn-user btn-block">
Login
</a>
<hr>
<a href="#" class="btn btn-google btn-user btn-block">
<i class="fab fa-google fa-fw"></i> Login with Google
</a>
<a href="#" class="btn btn-facebook btn-user btn-block">
<i class="fab fa-facebook-f fa-fw"></i> Login with Facebook
</a>
</form>
<hr>
<div class="text-center">
<a class="small" href="{{ url('/forgot_password') }}">Forgot Password?</a>
</div>
<div class="text-center">
<a class="small" href="{{ url('/register') }}">Create an Account!</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="{{ asset('assets/vendor/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('assets/vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<!-- Core plugin JavaScript-->
<script src="{{ asset('assets/vendor/jquery-easing/jquery.easing.min.js') }}"></script>
<!-- Custom scripts for all pages-->
<script src="{{ asset('assets/js/sb-admin-2.min.js') }}"></script>
</body>
</html>

26
routes/web.php

@ -7,8 +7,10 @@ use App\Http\Controllers\M_userController;
use App\Http\Controllers\M_assetController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\ProfileController;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
use App\Http\Controllers\PengadaanController;
use App\Http\Controllers\TransaksiController;
use App\Http\Controllers\WarehouseController;
use App\Http\Controllers\PeminjamanController;
use App\Http\Controllers\BarangMasukController;
use App\Http\Controllers\BarangKeluarController;
@ -27,8 +29,6 @@ use App\Http\Controllers\SettingPlatformController;
*/
Route::get('/', function () {
// return view('welcome');
// return view('landing_page.layouts.main');
return view('auth.login');
});
@ -44,15 +44,16 @@ Route::middleware('auth')->group(function () {
Route::group(['prefix' => 'dashboard'], function () {
//Halaman dashboard
Route::middleware('auth')->get('', function () {
$reminder = asset_status::whereNull('enter_at')->count();
$jumlahAsset = m_asset::count();
$jumlahPeminjaman = asset_status::count();
// $jumlahPengembalian = asset_status::count();
$jumlahPengembalian = asset_status::whereNotNull('enter_at')->count();
return view('dashboard.index', compact('jumlahAsset', 'jumlahPeminjaman', 'jumlahPengembalian'));
return view('dashboard.index', compact('jumlahAsset', 'jumlahPeminjaman', 'jumlahPengembalian', 'reminder'));
});
//Halaman Transaksi
Route::middleware('auth')->resource('/transaksi', TransaksiController::class);
// Route::middleware('auth')->resource('/transaksi', TransaksiController::class);
//Halaman Peminjaman
Route::middleware('auth')->resource('/peminjaman', PeminjamanController::class);
@ -69,17 +70,28 @@ Route::group(['prefix' => 'dashboard'], function () {
Route::get('/hapusAsset/{id}', [M_assetController::class, 'destroy'])->name('hapusAsset.destroy');
Route::get('/assetcetak_pdf', [M_assetController::class, 'cetakpdf'])->name('assetcetakpdf.cetakpdf');
Route::get('/assetexport', [M_assetController::class, 'export'])->name('assetexport.export');
// Route::get('/assetQR{id}', [M_assetController::class, 'QR'])->name('assetQR.QR');
// Route::get('assetQR{id}', function () {
// $path = public_path('qrcode/' . time() . '.png');
// return QrCode::size(300)
// ->generate('A simple example of QR code', $path);
// })->name('assetQR.QR');
//Halaman Manajemen User
Route::middleware('auth')->resource('/user', M_userController::class);
Route::get('/hapusUser/{id}', [M_userController::class, 'destroy'])->name('hapusUser.destroy');
//Halaman Warehouse
Route::middleware('auth')->resource('/warehouse', WarehouseController::class);
Route::get('/hapuswarehouse/{id}', [WarehouseController::class, 'destroy'])->name('hapuswarehouse.destroy');
//Halaman Barang Masuk
Route::middleware('auth')->resource('/barangMasuk', BarangMasukController::class);
// Route::middleware('auth')->resource('/barangMasuk', BarangMasukController::class);
//Halaman Barang Keluar
Route::middleware('auth')->resource('/barangKeluar', BarangKeluarController::class);
Route::get('/hapusBarangK/{id}', [BarangKeluarController::class, 'destroy'])->name('hapusBarangK.destroy');
// Route::middleware('auth')->resource('/barangKeluar', BarangKeluarController::class);
// Route::get('/hapusBarangK/{id}', [BarangKeluarController::class, 'destroy'])->name('hapusBarangK.destroy');
});
require __DIR__ . '/auth.php';

Loading…
Cancel
Save