Browse Source

remove library JWT

master
Gunawan19621 1 year 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. 81
      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) public function update(Request $request, $id)
{ {
$request->validate([ $request->validate([
'asset_id' => 'required', 'peti_id' => 'required',
'exit_at' => 'required', 'exit_at' => 'required',
'exit_pic' => 'required', 'est_pengembalian' => 'required',
'exit_warehouse' => 'required',
'enter_at' => 'required', 'enter_at' => 'required',
'enter_pic' => 'required',
'enter_warehouse' => 'required', 'enter_warehouse' => 'required',
'kondisi_peti' => 'required',
]); ]);
try { try {
$peminjaman = asset_status::findOrFail($id); $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'); return redirect()->route('dashboard.pengembalian.index')->with('success', 'Data peminjaman berhasil diperbaharui');
} catch (\Throwable $th) { } catch (\Throwable $th) {
@ -85,21 +99,29 @@ class PengembalianController extends Controller
// public function update(Request $request, $id) // public function update(Request $request, $id)
// { // {
// // dd($request->all());
// $request->validate([ // $request->validate([
// 'asset_id' => 'required', // 'peti_id' => 'required',
// 'exit_at' => 'required', // 'exit_at' => 'required',
// 'exit_pic' => 'required', // 'est_pengembalian' => 'required',
// 'exit_warehouse' => 'required',
// 'enter_at' => 'required', // 'enter_at' => 'required',
// 'enter_pic' => 'required',
// 'enter_warehouse' => 'required', // 'enter_warehouse' => 'required',
// 'kondisi_peti' => 'required',
// ]); // ]);
// // dd($request);
// try { // try {
// $peminjaman = asset_status::findOrFail($id); // $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()); // $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) { // } 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 'peti_id', //sudah
'exit_at', //sudah 'exit_at', //sudah
'est_pengembalian', //sudah 'est_pengembalian', //sudah
'exit_pic', //sudah 'exit_pic', // di controler
'exit_warehouse', //sudah 'exit_warehouse', //sudah
'enter_at', 'enter_at', // //sudah
'enter_pic', 'enter_pic', // //sudah
'enter_warehouse', 'enter_warehouse', // //sudah
'kondisi_peti', 'kondisi_peti', // //sudah
'created_by', 'created_by',
'updated_by', 'updated_by',
]; ];

3
composer.json

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

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

@ -16,63 +16,34 @@
@method('PUT') @method('PUT')
<div class="form-group"> <div class="form-group">
<label for="peti_id" class="col-form-label">Pilih Detail Peti:</label> <label for="peti_id" class="col-form-label">Pilih Detail Peti:</label>
<select class="form-control" name="peti_id" type="text" id="peti_id"> <div>
<option disabled selected>Pilih Detail Peti</option> <input class="form-control" hidden name="peti_id" type="text" id="peti_id"
@foreach ($peti as $data_peti) value="{{ $peminjaman->peti_id }}" readonly>
<option value="{{ $data_peti->id }}" data-warehouse-id="{{ $data_peti->warehouse_id }}"> <input class="form-control" value="{{ $peminjaman->peti->fix_lot }}" readonly>
{{ $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> </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>
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label> <label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label>
<input class="form-control" name="exit_at" type="date" id="exit_at" <input class="form-control" name="exit_at" type="date" id="exit_at"
value="{{ \Carbon\Carbon::parse($peminjaman->exit_at)->format('Y-m-d') }}" value="{{ $peminjaman->exit_at }}" readonly>
placeholder="Masukan Tanggal Keluar" readonly required>
<label for="exit_pic" class="col-form-label">PJ Keluar:</label> <label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label>
<input class="form-control" name="exit_pic" type="text" id="exit_pic" <input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian"
value="{{ $peminjaman->exit_pic }}" placeholder="Masukan Nama PJ Keluar" readonly required> value="{{ $peminjaman->est_pengembalian }}" readonly>
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label> <label for="exit_warehouse" class="col-form-label">Asal Gudang :</label>
<input type="hidden" name="exit_warehouse" id="exit_warehouse" <div>
value="{{ $peminjaman->exit_warehouse }}"> <input class="form-control" hidden name="exit_warehouse" type="text" id="exit_warehouse"
<input class="form-control" type="text" value="{{ $peminjaman->warehouse->name }}" readonly required> 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> <label for="enter_at" class="col-form-label">Tanggal Pengembalian:</label>
<input class="form-control" name="enter_at" type="date" id="enter_at" <input class="form-control" name="enter_at" type="date" id="enter_at"
value="{{ \Carbon\Carbon::parse($peminjaman->enter_at)->format('Y-m-d') }}" value="{{ \Carbon\Carbon::parse($peminjaman->enter_at)->format('Y-m-d') }}" required>
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>
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang:</label> <label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang:</label>
<select class="form-control" name="enter_warehouse" type="text" id="enter_warehouse"> <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) @foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}" <option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $peminjaman->enter_warehouse) selected @if ($data_warehouse->id == $peminjaman->enter_warehouse) selected
@ -80,9 +51,29 @@
{{ $data_warehouse->name }}</option> {{ $data_warehouse->name }}</option>
@endforeach @endforeach
</select> </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> --}}
<div class="modal-footer d-flex justify-content-center"> <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> <button type="submit" class="btn btn-primary">Simpan</button>
</div> </div>
</form> </form>

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

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

Loading…
Cancel
Save