Browse Source

remove library JWT

master
Gunawan19621 11 months ago
parent
commit
549f8b9a36
  1. 44
      app/Http/Controllers/PengembalianController.php
  2. 10
      app/Models/asset_status.php
  3. 3
      composer.json
  4. 305
      composer.lock
  5. 83
      resources/views/dashboard/Pengembalian/edit.blade.php
  6. 2
      resources/views/dashboard/Pengembalian/index.blade.php

44
app/Http/Controllers/PengembalianController.php

@ -63,18 +63,32 @@ class PengembalianController extends Controller
public function update(Request $request, $id)
{
$request->validate([
'asset_id' => 'required',
'peti_id' => 'required',
'exit_at' => 'required',
'exit_pic' => 'required',
'est_pengembalian' => 'required',
'exit_warehouse' => 'required',
'enter_at' => 'required',
'enter_pic' => 'required',
'enter_warehouse' => 'required',
'kondisi_peti' => 'required',
]);
try {
$peminjaman = asset_status::findOrFail($id);
$peminjaman['updated_by'] = Auth::user()->fullname; // Menambahkan ID pengguna sebagai updated_by
$peminjaman->update($request->all());
// Update atribut-atribut yang diperlukan
$peminjaman->enter_pic = Auth::user()->id;
$peminjaman->updated_by = Auth::user()->id;
$peminjaman->peti_id = $request->input('peti_id');
$peminjaman->exit_at = $request->input('exit_at');
$peminjaman->est_pengembalian = $request->input('est_pengembalian');
$peminjaman->exit_warehouse = $request->input('exit_warehouse');
$peminjaman->enter_at = $request->input('enter_at');
$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');
} catch (\Throwable $th) {
@ -85,21 +99,29 @@ class PengembalianController extends Controller
// public function update(Request $request, $id)
// {
// // dd($request->all());
// $request->validate([
// 'asset_id' => 'required',
// 'peti_id' => 'required',
// 'exit_at' => 'required',
// 'exit_pic' => 'required',
// 'est_pengembalian' => 'required',
// 'exit_warehouse' => 'required',
// 'enter_at' => 'required',
// 'enter_pic' => 'required',
// 'enter_warehouse' => 'required',
// 'kondisi_peti' => 'required',
// ]);
// // dd($request);
// try {
// $peminjaman = asset_status::findOrFail($id);
// $peminjaman['updated_by'] = Auth::user()->fullname; // Menambahkan ID pengguna sebagai updated_by
// $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('pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
// return redirect()->route('dashboard.pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
// } catch (\Throwable $th) {
// return redirect()->back()->with('error', 'Data peminjaman gagal diperbaharui');
// // Tampilkan pesan kesalahan untuk debugging
// return redirect()->back()->with('error', 'Data peminjaman gagal diperbaharui: ' . $th->getMessage());
// }
// }

10
app/Models/asset_status.php

@ -14,12 +14,12 @@ class asset_status extends Model
'peti_id', //sudah
'exit_at', //sudah
'est_pengembalian', //sudah
'exit_pic', //sudah
'exit_pic', // di controler
'exit_warehouse', //sudah
'enter_at',
'enter_pic',
'enter_warehouse',
'kondisi_peti',
'enter_at', // //sudah
'enter_pic', // //sudah
'enter_warehouse', // //sudah
'kondisi_peti', // //sudah
'created_by',
'updated_by',
];

3
composer.json

@ -14,8 +14,7 @@
"laravel/tinker": "^2.8",
"maatwebsite/excel": "^3.1",
"php-open-source-saver/jwt-auth": "^2.1",
"simplesoftwareio/simple-qrcode": "^4.2",
"tymon/jwt-auth": "^2.0"
"simplesoftwareio/simple-qrcode": "^4.2"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",

305
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "77a43e24a271e47f5d39a109b78e09c6",
"content-hash": "37f98cab1d340231d5d4d9764bef781d",
"packages": [
{
"name": "bacon/bacon-qr-code",
@ -1811,34 +1811,34 @@
},
{
"name": "lcobucci/clock",
"version": "3.1.0",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/clock.git",
"reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc"
"reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/30a854ceb22bd87d83a7a4563b3f6312453945fc",
"reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876",
"reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876",
"shasum": ""
},
"require": {
"php": "~8.2.0",
"psr/clock": "^1.0"
"php": "~8.1.0 || ~8.2.0",
"stella-maris/clock": "^0.1.7"
},
"provide": {
"psr/clock-implementation": "1.0"
},
"require-dev": {
"infection/infection": "^0.26",
"lcobucci/coding-standard": "^10.0.0",
"lcobucci/coding-standard": "^9.0",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.10.7",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.10",
"phpstan/phpstan-strict-rules": "^1.5.0",
"phpunit/phpunit": "^10.0.17"
"phpstan/phpstan": "^1.9.4",
"phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.2",
"phpstan/phpstan-strict-rules": "^1.4.4",
"phpunit/phpunit": "^9.5.27"
},
"type": "library",
"autoload": {
@ -1859,7 +1859,7 @@
"description": "Yet another clock abstraction",
"support": {
"issues": "https://github.com/lcobucci/clock/issues",
"source": "https://github.com/lcobucci/clock/tree/3.1.0"
"source": "https://github.com/lcobucci/clock/tree/2.3.0"
},
"funding": [
{
@ -1871,45 +1871,47 @@
"type": "patreon"
}
],
"time": "2023-03-20T19:12:25+00:00"
"time": "2022-12-19T14:38:11+00:00"
},
{
"name": "lcobucci/jwt",
"version": "4.3.0",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/jwt.git",
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4"
"reference": "55564265fddf810504110bd68ca311932324b0e9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9",
"reference": "55564265fddf810504110bd68ca311932324b0e9",
"shasum": ""
},
"require": {
"ext-hash": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-sodium": "*",
"lcobucci/clock": "^2.0 || ^3.0",
"lcobucci/clock": "^2.0",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"infection/infection": "^0.21",
"infection/infection": "^0.20",
"lcobucci/coding-standard": "^6.0",
"mikey179/vfsstream": "^1.6.7",
"phpbench/phpbench": "^1.2",
"mikey179/vfsstream": "^1.6",
"phpbench/phpbench": "^0.17",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/php-invoker": "^3.1",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"psr-4": {
"Lcobucci\\JWT\\": "src"
@ -1933,7 +1935,7 @@
],
"support": {
"issues": "https://github.com/lcobucci/jwt/issues",
"source": "https://github.com/lcobucci/jwt/tree/4.3.0"
"source": "https://github.com/lcobucci/jwt/tree/4.0.4"
},
"funding": [
{
@ -1945,7 +1947,7 @@
"type": "patreon"
}
],
"time": "2023-01-02T13:28:00+00:00"
"time": "2021-09-28T19:18:28+00:00"
},
{
"name": "league/commonmark",
@ -2343,16 +2345,16 @@
},
{
"name": "maatwebsite/excel",
"version": "3.1.48",
"version": "3.1.49",
"source": {
"type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
"reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9"
"reference": "769209f49ebe3419017114f98bd61e2a7d9af259"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d0fe2a1d195960c7af7bf0de760582da02a34b9",
"reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/769209f49ebe3419017114f98bd61e2a7d9af259",
"reference": "769209f49ebe3419017114f98bd61e2a7d9af259",
"shasum": ""
},
"require": {
@ -2407,7 +2409,7 @@
],
"support": {
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.48"
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.49"
},
"funding": [
{
@ -2419,7 +2421,7 @@
"type": "github"
}
],
"time": "2023-02-22T21:01:38+00:00"
"time": "2023-10-26T09:01:33+00:00"
},
{
"name": "maennchen/zipstream-php",
@ -2678,16 +2680,16 @@
},
{
"name": "monolog/monolog",
"version": "3.4.0",
"version": "3.5.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "e2392369686d420ca32df3803de28b5d6f76867d"
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d",
"reference": "e2392369686d420ca32df3803de28b5d6f76867d",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"shasum": ""
},
"require": {
@ -2763,7 +2765,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/3.4.0"
"source": "https://github.com/Seldaek/monolog/tree/3.5.0"
},
"funding": [
{
@ -2775,7 +2777,7 @@
"type": "tidelift"
}
],
"time": "2023-06-21T08:46:11+00:00"
"time": "2023-10-27T15:32:31+00:00"
},
{
"name": "namshi/jose",
@ -3014,16 +3016,16 @@
},
{
"name": "nette/utils",
"version": "v4.0.2",
"version": "v4.0.3",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "cead6637226456b35e1175cc53797dd585d85545"
"reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545",
"reference": "cead6637226456b35e1175cc53797dd585d85545",
"url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015",
"reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015",
"shasum": ""
},
"require": {
@ -3094,9 +3096,9 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.0.2"
"source": "https://github.com/nette/utils/tree/v4.0.3"
},
"time": "2023-09-19T11:58:07+00:00"
"time": "2023-10-29T21:02:13+00:00"
},
{
"name": "nikic/php-parser",
@ -4442,6 +4444,53 @@
},
"time": "2021-02-08T20:43:55+00:00"
},
{
"name": "stella-maris/clock",
"version": "0.1.7",
"source": {
"type": "git",
"url": "https://github.com/stella-maris-solutions/clock.git",
"reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8",
"reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8",
"shasum": ""
},
"require": {
"php": "^7.0|^8.0",
"psr/clock": "^1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"StellaMaris\\Clock\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Andreas Heigl",
"role": "Maintainer"
}
],
"description": "A pre-release of the proposed PSR-20 Clock-Interface",
"homepage": "https://gitlab.com/stella-maris/clock",
"keywords": [
"clock",
"datetime",
"point in time",
"psr20"
],
"support": {
"source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7"
},
"time": "2022-11-25T16:15:06+00:00"
},
{
"name": "symfony/console",
"version": "v6.3.4",
@ -4960,16 +5009,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.3.6",
"version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "c186627f52febe09c6d5270b04f8462687a250a6"
"reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/c186627f52febe09c6d5270b04f8462687a250a6",
"reference": "c186627f52febe09c6d5270b04f8462687a250a6",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/59d1837d5d992d16c2628cd0d6b76acf8d69b33e",
"reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e",
"shasum": ""
},
"require": {
@ -5017,7 +5066,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.3.6"
"source": "https://github.com/symfony/http-foundation/tree/v6.3.7"
},
"funding": [
{
@ -5033,20 +5082,20 @@
"type": "tidelift"
}
],
"time": "2023-10-17T11:32:53+00:00"
"time": "2023-10-28T23:55:27+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.3.6",
"version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "4945f5001b06ff9080cd3d8f1f9f069094c0d156"
"reference": "6d4098095f93279d9536a0e9124439560cc764d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/4945f5001b06ff9080cd3d8f1f9f069094c0d156",
"reference": "4945f5001b06ff9080cd3d8f1f9f069094c0d156",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6d4098095f93279d9536a0e9124439560cc764d0",
"reference": "6d4098095f93279d9536a0e9124439560cc764d0",
"shasum": ""
},
"require": {
@ -5130,7 +5179,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.3.6"
"source": "https://github.com/symfony/http-kernel/tree/v6.3.7"
},
"funding": [
{
@ -5146,7 +5195,7 @@
"type": "tidelift"
}
],
"time": "2023-10-21T13:12:51+00:00"
"time": "2023-10-29T14:31:45+00:00"
},
{
"name": "symfony/mailer",
@ -6432,16 +6481,16 @@
},
{
"name": "symfony/translation",
"version": "v6.3.6",
"version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "869b26c7a9d4b8a48afdd77ab36031909c87e3a2"
"reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/869b26c7a9d4b8a48afdd77ab36031909c87e3a2",
"reference": "869b26c7a9d4b8a48afdd77ab36031909c87e3a2",
"url": "https://api.github.com/repos/symfony/translation/zipball/30212e7c87dcb79c83f6362b00bde0e0b1213499",
"reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499",
"shasum": ""
},
"require": {
@ -6507,7 +6556,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v6.3.6"
"source": "https://github.com/symfony/translation/tree/v6.3.7"
},
"funding": [
{
@ -6523,7 +6572,7 @@
"type": "tidelift"
}
],
"time": "2023-10-17T11:32:53+00:00"
"time": "2023-10-28T23:11:45+00:00"
},
{
"name": "symfony/translation-contracts",
@ -6814,90 +6863,6 @@
},
"time": "2023-01-03T09:29:04+00:00"
},
{
"name": "tymon/jwt-auth",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/tymondesigns/jwt-auth.git",
"reference": "b0868a5b00801889a9e0c81a737963d8004e708c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/b0868a5b00801889a9e0c81a737963d8004e708c",
"reference": "b0868a5b00801889a9e0c81a737963d8004e708c",
"shasum": ""
},
"require": {
"illuminate/auth": "^9.0|^10.0",
"illuminate/contracts": "^9.0|^10.0",
"illuminate/http": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"lcobucci/jwt": "^4.0",
"nesbot/carbon": "^2.0",
"php": "^8.0"
},
"require-dev": {
"illuminate/console": "^9.0|^10.0",
"illuminate/database": "^9.0|^10.0",
"illuminate/routing": "^9.0|^10.0",
"mockery/mockery": ">=0.9.9",
"phpunit/phpunit": "^9.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "1.0-dev",
"dev-2.x": "2.0-dev"
},
"laravel": {
"aliases": {
"JWTAuth": "Tymon\\JWTAuth\\Facades\\JWTAuth",
"JWTFactory": "Tymon\\JWTAuth\\Facades\\JWTFactory"
},
"providers": [
"Tymon\\JWTAuth\\Providers\\LaravelServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Tymon\\JWTAuth\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sean Tymon",
"email": "tymon148@gmail.com",
"homepage": "https://tymon.xyz",
"role": "Developer"
}
],
"description": "JSON Web Token Authentication for Laravel and Lumen",
"homepage": "https://github.com/tymondesigns/jwt-auth",
"keywords": [
"Authentication",
"JSON Web Token",
"auth",
"jwt",
"laravel"
],
"support": {
"issues": "https://github.com/tymondesigns/jwt-auth/issues",
"source": "https://github.com/tymondesigns/jwt-auth"
},
"funding": [
{
"url": "https://www.patreon.com/seantymon",
"type": "patreon"
}
],
"time": "2023-02-16T16:29:41+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v5.5.0",
@ -7370,16 +7335,16 @@
},
{
"name": "laravel/pint",
"version": "v1.13.4",
"version": "v1.13.5",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "428c1eae1be4d2994c88234ffe3fea6800532e0d"
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/428c1eae1be4d2994c88234ffe3fea6800532e0d",
"reference": "428c1eae1be4d2994c88234ffe3fea6800532e0d",
"url": "https://api.github.com/repos/laravel/pint/zipball/df105cf8ce7a8f0b8a9425ff45cd281a5448e423",
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423",
"shasum": ""
},
"require": {
@ -7432,7 +7397,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2023-10-24T15:44:13+00:00"
"time": "2023-10-26T09:26:10+00:00"
},
{
"name": "laravel/sail",
@ -8173,16 +8138,16 @@
},
{
"name": "phpunit/phpunit",
"version": "10.4.1",
"version": "10.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c"
"reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/62bd7af13d282deeb95650077d28ba3600ca321c",
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
"reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
"shasum": ""
},
"require": {
@ -8254,7 +8219,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.1"
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2"
},
"funding": [
{
@ -8270,7 +8235,7 @@
"type": "tidelift"
}
],
"time": "2023-10-08T05:01:11+00:00"
"time": "2023-10-26T07:21:45+00:00"
},
{
"name": "sebastian/cli-parser",
@ -9496,16 +9461,16 @@
},
{
"name": "symfony/yaml",
"version": "v6.3.3",
"version": "v6.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "e23292e8c07c85b971b44c1c4b87af52133e2add"
"reference": "9758b6c69d179936435d0ffb577c3708d57e38a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add",
"reference": "e23292e8c07c85b971b44c1c4b87af52133e2add",
"url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8",
"reference": "9758b6c69d179936435d0ffb577c3708d57e38a8",
"shasum": ""
},
"require": {
@ -9548,7 +9513,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v6.3.3"
"source": "https://github.com/symfony/yaml/tree/v6.3.7"
},
"funding": [
{
@ -9564,7 +9529,7 @@
"type": "tidelift"
}
],
"time": "2023-07-31T07:08:24+00:00"
"time": "2023-10-28T23:31:00+00:00"
},
{
"name": "theseer/tokenizer",

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

@ -16,63 +16,34 @@
@method('PUT')
<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">
<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>
@endforeach
</select>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label>
<input class="form-control" name="exit_at" type="date" id="exit_at" value="{{ old('exit_at') }}"
placeholder="Masukan Tanggal Peminjaman" required>
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label>
<input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian"
value="{{ old('est_pengembalian') }}" placeholder="Masukan Estimasi Tanggal Peminjaman" required>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<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>
</div>
{{--
<!-- Elemen input readonly untuk menampilkan nama aset -->
<label for="asset_name" class="col-form-label">Nama Asset:</label>
<input class="form-control" name="asset_name" type="text" id="asset_name"
value="{{ $peminjaman->asset->name }}" readonly required>
<div>
<input class="form-control" hidden name="peti_id" type="text" id="peti_id"
value="{{ $peminjaman->peti_id }}" readonly>
<input class="form-control" value="{{ $peminjaman->peti->fix_lot }}" readonly>
</div>
<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($peminjaman->exit_at)->format('Y-m-d') }}"
placeholder="Masukan Tanggal Keluar" readonly required>
value="{{ $peminjaman->exit_at }}" readonly>
<label for="exit_pic" class="col-form-label">PJ Keluar:</label>
<input class="form-control" name="exit_pic" type="text" id="exit_pic"
value="{{ $peminjaman->exit_pic }}" placeholder="Masukan Nama PJ Keluar" readonly required>
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label>
<input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian"
value="{{ $peminjaman->est_pengembalian }}" readonly>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<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>
<div>
<input class="form-control" hidden name="exit_warehouse" type="text" id="exit_warehouse"
value="{{ $peminjaman->exit_warehouse }}" readonly>
<input class="form-control" value="{{ $peminjaman->warehouse->name }}" readonly>
</div>
<label for="enter_at" class="col-form-label">Tanggal Pengembalian:</label>
<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>
<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', $peminjaman->enter_pic) }}" placeholder="Masukan Nama PJ Pengembalian"
pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');" required>
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">
<option disabled selected>Pilih Nama Asset</option>
<option disabled selected>Pilih Tujuan Gudang</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $peminjaman->enter_warehouse) selected
@ -80,9 +51,29 @@
{{ $data_warehouse->name }}</option>
@endforeach
</select>
<label for="kondisi_peti" class="col-form-label">Kondisi Peti:</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.peminjaman.index') }}" class="btn btn-secondary">Kembali</a>
<a href="{{ route('dashboard.pengembalian.index') }}" class="btn btn-secondary">Kembali</a>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>

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

@ -22,6 +22,7 @@
<th>No</th>
<th>Kode Peti</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>Asal WH Peminjaman</th>
<th>Tgl Pengembalian</th>
@ -45,6 +46,7 @@
<td>{{ $data->peti->customer->code_customer }} -
{{ $data->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>{{ $data->warehouse->name }}</td>
<td>

Loading…
Cancel
Save