diff --git a/app/Http/Controllers/BorrowedItem/BorrowedController.php b/app/Http/Controllers/BorrowedItem/BorrowedController.php new file mode 100644 index 0000000..cb411f4 --- /dev/null +++ b/app/Http/Controllers/BorrowedItem/BorrowedController.php @@ -0,0 +1,20 @@ + $borrowedItem, + ]); + } +} diff --git a/app/Http/Controllers/Branch/BranchController.php b/app/Http/Controllers/Branch/BranchController.php new file mode 100644 index 0000000..2b006b2 --- /dev/null +++ b/app/Http/Controllers/Branch/BranchController.php @@ -0,0 +1,38 @@ + $branch, + ]); + } + + public function create() + { + return Inertia::render('Admin/Branch/Create'); + } + + public function store(Request $request) + { + $branch = Branch::create([ + + // create a variable that will coordinated in my frontend form + 'branch' => $request->branch, + ]); + + // You can optionally return a response or redirect the user + // For example, redirect them to the index page or return a success message + return redirect()->route('branch.index')->with('success', 'Category created successfully'); + } +} diff --git a/app/Http/Controllers/Categories/CategoriesController.php b/app/Http/Controllers/Categories/CategoriesController.php new file mode 100644 index 0000000..5a860f2 --- /dev/null +++ b/app/Http/Controllers/Categories/CategoriesController.php @@ -0,0 +1,41 @@ + $categories, + ]); + } + + public function create() + { + return Inertia::render('Admin/Categories/Create'); + } + + public function store(Request $request) + { + $categories = categories::create([ + + // create a variable that will coordinated in my frontend form + 'categories' => $request->categories, + ]); + + // You can optionally return a response or redirect the user + // For example, redirect them to the index page or return a success message + return redirect()->route('categories.index')->with('success', 'Category created successfully'); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Equipment/EquipmentController.php b/app/Http/Controllers/Equipment/EquipmentController.php new file mode 100644 index 0000000..b2f2e3e --- /dev/null +++ b/app/Http/Controllers/Equipment/EquipmentController.php @@ -0,0 +1,41 @@ + $equipments, + ]); + } + + public function create() + { + return Inertia::render('Admin/Equipment/Create'); + } + + public function store(Request $request) + { + $equipments = Equipment::create([ + + // create a variable that will coordinated in my frontend form + 'equipments' => $request->equipments, + ]); + + // You can optionally return a response or redirect the user + // For example, redirect them to the index page or return a success message + return redirect()->route('equipment.index')->with('success', 'Category created successfully'); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Library/SettingController.php b/app/Http/Controllers/Library/SettingController.php new file mode 100644 index 0000000..ed0d477 --- /dev/null +++ b/app/Http/Controllers/Library/SettingController.php @@ -0,0 +1,15 @@ + $product, + ]); + } + + public function store(Request $request) + { + + // i create a variable located my model named product same as the user + + $product = Product::create([ + + // create a variable that will coordinated in my frontend form + 'productName' => $request->productName, + 'productId' => $request->productId, + 'branch' => $request->branch, + 'status' => $request->status, + 'productDescription' => $request->productDescription, + 'productFileUpload' => $request->productFileUpload, + ]); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Management/UserManagementController.php b/app/Http/Controllers/Management/UserManagementController.php new file mode 100644 index 0000000..5264f97 --- /dev/null +++ b/app/Http/Controllers/Management/UserManagementController.php @@ -0,0 +1,51 @@ + $users, + ]); + } + + public function create() + { + return Inertia::render('Admin/Management/User/Create'); + } + + + + public function store(Request $request) + { + $request->validate([ + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:' . User::class, + 'password' => ['required', 'confirmed', Rules\Password::defaults()], + ]); + + $user = User::create([ + 'name' => $request->name, + 'email' => $request->email, + 'password' => Hash::make($request->password), + ]); + + return redirect()->route('management.index')->with('success', 'Category created successfully'); + + // event(new Registered($user)); + + // Auth::login($user); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 873b4f7..29b52a2 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -24,6 +24,10 @@ public function edit(Request $request): Response ]); } + public function show() + { + return Inertia::render('Profile/Show'); + } /** * Update the user's profile information. */ diff --git a/app/Http/Controllers/Qr/GenerateQrController.php b/app/Http/Controllers/Qr/GenerateQrController.php new file mode 100644 index 0000000..ed6c466 --- /dev/null +++ b/app/Http/Controllers/Qr/GenerateQrController.php @@ -0,0 +1,15 @@ + $qrcodes, + ]); + } + + public function create() + { + return Inertia::render('Admin/Qr/Create'); + } + + public function store(Request $request) + { + // Validate the request data + $validatedData = $request->validate([ + 'productName' => 'required', + 'productId' => 'required', + 'branch' => 'required', + 'status' => 'required', + 'qrDescription' => 'required', + 'fileUpload' => 'required', + 'qrcode' => 'required', + ]); + + // Create the Qrcode model with the validated data + $product = Qrcode::create($validatedData); + + return redirect()->route('qr.index')->with('success', 'Category created successfully'); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Storage/StorageController.php b/app/Http/Controllers/Storage/StorageController.php new file mode 100644 index 0000000..90ef740 --- /dev/null +++ b/app/Http/Controllers/Storage/StorageController.php @@ -0,0 +1,23 @@ + $storage, + ]); + } +} diff --git a/app/Http/Controllers/Warranty/WarrantyController.php b/app/Http/Controllers/Warranty/WarrantyController.php new file mode 100644 index 0000000..d6cf0aa --- /dev/null +++ b/app/Http/Controllers/Warranty/WarrantyController.php @@ -0,0 +1,23 @@ + $warranty, + ]); + } +} \ No newline at end of file diff --git a/app/Models/Borrowed_item.php b/app/Models/Borrowed_item.php new file mode 100644 index 0000000..e43dd4c --- /dev/null +++ b/app/Models/Borrowed_item.php @@ -0,0 +1,22 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'borrowed_item', + + ]; +} diff --git a/app/Models/Branch.php b/app/Models/Branch.php new file mode 100644 index 0000000..973d00e --- /dev/null +++ b/app/Models/Branch.php @@ -0,0 +1,22 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'branch', + + ]; +} \ No newline at end of file diff --git a/app/Models/Categories.php b/app/Models/Categories.php new file mode 100644 index 0000000..4816d4e --- /dev/null +++ b/app/Models/Categories.php @@ -0,0 +1,25 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'categories', + + ]; +} \ No newline at end of file diff --git a/app/Models/Equipment.php b/app/Models/Equipment.php new file mode 100644 index 0000000..0267e72 --- /dev/null +++ b/app/Models/Equipment.php @@ -0,0 +1,22 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'equipments', + ]; +} \ No newline at end of file diff --git a/app/Models/Product.php b/app/Models/Product.php new file mode 100644 index 0000000..6db4e6f --- /dev/null +++ b/app/Models/Product.php @@ -0,0 +1,29 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'productName', + 'productId', + 'branch', + 'status', + 'productDescription', + 'productFileUpload', + + ]; + +} diff --git a/app/Models/Qrcode.php b/app/Models/Qrcode.php new file mode 100644 index 0000000..8083806 --- /dev/null +++ b/app/Models/Qrcode.php @@ -0,0 +1,31 @@ + + */ + + // i use fillable in my item that i need to be populated + protected $fillable = [ + 'productName', + 'productId', + 'branch', + 'status', + 'qrDescription', + 'fileUpload', + 'qrcode', + // 'status', + // 'productDescription', + + ]; +} diff --git a/app/Models/Storage.php b/app/Models/Storage.php new file mode 100644 index 0000000..54a29db --- /dev/null +++ b/app/Models/Storage.php @@ -0,0 +1,11 @@ +id(); + $table->string('productName'); + $table->string('productId'); + $table->string('branch'); + $table->string('status')->default(true); // Default to true + $table->longText('productDescription'); + $table->string('productFileUpload')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('products'); + } +}; diff --git a/database/migrations/2023_09_23_125944_create_storages_table.php b/database/migrations/2023_09_23_125944_create_storages_table.php new file mode 100644 index 0000000..7ca5264 --- /dev/null +++ b/database/migrations/2023_09_23_125944_create_storages_table.php @@ -0,0 +1,31 @@ +id(); + $table->string('productName'); + $table->integer('productId'); + $table->string('itemName'); + $table->boolean('status')->default(true); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('storages'); + } +}; diff --git a/database/migrations/2023_09_25_024820_create_qrcodes_table.php b/database/migrations/2023_09_25_024820_create_qrcodes_table.php new file mode 100644 index 0000000..3f8cdc3 --- /dev/null +++ b/database/migrations/2023_09_25_024820_create_qrcodes_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('productName')->nullable(); + $table->string('productId')->nullable(); + $table->string('branch')->nullable(); + $table->string('status')->default(true); // Default to true + $table->longText('qrDescription')->nullable(); + $table->string('fileUpload')->nullable(); + $table->string('qrcode')->nullable(); // Add an image column + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('qrcodes'); + } +}; diff --git a/database/migrations/2023_10_02_064541_create_categories_table.php b/database/migrations/2023_10_02_064541_create_categories_table.php new file mode 100644 index 0000000..14182dc --- /dev/null +++ b/database/migrations/2023_10_02_064541_create_categories_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('categories')->nullable(); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('categories'); + } +}; \ No newline at end of file diff --git a/database/migrations/2023_10_03_024857_create_equipment_table.php b/database/migrations/2023_10_03_024857_create_equipment_table.php new file mode 100644 index 0000000..f5e8979 --- /dev/null +++ b/database/migrations/2023_10_03_024857_create_equipment_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('equipments')->nullable(); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('equipment'); + } +}; \ No newline at end of file diff --git a/database/migrations/2023_10_03_060621_create_branches_table.php b/database/migrations/2023_10_03_060621_create_branches_table.php new file mode 100644 index 0000000..3de8663 --- /dev/null +++ b/database/migrations/2023_10_03_060621_create_branches_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('branch')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('branches'); + } +}; \ No newline at end of file diff --git a/database/migrations/2023_10_03_065006_create_warranty_table.php b/database/migrations/2023_10_03_065006_create_warranty_table.php new file mode 100644 index 0000000..8efd49e --- /dev/null +++ b/database/migrations/2023_10_03_065006_create_warranty_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('warranty')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('warranties'); + } +}; \ No newline at end of file diff --git a/database/migrations/2023_10_13_013556_create_borrowed_item_table.php b/database/migrations/2023_10_13_013556_create_borrowed_item_table.php new file mode 100644 index 0000000..3993dee --- /dev/null +++ b/database/migrations/2023_10_13_013556_create_borrowed_item_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('borrowed_item')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('borrowed_item'); + } +}; diff --git a/database/seeders/Borrowed_itemSeeder.php b/database/seeders/Borrowed_itemSeeder.php new file mode 100644 index 0000000..1a50f70 --- /dev/null +++ b/database/seeders/Borrowed_itemSeeder.php @@ -0,0 +1,25 @@ + $faker->word, + ]); + } + } +} diff --git a/database/seeders/BranchSeeder.php b/database/seeders/BranchSeeder.php new file mode 100644 index 0000000..8318680 --- /dev/null +++ b/database/seeders/BranchSeeder.php @@ -0,0 +1,24 @@ + $faker->word, + ]); + } + } +} \ No newline at end of file diff --git a/database/seeders/CategoriesSeeder.php b/database/seeders/CategoriesSeeder.php new file mode 100644 index 0000000..7225cd9 --- /dev/null +++ b/database/seeders/CategoriesSeeder.php @@ -0,0 +1,25 @@ + $faker->word(), + ]); + } + } +} \ No newline at end of file diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a9f4519..87460aa 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -3,6 +3,8 @@ namespace Database\Seeders; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; + +use App\Models\Branch; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder @@ -14,9 +16,27 @@ public function run(): void { // \App\Models\User::factory(10)->create(); - // \App\Models\User::factory()->create([ - // 'name' => 'Test User', - // 'email' => 'test@example.com', - // ]); + \App\Models\User::factory()->create([ + 'name' => 'Jhunriz', + 'email' => 'jhunriz14@gmail.com', + 'password' => '123456789' + ]); + + $this->call([ + ProductsTableSeeder::class, + ]); + + $this->call([ + StorageTableSeeder::class, + ]); + + $this->call([ + QrcodeTableSeeder::class, + ]); + $this->call([CategoriesSeeder::class,]); + $this->call([EquipmentSeeder::class,]); + $this->call([BranchSeeder::class,]); + $this->call([WarrantySeeder::class,]); + $this->call([Borrowed_itemSeeder::class,]); } } diff --git a/database/seeders/EquipmentSeeder.php b/database/seeders/EquipmentSeeder.php new file mode 100644 index 0000000..3f4e4b5 --- /dev/null +++ b/database/seeders/EquipmentSeeder.php @@ -0,0 +1,25 @@ + $faker->word(), + ]); + } + } +} \ No newline at end of file diff --git a/database/seeders/ProductsTableSeeder.php b/database/seeders/ProductsTableSeeder.php new file mode 100644 index 0000000..aa8f5e8 --- /dev/null +++ b/database/seeders/ProductsTableSeeder.php @@ -0,0 +1,43 @@ + $faker->word(), + 'productId' => $faker->randomNumber(), + 'branch' => $faker->word(), + 'status' => true, + 'productDescription' => $faker->word(), + 'productFileUpload' => $faker->imageUrl($width = 640, $height = 480), + ]); + } + + + + // \App\Models\User::factory()->create([ + // 'productName' => 'Product 1', + // 'productId' => 'PROD001', + // 'itemName' => 'Item 1', + // 'status' => true, + // ]); + } +} \ No newline at end of file diff --git a/database/seeders/QrcodeTableSeeder.php b/database/seeders/QrcodeTableSeeder.php new file mode 100644 index 0000000..20c16bb --- /dev/null +++ b/database/seeders/QrcodeTableSeeder.php @@ -0,0 +1,32 @@ + $faker->word(), + 'productId' => $faker->randomNumber(), + 'branch' => $faker->word(), + 'status' => true, + 'qrDescription' => $faker->word(), + 'fileUpload' => $faker->imageUrl($width = 640, $height = 480), + 'qrcode' => $faker->imageUrl($width = 640, $height = 480), // Generate a fake image URL + ]); + } + } +} diff --git a/database/seeders/StorageTableSeeder.php b/database/seeders/StorageTableSeeder.php new file mode 100644 index 0000000..5a312e2 --- /dev/null +++ b/database/seeders/StorageTableSeeder.php @@ -0,0 +1,25 @@ +insert([ + 'productName' => \Faker\Factory::create()->word(), + 'productId' => \Faker\Factory::create()->randomNumber(), + 'itemName' => \Faker\Factory::create()->word(), + 'status' => true, + ]); + } + } +} diff --git a/database/seeders/WarrantySeeder.php b/database/seeders/WarrantySeeder.php new file mode 100644 index 0000000..0b1e5b7 --- /dev/null +++ b/database/seeders/WarrantySeeder.php @@ -0,0 +1,25 @@ + $faker->word, + ]); + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 35927a5..02f60b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,15 @@ "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.5", - "mui-datatables": "^4.3.0" + "@mui/x-charts": "^6.0.0-alpha.9", + "html2canvas": "^1.4.1", + "mui-datatables": "^4.3.0", + "notistack": "^3.0.1", + "qrcode.react": "^3.1.0", + "react-barcode": "^1.4.6", + "react-html5-camera-photo": "^1.5.11", + "react-qr-code": "^2.0.12", + "react-qr-reader": "^3.0.0-beta-1" }, "devDependencies": { "@inertiajs/react": "^1.0.0", @@ -1228,6 +1236,38 @@ "react": "^17.0.0 || ^18.0.0" } }, + "node_modules/@mui/x-charts": { + "version": "6.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-6.0.0-alpha.9.tgz", + "integrity": "sha512-2DVTbyxsm3g0D6kztQP9W4W9OOGeIQ/g6Ip6gjHj2wOOqkDB36bZxwVG/HlJuaVFBL001vI2VkYJYy+helw9gA==", + "dependencies": { + "@babel/runtime": "^7.22.11", + "clsx": "^2.0.0", + "d3-color": "^3.1.0", + "d3-scale": "^4.0.2", + "d3-shape": "^3.2.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.4.1", + "@mui/system": "^5.4.1", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1367,6 +1407,37 @@ "vite": "^4.2.0" } }, + "node_modules/@zxing/browser": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@zxing/browser/-/browser-0.0.7.tgz", + "integrity": "sha512-AepzMgDnD6EjxewqmXpHJsi4S3Gw9ilZJLIbTf6fWuWySEcHBodnGu3p7FWlgq1Sd5QyfPhTum5z3CBkkhMVng==", + "optionalDependencies": { + "@zxing/text-encoding": "^0.9.0" + }, + "peerDependencies": { + "@zxing/library": "^0.18.3" + } + }, + "node_modules/@zxing/library": { + "version": "0.18.6", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.18.6.tgz", + "integrity": "sha512-bulZ9JHoLFd9W36pi+7e7DnEYNJhljYjZ1UTsKPOoLMU3qtC+REHITeCRNx40zTRJZx18W5TBRXt5pq2Uopjsw==", + "dependencies": { + "ts-custom-error": "^3.0.0" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1477,6 +1548,14 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1728,6 +1807,14 @@ "node": ">=10" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -1745,6 +1832,100 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1993,7 +2174,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -2073,6 +2253,14 @@ "node": ">=4" } }, + "node_modules/goober": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.13.tgz", + "integrity": "sha512-jFj3BQeleOoy7t93E9rZ2de+ScC4lQICLwiAQmKMg9F6roKGaLSHoCDYKkWlSafg138jejvq/mTdvmnwDQgqoQ==", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2129,6 +2317,18 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -2160,6 +2360,14 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "engines": { + "node": ">=12" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -2232,6 +2440,66 @@ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, + "node_modules/jsbarcode": { + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/jsbarcode/-/jsbarcode-3.11.5.tgz", + "integrity": "sha512-zv3KsH51zD00I/LrFzFSM6dst7rDn0vIMzaiZFL7qusTjPZiPtxg3zxetp0RR7obmjTw4f6NyGgbdkBCgZUIrA==", + "bin": { + "auto.js": "bin/barcodes/CODE128/auto.js", + "Barcode.js": "bin/barcodes/Barcode.js", + "barcodes": "bin/barcodes", + "canvas.js": "bin/renderers/canvas.js", + "checksums.js": "bin/barcodes/MSI/checksums.js", + "codabar": "bin/barcodes/codabar", + "CODE128": "bin/barcodes/CODE128", + "CODE128_AUTO.js": "bin/barcodes/CODE128/CODE128_AUTO.js", + "CODE128.js": "bin/barcodes/CODE128/CODE128.js", + "CODE128A.js": "bin/barcodes/CODE128/CODE128A.js", + "CODE128B.js": "bin/barcodes/CODE128/CODE128B.js", + "CODE128C.js": "bin/barcodes/CODE128/CODE128C.js", + "CODE39": "bin/barcodes/CODE39", + "constants.js": "bin/barcodes/ITF/constants.js", + "defaults.js": "bin/options/defaults.js", + "EAN_UPC": "bin/barcodes/EAN_UPC", + "EAN.js": "bin/barcodes/EAN_UPC/EAN.js", + "EAN13.js": "bin/barcodes/EAN_UPC/EAN13.js", + "EAN2.js": "bin/barcodes/EAN_UPC/EAN2.js", + "EAN5.js": "bin/barcodes/EAN_UPC/EAN5.js", + "EAN8.js": "bin/barcodes/EAN_UPC/EAN8.js", + "encoder.js": "bin/barcodes/EAN_UPC/encoder.js", + "ErrorHandler.js": "bin/exceptions/ErrorHandler.js", + "exceptions": "bin/exceptions", + "exceptions.js": "bin/exceptions/exceptions.js", + "fixOptions.js": "bin/help/fixOptions.js", + "GenericBarcode": "bin/barcodes/GenericBarcode", + "getOptionsFromElement.js": "bin/help/getOptionsFromElement.js", + "getRenderProperties.js": "bin/help/getRenderProperties.js", + "help": "bin/help", + "index.js": "bin/renderers/index.js", + "index.tmp.js": "bin/barcodes/index.tmp.js", + "ITF": "bin/barcodes/ITF", + "ITF.js": "bin/barcodes/ITF/ITF.js", + "ITF14.js": "bin/barcodes/ITF/ITF14.js", + "JsBarcode.js": "bin/JsBarcode.js", + "linearizeEncodings.js": "bin/help/linearizeEncodings.js", + "merge.js": "bin/help/merge.js", + "MSI": "bin/barcodes/MSI", + "MSI.js": "bin/barcodes/MSI/MSI.js", + "MSI10.js": "bin/barcodes/MSI/MSI10.js", + "MSI1010.js": "bin/barcodes/MSI/MSI1010.js", + "MSI11.js": "bin/barcodes/MSI/MSI11.js", + "MSI1110.js": "bin/barcodes/MSI/MSI1110.js", + "object.js": "bin/renderers/object.js", + "options": "bin/options", + "optionsFromStrings.js": "bin/help/optionsFromStrings.js", + "pharmacode": "bin/barcodes/pharmacode", + "renderers": "bin/renderers", + "shared.js": "bin/renderers/shared.js", + "svg.js": "bin/renderers/svg.js", + "UPC.js": "bin/barcodes/EAN_UPC/UPC.js", + "UPCE.js": "bin/barcodes/EAN_UPC/UPCE.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2244,6 +2512,11 @@ "node": ">=4" } }, + "node_modules/jslib-html5-camera-photo": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/jslib-html5-camera-photo/-/jslib-html5-camera-photo-3.3.4.tgz", + "integrity": "sha512-qysjLnP4bud0+g0qs5uA/7i569x+6ID2ufgezf9XQ+BE3EvhYjz177vi9WXLEuq+V6C/WXEv73NUICvHm5VGmQ==" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2524,6 +2797,35 @@ "node": ">=0.10.0" } }, + "node_modules/notistack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-3.0.1.tgz", + "integrity": "sha512-ntVZXXgSQH5WYfyU+3HfcXuKaapzAJ8fBLQ/G618rn3yvSzEbnOB8ZSOwhX+dAORy/lw+GC2N061JA0+gYWTVA==", + "dependencies": { + "clsx": "^1.1.0", + "goober": "^2.0.33" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/notistack" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/notistack/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/nprogress": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", @@ -2817,6 +3119,19 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, + "node_modules/qr.js": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz", + "integrity": "sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==" + }, + "node_modules/qrcode.react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.1.0.tgz", + "integrity": "sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", @@ -2871,6 +3186,18 @@ "node": ">=0.10.0" } }, + "node_modules/react-barcode": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/react-barcode/-/react-barcode-1.4.6.tgz", + "integrity": "sha512-56WCPqjgpExPVi5LgKOfxM6uSCB4Wd1r94jY2VEwkIdigPjLp8P9RyIBIyQmDraxtYGOHE0e4Uer4+QrmOIy7Q==", + "dependencies": { + "jsbarcode": "^3.8.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-display-name": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/react-display-name/-/react-display-name-0.2.5.tgz", @@ -2911,6 +3238,18 @@ "react": "^18.2.0" } }, + "node_modules/react-html5-camera-photo": { + "version": "1.5.11", + "resolved": "https://registry.npmjs.org/react-html5-camera-photo/-/react-html5-camera-photo-1.5.11.tgz", + "integrity": "sha512-5OpdW66UmwKwd0ZHvy/U9tEZj19GrcG6RDRXjs1bFBgJoWzLJoJ7YNd8rmdrizV/6go/z9GrwoWMovqCUyaJgQ==", + "dependencies": { + "jslib-html5-camera-photo": "3.3.4" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -2921,6 +3260,52 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, + "node_modules/react-qr-code": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.12.tgz", + "integrity": "sha512-k+pzP5CKLEGBRwZsDPp98/CAJeXlsYRHM2iZn1Sd5Th/HnKhIZCSg27PXO58zk8z02RaEryg+60xa4vyywMJwg==", + "dependencies": { + "prop-types": "^15.8.1", + "qr.js": "0.0.0" + }, + "peerDependencies": { + "react": "^16.x || ^17.x || ^18.x", + "react-native-svg": "*" + }, + "peerDependenciesMeta": { + "react-native-svg": { + "optional": true + } + } + }, + "node_modules/react-qr-reader": { + "version": "3.0.0-beta-1", + "resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-3.0.0-beta-1.tgz", + "integrity": "sha512-5HeFH9x/BlziRYQYGK2AeWS9WiKYZtGGMs9DXy3bcySTX3C9UJL9EwcPnWw8vlf7JP4FcrAlr1SnZ5nsWLQGyw==", + "dependencies": { + "@zxing/browser": "0.0.7", + "@zxing/library": "^0.18.3", + "rollup": "^2.67.2" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + } + }, + "node_modules/react-qr-reader/node_modules/rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/react-refresh": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", @@ -3292,6 +3677,14 @@ "node": ">=14.0.0" } }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -3333,6 +3726,14 @@ "node": ">=8.0" } }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -3395,6 +3796,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/vite": { "version": "4.4.9", "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", diff --git a/package.json b/package.json index 72ee7af..ce4c481 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,14 @@ "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.5", - "mui-datatables": "^4.3.0" + "@mui/x-charts": "^6.0.0-alpha.9", + "html2canvas": "^1.4.1", + "mui-datatables": "^4.3.0", + "notistack": "^3.0.1", + "qrcode.react": "^3.1.0", + "react-barcode": "^1.4.6", + "react-html5-camera-photo": "^1.5.11", + "react-qr-code": "^2.0.12", + "react-qr-reader": "^3.0.0-beta-1" } } diff --git a/resources/css/app.css b/resources/css/app.css index b42ef0f..8a24077 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -6,3 +6,4 @@ /* @apply w-full sm:max-w-md mt-6 px-6 py-4 shadow-lg overflow-hidden sm:rounded-lg */ @apply rounded p-10 shadow-lg } + diff --git a/resources/js/Components/Alert.jsx b/resources/js/Components/Alert.jsx new file mode 100644 index 0000000..8d3ef79 --- /dev/null +++ b/resources/js/Components/Alert.jsx @@ -0,0 +1,31 @@ +import React, { useCallback } from "react"; +import Button from "@mui/material/Button"; +import { SnackbarProvider, useSnackbar } from "notistack"; + +function SnackbarExample() { + const { enqueueSnackbar } = useSnackbar(); + const handleClickVariant = (variant) => () => { + // variant could be success, error, warning, info, or default + enqueueSnackbar("The user is Added!", { variant }); + }; + + return ( + + + + ); +} + +export default function IntegrationNotistack() { + return ( + + + + ); +} diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx new file mode 100644 index 0000000..93343ba --- /dev/null +++ b/resources/js/Components/BarcodeGenerator.jsx @@ -0,0 +1,109 @@ +import React, { useState, useRef } from "react"; +import Barcode from "react-barcode"; +import { Box, Button, TextField } from "@mui/material"; +import html2canvas from "html2canvas"; + +const BarcodeGenerator = () => { + const [productName, setProductName] = useState(""); + const barcodeRef = useRef(null); + + const handleInputChange = (e) => { + setProductName(e.target.value); + const inputValue = event.target.value.replace(/\D/g, "").slice(0, 48); + setProductName(inputValue); + }; + + const downloadBarcode = () => { + if (barcodeRef.current) { + html2canvas(barcodeRef.current).then((canvas) => { + // Create an "a" element to trigger the download + const a = document.createElement("a"); + a.href = canvas.toDataURL("image/png"); + a.download = "barcode.png"; + a.click(); + }); + } + }; + + const printBarcode = () => { + const barcodeCanvas = document.getElementById("barcode-canvas"); + const printWindow = window.open("", "", "width=1000,height=1000"); + printWindow.document.open(); + printWindow.document.write( + "Print" + ); + printWindow.document.write(barcodeCanvas.innerHTML); + printWindow.document.write(""); + printWindow.document.close(); + printWindow.print(); + printWindow.close(); + }; + + return ( +
+
+

+ Generate Barcode +

+ +
+ +
+
+
+
+
+ {productName && ( + + )} +
+
+ + +
+
+
+ ); +}; + +export default BarcodeGenerator; diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx new file mode 100644 index 0000000..45b5e5b --- /dev/null +++ b/resources/js/Components/BarcodeScanner.jsx @@ -0,0 +1,37 @@ +import React, { useEffect, useState } from "react"; + +export default function BarcodeScanner() { + const [decodedResult, setDecodedResult] = useState(null); + + useEffect(() => { + const quaggaScript = document.createElement("script"); + quaggaScript.src = + "https://unpkg.com/html5-qrcode@2.0.9/dist/html5-qrcode.min.js"; + + quaggaScript.onload = () => { + const html5QrcodeScanner = new Html5QrcodeScanner("qr-reader", { + fps: 10, + qrbox: 250, + }); + + function onScanSuccess(decodedText, decodedResult) { + setDecodedResult(decodedText); // Update the state with the scanned result + } + + html5QrcodeScanner.render(onScanSuccess); + }; + + document.body.appendChild(quaggaScript); + + return () => { + document.body.removeChild(quaggaScript); + }; + }, []); + + return ( +
+

Decoded Result: {decodedResult}

+
+
+ ); +} diff --git a/resources/js/Components/BasicPie.jsx b/resources/js/Components/BasicPie.jsx new file mode 100644 index 0000000..23ffd4c --- /dev/null +++ b/resources/js/Components/BasicPie.jsx @@ -0,0 +1,22 @@ +import * as React from "react"; +import { PieChart } from "@mui/x-charts/PieChart"; + +export default function BasicPie() { + return ( +
+ +
+ ); +} diff --git a/resources/js/Components/Card.jsx b/resources/js/Components/Card.jsx new file mode 100644 index 0000000..098b14f --- /dev/null +++ b/resources/js/Components/Card.jsx @@ -0,0 +1,37 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Card from "@mui/material/Card"; +import CardContent from "@mui/material/CardContent"; +import Typography from "@mui/material/Typography"; + +const ShippingCard = ({ title, count, icon }) => { + return ( + + + + {icon} + +
+ + {title} + + + {count} + +
+
+
+ ); +}; + +ShippingCard.propTypes = { + icon: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + count: PropTypes.string.isRequired, +}; + +export default ShippingCard; diff --git a/resources/js/Components/Clock.jsx b/resources/js/Components/Clock.jsx new file mode 100644 index 0000000..b7a64cf --- /dev/null +++ b/resources/js/Components/Clock.jsx @@ -0,0 +1,42 @@ +import { Typography } from "@mui/material"; +import React, { useState, useEffect } from "react"; + +function Clock() { + const [currentDateTime, setCurrentDateTime] = useState(new Date()); + + // Update the current date and time every second + useEffect(() => { + const intervalId = setInterval(() => { + setCurrentDateTime(new Date()); + }, 1000); + + // Clear the interval when the component unmounts + return () => clearInterval(intervalId); + }, []); + // clock + + const options = { + weekday: "long", + year: "numeric", + month: "long", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short", + }; + + const formattedDateTime = currentDateTime.toLocaleDateString( + "en-US", + options + ); + + return ( +
+ Current Date and Time +

{formattedDateTime}

+
+ ); +} + +export default Clock; diff --git a/resources/js/Components/CustomBreadcrumbs.jsx b/resources/js/Components/CustomBreadcrumbs.jsx new file mode 100644 index 0000000..3011bd5 --- /dev/null +++ b/resources/js/Components/CustomBreadcrumbs.jsx @@ -0,0 +1,29 @@ +import React from "react"; +import Typography from "@mui/material/Typography"; +import Breadcrumbs from "@mui/material/Breadcrumbs"; +import Link from "@mui/material/Link"; + +function handleClick(event) { + event.preventDefault(); +} + +export default function CustomBreadcrumbs({ items }) { + return ( +
+ + {items.map((item, index) => ( + + {item.icon} + {item.text} + + ))} + +
+ ); +} diff --git a/resources/js/Components/CustomSelect.jsx b/resources/js/Components/CustomSelect.jsx new file mode 100644 index 0000000..c15c789 --- /dev/null +++ b/resources/js/Components/CustomSelect.jsx @@ -0,0 +1,26 @@ +import React from "react"; +import FormControl from "@mui/material/FormControl"; +import InputLabel from "@mui/material/InputLabel"; +import Select from "@mui/material/Select"; +import MenuItem from "@mui/material/MenuItem"; + +export default function MySelectComponent({ + label, + value, + options, + onChange, + style, +}) { + return ( + + {label} + + + ); +} diff --git a/resources/js/Components/CustomSpeedDial.jsx b/resources/js/Components/CustomSpeedDial.jsx new file mode 100644 index 0000000..2136d0e --- /dev/null +++ b/resources/js/Components/CustomSpeedDial.jsx @@ -0,0 +1,26 @@ +import * as React from "react"; +import Box from "@mui/material/Box"; +import SpeedDial from "@mui/material/SpeedDial"; +import SpeedDialIcon from "@mui/material/SpeedDialIcon"; +import SpeedDialAction from "@mui/material/SpeedDialAction"; +import ExpandLessSharpIcon from "@mui/icons-material/ExpandLessSharp"; + +export default function CustomSpeedDial({ actions, openIcon }) { + return ( + + } + > + {actions.map((action) => ( + + ))} + + + ); +} diff --git a/resources/js/Components/CustomizeSnackBar.jsx b/resources/js/Components/CustomizeSnackBar.jsx new file mode 100644 index 0000000..39fa069 --- /dev/null +++ b/resources/js/Components/CustomizeSnackBar.jsx @@ -0,0 +1,62 @@ +import * as React from "react"; +import Stack from "@mui/material/Stack"; +import Button from "@mui/material/Button"; +import Snackbar from "@mui/material/Snackbar"; +import MuiAlert from "@mui/material/Alert"; + +const Alert = React.forwardRef(function Alert(props, ref) { + return ; +}); + +export default function CustomizedSnackbars({ + title, + color, + startIcon, + alertMessage, +}) { + const [open, setOpen] = React.useState(false); + + const handleClick = () => { + setOpen(true); + }; + + const handleClose = (event, reason) => { + if (reason === "clickaway") { + return; + } + setOpen(false); + }; + + // Your condition here (e.g., showSnackbar) + const showSnackbar = true; // Replace this with your condition + + return ( + <> + + + + {showSnackbar && ( + + + {alertMessage} + + + )} + + ); +} diff --git a/resources/js/Components/CustomizedSwitches.jsx b/resources/js/Components/CustomizedSwitches.jsx new file mode 100644 index 0000000..67b23b2 --- /dev/null +++ b/resources/js/Components/CustomizedSwitches.jsx @@ -0,0 +1,74 @@ +import * as React from "react"; +import { styled } from "@mui/material/styles"; +import FormGroup from "@mui/material/FormGroup"; +import FormControlLabel from "@mui/material/FormControlLabel"; +import Switch from "@mui/material/Switch"; +import Stack from "@mui/material/Stack"; +import IconButton from "@mui/material/IconButton"; +import CheckIcon from "@mui/icons-material/Check"; +import CloseIcon from "@mui/icons-material/Close"; + +const MaterialUISwitch = styled(Switch)(({ theme }) => ({ + width: 62, + height: 34, + padding: 7, + "& .MuiSwitch-switchBase": { + margin: 1, + padding: 0, + transform: "translateX(6px)", + "&.Mui-checked": { + color: "#fff", + transform: "translateX(22px)", + "& .MuiSwitch-thumb:before": { + backgroundImage: `url('data:image/svg+xml;utf8,')`, + }, + "& + .MuiSwitch-track": { + opacity: 1, + backgroundColor: + theme.palette.mode === "dark" ? "#8796A5" : "#aab4be", + }, + }, + }, + "& .MuiSwitch-thumb": { + backgroundColor: theme.palette.mode === "dark" ? "#003892" : "#001e3c", + width: 32, + height: 32, + "&:before": { + content: "''", + position: "absolute", + width: "100%", + height: "100%", + left: 0, + top: 0, + backgroundRepeat: "no-repeat", + backgroundPosition: "center", + backgroundImage: `url('data:image/svg+xml;utf8,')`, + }, + }, + "& .MuiSwitch-track": { + opacity: 1, + backgroundColor: theme.palette.mode === "dark" ? "#8796A5" : "#aab4be", + borderRadius: 20 / 2, + }, +})); + +export default function CustomizedSwitches({ checked, onChange, label }) { + return ( + + + } + label={label} + /> + + ); +} diff --git a/resources/js/Components/Darkmode.jsx b/resources/js/Components/Darkmode.jsx new file mode 100644 index 0000000..e96cac7 --- /dev/null +++ b/resources/js/Components/Darkmode.jsx @@ -0,0 +1,59 @@ +import React, { useState } from "react"; +import { ThemeProvider, createTheme } from "@mui/material/styles"; +import CssBaseline from "@mui/material/CssBaseline"; +import Container from "@mui/material/Container"; +import AppBar from "@mui/material/AppBar"; +import Toolbar from "@mui/material/Toolbar"; +import Typography from "@mui/material/Typography"; +import IconButton from "@mui/material/IconButton"; +import Brightness4Icon from "@mui/icons-material/Brightness4"; +import Brightness7Icon from "@mui/icons-material/Brightness7"; +import Switch from "@mui/material/Switch"; + +function DarkModeToggle() { + const [darkMode, setDarkMode] = useState(false); + + // Toggle the dark mode state + const toggleDarkMode = () => { + setDarkMode(!darkMode); + }; + + // Create a Material-UI theme with dark mode + const theme = createTheme({ + palette: { + mode: darkMode ? "dark" : "light", + }, + }); + + return ( + + + + + + Dark Mode Example + + + {darkMode ? : } + + + + + + Welcome to Dark Mode Example + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Nullam nec purus sed neque bibendum convallis. + + {/* Add more content here */} + + + ); +} + +export default DarkModeToggle; diff --git a/resources/js/Components/FileUpload.jsx b/resources/js/Components/FileUpload.jsx new file mode 100644 index 0000000..2868e25 --- /dev/null +++ b/resources/js/Components/FileUpload.jsx @@ -0,0 +1,69 @@ +import React, { useState } from "react"; +import Button from "@mui/material/Button"; +import CloudUploadIcon from "@mui/icons-material/CloudUpload"; + +export default function FileUpload() { + const [selectedFile, setSelectedFile] = useState(null); + + const handleFileChange = (event) => { + const file = event.target.files[0]; + + // Check if the selected file is a PDF + if (file && file.type === "application/pdf") { + setSelectedFile(file); + } else { + console.log("Please select a PDF file."); + } + }; + + const handleUpload = () => { + if (selectedFile) { + // Check if the file size is within the limit (20MB) + if (selectedFile.size <= 20 * 1024 * 1024) { + // Perform the upload operation, e.g., using Axios or fetch + console.log(`Uploading file: ${selectedFile.name}`); + } else { + console.log("File size exceeds the 20MB limit"); + } + } else { + console.log("No file selected"); + } + }; + + return ( +
+
+ + + + {selectedFile + ? `Selected File: ${selectedFile.name}` + : "No file selected"} + +
+ {/* */} +
+ ); +} diff --git a/resources/js/Components/InputField.jsx b/resources/js/Components/InputField.jsx new file mode 100644 index 0000000..f2a460a --- /dev/null +++ b/resources/js/Components/InputField.jsx @@ -0,0 +1,39 @@ +import * as React from "react"; +import Box from "@mui/material/Box"; +import TextField from "@mui/material/TextField"; +import { Typography } from "@mui/material"; + +export default function InputField({ + label, + variant, + id, + size, + type, + value, + onchange, + required, +}) { + return ( + + + + ); +} diff --git a/resources/js/Components/Loader.jsx b/resources/js/Components/Loader.jsx new file mode 100644 index 0000000..a80aade --- /dev/null +++ b/resources/js/Components/Loader.jsx @@ -0,0 +1,47 @@ +import React, { useState, useEffect } from "react"; +import Box from "@mui/material/Box"; +// import "./Loader.css"; // Import a CSS file for styling + +export default function Loader() { + const [isMoved, setIsMoved] = useState(false); + + const handleMoveIcon = () => { + setIsMoved(!isMoved); + }; + + useEffect(() => { + // Load Lordicon script here + const script = document.createElement("script"); + script.src = "https://cdn.lordicon.com/bhenfmcm.js"; + script.async = true; + document.head.appendChild(script); + + return () => { + // Clean up the script when the component unmounts + document.head.removeChild(script); + }; + }, []); + + return ( +
+ + + +
+ ); +} diff --git a/resources/js/Components/MessageNotification.jsx b/resources/js/Components/MessageNotification.jsx new file mode 100644 index 0000000..22f89cd --- /dev/null +++ b/resources/js/Components/MessageNotification.jsx @@ -0,0 +1,98 @@ +import * as React from "react"; +import List from "@mui/material/List"; +import ListItem from "@mui/material/ListItem"; +import Divider from "@mui/material/Divider"; +import ListItemText from "@mui/material/ListItemText"; +import ListItemAvatar from "@mui/material/ListItemAvatar"; +import Avatar from "@mui/material/Avatar"; +import Typography from "@mui/material/Typography"; +import Button from "@mui/material/Button"; + +export default function MessageNotification({ user }) { + return ( + + + + + + + + Ali Connors + + { + " — I'll be in your neighborhood doing errands this…" + } + + } + /> + + + + + + + + + to Scott, Alex, Jennifer + + {" — Wish I could come, but I'm out of town this…"} + + } + /> + + + + + + + + + Sandra Adams + + { + " — Do you have Paris recommendations? Have you ever…" + } + + } + /> + +
+ +
+
+ ); +} diff --git a/resources/js/Components/Modal.jsx b/resources/js/Components/Modal.jsx new file mode 100644 index 0000000..b0f7064 --- /dev/null +++ b/resources/js/Components/Modal.jsx @@ -0,0 +1,75 @@ +import * as React from "react"; +import Backdrop from "@mui/material/Backdrop"; +import Box from "@mui/material/Box"; +import Modal from "@mui/material/Modal"; +import Fade from "@mui/material/Fade"; +import Button from "@mui/material/Button"; +import CloseIcon from "@mui/icons-material/Close"; + +const style = { + position: "absolute", + top: "50%", + left: "50%", + transform: "translate(-50%, -50%)", + width: 600, + bgcolor: "background.paper", + borderRadius: 1, + boxShadow: 24, + p: 4, +}; + +// Define a media query for screens with a maximum width of 768px +const responsiveStyle = { + "@media (max-width: 768px)": { + width: "100%", + height: "100%", // Adjust width for smaller screens + maxWidth: "none", // Remove the maximum width + borderRadius: 0, // Remove border radius + boxShadow: "none", // Remove box shadow + overflow: "auto", // Add overflow for scrolling + }, +}; + +const finalStyle = { ...style, ...responsiveStyle }; + +export default function ReusableModal({ content, title, icon, header }) { + const [open, setOpen] = React.useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( +
+ + + + +
+ +
+
{header}
+ {content} +
+
+
+
+ ); +} diff --git a/resources/js/Components/QRCodeGenerator.jsx b/resources/js/Components/QRCodeGenerator.jsx new file mode 100644 index 0000000..7b54fe1 --- /dev/null +++ b/resources/js/Components/QRCodeGenerator.jsx @@ -0,0 +1,160 @@ +import React, { useState } from "react"; +import QRCode from "qrcode.react"; +import { Box, Button, TextField } from "@mui/material"; + +const QRCodeGenerator = () => { + const [ProductName, setProductName] = useState(""); + + const handleInputChange = (e) => { + setProductName(e.target.value); + }; + const [Inventory, setInventory] = useState(""); + const handleInventoryChange = (e) => { + setInventory(e.target.value); + }; + + const [Department, setDepartment] = useState(""); + const handleDepartmentChange = (e) => { + setDepartment(e.target.value); + }; + + const [Purchase, setPurchase] = useState(""); + const handlePurchaseChange = (e) => { + setPurchase(e.target.value); + }; + + const value = + "Product Name: " + + ProductName + + "\n" + + "Inventory: " + + Inventory + + "\n" + + "Department: " + + Department + + "\n" + + "Purchase. :" + + Purchase; + + const DownloadButton = () => { + const handleDownload = () => { + const canvas = document.getElementById("qrcode-canvas"); + const a = document.createElement("a"); + a.href = canvas.toDataURL("image/png"); + a.download = "qrcode.png"; + a.click(); + }; + + return ( + + ); + }; + + const PrintButton = () => { + const handlePrint = () => { + const printWindow = window.open("", "", "width=600,height=600"); + printWindow.document.open(); + printWindow.document.write( + "QR Code" + ); + printWindow.document.write( + `QR Code` + ); + printWindow.document.write(""); + printWindow.document.close(); + printWindow.print(); + printWindow.close(); + }; + + return ( + + ); + }; + + return ( +
+
+

+ QR Code Generator +

+ +
+ + + + +
+
+
+
+
+ {ProductName && ( + + )} +
+
+ + +
+
+
+ ); +}; + +export default QRCodeGenerator; diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx new file mode 100644 index 0000000..31f7ad3 --- /dev/null +++ b/resources/js/Components/QRCodeScanner.jsx @@ -0,0 +1,124 @@ +import { Button, Typography } from "@mui/material"; +import React, { useEffect, useRef } from "react"; // Import useRef + +// import "./styles.css"; // Import your CSS file + +function QRCodeScanner() { + const videoRef = useRef(null); // Create a ref for the video element + + useEffect(() => { + const qrcode = window.qrcode; + + const canvasElement = document.getElementById("qr-canvas"); + const canvas = canvasElement.getContext("2d"); + + const qrResult = document.getElementById("qr-result"); + const outputData = document.getElementById("outputData"); + const btnScanQR = document.getElementById("btn-scan-qr"); + + let scanning = false; + + qrcode.callback = (res) => { + if (res) { + outputData.innerText = res; + scanning = false; + + if (videoRef.current) { + const stream = videoRef.current.srcObject; + const tracks = stream.getTracks(); + + tracks.forEach((track) => { + track.stop(); + }); + } + + qrResult.hidden = false; + canvasElement.hidden = true; + btnScanQR.hidden = false; + } + }; + + btnScanQR.onclick = () => { + navigator.mediaDevices + .getUserMedia({ video: { facingMode: "environment" } }) + .then(function (stream) { + scanning = true; + qrResult.hidden = true; + btnScanQR.hidden = true; + canvasElement.hidden = false; + if (videoRef.current) { + videoRef.current.setAttribute("playsinline", true); + videoRef.current.srcObject = stream; + videoRef.current.play(); + tick(); + scan(); + } + }); + }; + + function tick() { + if (videoRef.current) { + canvasElement.width = 400; // Set your desired width here + canvasElement.height = 300; // Set your desired height here + canvas.drawImage( + videoRef.current, + 0, + 0, + canvasElement.width, + canvasElement.height + ); + + scanning && requestAnimationFrame(tick); + } + } + + function scan() { + try { + qrcode.decode(); + } catch (e) { + setTimeout(scan, 300); + } + } + }, []); + + function copy() { + // Get the text you want to copy + var copyText = document.getElementById("outputData"); + var copied = copyText.textContent; // Remove .value here + + // Copy the text inside the text field + navigator.clipboard.writeText(copied); // Remove .value here + + // Alert the copied text + alert("Copied the text: " + copied); + + console.log(copied); + } + + return ( +
+ + + + + + + + +
+ +
+
+ ); +} + +export default QRCodeScanner; diff --git a/resources/js/Components/SkeletonColor.jsx b/resources/js/Components/SkeletonColor.jsx new file mode 100644 index 0000000..e0f3ccc --- /dev/null +++ b/resources/js/Components/SkeletonColor.jsx @@ -0,0 +1,29 @@ +import * as React from "react"; +import Skeleton from "@mui/material/Skeleton"; +import Box from "@mui/material/Box"; + +export default function CustomSkeleton({ + backgroundColor, + skeletonColor, + width, + height, +}) { + return ( + + + + ); +} diff --git a/resources/js/Components/StackBar.jsx b/resources/js/Components/StackBar.jsx new file mode 100644 index 0000000..22e7ca5 --- /dev/null +++ b/resources/js/Components/StackBar.jsx @@ -0,0 +1,23 @@ +import * as React from "react"; +import { BarChart } from "@mui/x-charts/BarChart"; + +export default function StackBars() { + const chartWidth = window.innerWidth > 768 ? 750 : window.innerWidth - 32; + const chartHeight = window.innerWidth > 768 ? 350 : 200; + + return ( +
+ +
+ ); +} diff --git a/resources/js/Components/TabPanel.jsx b/resources/js/Components/TabPanel.jsx new file mode 100644 index 0000000..3bb14e1 --- /dev/null +++ b/resources/js/Components/TabPanel.jsx @@ -0,0 +1,87 @@ +import React, { useState } from "react"; +import PropTypes from "prop-types"; +import Tabs from "@mui/material/Tabs"; +import Tab from "@mui/material/Tab"; +import Typography from "@mui/material/Typography"; +import Box from "@mui/material/Box"; + +function TabPanel(props) { + const { children, value, index, ...other } = props; + + return ( + + ); +} + +TabPanel.propTypes = { + children: PropTypes.node, + index: PropTypes.number.isRequired, + value: PropTypes.number.isRequired, +}; + +export default function VerticalTabs({ tabs }) { + const [value, setValue] = useState(0); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; + + return ( + + + {tabs.map((tab, index) => ( + + ))} + + {tabs.map((tab, index) => ( + + {tab.content} + + ))} + + ); +} + +VerticalTabs.propTypes = { + tabs: PropTypes.arrayOf( + PropTypes.shape({ + label: PropTypes.string.isRequired, + content: PropTypes.node.isRequired, + }) + ).isRequired, +}; + +function a11yProps(index) { + return { + id: `vertical-tab-${index}`, + "aria-controls": `vertical-tabpanel-${index}`, + }; +} diff --git a/resources/js/Components/VerticalTabs.jsx b/resources/js/Components/VerticalTabs.jsx new file mode 100644 index 0000000..2cd76b8 --- /dev/null +++ b/resources/js/Components/VerticalTabs.jsx @@ -0,0 +1,85 @@ +import React, { useState } from "react"; +import PropTypes from "prop-types"; +import Tabs from "@mui/material/Tabs"; +import Tab from "@mui/material/Tab"; +import Typography from "@mui/material/Typography"; +import Box from "@mui/material/Box"; + +function TabPanel({ children, value, index, ...other }) { + return ( + + ); +} + +TabPanel.propTypes = { + children: PropTypes.node, + index: PropTypes.number.isRequired, + value: PropTypes.number.isRequired, +}; + +function VerticalTabs({ tabs }) { + const [value, setValue] = useState(0); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; + + return ( + + + {tabs.map((tab, index) => ( + + ))} + + {tabs.map((tab, index) => ( + + {tab.content} + + ))} + + ); +} + +VerticalTabs.propTypes = { + tabs: PropTypes.arrayOf( + PropTypes.shape({ + label: PropTypes.string.isRequired, + content: PropTypes.node.isRequired, + }) + ).isRequired, +}; + +function a11yProps(index) { + return { + id: `vertical-tab-${index}`, + "aria-controls": `vertical-tabpanel-${index}`, + }; +} + +export default VerticalTabs; diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx index b6f6f38..be20e47 100644 --- a/resources/js/Layouts/MainLayout.jsx +++ b/resources/js/Layouts/MainLayout.jsx @@ -1,4 +1,4 @@ -import * as React from "react"; +import React, { useState, useEffect } from "react"; import Drawer from "@mui/material/Drawer"; import CssBaseline from "@mui/material/CssBaseline"; import MuiAppBar from "@mui/material/AppBar"; @@ -14,8 +14,32 @@ import ListItem from "@mui/material/ListItem"; import ListItemButton from "@mui/material/ListItemButton"; import ListItemIcon from "@mui/material/ListItemIcon"; import ListItemText from "@mui/material/ListItemText"; -import InboxIcon from "@mui/icons-material/MoveToInbox"; import { Link, useForm } from "@inertiajs/react"; +import ExpandLess from "@mui/icons-material/ExpandLess"; +import ExpandMore from "@mui/icons-material/ExpandMore"; +import SettingsApplicationsSharpIcon from "@mui/icons-material/SettingsApplicationsSharp"; +import DashboardSharpIcon from "@mui/icons-material/DashboardSharp"; +import QrCodeIcon from "@mui/icons-material/QrCode"; +import QrCodeScannerIcon from "@mui/icons-material/QrCodeScanner"; +import PostAddIcon from "@mui/icons-material/PostAdd"; +import ExpandMoreSharpIcon from "@mui/icons-material/ExpandMoreSharp"; +import CategoryIcon from "@mui/icons-material/Category"; +import { Logout, Settings } from "@mui/icons-material"; +import CustomSpeedDial from "@/Components/CustomSpeedDial"; +import { ThemeProvider, createTheme } from "@mui/material/styles"; +import AbcSharpIcon from "@mui/icons-material/AbcSharp"; +import CustomizedSwitches from "@/Components/CustomizedSwitches"; +import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp"; +import EmailIcon from "@mui/icons-material/Email"; +import MessageNotification from "@/Components/MessageNotification"; +import LoyaltyIcon from "@mui/icons-material/Loyalty"; +import Inventory2Icon from "@mui/icons-material/Inventory2"; +import SummarizeIcon from "@mui/icons-material/Summarize"; +import ConstructionIcon from "@mui/icons-material/Construction"; +import StoreIcon from "@mui/icons-material/Store"; +import CompareArrowsIcon from "@mui/icons-material/CompareArrows"; +import VerifiedUserIcon from "@mui/icons-material/VerifiedUser"; +import Clock from "@/Components/Clock"; import { Avatar, Menu, @@ -24,8 +48,10 @@ import { Box, styled, useTheme, + Collapse, + Badge, + Stack, } from "@mui/material"; -import { Logout, PersonAdd, Settings } from "@mui/icons-material"; const drawerWidth = 240; @@ -115,180 +141,624 @@ export default function MainLayout({ user, children }) { setAnchorEl(null); }; - // End account avatar + // expand list dropdown in side nav + // start + const [expanded, setExpanded] = useState(false); // Initially expanded + + const listSideNav = () => { + setExpanded(!expanded); + }; + const [QrSideNav, setQrSideNav] = useState(false); + + const toggleQrSideNav = () => { + setQrSideNav(!QrSideNav); + }; + + const [categories, setcategories] = useState(true); // Initially expanded + + const categoriesSideNav = () => { + setcategories(!categories); + }; + // end + + const [Qr, setQr] = useState(false); + + const generateQr = () => { + setQr(!Qr); + }; + + const [equipment, setequipment] = useState(false); + + const equipmentSideNav = () => { + setequipment(!equipment); + }; + + const [Branch, setBranch] = useState(false); + + const BranchSideNav = () => { + setBranch(!Branch); + }; + + // speed dial + + const actions = [ + { + icon: ( + + + + ), + name: "QR-CODE", + }, + { + icon: ( + + + + ), + name: "BARCODE", + }, + ]; + + // Initialize DarkMode state with a default value from localStorage if available + const [DarkMode, SetDarkMode] = useState( + localStorage.getItem("DarkMode") === "true" + ); + + // Function to toggle DarkMode and store the preference in localStorage + const toggleDarkMode = () => { + const newDarkMode = !DarkMode; + SetDarkMode(newDarkMode); + localStorage.setItem("DarkMode", newDarkMode); + }; + + // Create the theme based on DarkMode state + const darkTheme = createTheme({ + palette: { + mode: DarkMode ? "dark" : "light", + primary: { + light: "#40c4ff", + main: "#00b0ff", + dark: "#01579b", + contrastText: "#fff", + }, + secondary: { + main: "#00838f", // Change this to your secondary color + }, + error: { + main: "#d50000", // Change this to your error + light: "#ff8a80", + dark: "#ff1744", + }, + warning: { + main: "#ffff8d", // Change this to your warning + light: "#ffea00", + dark: "#ffd600", + }, + }, + typography: { + fontFamily: "Arial", + subtitle1: { + fontSize: 24, + fontWeight: "normal", + fontFamily: "arial", + }, + subtitle2: { + fontSize: 16, + color: "#00b0ff", + fontFamily: "Segoe UI", + }, + body1: { + fontWeight: 500, + }, + header: { + fontWeight: "bold", + textTransform: "uppercase", + }, + button: { + fontFamily: "Arial", + }, + }, + }); + + // active user + + const StyledBadge = styled(Badge)(({ theme }) => ({ + "& .MuiBadge-badge": { + backgroundColor: "#44b700", + color: "#44b700", + boxShadow: `0 0 0 2px ${theme.palette.background.paper}`, + "&::after": { + position: "absolute", + top: 0, + left: 0, + width: "100%", + height: "100%", + borderRadius: "50%", + animation: "ripple 1.2s infinite ease-in-out", + border: "1px solid currentColor", + content: '""', + }, + }, + "@keyframes ripple": { + "0%": { + transform: "scale(.8)", + opacity: 1, + }, + "100%": { + transform: "scale(2.4)", + opacity: 0, + }, + }, + })); + + const SmallAvatar = styled(Avatar)(({ theme }) => ({ + width: 22, + height: 22, + border: `2px solid ${theme.palette.background.paper}`, + })); + + // message notifications + + // Email Dropdown message in layout + + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; return ( - - - - - - - - - - Inventory Management System - -
- - {/* account menu start */} - - + + + + + + - + - - - + + +
+ + {/* account menu start */} + +
+
+ + + + + + + + + + +
+ + + + + + +
+
+ + + +
+ + + + {user.name} +
+
+
+ + + + + {DarkMode + ? "Switch to Light Mode" + : "Switch to Dark Mode"} + + + + + + + + + Account Settings + + + + + + + Logout + +
+ {/* account menu end */} + + + + {/* breadCrumbs */} + + - - {user.name} - - - My account - + +
+ + Inventory Management System + +
+ + {theme.direction === "ltr" ? ( + + ) : ( + + )} + +
- - - - - Add another account - - - - - - - Settings - - - - - - - Logout - -
- {/* account menu end */} -
-
- - - - {theme.direction === "ltr" ? ( - - ) : ( - - )} - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + {/* another sidenav list */} + + {/* start */} + + {/* categories start */} + + + + + + + + + + + + {/* end categories */} + + {/* Equipment start */} + + + + + + + + + + + {/* Equipment End */} + + {/* Branch start */} + + + + + + + + + + + + {/* end branch */} + + + + + + + + + + + + + {/* start of warranty list */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* End of warranty list */} + + + + + + + + + + + + {/* end */} + + - + - + + {Qr ? : } - - - - -
- - {children} -
-
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+ + +
+
{children}
+ +
+ } + /> +
+
+
+ + + ); } diff --git a/resources/js/Pages/Admin/Borrowed_item/Index.jsx b/resources/js/Pages/Admin/Borrowed_item/Index.jsx new file mode 100644 index 0000000..92a1875 --- /dev/null +++ b/resources/js/Pages/Admin/Borrowed_item/Index.jsx @@ -0,0 +1,230 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { + Avatar, + Box, + Card, + IconButton, + ListItem, + ListItemAvatar, + Menu, + Tooltip, + Typography, +} from "@mui/material"; +import React, { useState } from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; + +export default function Index({ auth, mustVerifyEmail, status, BorrowedItem }) { + const columns = ["ID", "Borrowed Items", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + + const handleClick = (event) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Borrowed Items", + url: "/material-ui/getting-started/installation/", + }, + ]; + + const data = BorrowedItem.map((BorrowedItem) => [ + BorrowedItem.id, + BorrowedItem.borrowed_item, +
+ + + + + +
, + ]); + + return ( + +
+ +
+ + {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+
+ {/* Mobile View */} + +
+ Borrowed Item +
+ +
+
+
+ {/* Desktop View */} + + +
+ Borrowed Item +
+ +
+
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Branch/Create.jsx b/resources/js/Pages/Admin/Branch/Create.jsx new file mode 100644 index 0000000..f5c6ba2 --- /dev/null +++ b/resources/js/Pages/Admin/Branch/Create.jsx @@ -0,0 +1,295 @@ +import { + Button, + DialogActions, + DialogContent, + DialogTitle, + Paper, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import { useRef, useState, useEffect } from "react"; +import { Link, useForm } from "@inertiajs/react"; +import MainLayout from "@/Layouts/MainLayout"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import { HomeRepairServiceOutlined } from "@mui/icons-material"; +import InventoryIcon from "@mui/icons-material/Inventory"; +import MySelectComponent from "@/Components/CustomSelect"; +import LocalPhoneIcon from "@mui/icons-material/LocalPhone"; +import SettingsCellIcon from "@mui/icons-material/SettingsCell"; + +function Create({ auth }) { + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // add alertmessage in form submit + + const [showAlert, setShowAlert] = useState(true); + + // Function to hide the alert after a specified duration (in milliseconds) + const hideAlertAfterDuration = (duration) => { + setTimeout(() => { + setShowAlert(false); + }, duration); + }; + + // Call the hideAlertAfterDuration function when showAlert becomes true + useEffect(() => { + if (showAlert) { + hideAlertAfterDuration(5000); // Auto-hide after 3 seconds + } + }, [showAlert]); + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + branch: "", + }); + + useEffect(() => { + return () => { + reset("password", "password_confirmation"); + }; + }, []); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("branch.store")); + + // Show the alert + setShowAlert(true); + + // Reset the form or perform other actions + reset(); + }; + + // breadcrumbItems + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Branch", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // province option + + const [selectedProvince, setselectedProvince] = useState(""); + + const handleProvinceChange = (event) => { + setselectedProvince(event.target.value); + }; + + const province_option = [ + { value: "None", label: "None" }, + { value: "Caloocan", label: "Caloocan" }, + { value: "Manila", label: "Manila" }, + ]; + + // City option + + const [selectedCity, setselectedCity] = useState(""); + + const handleCityChange = (event) => { + setselectedCity(event.target.value); + }; + + const city_option = [ + { value: "None", label: "None" }, + { value: "Bagong Silang", label: "Bagong Silang" }, + { value: "Tondo", label: "Tondo" }, + ]; + + // Barangay option + + const [selectedBarangay, setselectedBarangay] = useState(""); + + const handleBarangayChange = (event) => { + setselectedBarangay(event.target.value); + }; + + const Barangay_option = [ + { value: "None", label: "None" }, + { value: "176", label: "176" }, + { value: "Quiapo", label: "Quiapo" }, + ]; + + // choice of branch mobile + + const [selectedValue, setSelectedValue] = useState(""); + + const handleSelectChange = (event) => { + setSelectedValue(event.target.value); + }; + + const branch_contact_option = [ + { value: "Telephone", label: }, + { value: "Mobile", label: }, + ]; + + return ( + +
+ +
+ +
+ + Branch + + +
+
+ + setData("branch", e.target.value) + } + required + fullWidth + helperText={errors.branch} + error={!!errors.branch} + size="small" + /> + + Address + +
+ + + +
+
+ + + +
+
+ Contact +
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Branch/Index.jsx b/resources/js/Pages/Admin/Branch/Index.jsx new file mode 100644 index 0000000..152118a --- /dev/null +++ b/resources/js/Pages/Admin/Branch/Index.jsx @@ -0,0 +1,230 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { + Avatar, + Box, + Card, + IconButton, + ListItem, + ListItemAvatar, + Menu, + Tooltip, + Typography, +} from "@mui/material"; +import React, { useState } from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; + +export default function Index({ auth, mustVerifyEmail, status, branch }) { + const columns = ["ID", "Categories", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + + const handleClick = (event) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Branch", + url: "/material-ui/getting-started/installation/", + }, + ]; + + const data = branch.map((branch) => [ + branch.id, + branch.branch, +
+ + + + + +
, + ]); + + return ( + +
+ +
+ + {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+
+ {/* Mobile View */} + +
+ Branch +
+ +
+
+
+ {/* Desktop View */} + + +
+ Branch +
+ +
+
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Categories/Create.jsx b/resources/js/Pages/Admin/Categories/Create.jsx new file mode 100644 index 0000000..017e92f --- /dev/null +++ b/resources/js/Pages/Admin/Categories/Create.jsx @@ -0,0 +1,137 @@ +import { + Alert, + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Paper, + Stack, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import InputLabel from "@mui/material/InputLabel"; +import MenuItem from "@mui/material/MenuItem"; +import FormControl from "@mui/material/FormControl"; +import Select from "@mui/material/Select"; +import CustomSelect from "@/Components/CustomSelect"; +import { useRef, useState, useEffect } from "react"; +import { Link, useForm } from "@inertiajs/react"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import MainLayout from "@/Layouts/MainLayout"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import { HomeRepairServiceOutlined } from "@mui/icons-material"; +import InventoryIcon from "@mui/icons-material/Inventory"; + +function Create({ auth }) { + const handleClose = () => { + setOpen(false); + }; + + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + categories: "", + }); + + useEffect(() => { + return () => { + reset("password", "password_confirmation"); + }; + }, []); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("categories.store")); + + // Show the alert + setShowAlert(true); + + // Reset the form or perform other actions + reset(); + }; + + // breadcrumbItems + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Categories", + url: "/material-ui/getting-started/installation/", + }, + ]; + + return ( + +
+ +
+ +
+ + Category + + +
+
+ + setData("categories", e.target.value) + } + required + fullWidth + helperText={errors.categories} + error={!!errors.categories} + size="small" + /> +
+
+
+ +
+ + +
+
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Categories/Index.jsx b/resources/js/Pages/Admin/Categories/Index.jsx new file mode 100644 index 0000000..05c997c --- /dev/null +++ b/resources/js/Pages/Admin/Categories/Index.jsx @@ -0,0 +1,258 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { + Avatar, + Badge, + Box, + Card, + Grid, + IconButton, + List, + ListItem, + ListItemAvatar, + Menu, + MenuItem, + Paper, + Tooltip, + Typography, +} from "@mui/material"; +import React, { useState } from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; +import { styled } from "@mui/material/styles"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; + +export default function Index({ auth, mustVerifyEmail, status, categories }) { + const columns = ["ID", "Categories", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Categories", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // crud + + // Email Dropdown message in layout + + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + + const handleClick = (event) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + + const [anchorEl, setAnchorEl] = React.useState(null); + const openAvatar = Boolean(anchorEl); + + const [selectedValue, setSelectedValue] = useState("default"); // Default value + + const handleChange = (newValue) => { + setSelectedValue(newValue); // Update the selected value + }; + + const crud = [ + { value: "Add", label: "Add" }, + { value: "Update", label: "Update" }, + { value: "Delete", label: "Delete" }, + ]; + + const Demo = styled("div")(({ theme }) => ({ + backgroundColor: theme.palette.background.paper, + })); + + const data = categories.map((category) => [ + category.id, + category.categories, +
+ + + + + +
, + ]); + + return ( + +
+ {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+ +
+ +
+ +
+ +
+
+ Categories +
+ {/* Mobile View */} + + + +
+
+
+ Categories +
+ {/* Desktop View */} + + + +
+
+
+ {/* end */} +
+ ); +} diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx index 870e14b..9029ee3 100644 --- a/resources/js/Pages/Admin/Dashboard/Index.jsx +++ b/resources/js/Pages/Admin/Dashboard/Index.jsx @@ -1,42 +1,136 @@ +import ShippingCard from "@/Components/Card"; import MainLayout from "@/Layouts/MainLayout"; -import { Typography } from "@mui/material"; +import { Card, Paper, Typography } from "@mui/material"; import React from "react"; +import MUIDataTable from "mui-datatables"; +import StackBars from "@/Components/StackBar"; +import BasicPie from "@/Components/BasicPie"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import DashboardIcon from "@mui/icons-material/Dashboard"; +import EastIcon from "@mui/icons-material/East"; +import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; +import CategoryIcon from "@mui/icons-material/Category"; +import HomeRepairServiceIcon from "@mui/icons-material/HomeRepairService"; +import { Link } from "@inertiajs/react"; -export default function Index({ auth, mustVerifyEmail, status }) { +export default function Index({ auth, mustVerifyEmail, status, users }) { + // this variable data with the code .map is help determine the backend + const data = users.map((user) => [ + user.id, + user.name, + user.email, +
+ + + +
, // Replace 'insert_icon_name_here' with the actual icon name + ]); + + const columns = ["ID", "Name", "Email", ""]; + // Now, you have a total of 108 rows in the `data` array. + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: "Home", + url: "/", + }, + { + icon: , + text: "Administrator", + url: "/material-ui/getting-started/installation/", + }, + ]; return ( - {auth.user.email} - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. - Rhoncus dolor purus non enim praesent elementum facilisis leo - vel. Risus at ultrices mi tempus imperdiet. Semper risus in - hendrerit gravida rutrum quisque non tellus. Convallis convallis - tellus id interdum velit laoreet id donec ultrices. Odio morbi - quis commodo odio aenean sed adipiscing. Amet nisl suscipit - adipiscing bibendum est ultricies integer quis. Cursus euismod - quis viverra nibh cras. Metus vulputate eu scelerisque felis - imperdiet proin fermentum leo. Mauris commodo quis imperdiet - massa tincidunt. Cras tincidunt lobortis feugiat vivamus at - augue. At augue eget arcu dictum varius duis at consectetur - lorem. Velit sed ullamcorper morbi tincidunt. Lorem donec massa - sapien faucibus et molestie ac. - - - Consequat mauris nunc congue nisi vitae suscipit. Fringilla est - ullamcorper eget nulla facilisi etiam dignissim diam. Pulvinar - elementum integer enim neque volutpat ac tincidunt. Ornare - suspendisse sed nisi lacus sed viverra tellus. Purus sit amet - volutpat consequat mauris. Elementum eu facilisis sed odio - morbi. Euismod lacinia at quis risus sed vulputate odio. Morbi - tincidunt ornare massa eget egestas purus viverra accumsan in. - In hendrerit gravida rutrum quisque non tellus orci ac. - Pellentesque nec nam aliquam sem et tortor. Habitant morbi - tristique senectus et. Adipiscing elit duis tristique - sollicitudin nibh sit. Ornare aenean euismod elementum nisi quis - eleifend. Commodo viverra maecenas accumsan lacus vel facilisis. - Nulla posuere sollicitudin aliquam ultrices sagittis orci a. - + +
+ } + title="Item Returned" + count="1" + /> + } + title="Item Borrowed" + count="3" + /> + } + title="Item Disposed" + count="5" + /> +
+ +
+ + + + + + + + + + +
+ +
+
+ +
+ + Items Returned + +
+ +
+
+
+ +
+ + Item Borrowed + +
+ +
+
+
+ +
+ + Item Disposed + +
+ +
+
+
); } diff --git a/resources/js/Pages/Admin/Equipment/Create.jsx b/resources/js/Pages/Admin/Equipment/Create.jsx new file mode 100644 index 0000000..5076965 --- /dev/null +++ b/resources/js/Pages/Admin/Equipment/Create.jsx @@ -0,0 +1,199 @@ +import { + Button, + DialogActions, + DialogContent, + DialogTitle, + Paper, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import { useRef, useState, useEffect } from "react"; +import { Link, useForm } from "@inertiajs/react"; + +import MainLayout from "@/Layouts/MainLayout"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import { HomeRepairServiceOutlined } from "@mui/icons-material"; +import InventoryIcon from "@mui/icons-material/Inventory"; +import MySelectComponent from "@/Components/CustomSelect"; + +function Create({ auth }) { + // test sample + + const [region, setRegion] = React.useState(""); + + const regionChange = (event) => { + setRegion(event.target.value); + }; + + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // add alertmessage in form submit + + const [showAlert, setShowAlert] = useState(true); + + // Function to hide the alert after a specified duration (in milliseconds) + const hideAlertAfterDuration = (duration) => { + setTimeout(() => { + setShowAlert(false); + }, duration); + }; + + // Call the hideAlertAfterDuration function when showAlert becomes true + useEffect(() => { + if (showAlert) { + hideAlertAfterDuration(5000); // Auto-hide after 3 seconds + } + }, [showAlert]); + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + equipments: "", + }); + + useEffect(() => { + return () => { + reset("password", "password_confirmation"); + }; + }, []); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("equipment.store")); + + // Show the alert + setShowAlert(true); + + // Reset the form or perform other actions + reset(); + }; + + // breadcrumbItems + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Equipments", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // choice of categories + + const [selectedValue, setSelectedValue] = useState(""); + + const handleSelectChange = (event) => { + setSelectedValue(event.target.value); + }; + + const categories_option = [ + { value: "None", label: "None" }, + { value: "option1", label: "Option 1" }, + { value: "option2", label: "Option 2" }, + { value: "option3", label: "Option 3" }, + ]; + + return ( + +
+ +
+ +
+ + Equipments + + +
+
+ { + setData("equipments", e.target.value); + }} + required + fullWidth + helperText={errors.equipments} + error={!!errors.equipments} + size="small" + /> + + + + +
+
+
+ +
+ + +
+
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Equipment/Index.jsx b/resources/js/Pages/Admin/Equipment/Index.jsx new file mode 100644 index 0000000..4e34a09 --- /dev/null +++ b/resources/js/Pages/Admin/Equipment/Index.jsx @@ -0,0 +1,226 @@ +import ShippingCard from "@/Components/Card"; +import MainLayout from "@/Layouts/MainLayout"; +import { + Avatar, + Box, + Card, + IconButton, + ListItem, + ListItemAvatar, + Menu, + Paper, + Tooltip, + Typography, +} from "@mui/material"; +import React, { useState } from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; + +export default function Index({ auth, mustVerifyEmail, status, equipments }) { + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + const data = equipments.map((equipments) => [ + equipments.id, + equipments.equipments, +
+ + + + + +
, + ]); + + const columns = ["ID", "Categories", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Equipments", + url: "/material-ui/getting-started/installation/", + }, + ]; + + return ( + +
+ +
+
+ {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+
+ +
+
+ Equipments +
+ {/* Mobile View */} + + + +
+
+
+ Equipments +
+ {/* Desktop View */} + + + +
+
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Library/Company/Index.jsx b/resources/js/Pages/Admin/Library/Company/Index.jsx new file mode 100644 index 0000000..affb4c9 --- /dev/null +++ b/resources/js/Pages/Admin/Library/Company/Index.jsx @@ -0,0 +1,49 @@ +import { Typography } from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; + +export default function Index({ genders }) { + const columns = ["Company Name", "Location"]; + + // const data = genders.map((data) => [ + // data.gender, + // data.isActive ? "Active" : "Inactive", + // ]); + + const data = [ + ["EasyPC", "MAKATI CITY"], + ["ARK-PC", "CAMARIN CALOOCAN CITY"], + ["Tech Haven", "QUEZON CITY"], + ["Gadget Galaxy", "TAGUIG CITY"], + ["Digital Delights", "MANILA"], + ["PC Paradise", "PASAY CITY"], + ["ElectroTech", "MANDALUYONG CITY"], + ["Tech Trends", "PASIG CITY"], + ["Gizmo World", "QUEZON CITY"], + ["Future Fusion", "MARIKINA CITY"], + ["PC Powerhouse", "LAS PIÑAS CITY"], + ["Cyber Central", "PARAÑAQUE CITY"], + ["MegaBytes", "VALENZUELA CITY"], + ["Innovate IT", "ANTIPOLLO CITY"], + ["E-Tech Solutions", "SAN JUAN CITY"], + ["iGadget Hub", "MUNTINLUPA CITY"], + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + return ( + <> + + + ); +} diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx index ee525d0..ea6c4f5 100644 --- a/resources/js/Pages/Admin/Library/Index.jsx +++ b/resources/js/Pages/Admin/Library/Index.jsx @@ -1,39 +1,95 @@ import MainLayout from "@/Layouts/MainLayout"; -import { Tab, Tabs, Typography } from "@mui/material"; -import React from "react"; +import { Box, Card, Tab, Tabs, Typography } from "@mui/material"; +import React, { useState } from "react"; import Gender from "./Gender/Index"; import Religion from "./Religion/Index"; +import Company from "./Company/Index"; +import Position from "./Position/Index"; +import SupervisedUserCircleSharpIcon from "@mui/icons-material/SupervisedUserCircleSharp"; +import ChangeCircleSharpIcon from "@mui/icons-material/ChangeCircleSharp"; +import ManageAccountsSharpIcon from "@mui/icons-material/ManageAccountsSharp"; +import MUIDataTable from "mui-datatables"; export default function Index({ auth }) { - const [value, setValue] = React.useState("gender"); - + const [value, setValue] = useState("settings"); const handleChange = (event, newValue) => { setValue(newValue); }; + + const [secondForm, setSecondForm] = useState("gender"); + const handleChange1 = (event1, newValue1) => { + setSecondForm(newValue1); + }; + + const columns = ["Name", "Age", "Status"]; + const data = [ + // Data here... + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + return ( -
+
Settings Page - Add or update settings or global parameter + Add or update settings or global parameters - - - - - -
- {value === "gender" && } - {value === "religion" && } +
+ {value === "settings" && ( +
+
+ + + + + +
+
+ {secondForm === "gender" && ( +
+ +
+ )} + {secondForm === "company List" && ( +
+ +
+ )} + {secondForm === "position List" && ( +
+ +
+ )} +
+
+ )}
diff --git a/resources/js/Pages/Admin/Library/Position/Index.jsx b/resources/js/Pages/Admin/Library/Position/Index.jsx new file mode 100644 index 0000000..8a43ed7 --- /dev/null +++ b/resources/js/Pages/Admin/Library/Position/Index.jsx @@ -0,0 +1,64 @@ +import { Typography } from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; + +export default function Index({ genders }) { + const columns = ["Position", "Location"]; + + // const data = genders.map((data) => [ + // data.gender, + // data.isActive ? "Active" : "Inactive", + // ]); + + const data = [ + ["Inventory Clerk", "MAKATI CITY"], + ["Sales Manager", "QUEZON CITY"], + ["Customer Service Representative", "MANILA"], + ["Software Developer", "TAGUIG CITY"], + ["Marketing Coordinator", "CEBU CITY"], + ["Accountant", "DAVAO CITY"], + ["Warehouse Supervisor", "PASIG CITY"], + ["HR Specialist", "MANDALUYONG CITY"], + ["Operations Manager", "PASAY CITY"], + ["Graphic Designer", "MUNTINLUPA CITY"], + ["Inventory Clerk", "MAKATI CITY"], + ["Sales Manager", "QUEZON CITY"], + ["Customer Service Representative", "MANILA"], + ["Software Developer", "TAGUIG CITY"], + ["Marketing Coordinator", "CEBU CITY"], + ["Accountant", "DAVAO CITY"], + ["Warehouse Supervisor", "PASIG CITY"], + ["HR Specialist", "MANDALUYONG CITY"], + ["Operations Manager", "PASAY CITY"], + ["Graphic Designer", "MUNTINLUPA CITY"], + ["Data Analyst", "QUEZON CITY"], + ["Product Manager", "MANILA"], + ["Frontend Developer", "TAGUIG CITY"], + ["Event Planner", "CEBU CITY"], + ["Financial Analyst", "DAVAO CITY"], + ["Logistics Coordinator", "PASIG CITY"], + ["Recruitment Specialist", "MANDALUYONG CITY"], + ["Restaurant Manager", "PASAY CITY"], + ["UI/UX Designer", "MUNTINLUPA CITY"], + ["Quality Assurance Tester", "QUEZON CITY"], + ["Marketing Manager", "MANILA"], + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + return ( + <> + + + ); +} diff --git a/resources/js/Pages/Admin/Library/Settings/Index.jsx b/resources/js/Pages/Admin/Library/Settings/Index.jsx new file mode 100644 index 0000000..dc18cdc --- /dev/null +++ b/resources/js/Pages/Admin/Library/Settings/Index.jsx @@ -0,0 +1,54 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { Button, Tab, Tabs, TextField, Typography } from "@mui/material"; +import React from "react"; + +export default function Index({ auth, user }) { + const [value, setValue] = React.useState("gender"); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; + return ( + +
+ +
+
+ + Settings Page + + +
+ Username + Jhunriz +
+ +
+ + + + +
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx new file mode 100644 index 0000000..a6bb44a --- /dev/null +++ b/resources/js/Pages/Admin/Management/Products/Create.jsx @@ -0,0 +1,315 @@ +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + TextField, +} from "@mui/material"; +import React from "react"; +import InputLabel from "@mui/material/InputLabel"; +import MenuItem from "@mui/material/MenuItem"; +import FormControl from "@mui/material/FormControl"; +import Select from "@mui/material/Select"; +import CustomSelect from "@/Components/CustomSelect"; +import { useRef, useState, useEffect } from "react"; +import { useForm } from "@inertiajs/react"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import FileUpload from "@/Components/FileUpload"; +import Alert from "@mui/material/Alert"; +import Stack from "@mui/material/Stack"; + +function Create() { + // test sample + + const [region, setRegion] = React.useState(""); + + const regionChange = (event) => { + setRegion(event.target.value); + }; + + const regions = [ + { label: "None", value: "" }, + { label: "Ten", value: 10 }, + { label: "Twenty", value: 20 }, + { label: "Thirty", value: 30 }, + ]; + + // test + + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // department sample + + const [department, setDepartment] = React.useState(""); + + const departmentChange = (event) => { + setDepartment(event.target.value); + }; + + const departmentoptions = [ + { label: "None", value: "" }, + { label: "EasyPC", value: "EasyPC" }, + { label: "Greenhills", value: "Greenhills" }, + { label: "Gilmore", value: "Gilmore" }, + ]; + + const [status, setStatus] = React.useState(""); + + const statusChange = (event) => { + setStatus(event.target.value); + }; + + const options = [ + { label: "None", value: "" }, + { label: "Active", value: "Active" }, + { label: "Inactive", value: "Inactive" }, + { label: "Deactivated", value: "Deactivated" }, + ]; + + // add alertmessage in form submit + + const [showAlert, setShowAlert] = useState(true); + + // Function to hide the alert after a specified duration (in milliseconds) + const hideAlertAfterDuration = (duration) => { + setTimeout(() => { + setShowAlert(false); + }, duration); + }; + + // Call the hideAlertAfterDuration function when showAlert becomes true + useEffect(() => { + if (showAlert) { + hideAlertAfterDuration(5000); // Auto-hide after 3 seconds + } + }, [showAlert]); + + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + productName: "", + productId: "", + branch: "", + status: "", + productDescription: "", + productFileUpload: "", + }); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("products.store")); + // route is located ) web.php + setShowAlert(true); + reset(); + }; + + // file upload + + const [selectedFile, setSelectedFile] = useState(null); + + const handleFileChange = (event) => { + const file = event.target.files[0]; + if (file) { + // Check the file type + if ( + file.type === "application/pdf" || + file.type.startsWith( + "application/vnd.openxmlformats-officedocument" + ) || + file.type === "application/msword" + ) { + // Check the file size (50MB limit) + if (file.size <= 50 * 1024 * 1024) { + setSelectedFile(file); + } else { + alert("File size exceeds 50MB limit"); + event.target.value = null; // Clear the file input + } + } else { + alert( + "Unsupported file type. Please select a PDF or document file." + ); + event.target.value = null; // Clear the file input + } + } + }; + + const handleUpload = () => { + if (selectedFile) { + // You can perform the file upload logic here + console.log("Uploading file:", selectedFile); + } else { + console.log("No file selected"); + } + }; + + return ( +
+
+ + + +
+ Add your products! + +
+
+ + setData( + "productName", + e.target.value + ) + } + required + fullWidth + helperText={errors.productName} + error={!!errors.productName} + size="small" + /> + + + setData("productId", e.target.value) + } + required + fullWidth + helperText={errors.productId} + error={!!errors.productId} + size="small" + /> +
+
+ + setData("branch", e.target.value) + } + required + fullWidth + helperText={errors.branch} + error={!!errors.branch} + size="small" + options={departmentoptions} + /> + + setData("status", e.target.value) + } + required + fullWidth + helperText={errors.status} + error={!!errors.status} + size="small" + options={options} + /> +
+ +
+ +
+ +
+ { + setData( + "productFileUpload", + e.target.value + ); + handleFileChange(e); // Call your existing onChange handler + }} + required + fullWidth + helperText={errors.productFileUpload} + error={!!errors.productFileUpload} + /> +
+
+
+ + + + +
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx new file mode 100644 index 0000000..9898f90 --- /dev/null +++ b/resources/js/Pages/Admin/Management/Products/Index.jsx @@ -0,0 +1,109 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { Card, Typography } from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import EastIcon from "@mui/icons-material/East"; + +export default function Index({ auth, mustVerifyEmail, status, products }) { + const data = products.map((product) => [ + product.productName, + product.productId, + product.branch, + product.status, + product.productDescription, + product.productFileUpload, +
+ + + +
, // Replace 'insert_icon_name_here' with the actual icon name + ]); + + const columns = [ + "Product Name", + "Product ID", + "Branch", + "Status", + "Description", + "productFileUpload", + "", + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Inventory", + url: "/material-ui/getting-started/installation/", + }, + ]; + + return ( + +
+ +
+
+
+ {/* Mobile View */} + +
+ Inventory +
+ +
+
+
+ {/* Desktop View */} + +
+ Inventory +
+ +
+
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx new file mode 100644 index 0000000..542878c --- /dev/null +++ b/resources/js/Pages/Admin/Management/User/Create.jsx @@ -0,0 +1,217 @@ +import { + Alert, + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Paper, + Stack, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import InputLabel from "@mui/material/InputLabel"; +import MenuItem from "@mui/material/MenuItem"; +import FormControl from "@mui/material/FormControl"; +import Select from "@mui/material/Select"; +import CustomSelect from "@/Components/CustomSelect"; +import { useRef, useState, useEffect } from "react"; +import { useForm } from "@inertiajs/react"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import MainLayout from "@/Layouts/MainLayout"; + +function Create({ auth }) { + // test sample + + const [region, setRegion] = React.useState(""); + + const regionChange = (event) => { + setRegion(event.target.value); + }; + + const regions = [ + { label: "None", value: "" }, + { label: "Ten", value: 10 }, + { label: "Twenty", value: 20 }, + { label: "Thirty", value: 30 }, + ]; + + // test + + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // department sample + + const [department, setDepartment] = React.useState(""); + + const DepartmentChange = (event) => { + setDepartment(event.target.value); + }; + + const departmentoption = [ + { label: "None", value: "" }, + { label: "IT", value: 10 }, + { label: "Computer-Science", value: 20 }, + { label: "IS", value: 30 }, + ]; + + // add alertmessage in form submit + + const [showAlert, setShowAlert] = useState(true); + + // Function to hide the alert after a specified duration (in milliseconds) + const hideAlertAfterDuration = (duration) => { + setTimeout(() => { + setShowAlert(false); + }, duration); + }; + + // Call the hideAlertAfterDuration function when showAlert becomes true + useEffect(() => { + if (showAlert) { + hideAlertAfterDuration(5000); // Auto-hide after 3 seconds + } + }, [showAlert]); + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + name: "", + email: "", + password: "", + password_confirmation: "", + }); + + useEffect(() => { + return () => { + reset("password", "password_confirmation"); + }; + }, []); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("management.store")); + + // Show the alert + setShowAlert(true); + + // Reset the form or perform other actions + reset(); + }; + + return ( + + +
+ + User + + +
+
+ + setData("name", e.target.value) + } + required + fullWidth + helperText={errors.name} + error={!!errors.name} + size="small" + /> + + + setData("email", e.target.value) + } + required + fullWidth + helperText={errors.email} + error={!!errors.email} + size="small" + /> + + + setData("password", e.target.value) + } + required + fullWidth + helperText={errors.password} + error={!!errors.password} + size="small" + /> + + + setData( + "password_confirmation", + e.target.value + ) + } + required + fullWidth + helperText={errors.password_confirmation} + error={!!errors.password_confirmation} + size="small" + /> +
+
+
+ +
+ + +
+
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx new file mode 100644 index 0000000..3dccf5e --- /dev/null +++ b/resources/js/Pages/Admin/Management/User/Index.jsx @@ -0,0 +1,299 @@ +import ShippingCard from "@/Components/Card"; +import MainLayout from "@/Layouts/MainLayout"; +import { + Autocomplete, + Avatar, + Box, + Button, + Card, + FormControl, + IconButton, + InputLabel, + ListItem, + ListItemAvatar, + Menu, + MenuItem, + Select, + Skeleton, + TextField, + Tooltip, + Typography, +} from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; +import TransitionsModal from "@/Components/Modal"; +import ReusableModal from "@/Components/Modal"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import BasicTextFields from "@/Components/InputField"; +import CustomizedSnackbars from "@/Components/CustomizeSnackBar"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import PersonIcon from "@mui/icons-material/Person"; +import GrainIcon from "@mui/icons-material/Grain"; +import { Link } from "@inertiajs/react"; +import Create from "./Create"; +import { useRef, useState } from "react"; +import { useForm } from "@inertiajs/react"; +import EastIcon from "@mui/icons-material/East"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; + +export default function Index({ auth, mustVerifyEmail, status, users }) { + // this variable data with the code .map is help determine the backend + + const columns = ["ID", "Name", "Email", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "User", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // test sample + + const [region, setRegion] = React.useState(""); + + const regionChange = (event) => { + setRegion(event.target.value); + }; + + const regions = [ + { label: "None", value: "" }, + { label: "Ten", value: 10 }, + { label: "Twenty", value: 20 }, + { label: "Thirty", value: 30 }, + ]; + + // test + + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false); + const passwordInput = useRef(); + + const { + data1, + setData, + delete: destroy, + processing, + reset, + errors, + } = useForm({ + password: "", + }); + + const confirmUserDeletion = () => { + setConfirmingUserDeletion(true); + }; + + const deleteUser = (e) => { + e.preventDefault(); + + const confirmation = window.confirm( + "Are you sure you want to delete your account?" + ); + if (confirmation) { + destroy(route("profile.destroy"), { + preserveScroll: true, + onSuccess: () => closeModal(), + onError: () => passwordInput.current.focus(), + onFinish: () => reset(), + }); + } + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // department sample + + const [department, setDepartment] = React.useState(""); + + const DepartmentChange = (event) => { + setDepartment(event.target.value); + }; + + const departmentoption = [ + { label: "None", value: "" }, + { label: "IT", value: 10 }, + { label: "Computer-Science", value: 20 }, + { label: "IS", value: 30 }, + ]; + + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + + const data = users.map((user) => [ + user.id, + user.name, + user.email, +
+ + + + + +
, + ]); + + return ( + + {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+ +
+
+ +
+ User +
+ +
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Qr/Create.jsx b/resources/js/Pages/Admin/Qr/Create.jsx new file mode 100644 index 0000000..7583fdd --- /dev/null +++ b/resources/js/Pages/Admin/Qr/Create.jsx @@ -0,0 +1,336 @@ +import { + Button, + DialogActions, + DialogContent, + DialogTitle, + Paper, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import CustomSelect from "@/Components/CustomSelect"; +import { useRef, useState } from "react"; +import { useForm } from "@inertiajs/react"; +import QRCode from "qrcode.react"; +import MainLayout from "@/Layouts/MainLayout"; + +function Create({ auth }) { + const [formData, setFormData] = useState({ + name: "", + email: "", + }); + + const handleChange = (e) => { + const { name, value } = e.target; + setFormData({ + ...formData, + [name]: value, + }); + }; + + const [open, setOpen] = React.useState(false); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const closeModal = () => { + setConfirmingUserDeletion(false); + + reset(); + }; + + // department sample + + const [department, setDepartment] = React.useState(""); + + const departmentChange = (event) => { + setDepartment(event.target.value); + }; + + const departmentoptions = [ + { label: "None", value: "" }, + { label: "EasyPC", value: "EasyPC" }, + { label: "Greenhills", value: "Greenhills" }, + { label: "Gilmore", value: "Gilmore" }, + ]; + + const [status, setStatus] = React.useState(""); + + const statusChange = (event) => { + setStatus(event.target.value); + }; + + const options = [ + { label: "None", value: "" }, + { label: "Active", value: "Active" }, + { label: "Inactive", value: "Inactive" }, + { label: "Deactivated", value: "Deactivated" }, + ]; + + // qrcode generator start + + const [ProductName, setProductName] = useState(""); + + const handleInputChange = (e) => { + setProductName(e.target.value); + }; + const [Product, setProduct] = useState(""); + const handleProductChange = (e) => { + setProduct(e.target.value); + }; + + const [Branch, setBranch] = useState(""); + const handleBranchChange = (e) => { + setBranch(e.target.value); + }; + + const result = + "Product Name: " + + ProductName + + "\n" + + "Inventory: " + + Product + + "Inventory: " + + Branch; + + // submmit to store + + const { data, setData, post, processing, errors, reset } = useForm({ + productName: "", + productId: "", + branch: "", + status: "", + qrDescription: "", + fileUpload: "", + qrcode: "", + }); + + const handleSubmit = (e) => { + e.preventDefault(); + + post(route("qr.store")); + // route is located ) web.php + // setShowAlert(true); + reset(); + }; + + // file upload + + const [selectedFile, setSelectedFile] = useState(null); + + const handleFileChange = (event) => { + const file = event.target.files[0]; + if (file) { + // Check the file type + if ( + file.type === "application/pdf" || + file.type.startsWith( + "application/vnd.openxmlformats-officedocument" + ) || + file.type === "application/msword" + ) { + // Check the file size (50MB limit) + if (file.size <= 50 * 1024 * 1024) { + setSelectedFile(file); + } else { + alert("File size exceeds 50MB limit"); + event.target.value = null; // Clear the file input + } + } else { + alert( + "Unsupported file type. Please select a PDF or document file." + ); + event.target.value = null; // Clear the file input + } + } + }; + + const handleUpload = () => { + if (selectedFile) { + // You can perform the file upload logic here + console.log("Uploading file:", selectedFile); + } else { + console.log("No file selected"); + } + }; + return ( + + +
+
+ QRCODE Management +
+ + +
+
+ { + setData("productName", e.target.value); + handleInputChange(e); // Call your existing onChange handler + }} + helperText={errors.productName} + error={!!errors.productName} + /> + + { + setData("productId", e.target.value); + handleProductChange(e); // Call your existing onChange handler + }} + helperText={errors.productId} + error={!!errors.productId} + /> +
+
+ { + setData("branch", e.target.value); + handleBranchChange(e); // Call your existing onChange handler + }} + helperText={errors.branch} + error={!!errors.branch} + options={departmentoptions} + /> + { + setData("status", e.target.value); + }} + helperText={errors.status} + error={!!errors.status} + options={options} + /> +
+ +
+ +
+ +
+

+ File Upload +

+ { + setData("fileUpload", e.target.value); + handleFileChange(e); // Call your existing onChange handler + }} + required + class="block w-full mt-1 p-2 border rounded-lg focus:outline-none focus:ring focus:border-blue-300" + /> +
+ +
+ {ProductName && ( + { + setData("qrcode", e.target.value); + handleProductChange(e); // Call your existing onChange handler + }} + helperText={errors.qrcode} + error={!!errors.qrcode} + size={128} + /> + )} +
+ +
+ + { + setData("qrcode", e.target.value); + handleProductChange(e); // Call your existing onChange handler + }} + helperText={errors.qrcode} + error={!!errors.qrcode} + /> + +
+
+
+ +
+ + +
+
+
+
+
+ ); +} + +export default Create; diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx new file mode 100644 index 0000000..5d253f0 --- /dev/null +++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx @@ -0,0 +1,145 @@ +import ShippingCard from "@/Components/Card"; +import MainLayout from "@/Layouts/MainLayout"; +import { + Autocomplete, + Avatar, + Button, + Card, + FormControl, + InputLabel, + MenuItem, + Select, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; +import TransitionsModal from "@/Components/Modal"; +import ReusableModal from "@/Components/Modal"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import BasicTextFields from "@/Components/InputField"; +import QRCodeGenerator from "@/Components/QRCodeGenerator"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import WhatshotIcon from "@mui/icons-material/Whatshot"; +import GrainIcon from "@mui/icons-material/Grain"; +import { Link } from "@inertiajs/react"; +import VerticalTabs from "@/Components/TabPanel"; +import BarcodeGenerator from "@/Components/BarcodeGenerator"; +import QRCodeScanner from "@/Components/QRCodeScanner"; +import BarcodeScanner from "@/Components/BarcodeScanner"; +import QrCodeSharpIcon from "@mui/icons-material/QrCodeSharp"; +import CropFreeIcon from "@mui/icons-material/CropFree"; +import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp"; + +export default function Index({ auth, mustVerifyEmail, status }) { + const columns = ["Product Name", "Product ID", "Status"]; + + const data = [ + ["Lenovo laptop", "ABC1234", "Active"], + ["Lenovo PC", "ABC4321", "Pending"], + ]; + + const data1 = [ + ["Lenovo laasdfasdfptop", "ABC1234", "Active"], + ["Lenovo PC", "ABC4321", "Pending"], + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "QR", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // Define an array of tab objects with label and content properties + const tabs = [ + { + label: ( + + Barcode + + ), + content: ( +
+
+ } + title={"Scan"} + content={ +
+ +
+ } + /> +
+ + + +
+ ), + }, + { + label: ( + + QR-Code + + ), + content: ( +
+
+ } + title={"Scan QR"} + content={ +
+ +
+ } + /> +
+ + + +
+ ), + }, + // Add more tabs as needed + ]; + + return ( + +
+ +
+ +
+ ); +} diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx new file mode 100644 index 0000000..d9e957e --- /dev/null +++ b/resources/js/Pages/Admin/Qr/Index.jsx @@ -0,0 +1,210 @@ +import MainLayout from "@/Layouts/MainLayout"; +import { + Avatar, + Box, + Card, + IconButton, + ListItem, + ListItemAvatar, + Menu, + Tooltip, + Typography, +} from "@mui/material"; +import React, { useState } from "react"; +import MUIDataTable from "mui-datatables"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import { Link } from "@inertiajs/react"; +import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp"; +import EastIcon from "@mui/icons-material/East"; +import AddIcon from "@mui/icons-material/Add"; +import SyncAltIcon from "@mui/icons-material/SyncAlt"; +import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; + +export default function Index({ auth, mustVerifyEmail, qrcodes }) { + const [messageEl, setmessageEl] = useState(null); + + const MessagehandleClick = (event) => { + setmessageEl(event.currentTarget); + }; + + const MessagehandleClose = () => { + setmessageEl(null); + }; + + const data = qrcodes.map((qrcode) => [ + qrcode.productName, + qrcode.productId, + qrcode.branch, + qrcode.status, + qrcode.qrDescription, + qrcode.fileUpload, + qrcode.qrcode, +
+ + + + + +
, // Replace 'insert_icon_name_here' with the actual icon name + ]); + + const columns = [ + "Product Name", + "Product ID", + "Branch", + "Status", + "Description", + "fileUpload", + "qrcode", + "", + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "QR", + url: "/material-ui/getting-started/installation/", + }, + ]; + + return ( + + {/* account menu start */} + +
+
+ + {/* */} + + + + + + + + + Create + + + + + + + + + + + + Update + + + + + + + + + + + + Delete + + + + +
+
+
+
+ +
+
+ +
+ QRCode +
+ +
+
+
+ ); +} diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx new file mode 100644 index 0000000..9211a0d --- /dev/null +++ b/resources/js/Pages/Admin/Storage/Index.jsx @@ -0,0 +1,124 @@ +import ShippingCard from "@/Components/Card"; +import MainLayout from "@/Layouts/MainLayout"; +import { + Autocomplete, + Avatar, + Button, + Card, + FormControl, + InputLabel, + MenuItem, + Select, + TextField, +} from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; +import TransitionsModal from "@/Components/Modal"; +import ReusableModal from "@/Components/Modal"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import BasicTextFields from "@/Components/InputField"; +import CustomizedSnackbars from "@/Components/CustomizeSnackBar"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import WhatshotIcon from "@mui/icons-material/Whatshot"; +import GrainIcon from "@mui/icons-material/Grain"; +import { Link } from "@inertiajs/react"; +import VerticalTabs from "@/Components/TabPanel"; +import WidgetsIcon from "@mui/icons-material/Widgets"; +import EastIcon from "@mui/icons-material/East"; + +export default function Index({ auth, mustVerifyEmail, storages }) { + const data = storages.map((storage) => [ + // storage.id, + storage.productName, + storage.productId, + storage.itemName, + storage.status, + , + ]); + const columns = [ + "Product Name", + "Product ID", + // "Item Name", + "Quantity Needed", + "Status", + "", + ]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Storage", + url: "/material-ui/getting-started/installation/", + }, + ]; + + // Define an array of tab objects with label and content properties + const tabs = [ + { + label: "Desktop", + content: ( +
+ + + +
+ ), + }, + { + label: "Laptops", + content: ( +
+ + + +
+ ), + }, + // Add more tabs as needed + ]; + + return ( + +
+ +
+ {/* Pass the tabs array to the VerticalTabs component */} + +
+ ); +} diff --git a/resources/js/Pages/Admin/Warranty/Index.jsx b/resources/js/Pages/Admin/Warranty/Index.jsx new file mode 100644 index 0000000..8ea6c31 --- /dev/null +++ b/resources/js/Pages/Admin/Warranty/Index.jsx @@ -0,0 +1,116 @@ +import ShippingCard from "@/Components/Card"; +import MainLayout from "@/Layouts/MainLayout"; +import { + Autocomplete, + Avatar, + Button, + Card, + FormControl, + InputLabel, + MenuItem, + Select, + TextField, + Typography, +} from "@mui/material"; +import React from "react"; +import MUIDataTable from "mui-datatables"; +import TransitionsModal from "@/Components/Modal"; +import ReusableModal from "@/Components/Modal"; +import AddSharpIcon from "@mui/icons-material/AddSharp"; +import BasicTextFields from "@/Components/InputField"; +import CustomizedSnackbars from "@/Components/CustomizeSnackBar"; +import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs"; +import HomeIcon from "@mui/icons-material/Home"; +import WhatshotIcon from "@mui/icons-material/Whatshot"; +import GrainIcon from "@mui/icons-material/Grain"; +import { Link } from "@inertiajs/react"; +import InventorySharpIcon from "@mui/icons-material/InventorySharp"; +import EastIcon from "@mui/icons-material/East"; + +export default function Index({ auth, mustVerifyEmail, status, warranty }) { + const data = warranty.map((warranty) => [ + warranty.id, + warranty.warranty, +
+ + + +
, // Replace 'insert_icon_name_here' with the actual icon name + ]); + + const columns = ["ID", "Warranties", ""]; + + const options = { + filterType: "checkBox", + elevation: 0, + responsive: "standard", + selectableRows: false, + }; + + const [age, setAge] = React.useState(""); + + const handleChange = (event) => { + setAge(event.target.value); + }; + + const breadcrumbItems = [ + { + icon: ( + + + + ), + text: Home, + url: ( + + + + ), + }, + { + icon: , + text: "Branch", + url: "/material-ui/getting-started/installation/", + }, + ]; + + return ( + +
+ +
+
+
+ {/* Mobile View */} + +
+ Warranty List +
+ +
+
+
+ {/* Desktop View */} + +
+ Warranty List +
+ +
+
+
+
+ ); +} diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx index 144aa1a..eb0dce4 100644 --- a/resources/js/Pages/Profile/Edit.jsx +++ b/resources/js/Pages/Profile/Edit.jsx @@ -3,7 +3,20 @@ import React from "react"; import UpdateProfile from "./Partials/UpdateProfile"; import UpdatePassword from "./Partials/UpdatePassword"; import DeleteAccount from "./Partials/DeleteAccount"; -import { Avatar, IconButton, Typography, Tabs, Tab } from "@mui/material"; +import { + Avatar, + IconButton, + Typography, + Tabs, + Tab, + Box, + Badge, + Stack, +} from "@mui/material"; +import SupervisedUserCircleSharpIcon from "@mui/icons-material/SupervisedUserCircleSharp"; +import ChangeCircleSharpIcon from "@mui/icons-material/ChangeCircleSharp"; +import ManageAccountsSharpIcon from "@mui/icons-material/ManageAccountsSharp"; +import { styled } from "@mui/material/styles"; export default function Edit({ auth }) { const [value, setValue] = React.useState("personalInformation"); @@ -11,26 +24,62 @@ export default function Edit({ auth }) { const handleChange = (event, newValue) => { setValue(newValue); }; + + // active avatar + + const StyledBadge = styled(Badge)(({ theme }) => ({ + "& .MuiBadge-badge": { + backgroundColor: "#44b700", + color: "#44b700", + boxShadow: `0 0 0 2px ${theme.palette.background.paper}`, + "&::after": { + position: "absolute", + top: 0, + left: 0, + width: "100%", + height: "100%", + borderRadius: "50%", + animation: "ripple 1.2s infinite ease-in-out", + border: "1px solid currentColor", + content: '""', + }, + }, + "@keyframes ripple": { + "0%": { + transform: "scale(.8)", + opacity: 1, + }, + "100%": { + transform: "scale(2.4)", + opacity: 0, + }, + }, + })); + + const SmallAvatar = styled(Avatar)(({ theme }) => ({ + width: 22, + height: 22, + border: `2px solid ${theme.palette.background.paper}`, + })); + return ( -
-
-
- - - - - {auth.user.name} - - - {auth.user.email} - -
+
+
+ + + + + {auth.user.name} + + + {auth.user.email} +
-
+
-
- - Delete Account - - - Once your account is deleted, all of its resources and data - will be permanently deleted. Before deleting your account, - please download any data or information that you wish to - retain. - +
+
+ + Delete Account + + + Once your account is deleted, all of its resources and + data will be permanently deleted. Before deleting your + account, please download any data or information that + you wish to retain. + +
+
+ {/* } + /> */} + +
- +
@@ -109,7 +129,7 @@ export default function DeleteAccount({ className = "" }) { -
- + { e.preventDefault(); @@ -32,7 +36,7 @@ export default function UpdateProfile({ mustVerifyEmail, status, className = ''
-
+
- - {/* {mustVerifyEmail && user.email_verified_at === null && ( -
-

- Your email address is unverified. - - Click here to re-send the verification - email. - -

- - {status === "verification-link-sent" && ( -
- A new verification link has been sent to - your email address. -
- )} -
- )} */} ); } diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index f23e9ff..764e8ed 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -1,23 +1,29 @@ - - - - - - {{-- {{ config('app.name', 'Laravel') }} --}} - Inventory Management System - - - - - - - @routes - @viteReactRefresh - @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"]) - @inertiaHead - - - @inertia - + + + + + + + {{-- {{ config('app.name', 'Laravel') }} --}} + Inventory Management System + + + + + + + + + + @routes + @viteReactRefresh + @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"]) + @inertiaHead + + + + @inertia + + diff --git a/routes/web.php b/routes/web.php index 985f9b1..90918d4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,11 +1,27 @@ group(function () { Route::get('/', function () { - return Inertia::render('Admin/Dashboard/Index'); + $users = User::all(); + return Inertia::render('Admin/Dashboard/Index', [ + 'users' => $users, + ]); })->name('dashboard'); + // Route::resource('/Dashboard', DashboardController::class); + // library Route::resource('/library', LibraryController::class); + // Management + Route::resource('/management', UserManagementController::class); + Route::resource("/categories", CategoriesController::class); + Route::resource('/products', ProductManagementController::class); + Route::resource('/equipment', EquipmentController::class); + Route::resource('/branch', BranchController::class); + Route::resource('/warranty', WarrantyController::class); + Route::resource('/borrowed_item', BorrowedController::class); + // create a post that located at ProductManagementController + + // Qr code + Route::resource('/qr', QrController::class); + Route::resource('/generator', GenerateQrController::class); + + // storage + + Route::resource('/storage', StorageController::class); + // Setting navigationbar + Route::resource('/settings', SettingController::class); + + + // Route::resource('/profile', ProfileController::class); @@ -52,11 +95,10 @@ Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); }); - }); -require __DIR__.'/auth.php'; +require __DIR__ . '/auth.php'; diff --git a/tailwind.config.js b/tailwind.config.js index 19ae3e3..7776665 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,19 +1,20 @@ -import defaultTheme from 'tailwindcss/defaultTheme'; -import forms from '@tailwindcss/forms'; +import defaultTheme from "tailwindcss/defaultTheme"; +import forms from "@tailwindcss/forms"; /** @type {import('tailwindcss').Config} */ export default { + darkMode: "class", content: [ - './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', - './storage/framework/views/*.php', - './resources/views/**/*.blade.php', - './resources/js/**/*.jsx', + "./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php", + "./storage/framework/views/*.php", + "./resources/views/**/*.blade.php", + "./resources/js/**/*.jsx", ], theme: { extend: { fontFamily: { - sans: ['Figtree', ...defaultTheme.fontFamily.sans], + sans: ["Figtree", ...defaultTheme.fontFamily.sans], }, }, },