Browse Source

update UUID

master
Gunawan19621 1 year ago
parent
commit
8a8d910ce2
  1. 2
      app/Http/Controllers/Auth/RedirectAuthController.php
  2. 5
      app/Models/BarangKeluar.php
  3. 5
      app/Models/BarangMasuk.php
  4. 3
      app/Models/Customer.php
  5. 3
      app/Models/Kondisi_Peti.php
  6. 3
      app/Models/Peti.php
  7. 3
      app/Models/Transfer.php
  8. 3
      app/Models/Type_peti.php
  9. 3
      app/Models/User.php
  10. 3
      app/Models/asset_status.php
  11. 3
      app/Models/m_asset.php
  12. 5
      app/Models/m_role.php
  13. 5
      app/Models/m_warehouse.php
  14. 36
      app/Traits/UUID.php
  15. 1
      composer.json
  16. 241
      composer.lock
  17. 2
      database/migrations/2023_10_23_073314_create_m_warehouses_table.php
  18. 7
      database/migrations/2023_10_23_074754_create_m_assets_table.php
  19. 2
      database/migrations/2023_10_23_075239_create_m_roles_table.php
  20. 7
      database/migrations/2023_10_23_075245_create_users_table.php
  21. 7
      database/migrations/2023_10_23_120702_create_barang_masuks_table.php
  22. 8
      database/migrations/2023_10_23_120927_create_barang_keluars_table.php
  23. 2
      database/migrations/2023_10_28_080457_create_customers_table.php
  24. 2
      database/migrations/2023_10_28_083930_create_type_petis_table.php
  25. 2
      database/migrations/2023_11_06_022213_create_kondisi_petis_table.php
  26. 14
      database/migrations/2023_11_06_085238_create_petis_table.php
  27. 5
      database/migrations/2023_11_06_122033_create_asset_statuses_table.php
  28. 5
      database/migrations/2023_11_08_132316_create_transfers_table.php
  29. 5
      database/seeders/Customer.php
  30. 6
      database/seeders/Kondisi_PetiSeeder.php
  31. 2
      database/seeders/RoleSeeder.php
  32. 2
      database/seeders/Type_Peti.php
  33. 14
      database/seeders/UserSeeder.php
  34. 2
      database/seeders/WarehouseSeeder.php
  35. 2
      resources/views/dashboard/Master_Data/Customer/index.blade.php
  36. 195
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php
  37. 2
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php
  38. 2
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php
  39. 2
      resources/views/dashboard/Master_Data/Role/index.blade.php
  40. 2
      resources/views/dashboard/Master_Data/User/index.blade.php
  41. 2
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  42. 1
      resources/views/dashboard/Peminjaman/create.blade.php
  43. 1
      resources/views/dashboard/Peminjaman/edit.blade.php
  44. 2
      resources/views/dashboard/Peminjaman/index.blade.php
  45. 1
      resources/views/dashboard/Pengembalian/edit.blade.php
  46. 2
      resources/views/dashboard/Pengembalian/index.blade.php
  47. 48
      resources/views/dashboard/index.blade.php
  48. 4
      resources/views/layouts/sidebar.blade.php

2
app/Http/Controllers/Auth/RedirectAuthController.php

