From 8a8d910ce2f7ec51e0c5d32fb21c71e34d600b68 Mon Sep 17 00:00:00 2001 From: Gunawan19621 Date: Sat, 11 Nov 2023 20:11:29 +0700 Subject: [PATCH] update UUID --- .../Auth/RedirectAuthController.php | 2 +- app/Models/BarangKeluar.php | 5 +- app/Models/BarangMasuk.php | 5 +- app/Models/Customer.php | 3 +- app/Models/Kondisi_Peti.php | 3 +- app/Models/Peti.php | 3 +- app/Models/Transfer.php | 3 +- app/Models/Type_peti.php | 3 +- app/Models/User.php | 3 +- app/Models/asset_status.php | 3 +- app/Models/m_asset.php | 3 +- app/Models/m_role.php | 5 +- app/Models/m_warehouse.php | 5 +- app/Traits/UUID.php | 36 +++ composer.json | 1 + composer.lock | 241 ++++++++---------- ...10_23_073314_create_m_warehouses_table.php | 2 +- ...023_10_23_074754_create_m_assets_table.php | 7 +- ...2023_10_23_075239_create_m_roles_table.php | 2 +- .../2023_10_23_075245_create_users_table.php | 7 +- ...0_23_120702_create_barang_masuks_table.php | 7 +- ..._23_120927_create_barang_keluars_table.php | 8 +- ...23_10_28_080457_create_customers_table.php | 2 +- ...3_10_28_083930_create_type_petis_table.php | 2 +- ...1_06_022213_create_kondisi_petis_table.php | 2 +- .../2023_11_06_085238_create_petis_table.php | 14 +- ..._06_122033_create_asset_statuses_table.php | 5 +- ...23_11_08_132316_create_transfers_table.php | 5 +- database/seeders/Customer.php | 5 + database/seeders/Kondisi_PetiSeeder.php | 6 +- database/seeders/RoleSeeder.php | 2 + database/seeders/Type_Peti.php | 2 + database/seeders/UserSeeder.php | 14 +- database/seeders/WarehouseSeeder.php | 2 + .../Master_Data/Customer/index.blade.php | 2 +- .../Manajemen_Peti/Peti/all_print.blade.php | 195 -------------- .../Manajemen_Peti/Peti/index.blade.php | 2 +- .../Manajemen_Peti/Type_peti/index.blade.php | 2 +- .../Master_Data/Role/index.blade.php | 2 +- .../Master_Data/User/index.blade.php | 2 +- .../Master_Data/Warehouse/index.blade.php | 2 +- .../dashboard/Peminjaman/create.blade.php | 1 + .../views/dashboard/Peminjaman/edit.blade.php | 1 + .../dashboard/Peminjaman/index.blade.php | 2 +- .../dashboard/Pengembalian/edit.blade.php | 1 + .../dashboard/Pengembalian/index.blade.php | 2 +- resources/views/dashboard/index.blade.php | 48 +++- resources/views/layouts/sidebar.blade.php | 4 +- 48 files changed, 278 insertions(+), 406 deletions(-) create mode 100644 app/Traits/UUID.php diff --git a/app/Http/Controllers/Auth/RedirectAuthController.php b/app/Http/Controllers/Auth/RedirectAuthController.php index f1e485f..287de3a 100644 --- a/app/Http/Controllers/Auth/RedirectAuthController.php +++ b/app/Http/Controllers/Auth/RedirectAuthController.php @@ -11,7 +11,7 @@ class RedirectAuthController extends Controller public function redirectAuth() { if (Auth::check()) { - if (Auth::user()->role_id == '1') { + if (Auth::user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111') { // Admin return redirect()->route('dashboard.home.admin'); } else { diff --git a/app/Models/BarangKeluar.php b/app/Models/BarangKeluar.php index cec21eb..726996d 100644 --- a/app/Models/BarangKeluar.php +++ b/app/Models/BarangKeluar.php @@ -2,12 +2,13 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class BarangKeluar extends Model { - use HasFactory; + use HasFactory, UUID; protected $table = 'barang_keluars'; protected $fillable = [ diff --git a/app/Models/BarangMasuk.php b/app/Models/BarangMasuk.php index 92ef495..df24365 100644 --- a/app/Models/BarangMasuk.php +++ b/app/Models/BarangMasuk.php @@ -2,12 +2,13 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class BarangMasuk extends Model { - use HasFactory; + use HasFactory, UUID; protected $table = 'barang_masuks'; protected $fillable = [ diff --git a/app/Models/Customer.php b/app/Models/Customer.php index 7ef3cb5..bc6508b 100644 --- a/app/Models/Customer.php +++ b/app/Models/Customer.php @@ -2,13 +2,14 @@ namespace App\Models; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Factories\HasFactory; class Customer extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'customers'; protected $fillable = [ diff --git a/app/Models/Kondisi_Peti.php b/app/Models/Kondisi_Peti.php index 5bee0a7..b5f97af 100644 --- a/app/Models/Kondisi_Peti.php +++ b/app/Models/Kondisi_Peti.php @@ -2,13 +2,14 @@ namespace App\Models; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Factories\HasFactory; class Kondisi_Peti extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'kondisi_petis'; protected $fillable = [ diff --git a/app/Models/Peti.php b/app/Models/Peti.php index ff48859..4387db4 100644 --- a/app/Models/Peti.php +++ b/app/Models/Peti.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Traits\UUID; use App\Models\Customer; use App\Models\Type_peti; use App\Models\Kondisi_Peti; @@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class Peti extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'petis'; protected $fillable = [ diff --git a/app/Models/Transfer.php b/app/Models/Transfer.php index b0f8c71..cd98c3e 100644 --- a/app/Models/Transfer.php +++ b/app/Models/Transfer.php @@ -3,13 +3,14 @@ namespace App\Models; use App\Models\Peti; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Factories\HasFactory; class Transfer extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'petis'; protected $fillable = [ diff --git a/app/Models/Type_peti.php b/app/Models/Type_peti.php index 4d5dff4..15c6a66 100644 --- a/app/Models/Type_peti.php +++ b/app/Models/Type_peti.php @@ -2,13 +2,14 @@ namespace App\Models; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Factories\HasFactory; class Type_peti extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'type_petis'; protected $fillable = [ diff --git a/app/Models/User.php b/app/Models/User.php index ce7378c..06af296 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -3,6 +3,7 @@ namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; +use App\Traits\UUID; use Laravel\Sanctum\HasApiTokens; use Illuminate\Notifications\Notifiable; use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; @@ -11,7 +12,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable implements JWTSubject { - use HasApiTokens, HasFactory, Notifiable; + use HasApiTokens, HasFactory, Notifiable, UUID; /** * The attributes that are mass assignable. diff --git a/app/Models/asset_status.php b/app/Models/asset_status.php index b8ed253..8b8f121 100644 --- a/app/Models/asset_status.php +++ b/app/Models/asset_status.php @@ -3,6 +3,7 @@ namespace App\Models; use App\Models\Peti; +use App\Traits\UUID; use App\Models\Customer; use App\Models\Type_peti; use Illuminate\Database\Eloquent\Model; @@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; class asset_status extends Model { - use HasFactory; + use HasFactory, UUID; protected $table = 'asset_statuses'; protected $fillable = [ diff --git a/app/Models/m_asset.php b/app/Models/m_asset.php index e92b5b9..1d2d754 100644 --- a/app/Models/m_asset.php +++ b/app/Models/m_asset.php @@ -2,13 +2,14 @@ namespace App\Models; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Factories\HasFactory; class m_asset extends Model { - use HasFactory, SoftDeletes; + use HasFactory, SoftDeletes, UUID; protected $table = 'm_assets'; protected $fillable = [ diff --git a/app/Models/m_role.php b/app/Models/m_role.php index cc42cf9..fec0070 100644 --- a/app/Models/m_role.php +++ b/app/Models/m_role.php @@ -2,12 +2,13 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class m_role extends Model { - use HasFactory; + use HasFactory, UUID; protected $table = 'm_roles'; protected $fillable = [ diff --git a/app/Models/m_warehouse.php b/app/Models/m_warehouse.php index 25d8bc6..746a41b 100644 --- a/app/Models/m_warehouse.php +++ b/app/Models/m_warehouse.php @@ -2,12 +2,13 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; +use App\Traits\UUID; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class m_warehouse extends Model { - use HasFactory; + use HasFactory, UUID; protected $table = 'm_warehouses'; protected $fillable = [ diff --git a/app/Traits/UUID.php b/app/Traits/UUID.php new file mode 100644 index 0000000..3222a1a --- /dev/null +++ b/app/Traits/UUID.php @@ -0,0 +1,36 @@ +getKey() === null) { + $model->setAttribute($model->getKeyName(), Str::uuid()->toString()); + } + }); + } + + // Tells the database not to auto-increment this field + public function getIncrementing() + { + return false; + } + + // Helps the application specify the field type in the database + public function getKeyType() + { + return 'string'; + } +} diff --git a/composer.json b/composer.json index 6f03c91..86165ff 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "laravel/tinker": "^2.8", "maatwebsite/excel": "^3.1", "php-open-source-saver/jwt-auth": "^2.1", + "ramsey/uuid": "^4.7", "simplesoftwareio/simple-qrcode": "^4.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 7243390..7a0b2f8 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "37f98cab1d340231d5d4d9764bef781d", + "content-hash": "45d30d4d24966e48bb5a373edf574207", "packages": [ { "name": "bacon/bacon-qr-code", @@ -1357,16 +1357,16 @@ }, { "name": "laravel/framework", - "version": "v10.29.0", + "version": "v10.31.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "2d002849a16ad131110a50cbea4d64dbb78515a3" + "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/2d002849a16ad131110a50cbea4d64dbb78515a3", - "reference": "2d002849a16ad131110a50cbea4d64dbb78515a3", + "url": "https://api.github.com/repos/laravel/framework/zipball/507ce9b28bce4b5e4140c28943092ca38e9a52e4", + "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4", "shasum": "" }, "require": { @@ -1555,20 +1555,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-10-24T13:48:53+00:00" + "time": "2023-11-07T13:48:30+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.12", + "version": "v0.1.13", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "b35f249028c22016e45e48626e19e5d42fd827ff" + "reference": "e1379d8ead15edd6cc4369c22274345982edc95a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/b35f249028c22016e45e48626e19e5d42fd827ff", - "reference": "b35f249028c22016e45e48626e19e5d42fd827ff", + "url": "https://api.github.com/repos/laravel/prompts/zipball/e1379d8ead15edd6cc4369c22274345982edc95a", + "reference": "e1379d8ead15edd6cc4369c22274345982edc95a", "shasum": "" }, "require": { @@ -1610,22 +1610,22 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.12" + "source": "https://github.com/laravel/prompts/tree/v0.1.13" }, - "time": "2023-10-18T14:18:57+00:00" + "time": "2023-10-27T13:53:59+00:00" }, { "name": "laravel/sanctum", - "version": "v3.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "338f633e6487e76b255470d3373fbc29228aa971" + "reference": "e1a272893bec13cf135627f7e156030b3afe1e60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/338f633e6487e76b255470d3373fbc29228aa971", - "reference": "338f633e6487e76b255470d3373fbc29228aa971", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/e1a272893bec13cf135627f7e156030b3afe1e60", + "reference": "e1a272893bec13cf135627f7e156030b3afe1e60", "shasum": "" }, "require": { @@ -1678,7 +1678,7 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2023-09-07T15:46:33+00:00" + "time": "2023-11-03T13:42:14+00:00" }, { "name": "laravel/serializable-closure", @@ -1811,18 +1811,6 @@ }, { "name": "lcobucci/clock", -<<<<<<< HEAD - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/clock.git", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", -======= "version": "2.3.0", "source": { "type": "git", @@ -1833,16 +1821,11 @@ "type": "zip", "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", ->>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad "shasum": "" }, "require": { "php": "~8.1.0 || ~8.2.0", -<<<<<<< HEAD - "psr/clock": "^1.0" -======= "stella-maris/clock": "^0.1.7" ->>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad }, "provide": { "psr/clock-implementation": "1.0" @@ -1876,11 +1859,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", -<<<<<<< HEAD - "source": "https://github.com/lcobucci/clock/tree/3.0.0" -======= "source": "https://github.com/lcobucci/clock/tree/2.3.0" ->>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad }, "funding": [ { @@ -1892,11 +1871,7 @@ "type": "patreon" } ], -<<<<<<< HEAD - "time": "2022-12-19T15:00:24+00:00" -======= "time": "2022-12-19T14:38:11+00:00" ->>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad }, { "name": "lcobucci/jwt", @@ -2164,16 +2139,16 @@ }, { "name": "league/flysystem", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "015633a05aee22490495159237a5944091d8281e" + "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/015633a05aee22490495159237a5944091d8281e", - "reference": "015633a05aee22490495159237a5944091d8281e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b2aa10f2326e0351399b8ce68e287d8e9209a83", + "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83", "shasum": "" }, "require": { @@ -2238,7 +2213,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.18.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.19.0" }, "funding": [ { @@ -2250,20 +2225,20 @@ "type": "github" } ], - "time": "2023-10-20T17:59:40+00:00" + "time": "2023-11-07T09:04:28+00:00" }, { "name": "league/flysystem-local", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32" + "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e7381ef7643f658b87efb7dbe98fe538fb1bbf32", - "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/8d868217f9eeb4e9a7320db5ccad825e9a7a4076", + "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076", "shasum": "" }, "require": { @@ -2298,7 +2273,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-local/issues", - "source": "https://github.com/thephpleague/flysystem-local/tree/3.18.0" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.19.0" }, "funding": [ { @@ -2310,7 +2285,7 @@ "type": "github" } ], - "time": "2023-10-19T20:07:13+00:00" + "time": "2023-11-06T20:35:28+00:00" }, { "name": "league/mime-type-detection", @@ -2370,28 +2345,28 @@ }, { "name": "maatwebsite/excel", - "version": "3.1.49", + "version": "3.1.50", "source": { "type": "git", "url": "https://github.com/SpartnerNL/Laravel-Excel.git", - "reference": "769209f49ebe3419017114f98bd61e2a7d9af259" + "reference": "d79e66391aa306983bb7e234503f5605c3e33348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/769209f49ebe3419017114f98bd61e2a7d9af259", - "reference": "769209f49ebe3419017114f98bd61e2a7d9af259", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/d79e66391aa306983bb7e234503f5605c3e33348", + "reference": "d79e66391aa306983bb7e234503f5605c3e33348", "shasum": "" }, "require": { "composer/semver": "^3.3", "ext-json": "*", - "illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0", - "php": "^7.0|^8.0", + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0", + "php": "^7.0||^8.0", "phpoffice/phpspreadsheet": "^1.18", - "psr/simple-cache": "^1.0|^2.0|^3.0" + "psr/simple-cache": "^1.0||^2.0||^3.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0", + "orchestra/testbench": "^6.0||^7.0||^8.0", "predis/predis": "^1.1" }, "type": "library", @@ -2434,7 +2409,7 @@ ], "support": { "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", - "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.49" + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.50" }, "funding": [ { @@ -2446,7 +2421,7 @@ "type": "github" } ], - "time": "2023-10-26T09:01:33+00:00" + "time": "2023-11-06T11:29:48+00:00" }, { "name": "maennchen/zipstream-php", @@ -4258,16 +4233,16 @@ }, { "name": "ramsey/uuid", - "version": "4.7.4", + "version": "4.7.5", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "60a4c63ab724854332900504274f6150ff26d286" + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", - "reference": "60a4c63ab724854332900504274f6150ff26d286", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { @@ -4334,7 +4309,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.4" + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, "funding": [ { @@ -4346,7 +4321,7 @@ "type": "tidelift" } ], - "time": "2023-04-15T23:01:58+00:00" + "time": "2023-11-08T05:53:05+00:00" }, { "name": "sabberworm/php-css-parser", @@ -4518,16 +4493,16 @@ }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", "shasum": "" }, "require": { @@ -4588,7 +4563,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.3.8" }, "funding": [ { @@ -4604,7 +4579,7 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2023-10-31T08:09:35+00:00" }, { "name": "symfony/css-selector", @@ -5034,16 +5009,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.3.7", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e" + "reference": "ce332676de1912c4389222987193c3ef38033df6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/59d1837d5d992d16c2628cd0d6b76acf8d69b33e", - "reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ce332676de1912c4389222987193c3ef38033df6", + "reference": "ce332676de1912c4389222987193c3ef38033df6", "shasum": "" }, "require": { @@ -5091,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.7" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.8" }, "funding": [ { @@ -5107,20 +5082,20 @@ "type": "tidelift" } ], - "time": "2023-10-28T23:55:27+00:00" + "time": "2023-11-07T10:17:15+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.7", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6d4098095f93279d9536a0e9124439560cc764d0" + "reference": "929202375ccf44a309c34aeca8305408442ebcc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6d4098095f93279d9536a0e9124439560cc764d0", - "reference": "6d4098095f93279d9536a0e9124439560cc764d0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/929202375ccf44a309c34aeca8305408442ebcc1", + "reference": "929202375ccf44a309c34aeca8305408442ebcc1", "shasum": "" }, "require": { @@ -5204,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.7" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.8" }, "funding": [ { @@ -5220,7 +5195,7 @@ "type": "tidelift" } ], - "time": "2023-10-29T14:31:45+00:00" + "time": "2023-11-10T13:47:32+00:00" }, { "name": "symfony/mailer", @@ -6420,16 +6395,16 @@ }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "13880a87790c76ef994c91e87efb96134522577a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", "shasum": "" }, "require": { @@ -6486,7 +6461,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, "funding": [ { @@ -6502,7 +6477,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2023-11-09T08:28:21+00:00" }, { "name": "symfony/translation", @@ -6679,16 +6654,16 @@ }, { "name": "symfony/uid", - "version": "v6.3.0", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "01b0f20b1351d997711c56f1638f7a8c3061e384" + "reference": "819fa5ac210fb7ddda4752b91a82f50be7493dd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/01b0f20b1351d997711c56f1638f7a8c3061e384", - "reference": "01b0f20b1351d997711c56f1638f7a8c3061e384", + "url": "https://api.github.com/repos/symfony/uid/zipball/819fa5ac210fb7ddda4752b91a82f50be7493dd9", + "reference": "819fa5ac210fb7ddda4752b91a82f50be7493dd9", "shasum": "" }, "require": { @@ -6733,7 +6708,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.3.0" + "source": "https://github.com/symfony/uid/tree/v6.3.8" }, "funding": [ { @@ -6749,20 +6724,20 @@ "type": "tidelift" } ], - "time": "2023-04-08T07:25:02+00:00" + "time": "2023-10-31T08:07:48+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.3.6", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97" + "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/999ede244507c32b8e43aebaa10e9fce20de7c97", - "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81acabba9046550e89634876ca64bfcd3c06aa0a", + "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a", "shasum": "" }, "require": { @@ -6817,7 +6792,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.6" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.8" }, "funding": [ { @@ -6833,7 +6808,7 @@ "type": "tidelift" } ], - "time": "2023-10-12T18:45:56+00:00" + "time": "2023-11-08T10:42:36+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -7176,16 +7151,16 @@ }, { "name": "filp/whoops", - "version": "2.15.3", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -7235,7 +7210,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -7243,7 +7218,7 @@ "type": "github" } ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2023-11-03T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7298,16 +7273,16 @@ }, { "name": "laravel/breeze", - "version": "v1.25.1", + "version": "v1.26.1", "source": { "type": "git", "url": "https://github.com/laravel/breeze.git", - "reference": "f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f" + "reference": "8757692a7be1a6174a0f1a5d3c280a8912d45dd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/breeze/zipball/f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f", - "reference": "f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f", + "url": "https://api.github.com/repos/laravel/breeze/zipball/8757692a7be1a6174a0f1a5d3c280a8912d45dd0", + "reference": "8757692a7be1a6174a0f1a5d3c280a8912d45dd0", "shasum": "" }, "require": { @@ -7356,20 +7331,20 @@ "issues": "https://github.com/laravel/breeze/issues", "source": "https://github.com/laravel/breeze" }, - "time": "2023-10-20T14:02:17+00:00" + "time": "2023-11-01T14:18:45+00:00" }, { "name": "laravel/pint", - "version": "v1.13.5", + "version": "v1.13.6", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423" + "reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/df105cf8ce7a8f0b8a9425ff45cd281a5448e423", - "reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423", + "url": "https://api.github.com/repos/laravel/pint/zipball/3e3d2ab01c7d8b484c18e6100ecf53639c744fa7", + "reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7", "shasum": "" }, "require": { @@ -7380,13 +7355,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.34.1", - "illuminate/view": "^10.26.2", - "laravel-zero/framework": "^10.1.2", + "friendsofphp/php-cs-fixer": "^3.38.0", + "illuminate/view": "^10.30.1", + "laravel-zero/framework": "^10.3.0", "mockery/mockery": "^1.6.6", "nunomaduro/larastan": "^2.6.4", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.20.0" + "pestphp/pest": "^2.24.2" }, "bin": [ "builds/pint" @@ -7422,7 +7397,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-10-26T09:26:10+00:00" + "time": "2023-11-07T17:59:57+00:00" }, { "name": "laravel/sail", @@ -9486,16 +9461,16 @@ }, { "name": "symfony/yaml", - "version": "v6.3.7", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8" + "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8", - "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92", + "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92", "shasum": "" }, "require": { @@ -9538,7 +9513,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.7" + "source": "https://github.com/symfony/yaml/tree/v6.3.8" }, "funding": [ { @@ -9554,7 +9529,7 @@ "type": "tidelift" } ], - "time": "2023-10-28T23:31:00+00:00" + "time": "2023-11-06T10:58:05+00:00" }, { "name": "theseer/tokenizer", @@ -9616,5 +9591,5 @@ "php": "^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/database/migrations/2023_10_23_073314_create_m_warehouses_table.php b/database/migrations/2023_10_23_073314_create_m_warehouses_table.php index 50c9bae..6cc3dd4 100644 --- a/database/migrations/2023_10_23_073314_create_m_warehouses_table.php +++ b/database/migrations/2023_10_23_073314_create_m_warehouses_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::create('m_warehouses', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('name', 32)->nullable(); $table->text('description')->nullable(); $table->text('address')->nullable(); diff --git a/database/migrations/2023_10_23_074754_create_m_assets_table.php b/database/migrations/2023_10_23_074754_create_m_assets_table.php index 708b7d4..8018ceb 100644 --- a/database/migrations/2023_10_23_074754_create_m_assets_table.php +++ b/database/migrations/2023_10_23_074754_create_m_assets_table.php @@ -12,12 +12,13 @@ return new class extends Migration public function up(): void { Schema::create('m_assets', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('seri', 50)->nullable(); $table->string('name', 200)->nullable(); $table->text('description')->nullable(); - $table->unsignedBigInteger('warehouse_id')->nullable(); - $table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); + // $table->unsignedBigInteger('warehouse_id')->nullable(); + // $table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); + $table->foreignUuid('warehouse_id')->nullable()->constrained('m_warehouses')->onDelete('set null'); $table->date('date')->nullable(); $table->string('qr_count', 255)->nullable(); $table->timestamps(); diff --git a/database/migrations/2023_10_23_075239_create_m_roles_table.php b/database/migrations/2023_10_23_075239_create_m_roles_table.php index 6147ad1..ecb9928 100644 --- a/database/migrations/2023_10_23_075239_create_m_roles_table.php +++ b/database/migrations/2023_10_23_075239_create_m_roles_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::create('m_roles', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('name', 50)->nullable(); $table->text('description')->nullable(); $table->timestamps(); diff --git a/database/migrations/2023_10_23_075245_create_users_table.php b/database/migrations/2023_10_23_075245_create_users_table.php index 481ba44..93473ac 100644 --- a/database/migrations/2023_10_23_075245_create_users_table.php +++ b/database/migrations/2023_10_23_075245_create_users_table.php @@ -13,7 +13,7 @@ return new class extends Migration public function up(): void { Schema::create('users', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('username', 32)->nullable(); $table->string('fullname', 50)->nullable(); @@ -25,9 +25,8 @@ return new class extends Migration $table->string('foto', 255)->nullable(); $table->string('jenis_kelamin', 20)->nullable(); $table->string('agama', 15)->nullable(); - $table->foreignId('role_id')->nullable()->constrained('m_roles')->onDelete('cascade')->nullable(); - $table->bigInteger('warehouse_id')->unsigned()->nullable(); - $table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); + $table->foreignUuid('role_id')->nullable()->constrained('m_roles')->cascadeOnDelete(); + $table->foreignUuid('warehouse_id')->nullable()->constrained('m_warehouses')->onDelete('set null'); $table->text('address')->nullable(); $table->timestamp('email_verified_at')->nullable(); $table->string('password', 255)->nullable(); diff --git a/database/migrations/2023_10_23_120702_create_barang_masuks_table.php b/database/migrations/2023_10_23_120702_create_barang_masuks_table.php index 6c30448..a06a289 100644 --- a/database/migrations/2023_10_23_120702_create_barang_masuks_table.php +++ b/database/migrations/2023_10_23_120702_create_barang_masuks_table.php @@ -12,9 +12,10 @@ return new class extends Migration public function up(): void { Schema::create('barang_masuks', function (Blueprint $table) { - $table->id(); - $table->bigInteger('asset_id')->unsigned()->nullable(); - $table->foreign('asset_id')->references('id')->on('m_assets')->onDelete('set null'); + $table->uuid('id')->primary(); + // $table->bigInteger('asset_id')->unsigned()->nullable(); + // $table->foreign('asset_id')->references('id')->on('m_assets')->onDelete('set null'); + $table->foreignUuid('asset_id')->nullable()->constrained('m_assets')->onDelete('set null'); $table->integer('jumlah')->nullable(); $table->date('tanggal_masuk')->nullable(); $table->string('asal_barang', 200)->nullable(); diff --git a/database/migrations/2023_10_23_120927_create_barang_keluars_table.php b/database/migrations/2023_10_23_120927_create_barang_keluars_table.php index 8a305b5..137bcda 100644 --- a/database/migrations/2023_10_23_120927_create_barang_keluars_table.php +++ b/database/migrations/2023_10_23_120927_create_barang_keluars_table.php @@ -12,9 +12,11 @@ return new class extends Migration public function up(): void { Schema::create('barang_keluars', function (Blueprint $table) { - $table->id(); - $table->bigInteger('assets_id')->unsigned()->nullable(); - $table->foreign('assets_id')->references('id')->on('m_assets')->onDelete('set null'); + $table->uuid('id')->primary(); + // $table->bigInteger('assets_id')->unsigned()->nullable(); + // $table->foreign('assets_id')->references('id')->on('m_assets')->onDelete('set null'); + $table->foreignUuid('assets_id')->nullable()->constrained('m_assets')->onDelete('set null'); + $table->integer('jumlah')->nullable(); $table->date('tanggal_keluar')->nullable(); $table->string('penerima_barang', 200)->nullable(); diff --git a/database/migrations/2023_10_28_080457_create_customers_table.php b/database/migrations/2023_10_28_080457_create_customers_table.php index d65cd05..db13ebb 100644 --- a/database/migrations/2023_10_28_080457_create_customers_table.php +++ b/database/migrations/2023_10_28_080457_create_customers_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::create('customers', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('name', 50); $table->string('code_customer', 15); $table->string('lot_no', 50); diff --git a/database/migrations/2023_10_28_083930_create_type_petis_table.php b/database/migrations/2023_10_28_083930_create_type_petis_table.php index 611c518..9784d19 100644 --- a/database/migrations/2023_10_28_083930_create_type_petis_table.php +++ b/database/migrations/2023_10_28_083930_create_type_petis_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::create('type_petis', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('type', 20); $table->string('size_peti', 25); $table->text('description')->nullable(); diff --git a/database/migrations/2023_11_06_022213_create_kondisi_petis_table.php b/database/migrations/2023_11_06_022213_create_kondisi_petis_table.php index dae6984..7e06bf8 100644 --- a/database/migrations/2023_11_06_022213_create_kondisi_petis_table.php +++ b/database/migrations/2023_11_06_022213_create_kondisi_petis_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::create('kondisi_petis', function (Blueprint $table) { - $table->id(); + $table->uuid('id')->primary(); $table->string('nama_kondisi', 50); $table->text('deskripsi_kondisi'); $table->timestamps(); diff --git a/database/migrations/2023_11_06_085238_create_petis_table.php b/database/migrations/2023_11_06_085238_create_petis_table.php index 0f89c9a..64e4db7 100644 --- a/database/migrations/2023_11_06_085238_create_petis_table.php +++ b/database/migrations/2023_11_06_085238_create_petis_table.php @@ -12,20 +12,16 @@ return new class extends Migration public function up(): void { Schema::create('petis', function (Blueprint $table) { - $table->id(); - $table->unsignedBigInteger('tipe_peti_id')->nullable(); - $table->foreign('tipe_peti_id')->references('id')->on('type_petis')->onDelete('set null'); + $table->uuid('id')->primary(); + $table->foreignUuid('tipe_peti_id')->nullable()->constrained('type_petis')->onDelete('set null'); $table->string('warna', 50); $table->string('fix_lot', 100); $table->integer('packing_no'); - $table->unsignedBigInteger('customer_id')->nullable(); - $table->foreign('customer_id')->references('id')->on('customers')->onDelete('set null'); + $table->foreignUuid('customer_id')->nullable()->constrained('customers')->onDelete('set null'); $table->integer('jumlah')->nullable(); $table->date('date_pembuatan', 100)->nullable(); - $table->unsignedBigInteger('warehouse_id')->nullable(); - $table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); - $table->unsignedBigInteger('kondisipeti_id')->nullable(); - $table->foreign('kondisipeti_id')->references('id')->on('kondisi_petis')->onDelete('set null'); + $table->foreignUuid('warehouse_id')->nullable()->constrained('m_warehouses')->onDelete('set null'); + $table->foreignUuid('kondisipeti_id')->nullable()->constrained('kondisi_petis')->onDelete('set null'); $table->timestamps(); $table->softDeletes(); $table->string('created_by', 200)->nullable(); diff --git a/database/migrations/2023_11_06_122033_create_asset_statuses_table.php b/database/migrations/2023_11_06_122033_create_asset_statuses_table.php index 0a4849b..4c158b3 100644 --- a/database/migrations/2023_11_06_122033_create_asset_statuses_table.php +++ b/database/migrations/2023_11_06_122033_create_asset_statuses_table.php @@ -12,9 +12,8 @@ return new class extends Migration public function up(): void { Schema::create('asset_statuses', function (Blueprint $table) { - $table->id(); - $table->bigInteger('peti_id')->unsigned()->nullable(); - $table->foreign('peti_id')->references('id')->on('petis')->onDelete('set null'); + $table->uuid('id')->primary(); + $table->foreignUuid('peti_id')->nullable()->constrained('petis')->onDelete('set null'); $table->date('exit_at')->nullable(); $table->date('est_pengembalian')->nullable(); $table->string('exit_pic', 200)->nullable(); diff --git a/database/migrations/2023_11_08_132316_create_transfers_table.php b/database/migrations/2023_11_08_132316_create_transfers_table.php index fbce8a4..95884a2 100644 --- a/database/migrations/2023_11_08_132316_create_transfers_table.php +++ b/database/migrations/2023_11_08_132316_create_transfers_table.php @@ -12,9 +12,8 @@ return new class extends Migration public function up(): void { Schema::create('transfers', function (Blueprint $table) { - $table->id(); - $table->bigInteger('peti_id')->unsigned()->nullable(); - $table->foreign('peti_id')->references('id')->on('petis')->onDelete('set null'); + $table->uuid('id')->primary(); + $table->foreignUuid('peti_id')->nullable()->constrained('petis')->onDelete('set null'); $table->date('tanggal')->nullable(); $table->timestamps(); $table->softDeletes(); diff --git a/database/seeders/Customer.php b/database/seeders/Customer.php index e776fa1..792f44d 100644 --- a/database/seeders/Customer.php +++ b/database/seeders/Customer.php @@ -13,7 +13,9 @@ class Customer extends Seeder */ public function run(): void { + // Sisipkan data pertama DB::table('customers')->insert([ + 'id' => 'd961ad96-211b-4f68-9ff2-111111111111', 'name' => 'DHARMA', 'code_customer' => 'DPM', 'lot_no' => 'JKT23', @@ -22,7 +24,10 @@ class Customer extends Seeder 'created_by' => 'Seeder', 'updated_by' => 'Seeder', ]); + + // Sisipkan data kedua DB::table('customers')->insert([ + 'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', 'name' => 'ADHI CHANDRA', 'code_customer' => 'ACJ', 'lot_no' => 'JKT23', diff --git a/database/seeders/Kondisi_PetiSeeder.php b/database/seeders/Kondisi_PetiSeeder.php index 3ef956f..4024b73 100644 --- a/database/seeders/Kondisi_PetiSeeder.php +++ b/database/seeders/Kondisi_PetiSeeder.php @@ -13,16 +13,18 @@ class Kondisi_PetiSeeder extends Seeder */ public function run(): void { - // Kondisi peti Rusak + // Sisipkan data Kondisi Peti Rusak Kondisi_Peti::create([ + 'id' => 'd961ad96-211b-4f68-9ff2-111111111111', 'nama_kondisi' => 'Rusak', 'deskripsi_kondisi' => 'Barang Rusak', 'created_by' => 'Seeder', 'updated_by' => 'Seeder', ]); - // Kondisi peti Baik + // Sisipkan data Kondisi Peti Baik Kondisi_Peti::create([ + 'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', 'nama_kondisi' => 'Ready', 'deskripsi_kondisi' => 'Barang Siap Bawa', 'created_by' => 'Seeder', diff --git a/database/seeders/RoleSeeder.php b/database/seeders/RoleSeeder.php index 19d9a3f..566a4b0 100644 --- a/database/seeders/RoleSeeder.php +++ b/database/seeders/RoleSeeder.php @@ -15,6 +15,7 @@ class RoleSeeder extends Seeder { // Role Admin m_role::create([ + 'id' => 'd961ad96-211b-4f68-9ff2-111111111111', 'name' => 'Admin', 'description' => 'admin sistem', 'created_by' => 'Seeder', @@ -23,6 +24,7 @@ class RoleSeeder extends Seeder // Role User m_role::create([ + 'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', 'name' => 'Operator', 'description' => 'Operator sistem', 'created_by' => 'Seeder', diff --git a/database/seeders/Type_Peti.php b/database/seeders/Type_Peti.php index ec9d884..66b38bb 100644 --- a/database/seeders/Type_Peti.php +++ b/database/seeders/Type_Peti.php @@ -15,6 +15,7 @@ class Type_Peti extends Seeder public function run(): void { DB::table('type_petis')->insert([ + 'id' => 'd961ad96-211b-4f68-9ff2-111111111111', 'type' => 'Bagus', 'size_peti' => '2 X 2 X 2 X 2', 'description' => 'Detail Barang Bagus', @@ -22,6 +23,7 @@ class Type_Peti extends Seeder 'updated_by' => 'Seeder', ]); DB::table('type_petis')->insert([ + 'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', 'type' => 'Standar', 'size_peti' => '3 X 3 X 3 X 3', 'description' => 'Detail Barang Standar', diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 2fda37a..8187715 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -2,9 +2,11 @@ namespace Database\Seeders; -use Illuminate\Database\Console\Seeds\WithoutModelEvents; -use Illuminate\Database\Seeder; use App\Models\User; +// use Faker\Provider\Uuid; +use Ramsey\Uuid\Uuid; +use Illuminate\Database\Seeder; +use Illuminate\Database\Console\Seeds\WithoutModelEvents; class UserSeeder extends Seeder { @@ -24,8 +26,8 @@ class UserSeeder extends Seeder 'jenis_kelamin' => 'Laki-laki', 'agama' => 'Islam', 'foto' => '', // Ganti dengan nama berkas foto jika diperlukan - 'role_id' => 1, // Ganti dengan ID peran yang sesuai - 'warehouse_id' => 1, // Ganti dengan ID gudang yang sesuai + 'role_id' => 'd961ad96-211b-4f68-9ff2-111111111111', // Menghasilkan UUID versi 4 + 'warehouse_id' => 'd961ad96-211b-4f68-9ff2-111111111111', // Menghasilkan UUID versi 4 'address' => 'Jalan Ciwatu', 'email_verified_at' => now(), 'password' => bcrypt('admin'), @@ -45,8 +47,8 @@ class UserSeeder extends Seeder 'jenis_kelamin' => 'Perempuan', 'agama' => 'Islam', 'foto' => '', // Ganti dengan nama berkas foto jika diperlukan - 'role_id' => 2, // Ganti dengan ID peran yang sesuai - 'warehouse_id' => 2, // Ganti dengan ID gudang yang sesuai + 'role_id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', // Menghasilkan UUID versi 4 + 'warehouse_id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', // Menghasilkan UUID versi 4 'address' => 'Jalan Gelarmendala', 'email_verified_at' => now(), 'password' => bcrypt('operator'), diff --git a/database/seeders/WarehouseSeeder.php b/database/seeders/WarehouseSeeder.php index 18cd16f..97fad73 100644 --- a/database/seeders/WarehouseSeeder.php +++ b/database/seeders/WarehouseSeeder.php @@ -15,6 +15,7 @@ class WarehouseSeeder extends Seeder { // Warehouse 1 m_warehouse::create([ + 'id' => 'd961ad96-211b-4f68-9ff2-111111111111', 'name' => 'Gudang A', 'description' => 'Gudang utama', 'address' => 'Alamat Gudang A', @@ -24,6 +25,7 @@ class WarehouseSeeder extends Seeder // Warehouse 2 m_warehouse::create([ + 'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', 'name' => 'Gudang B', 'description' => 'Gudang cabang', 'address' => 'Alamat Gudang B', diff --git a/resources/views/dashboard/Master_Data/Customer/index.blade.php b/resources/views/dashboard/Master_Data/Customer/index.blade.php index 7130eeb..1694449 100644 --- a/resources/views/dashboard/Master_Data/Customer/index.blade.php +++ b/resources/views/dashboard/Master_Data/Customer/index.blade.php @@ -1,7 +1,7 @@ @extends('layouts.main') @section('content') @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php index 5b7a444..1f3dff2 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php @@ -100,198 +100,3 @@ - - -{{-- - - - - Data PDF - - - - - - @foreach ($peti as $item => $data) - size(150) - ->errorCorrection('H') - ->generate($data->fix_lot . ';' . $data->id . ';' . $data->warehouse_id), - ); - ?> -
- - - - - - - - - - - - - - - - - - - - - -
- - PETI NUMBERBARCODE
- {{ $data->fix_lot }} - - QR Code -
PT. ISTWCUSTOMER
QTY PETIPT. {{ $data->customer->name }}
1
- @endforeach - - - - --}} - -{{-- - - - - Data PDF - - - - - - @foreach ($peti as $item => $data) - size(150) - ->errorCorrection('H') - ->generate($data->fix_lot . ';' . $data->id . ';' . $data->warehouse_id), - ); - ?> - @if ($loop->index % 3 == 0) -
- @endif - - - - - - - - - - - - - - - - - - - - - -
- Logo ISTW - PETI NUMBERBARCODE
- {{ $data->fix_lot }} - - QR Code -
PT. ISTWCUSTOMER
QTY PETIPT. {{ $data->customer->name }}
1
- @endforeach - - - - --}} diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php index f739299..3e21828 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php @@ -11,7 +11,7 @@ @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php index f5d9133..5de13bb 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php @@ -1,7 +1,7 @@ @extends('layouts.main') @section('content') @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Master_Data/Role/index.blade.php b/resources/views/dashboard/Master_Data/Role/index.blade.php index e12429e..4f989e2 100644 --- a/resources/views/dashboard/Master_Data/Role/index.blade.php +++ b/resources/views/dashboard/Master_Data/Role/index.blade.php @@ -2,7 +2,7 @@ @section('title', 'Role') @section('content') @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Master_Data/User/index.blade.php b/resources/views/dashboard/Master_Data/User/index.blade.php index 1710cb6..66b93d0 100644 --- a/resources/views/dashboard/Master_Data/User/index.blade.php +++ b/resources/views/dashboard/Master_Data/User/index.blade.php @@ -1,7 +1,7 @@ @extends('layouts.main') @section('content') @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Master_Data/Warehouse/index.blade.php b/resources/views/dashboard/Master_Data/Warehouse/index.blade.php index 3220fa1..751dbae 100644 --- a/resources/views/dashboard/Master_Data/Warehouse/index.blade.php +++ b/resources/views/dashboard/Master_Data/Warehouse/index.blade.php @@ -3,7 +3,7 @@ @section('content') @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Peminjaman/create.blade.php b/resources/views/dashboard/Peminjaman/create.blade.php index 4a6a1e0..633f94d 100644 --- a/resources/views/dashboard/Peminjaman/create.blade.php +++ b/resources/views/dashboard/Peminjaman/create.blade.php @@ -1,6 +1,7 @@ @extends('layouts.main') @section('title', 'Tambah Peminjaman') @section('content') + @include('layouts.components.alert-prompt')
diff --git a/resources/views/dashboard/Peminjaman/edit.blade.php b/resources/views/dashboard/Peminjaman/edit.blade.php index 7df939e..9436111 100644 --- a/resources/views/dashboard/Peminjaman/edit.blade.php +++ b/resources/views/dashboard/Peminjaman/edit.blade.php @@ -1,6 +1,7 @@ @extends('layouts.main') @section('title', 'Edit Peminjaman') @section('content') + @include('layouts.components.alert-prompt')
diff --git a/resources/views/dashboard/Peminjaman/index.blade.php b/resources/views/dashboard/Peminjaman/index.blade.php index 888fd55..ff15e53 100644 --- a/resources/views/dashboard/Peminjaman/index.blade.php +++ b/resources/views/dashboard/Peminjaman/index.blade.php @@ -11,7 +11,7 @@ @include('layouts.components.alert-prompt') - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
diff --git a/resources/views/dashboard/Pengembalian/edit.blade.php b/resources/views/dashboard/Pengembalian/edit.blade.php index a97adff..0c74c17 100644 --- a/resources/views/dashboard/Pengembalian/edit.blade.php +++ b/resources/views/dashboard/Pengembalian/edit.blade.php @@ -1,6 +1,7 @@ @extends('layouts.main') @section('title', 'Update Data Pengembalian') @section('content') + @include('layouts.components.alert-prompt')
diff --git a/resources/views/dashboard/Pengembalian/index.blade.php b/resources/views/dashboard/Pengembalian/index.blade.php index a1766f7..42f8f04 100644 --- a/resources/views/dashboard/Pengembalian/index.blade.php +++ b/resources/views/dashboard/Pengembalian/index.blade.php @@ -10,7 +10,7 @@ white-space: nowrap; } - @if (auth()->user()->role_id == 1) + @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
Data Pengembalian
diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 74c43a8..a8970f9 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -87,7 +87,7 @@
-
+
Grafik Peminjaman VS Pengembalian
@@ -112,7 +112,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
@@ -129,27 +129,55 @@
@push('script') + + // Custom legend using legendCallback + document.getElementById('chart-legend').innerHTML = myPieChart.generateLegend(); +