@ -11,7 +11,7 @@ class RedirectAuthController extends Controller
public function redirectAuth() public function redirectAuth()
{ {
if (Auth::check()) { if (Auth::check()) {
if (Auth::user()->role_id == '1') { if (Auth::user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111') {
// Admin // Admin
return redirect()->route('dashboard.home.admin'); return redirect()->route('dashboard.home.admin');
} else { } else {

5
app/Models/BarangKeluar.php

@ -2,12 +2,13 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class BarangKeluar extends Model class BarangKeluar extends Model
{ {
use HasFactory; use HasFactory, UUID;
protected $table = 'barang_keluars'; protected $table = 'barang_keluars';
protected $fillable = [ protected $fillable = [

5
app/Models/BarangMasuk.php

@ -2,12 +2,13 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class BarangMasuk extends Model class BarangMasuk extends Model
{ {
use HasFactory; use HasFactory, UUID;
protected $table = 'barang_masuks'; protected $table = 'barang_masuks';
protected $fillable = [ protected $fillable = [

3
app/Models/Customer.php

@ -2,13 +2,14 @@
namespace App\Models; namespace App\Models;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class Customer extends Model class Customer extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'customers'; protected $table = 'customers';
protected $fillable = [ protected $fillable = [

3
app/Models/Kondisi_Peti.php

@ -2,13 +2,14 @@
namespace App\Models; namespace App\Models;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class Kondisi_Peti extends Model class Kondisi_Peti extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'kondisi_petis'; protected $table = 'kondisi_petis';
protected $fillable = [ protected $fillable = [

3
app/Models/Peti.php

@ -2,6 +2,7 @@
namespace App\Models; namespace App\Models;
use App\Traits\UUID;
use App\Models\Customer; use App\Models\Customer;
use App\Models\Type_peti; use App\Models\Type_peti;
use App\Models\Kondisi_Peti; use App\Models\Kondisi_Peti;
@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
class Peti extends Model class Peti extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'petis'; protected $table = 'petis';
protected $fillable = [ protected $fillable = [

3
app/Models/Transfer.php

@ -3,13 +3,14 @@
namespace App\Models; namespace App\Models;
use App\Models\Peti; use App\Models\Peti;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class Transfer extends Model class Transfer extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'petis'; protected $table = 'petis';
protected $fillable = [ protected $fillable = [

3
app/Models/Type_peti.php

@ -2,13 +2,14 @@
namespace App\Models; namespace App\Models;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class Type_peti extends Model class Type_peti extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'type_petis'; protected $table = 'type_petis';
protected $fillable = [ protected $fillable = [

3
app/Models/User.php

@ -3,6 +3,7 @@
namespace App\Models; namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail; // use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Traits\UUID;
use Laravel\Sanctum\HasApiTokens; use Laravel\Sanctum\HasApiTokens;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
@ -11,7 +12,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject class User extends Authenticatable implements JWTSubject
{ {
use HasApiTokens, HasFactory, Notifiable; use HasApiTokens, HasFactory, Notifiable, UUID;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.

3
app/Models/asset_status.php

@ -3,6 +3,7 @@
namespace App\Models; namespace App\Models;
use App\Models\Peti; use App\Models\Peti;
use App\Traits\UUID;
use App\Models\Customer; use App\Models\Customer;
use App\Models\Type_peti; use App\Models\Type_peti;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
class asset_status extends Model class asset_status extends Model
{ {
use HasFactory; use HasFactory, UUID;
protected $table = 'asset_statuses'; protected $table = 'asset_statuses';
protected $fillable = [ protected $fillable = [

3
app/Models/m_asset.php

@ -2,13 +2,14 @@
namespace App\Models; namespace App\Models;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class m_asset extends Model class m_asset extends Model
{ {
use HasFactory, SoftDeletes; use HasFactory, SoftDeletes, UUID;
protected $table = 'm_assets'; protected $table = 'm_assets';
protected $fillable = [ protected $fillable = [

5
app/Models/m_role.php

@ -2,12 +2,13 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class m_role extends Model class m_role extends Model
{ {
use HasFactory; use HasFactory, UUID;
protected $table = 'm_roles'; protected $table = 'm_roles';
protected $fillable = [ protected $fillable = [

5
app/Models/m_warehouse.php

@ -2,12 +2,13 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class m_warehouse extends Model class m_warehouse extends Model
{ {
use HasFactory; use HasFactory, UUID;
protected $table = 'm_warehouses'; protected $table = 'm_warehouses';
protected $fillable = [ protected $fillable = [

36
app/Traits/UUID.php

@ -0,0 +1,36 @@
<?php
namespace App\Traits;
use Illuminate\Support\Str;
trait UUID
{
protected static function boot()
{
// Boot other traits on the Model
parent::boot();
/**
* Listen for the creating event on the user model.
* Sets the 'id' to a UUID using Str::uuid() on the instance being created
*/
static::creating(function ($model) {
if ($model->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';
}
}

1
composer.json

@ -14,6 +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",
"ramsey/uuid": "^4.7",
"simplesoftwareio/simple-qrcode": "^4.2" "simplesoftwareio/simple-qrcode": "^4.2"
}, },
"require-dev": { "require-dev": {

241
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": "37f98cab1d340231d5d4d9764bef781d", "content-hash": "45d30d4d24966e48bb5a373edf574207",
"packages": [ "packages": [
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -1357,16 +1357,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v10.29.0", "version": "v10.31.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "2d002849a16ad131110a50cbea4d64dbb78515a3" "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/2d002849a16ad131110a50cbea4d64dbb78515a3", "url": "https://api.github.com/repos/laravel/framework/zipball/507ce9b28bce4b5e4140c28943092ca38e9a52e4",
"reference": "2d002849a16ad131110a50cbea4d64dbb78515a3", "reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1555,20 +1555,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "laravel/prompts",
"version": "v0.1.12", "version": "v0.1.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/prompts.git", "url": "https://github.com/laravel/prompts.git",
"reference": "b35f249028c22016e45e48626e19e5d42fd827ff" "reference": "e1379d8ead15edd6cc4369c22274345982edc95a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/b35f249028c22016e45e48626e19e5d42fd827ff", "url": "https://api.github.com/repos/laravel/prompts/zipball/e1379d8ead15edd6cc4369c22274345982edc95a",
"reference": "b35f249028c22016e45e48626e19e5d42fd827ff", "reference": "e1379d8ead15edd6cc4369c22274345982edc95a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1610,22 +1610,22 @@
], ],
"support": { "support": {
"issues": "https://github.com/laravel/prompts/issues", "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", "name": "laravel/sanctum",
"version": "v3.3.1", "version": "v3.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/sanctum.git", "url": "https://github.com/laravel/sanctum.git",
"reference": "338f633e6487e76b255470d3373fbc29228aa971" "reference": "e1a272893bec13cf135627f7e156030b3afe1e60"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/sanctum/zipball/338f633e6487e76b255470d3373fbc29228aa971", "url": "https://api.github.com/repos/laravel/sanctum/zipball/e1a272893bec13cf135627f7e156030b3afe1e60",
"reference": "338f633e6487e76b255470d3373fbc29228aa971", "reference": "e1a272893bec13cf135627f7e156030b3afe1e60",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1678,7 +1678,7 @@
"issues": "https://github.com/laravel/sanctum/issues", "issues": "https://github.com/laravel/sanctum/issues",
"source": "https://github.com/laravel/sanctum" "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", "name": "laravel/serializable-closure",
@ -1811,18 +1811,6 @@
}, },
{ {
"name": "lcobucci/clock", "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", "version": "2.3.0",
"source": { "source": {
"type": "git", "type": "git",
@ -1833,16 +1821,11 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876",
"reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876",
>>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "~8.1.0 || ~8.2.0", "php": "~8.1.0 || ~8.2.0",
<<<<<<< HEAD
"psr/clock": "^1.0"
=======
"stella-maris/clock": "^0.1.7" "stella-maris/clock": "^0.1.7"
>>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad
}, },
"provide": { "provide": {
"psr/clock-implementation": "1.0" "psr/clock-implementation": "1.0"
@ -1876,11 +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",
<<<<<<< HEAD
"source": "https://github.com/lcobucci/clock/tree/3.0.0"
=======
"source": "https://github.com/lcobucci/clock/tree/2.3.0" "source": "https://github.com/lcobucci/clock/tree/2.3.0"
>>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad
}, },
"funding": [ "funding": [
{ {
@ -1892,11 +1871,7 @@
"type": "patreon" "type": "patreon"
} }
], ],
<<<<<<< HEAD
"time": "2022-12-19T15:00:24+00:00"
=======
"time": "2022-12-19T14:38:11+00:00" "time": "2022-12-19T14:38:11+00:00"
>>>>>>> 549f8b9a361a5f1f70601f56ab3f8b0290f617ad
}, },
{ {
"name": "lcobucci/jwt", "name": "lcobucci/jwt",
@ -2164,16 +2139,16 @@
}, },
{ {
"name": "league/flysystem", "name": "league/flysystem",
"version": "3.18.0", "version": "3.19.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/flysystem.git", "url": "https://github.com/thephpleague/flysystem.git",
"reference": "015633a05aee22490495159237a5944091d8281e" "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/015633a05aee22490495159237a5944091d8281e", "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b2aa10f2326e0351399b8ce68e287d8e9209a83",
"reference": "015633a05aee22490495159237a5944091d8281e", "reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2238,7 +2213,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/flysystem/issues", "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": [ "funding": [
{ {
@ -2250,20 +2225,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-20T17:59:40+00:00" "time": "2023-11-07T09:04:28+00:00"
}, },
{ {
"name": "league/flysystem-local", "name": "league/flysystem-local",
"version": "3.18.0", "version": "3.19.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/flysystem-local.git", "url": "https://github.com/thephpleague/flysystem-local.git",
"reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32" "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e7381ef7643f658b87efb7dbe98fe538fb1bbf32", "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
"reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32", "reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2298,7 +2273,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/thephpleague/flysystem-local/issues", "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": [ "funding": [
{ {
@ -2310,7 +2285,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-19T20:07:13+00:00" "time": "2023-11-06T20:35:28+00:00"
}, },
{ {
"name": "league/mime-type-detection", "name": "league/mime-type-detection",
@ -2370,28 +2345,28 @@
}, },
{ {
"name": "maatwebsite/excel", "name": "maatwebsite/excel",
"version": "3.1.49", "version": "3.1.50",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git", "url": "https://github.com/SpartnerNL/Laravel-Excel.git",
"reference": "769209f49ebe3419017114f98bd61e2a7d9af259" "reference": "d79e66391aa306983bb7e234503f5605c3e33348"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/769209f49ebe3419017114f98bd61e2a7d9af259", "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/d79e66391aa306983bb7e234503f5605c3e33348",
"reference": "769209f49ebe3419017114f98bd61e2a7d9af259", "reference": "d79e66391aa306983bb7e234503f5605c3e33348",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer/semver": "^3.3", "composer/semver": "^3.3",
"ext-json": "*", "ext-json": "*",
"illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0", "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0",
"php": "^7.0|^8.0", "php": "^7.0||^8.0",
"phpoffice/phpspreadsheet": "^1.18", "phpoffice/phpspreadsheet": "^1.18",
"psr/simple-cache": "^1.0|^2.0|^3.0" "psr/simple-cache": "^1.0||^2.0||^3.0"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench": "^6.0|^7.0|^8.0", "orchestra/testbench": "^6.0||^7.0||^8.0",
"predis/predis": "^1.1" "predis/predis": "^1.1"
}, },
"type": "library", "type": "library",
@ -2434,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.49" "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.50"
}, },
"funding": [ "funding": [
{ {
@ -2446,7 +2421,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-26T09:01:33+00:00" "time": "2023-11-06T11:29:48+00:00"
}, },
{ {
"name": "maennchen/zipstream-php", "name": "maennchen/zipstream-php",
@ -4258,16 +4233,16 @@
}, },
{ {
"name": "ramsey/uuid", "name": "ramsey/uuid",
"version": "4.7.4", "version": "4.7.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ramsey/uuid.git", "url": "https://github.com/ramsey/uuid.git",
"reference": "60a4c63ab724854332900504274f6150ff26d286" "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
"reference": "60a4c63ab724854332900504274f6150ff26d286", "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4334,7 +4309,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/ramsey/uuid/issues", "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": [ "funding": [
{ {
@ -4346,7 +4321,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-04-15T23:01:58+00:00" "time": "2023-11-08T05:53:05+00:00"
}, },
{ {
"name": "sabberworm/php-css-parser", "name": "sabberworm/php-css-parser",
@ -4518,16 +4493,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.3.4", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4588,7 +4563,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.3.4" "source": "https://github.com/symfony/console/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -4604,7 +4579,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-16T10:10:12+00:00" "time": "2023-10-31T08:09:35+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
@ -5034,16 +5009,16 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v6.3.7", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e" "reference": "ce332676de1912c4389222987193c3ef38033df6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/59d1837d5d992d16c2628cd0d6b76acf8d69b33e", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ce332676de1912c4389222987193c3ef38033df6",
"reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e", "reference": "ce332676de1912c4389222987193c3ef38033df6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5091,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.7" "source": "https://github.com/symfony/http-foundation/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -5107,20 +5082,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-28T23:55:27+00:00" "time": "2023-11-07T10:17:15+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v6.3.7", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "6d4098095f93279d9536a0e9124439560cc764d0" "reference": "929202375ccf44a309c34aeca8305408442ebcc1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6d4098095f93279d9536a0e9124439560cc764d0", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/929202375ccf44a309c34aeca8305408442ebcc1",
"reference": "6d4098095f93279d9536a0e9124439560cc764d0", "reference": "929202375ccf44a309c34aeca8305408442ebcc1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5204,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.7" "source": "https://github.com/symfony/http-kernel/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -5220,7 +5195,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-29T14:31:45+00:00" "time": "2023-11-10T13:47:32+00:00"
}, },
{ {
"name": "symfony/mailer", "name": "symfony/mailer",
@ -6420,16 +6395,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.3.5", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" "reference": "13880a87790c76ef994c91e87efb96134522577a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a",
"reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "reference": "13880a87790c76ef994c91e87efb96134522577a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6486,7 +6461,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.3.5" "source": "https://github.com/symfony/string/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -6502,7 +6477,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-09-18T10:38:32+00:00" "time": "2023-11-09T08:28:21+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
@ -6679,16 +6654,16 @@
}, },
{ {
"name": "symfony/uid", "name": "symfony/uid",
"version": "v6.3.0", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/uid.git", "url": "https://github.com/symfony/uid.git",
"reference": "01b0f20b1351d997711c56f1638f7a8c3061e384" "reference": "819fa5ac210fb7ddda4752b91a82f50be7493dd9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/uid/zipball/01b0f20b1351d997711c56f1638f7a8c3061e384", "url": "https://api.github.com/repos/symfony/uid/zipball/819fa5ac210fb7ddda4752b91a82f50be7493dd9",
"reference": "01b0f20b1351d997711c56f1638f7a8c3061e384", "reference": "819fa5ac210fb7ddda4752b91a82f50be7493dd9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6733,7 +6708,7 @@
"uuid" "uuid"
], ],
"support": { "support": {
"source": "https://github.com/symfony/uid/tree/v6.3.0" "source": "https://github.com/symfony/uid/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -6749,20 +6724,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-04-08T07:25:02+00:00" "time": "2023-10-31T08:07:48+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v6.3.6", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "999ede244507c32b8e43aebaa10e9fce20de7c97" "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/999ede244507c32b8e43aebaa10e9fce20de7c97", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81acabba9046550e89634876ca64bfcd3c06aa0a",
"reference": "999ede244507c32b8e43aebaa10e9fce20de7c97", "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6817,7 +6792,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v6.3.6" "source": "https://github.com/symfony/var-dumper/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -6833,7 +6808,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-12T18:45:56+00:00" "time": "2023-11-08T10:42:36+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@ -7176,16 +7151,16 @@
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.15.3", "version": "2.15.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187" "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7235,7 +7210,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/filp/whoops/issues", "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": [ "funding": [
{ {
@ -7243,7 +7218,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-13T12:00:00+00:00" "time": "2023-11-03T12:00:00+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@ -7298,16 +7273,16 @@
}, },
{ {
"name": "laravel/breeze", "name": "laravel/breeze",
"version": "v1.25.1", "version": "v1.26.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/breeze.git", "url": "https://github.com/laravel/breeze.git",
"reference": "f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f" "reference": "8757692a7be1a6174a0f1a5d3c280a8912d45dd0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/breeze/zipball/f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f", "url": "https://api.github.com/repos/laravel/breeze/zipball/8757692a7be1a6174a0f1a5d3c280a8912d45dd0",
"reference": "f0507f4d1ac0e16765e9fa8e0393c9f8a25d3d6f", "reference": "8757692a7be1a6174a0f1a5d3c280a8912d45dd0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7356,20 +7331,20 @@
"issues": "https://github.com/laravel/breeze/issues", "issues": "https://github.com/laravel/breeze/issues",
"source": "https://github.com/laravel/breeze" "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", "name": "laravel/pint",
"version": "v1.13.5", "version": "v1.13.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/pint.git", "url": "https://github.com/laravel/pint.git",
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423" "reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/df105cf8ce7a8f0b8a9425ff45cd281a5448e423", "url": "https://api.github.com/repos/laravel/pint/zipball/3e3d2ab01c7d8b484c18e6100ecf53639c744fa7",
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423", "reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7380,13 +7355,13 @@
"php": "^8.1.0" "php": "^8.1.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^3.34.1", "friendsofphp/php-cs-fixer": "^3.38.0",
"illuminate/view": "^10.26.2", "illuminate/view": "^10.30.1",
"laravel-zero/framework": "^10.1.2", "laravel-zero/framework": "^10.3.0",
"mockery/mockery": "^1.6.6", "mockery/mockery": "^1.6.6",
"nunomaduro/larastan": "^2.6.4", "nunomaduro/larastan": "^2.6.4",
"nunomaduro/termwind": "^1.15.1", "nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^2.20.0" "pestphp/pest": "^2.24.2"
}, },
"bin": [ "bin": [
"builds/pint" "builds/pint"
@ -7422,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-26T09:26:10+00:00" "time": "2023-11-07T17:59:57+00:00"
}, },
{ {
"name": "laravel/sail", "name": "laravel/sail",
@ -9486,16 +9461,16 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v6.3.7", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "9758b6c69d179936435d0ffb577c3708d57e38a8" "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8", "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92",
"reference": "9758b6c69d179936435d0ffb577c3708d57e38a8", "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9538,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.7" "source": "https://github.com/symfony/yaml/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@ -9554,7 +9529,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-28T23:31:00+00:00" "time": "2023-11-06T10:58:05+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
@ -9616,5 +9591,5 @@
"php": "^8.1" "php": "^8.1"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.3.0" "plugin-api-version": "2.6.0"
} }

2
database/migrations/2023_10_23_073314_create_m_warehouses_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('m_warehouses', function (Blueprint $table) { Schema::create('m_warehouses', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('name', 32)->nullable(); $table->string('name', 32)->nullable();
$table->text('description')->nullable(); $table->text('description')->nullable();
$table->text('address')->nullable(); $table->text('address')->nullable();

7
database/migrations/2023_10_23_074754_create_m_assets_table.php

@ -12,12 +12,13 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('m_assets', function (Blueprint $table) { Schema::create('m_assets', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('seri', 50)->nullable(); $table->string('seri', 50)->nullable();
$table->string('name', 200)->nullable(); $table->string('name', 200)->nullable();
$table->text('description')->nullable(); $table->text('description')->nullable();
$table->unsignedBigInteger('warehouse_id')->nullable(); // $table->unsignedBigInteger('warehouse_id')->nullable();
$table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); // $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->date('date')->nullable();
$table->string('qr_count', 255)->nullable(); $table->string('qr_count', 255)->nullable();
$table->timestamps(); $table->timestamps();

2
database/migrations/2023_10_23_075239_create_m_roles_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('m_roles', function (Blueprint $table) { Schema::create('m_roles', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('name', 50)->nullable(); $table->string('name', 50)->nullable();
$table->text('description')->nullable(); $table->text('description')->nullable();
$table->timestamps(); $table->timestamps();

7
database/migrations/2023_10_23_075245_create_users_table.php

@ -13,7 +13,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('username', 32)->nullable(); $table->string('username', 32)->nullable();
$table->string('fullname', 50)->nullable(); $table->string('fullname', 50)->nullable();
@ -25,9 +25,8 @@ return new class extends Migration
$table->string('foto', 255)->nullable(); $table->string('foto', 255)->nullable();
$table->string('jenis_kelamin', 20)->nullable(); $table->string('jenis_kelamin', 20)->nullable();
$table->string('agama', 15)->nullable(); $table->string('agama', 15)->nullable();
$table->foreignId('role_id')->nullable()->constrained('m_roles')->onDelete('cascade')->nullable(); $table->foreignUuid('role_id')->nullable()->constrained('m_roles')->cascadeOnDelete();
$table->bigInteger('warehouse_id')->unsigned()->nullable(); $table->foreignUuid('warehouse_id')->nullable()->constrained('m_warehouses')->onDelete('set null');
$table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null');
$table->text('address')->nullable(); $table->text('address')->nullable();
$table->timestamp('email_verified_at')->nullable(); $table->timestamp('email_verified_at')->nullable();
$table->string('password', 255)->nullable(); $table->string('password', 255)->nullable();

7
database/migrations/2023_10_23_120702_create_barang_masuks_table.php

@ -12,9 +12,10 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('barang_masuks', function (Blueprint $table) { Schema::create('barang_masuks', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->bigInteger('asset_id')->unsigned()->nullable(); // $table->bigInteger('asset_id')->unsigned()->nullable();
$table->foreign('asset_id')->references('id')->on('m_assets')->onDelete('set null'); // $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->integer('jumlah')->nullable();
$table->date('tanggal_masuk')->nullable(); $table->date('tanggal_masuk')->nullable();
$table->string('asal_barang', 200)->nullable(); $table->string('asal_barang', 200)->nullable();

8
database/migrations/2023_10_23_120927_create_barang_keluars_table.php

@ -12,9 +12,11 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('barang_keluars', function (Blueprint $table) { Schema::create('barang_keluars', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->bigInteger('assets_id')->unsigned()->nullable(); // $table->bigInteger('assets_id')->unsigned()->nullable();
$table->foreign('assets_id')->references('id')->on('m_assets')->onDelete('set null'); // $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->integer('jumlah')->nullable();
$table->date('tanggal_keluar')->nullable(); $table->date('tanggal_keluar')->nullable();
$table->string('penerima_barang', 200)->nullable(); $table->string('penerima_barang', 200)->nullable();

2
database/migrations/2023_10_28_080457_create_customers_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('customers', function (Blueprint $table) { Schema::create('customers', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('name', 50); $table->string('name', 50);
$table->string('code_customer', 15); $table->string('code_customer', 15);
$table->string('lot_no', 50); $table->string('lot_no', 50);

2
database/migrations/2023_10_28_083930_create_type_petis_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('type_petis', function (Blueprint $table) { Schema::create('type_petis', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('type', 20); $table->string('type', 20);
$table->string('size_peti', 25); $table->string('size_peti', 25);
$table->text('description')->nullable(); $table->text('description')->nullable();

2
database/migrations/2023_11_06_022213_create_kondisi_petis_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('kondisi_petis', function (Blueprint $table) { Schema::create('kondisi_petis', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->string('nama_kondisi', 50); $table->string('nama_kondisi', 50);
$table->text('deskripsi_kondisi'); $table->text('deskripsi_kondisi');
$table->timestamps(); $table->timestamps();

14
database/migrations/2023_11_06_085238_create_petis_table.php

@ -12,20 +12,16 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('petis', function (Blueprint $table) { Schema::create('petis', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->unsignedBigInteger('tipe_peti_id')->nullable(); $table->foreignUuid('tipe_peti_id')->nullable()->constrained('type_petis')->onDelete('set null');
$table->foreign('tipe_peti_id')->references('id')->on('type_petis')->onDelete('set null');
$table->string('warna', 50); $table->string('warna', 50);
$table->string('fix_lot', 100); $table->string('fix_lot', 100);
$table->integer('packing_no'); $table->integer('packing_no');
$table->unsignedBigInteger('customer_id')->nullable(); $table->foreignUuid('customer_id')->nullable()->constrained('customers')->onDelete('set null');
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('set null');
$table->integer('jumlah')->nullable(); $table->integer('jumlah')->nullable();
$table->date('date_pembuatan', 100)->nullable(); $table->date('date_pembuatan', 100)->nullable();
$table->unsignedBigInteger('warehouse_id')->nullable(); $table->foreignUuid('warehouse_id')->nullable()->constrained('m_warehouses')->onDelete('set null');
$table->foreign('warehouse_id')->references('id')->on('m_warehouses')->onDelete('set null'); $table->foreignUuid('kondisipeti_id')->nullable()->constrained('kondisi_petis')->onDelete('set null');
$table->unsignedBigInteger('kondisipeti_id')->nullable();
$table->foreign('kondisipeti_id')->references('id')->on('kondisi_petis')->onDelete('set null');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->string('created_by', 200)->nullable(); $table->string('created_by', 200)->nullable();

5
database/migrations/2023_11_06_122033_create_asset_statuses_table.php

@ -12,9 +12,8 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('asset_statuses', function (Blueprint $table) { Schema::create('asset_statuses', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->bigInteger('peti_id')->unsigned()->nullable(); $table->foreignUuid('peti_id')->nullable()->constrained('petis')->onDelete('set null');
$table->foreign('peti_id')->references('id')->on('petis')->onDelete('set null');
$table->date('exit_at')->nullable(); $table->date('exit_at')->nullable();
$table->date('est_pengembalian')->nullable(); $table->date('est_pengembalian')->nullable();
$table->string('exit_pic', 200)->nullable(); $table->string('exit_pic', 200)->nullable();

5
database/migrations/2023_11_08_132316_create_transfers_table.php

@ -12,9 +12,8 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('transfers', function (Blueprint $table) { Schema::create('transfers', function (Blueprint $table) {
$table->id(); $table->uuid('id')->primary();
$table->bigInteger('peti_id')->unsigned()->nullable(); $table->foreignUuid('peti_id')->nullable()->constrained('petis')->onDelete('set null');
$table->foreign('peti_id')->references('id')->on('petis')->onDelete('set null');
$table->date('tanggal')->nullable(); $table->date('tanggal')->nullable();
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();

5
database/seeders/Customer.php

@ -13,7 +13,9 @@ class Customer extends Seeder
*/ */
public function run(): void public function run(): void
{ {
// Sisipkan data pertama
DB::table('customers')->insert([ DB::table('customers')->insert([
'id' => 'd961ad96-211b-4f68-9ff2-111111111111',
'name' => 'DHARMA', 'name' => 'DHARMA',
'code_customer' => 'DPM', 'code_customer' => 'DPM',
'lot_no' => 'JKT23', 'lot_no' => 'JKT23',
@ -22,7 +24,10 @@ class Customer extends Seeder
'created_by' => 'Seeder', 'created_by' => 'Seeder',
'updated_by' => 'Seeder', 'updated_by' => 'Seeder',
]); ]);
// Sisipkan data kedua
DB::table('customers')->insert([ DB::table('customers')->insert([
'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222',
'name' => 'ADHI CHANDRA', 'name' => 'ADHI CHANDRA',
'code_customer' => 'ACJ', 'code_customer' => 'ACJ',
'lot_no' => 'JKT23', 'lot_no' => 'JKT23',

6
database/seeders/Kondisi_PetiSeeder.php

@ -13,16 +13,18 @@ class Kondisi_PetiSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
// Kondisi peti Rusak // Sisipkan data Kondisi Peti Rusak
Kondisi_Peti::create([ Kondisi_Peti::create([
'id' => 'd961ad96-211b-4f68-9ff2-111111111111',
'nama_kondisi' => 'Rusak', 'nama_kondisi' => 'Rusak',
'deskripsi_kondisi' => 'Barang Rusak', 'deskripsi_kondisi' => 'Barang Rusak',
'created_by' => 'Seeder', 'created_by' => 'Seeder',
'updated_by' => 'Seeder', 'updated_by' => 'Seeder',
]); ]);
// Kondisi peti Baik // Sisipkan data Kondisi Peti Baik
Kondisi_Peti::create([ Kondisi_Peti::create([
'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222',
'nama_kondisi' => 'Ready', 'nama_kondisi' => 'Ready',
'deskripsi_kondisi' => 'Barang Siap Bawa', 'deskripsi_kondisi' => 'Barang Siap Bawa',
'created_by' => 'Seeder', 'created_by' => 'Seeder',

2
database/seeders/RoleSeeder.php

@ -15,6 +15,7 @@ class RoleSeeder extends Seeder
{ {
// Role Admin // Role Admin
m_role::create([ m_role::create([
'id' => 'd961ad96-211b-4f68-9ff2-111111111111',
'name' => 'Admin', 'name' => 'Admin',
'description' => 'admin sistem', 'description' => 'admin sistem',
'created_by' => 'Seeder', 'created_by' => 'Seeder',
@ -23,6 +24,7 @@ class RoleSeeder extends Seeder
// Role User // Role User
m_role::create([ m_role::create([
'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222',
'name' => 'Operator', 'name' => 'Operator',
'description' => 'Operator sistem', 'description' => 'Operator sistem',
'created_by' => 'Seeder', 'created_by' => 'Seeder',

2
database/seeders/Type_Peti.php

@ -15,6 +15,7 @@ class Type_Peti extends Seeder
public function run(): void public function run(): void
{ {
DB::table('type_petis')->insert([ DB::table('type_petis')->insert([
'id' => 'd961ad96-211b-4f68-9ff2-111111111111',
'type' => 'Bagus', 'type' => 'Bagus',
'size_peti' => '2 X 2 X 2 X 2', 'size_peti' => '2 X 2 X 2 X 2',
'description' => 'Detail Barang Bagus', 'description' => 'Detail Barang Bagus',
@ -22,6 +23,7 @@ class Type_Peti extends Seeder
'updated_by' => 'Seeder', 'updated_by' => 'Seeder',
]); ]);
DB::table('type_petis')->insert([ DB::table('type_petis')->insert([
'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222',
'type' => 'Standar', 'type' => 'Standar',
'size_peti' => '3 X 3 X 3 X 3', 'size_peti' => '3 X 3 X 3 X 3',
'description' => 'Detail Barang Standar', 'description' => 'Detail Barang Standar',

14
database/seeders/UserSeeder.php

@ -2,9 +2,11 @@
namespace Database\Seeders; namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User; 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 class UserSeeder extends Seeder
{ {
@ -24,8 +26,8 @@ class UserSeeder extends Seeder
'jenis_kelamin' => 'Laki-laki', 'jenis_kelamin' => 'Laki-laki',
'agama' => 'Islam', 'agama' => 'Islam',
'foto' => '', // Ganti dengan nama berkas foto jika diperlukan 'foto' => '', // Ganti dengan nama berkas foto jika diperlukan
'role_id' => 1, // Ganti dengan ID peran yang sesuai 'role_id' => 'd961ad96-211b-4f68-9ff2-111111111111', // Menghasilkan UUID versi 4
'warehouse_id' => 1, // Ganti dengan ID gudang yang sesuai 'warehouse_id' => 'd961ad96-211b-4f68-9ff2-111111111111', // Menghasilkan UUID versi 4
'address' => 'Jalan Ciwatu', 'address' => 'Jalan Ciwatu',
'email_verified_at' => now(), 'email_verified_at' => now(),
'password' => bcrypt('admin'), 'password' => bcrypt('admin'),
@ -45,8 +47,8 @@ class UserSeeder extends Seeder
'jenis_kelamin' => 'Perempuan', 'jenis_kelamin' => 'Perempuan',
'agama' => 'Islam', 'agama' => 'Islam',
'foto' => '', // Ganti dengan nama berkas foto jika diperlukan 'foto' => '', // Ganti dengan nama berkas foto jika diperlukan
'role_id' => 2, // Ganti dengan ID peran yang sesuai 'role_id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', // Menghasilkan UUID versi 4
'warehouse_id' => 2, // Ganti dengan ID gudang yang sesuai 'warehouse_id' => 'a5c7b207-1a1c-43b8-89bf-222222222222', // Menghasilkan UUID versi 4
'address' => 'Jalan Gelarmendala', 'address' => 'Jalan Gelarmendala',
'email_verified_at' => now(), 'email_verified_at' => now(),
'password' => bcrypt('operator'), 'password' => bcrypt('operator'),

2
database/seeders/WarehouseSeeder.php

@ -15,6 +15,7 @@ class WarehouseSeeder extends Seeder
{ {
// Warehouse 1 // Warehouse 1
m_warehouse::create([ m_warehouse::create([
'id' => 'd961ad96-211b-4f68-9ff2-111111111111',
'name' => 'Gudang A', 'name' => 'Gudang A',
'description' => 'Gudang utama', 'description' => 'Gudang utama',
'address' => 'Alamat Gudang A', 'address' => 'Alamat Gudang A',
@ -24,6 +25,7 @@ class WarehouseSeeder extends Seeder
// Warehouse 2 // Warehouse 2
m_warehouse::create([ m_warehouse::create([
'id' => 'a5c7b207-1a1c-43b8-89bf-222222222222',
'name' => 'Gudang B', 'name' => 'Gudang B',
'description' => 'Gudang cabang', 'description' => 'Gudang cabang',
'address' => 'Alamat Gudang B', 'address' => 'Alamat Gudang B',

2
resources/views/dashboard/Master_Data/Customer/index.blade.php

@ -1,7 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('content') @section('content')
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

195
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php

@ -100,198 +100,3 @@
</body> </body>
</html> </html>
{{-- <!DOCTYPE html>
<html>
<head>
<title>Data PDF</title>
<style>
body {
font-family: Arial, sans-serif;
}
table {
width: 100%;
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid black;
}
th,
td {
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
/* Potret */
@page {
size: 7cm 14cm;
margin: 0;
}
body {
margin: 0.5cm;
}
/* Atur ukuran gambar logo */
.logo {
width: 100px;
height: 100px;
}
/* Atur ukuran gambar QR Code */
.qrcode {
width: 150px;
height: 150px;
}
/* Halaman baru setelah setiap label */
.page-break {
page-break-before: always;
}
</style>
</head>
<body>
@foreach ($peti as $item => $data)
<?php
$qrcode = base64_encode(
QrCode::format('svg')
->size(150)
->errorCorrection('H')
->generate($data->fix_lot . ';' . $data->id . ';' . $data->warehouse_id),
);
?>
<div class="page-break"></div> <!-- Halaman baru setelah setiap label -->
<table style="width:100%; margin-top: 10px;" class="table table-bordered">
<tr>
<td rowspan="2">
<img src="data:image/jpeg;base64,<?= base64_encode(file_get_contents('assets/img/logo istw.jpg')) ?>"
alt="Logo ISTW" class="logo">
</td>
<td>PETI NUMBER</td>
<td>BARCODE</td>
</tr>
<tr>
<td>
{{ $data->fix_lot }}
</td>
<td rowspan="4">
<img src="data:image/svg+xml;base64,{{ $qrcode }}" alt="QR Code" class="qrcode">
</td>
</tr>
<tr>
<td>PT. ISTW</td>
<td>CUSTOMER</td>
</tr>
<tr>
<td>QTY PETI</td>
<td rowspan="2">PT. {{ $data->customer->name }}</td>
</tr>
<tr>
<td>1</td>
</tr>
</table>
@endforeach
</body>
</html> --}}
{{-- <!DOCTYPE html>
<html>
<head>
<title>Data PDF</title>
<style>
body {
font-family: Arial, sans-serif;
page-break-before: always;
}
h1 {
text-align: center;
}
table {
width: 100%;
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid black;
}
th,
td {
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
@foreach ($peti as $item => $data)
<?php
$qrcode = base64_encode(
QrCode::format('svg')
->size(150)
->errorCorrection('H')
->generate($data->fix_lot . ';' . $data->id . ';' . $data->warehouse_id),
);
?>
@if ($loop->index % 3 == 0)
<div style="page-break-before: always;"></div>
@endif
<table style="width:100%; margin-top: 10px;" class="table table-bordered">
<tr>
<td rowspan="2">
<img src="data:image/jpeg;base64,<?= base64_encode(file_get_contents('assets/img/logo istw.jpg')) ?>"
alt="Logo ISTW" width="100" height="100">
</td>
<td>PETI NUMBER</td>
<td>BARCODE</td>
</tr>
<tr>
<td>
{{ $data->fix_lot }}
</td>
<td rowspan="4">
<img src="data:image/svg+xml;base64,{{ $qrcode }}" alt="QR Code" />
</td>
</tr>
<tr>
<td>PT. ISTW</td>
<td>CUSTOMER</td>
</tr>
<tr>
<td>QTY PETI</td>
<td rowspan="2">PT. {{ $data->customer->name }}</td>
</tr>
<tr>
<td>1</td>
</tr>
</table>
@endforeach
</body>
</html> --}}

2
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php

@ -11,7 +11,7 @@
</style> </style>
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

2
resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php

@ -1,7 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('content') @section('content')
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -2,7 +2,7 @@
@section('title', 'Role') @section('title', 'Role')
@section('content') @section('content')
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

2
resources/views/dashboard/Master_Data/User/index.blade.php

@ -1,7 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('content') @section('content')
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -3,7 +3,7 @@
@section('content') @section('content')
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -1,6 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('title', 'Tambah Peminjaman') @section('title', 'Tambah Peminjaman')
@section('content') @section('content')
@include('layouts.components.alert-prompt')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -1,6 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('title', 'Edit Peminjaman') @section('title', 'Edit Peminjaman')
@section('content') @section('content')
@include('layouts.components.alert-prompt')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -11,7 +11,7 @@
</style> </style>
@include('layouts.components.alert-prompt') @include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -1,6 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('title', 'Update Data Pengembalian') @section('title', 'Update Data Pengembalian')
@section('content') @section('content')
@include('layouts.components.alert-prompt')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">

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

@ -10,7 +10,7 @@
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6> <h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6>

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

@ -87,7 +87,7 @@
</div> </div>
<!-- Area Bar Chart --> <!-- Area Bar Chart -->
<div class="col-xl-8 col-lg-7"> <div class="col-xl-7 col-lg-7">
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6> <h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6>
@ -112,7 +112,7 @@
</div> </div>
<!-- Area Pie Chart --> <!-- Area Pie Chart -->
<div class="col-xl-4 col-lg-5"> <div class="col-xl-5 col-lg-5">
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<!-- Card Header - Dropdown --> <!-- Card Header - Dropdown -->
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
@ -120,7 +120,7 @@
</div> </div>
<!-- Card Body --> <!-- Card Body -->
<div class="card-body"> <div class="card-body">
<div class="chart-pie pt-4 pb-2"> <div class="card-body">
<canvas id="myPieChartsiopas"></canvas> <canvas id="myPieChartsiopas"></canvas>
</div> </div>
</div> </div>
@ -129,27 +129,55 @@
</div> </div>
@push('script') @push('script')
<!-- script pie chart -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script> <script>
// Data untuk grafik pie (gantilah data sesuai kebutuhan Anda) // Sample data for the pie chart
var data = { var data = {
labels: ["Gunawan", "Social", "Referral"], labels: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober",
"November", "Desember"
],
datasets: [{ datasets: [{
data: [30, 40, 30], // Misalnya, data penggunaan Anda data: [30, 40, 30, 25, 35, 45, 20, 30, 40, 50, 30, 20],
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc"], // Warna untuk setiap bagian grafik backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc", "#ff6384", "#ff9f40", "#9966ff", "#cc65fe",
"#ffcc29", "#a4e56d", "#ff3d00", "#9c9c9c", "#0d47a1"
],
}] }]
}; };
// Mengambil elemen canvas untuk grafik pie // Get the canvas element for the pie chart
var ctx = document.getElementById("myPieChartsiopas").getContext('2d'); var ctx = document.getElementById("myPieChartsiopas").getContext('2d');
// Membuat instance grafik pie // Create the pie chart instance
var myPieChart = new Chart(ctx, { var myPieChart = new Chart(ctx, {
type: 'pie', type: 'pie',
data: data, data: data,
options: {
responsive: true,
plugins: {
legend: {
position: 'right', // Set the legend position to the right
maxHeight: 200, // Set a maximum height for the legend
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.label || '';
if (label) {
label += ': ';
}
label += Math.round(context.parsed * 1) + '%';
return label;
}
}
}
}
},
}); });
</script>
// Custom legend using legendCallback
document.getElementById('chart-legend').innerHTML = myPieChart.generateLegend();
</script>
<!-- script bar chart --> <!-- script bar chart -->
<script> <script>

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

@ -1,5 +1,5 @@
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar"> <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
@if (auth()->user()->role_id == 1) @if (auth()->user()->role_id == 'D961AD96-211B-4F68-9FF2-111111111111')
<!-- Sidebar - Brand --> <!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" <a class="sidebar-brand d-flex align-items-center justify-content-center"
href="{{ route('dashboard.home.admin') }}"> href="{{ route('dashboard.home.admin') }}">
@ -27,7 +27,7 @@
<li class="nav-item {{ $active == 'menu-peminjaman' ? 'active' : '' }}"> <li class="nav-item {{ $active == 'menu-peminjaman' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.peminjaman.index') }}"> <a class="nav-link" href="{{ route('dashboard.peminjaman.index') }}">
<i class="fas fa-fw fa-upload"></i> <i class="fas fa-fw fa-upload"></i>
<span>Peminjaman</span> <span>Peminjaman Gunawan</span>
</a> </a>
</li> </li>
<li class="nav-item {{ $active == 'menu-pengembalian' ? 'active' : '' }}"> <li class="nav-item {{ $active == 'menu-pengembalian' ? 'active' : '' }}">

Loading…
Cancel
Save