@@ -28,7 +32,7 @@ const BarcodeGenerator = () => {
label="Barcode Value"
variant="outlined"
size="small"
- value={barcodeValue}
+ value={ProductName}
fullWidth
onChange={handleInputChange}
/>
@@ -37,8 +41,8 @@ const BarcodeGenerator = () => {
diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
index 1f2583d..f22bea5 100644
--- a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
@@ -23,6 +23,8 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = ["Product Name", "Product ID", "Status"];
@@ -32,6 +34,11 @@ export default function Index({ auth, mustVerifyEmail, status }) {
["Lenovo PC", "ABC4321", "Pending"],
];
+ const data1 = [
+ ["Lenovo laasdfasdfptop", "ABC1234", "Active"],
+ ["Lenovo PC", "ABC4321", "Pending"],
+ ];
+
const options = {
filterType: "checkBox",
elevation: 0,
@@ -66,12 +73,35 @@ export default function Index({ auth, mustVerifyEmail, status }) {
},
];
+ // Define an array of tab objects with label and content properties
+ const tabs = [
+ {
+ label: "Barcode",
+ content: (
+
+ ),
+ },
+ {
+ label: "QR-Code",
+ content: (
+
+ ),
+ },
+ // Add more tabs as needed
+ ];
+
return (
);
}
From 1e555ffef139ad0e797c82961e89cd9c052e2b11 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Wed, 6 Sep 2023 13:13:53 +0800
Subject: [PATCH 014/182] add-design-for-qr-scanner-and-barcode
---
resources/js/Components/BarcodeScanner.jsx | 45 +++++++++++++++++++
resources/js/Components/QRCodeScanner.jsx | 37 +++++++++++++++
.../js/Pages/Admin/Qr/GenerateQr/Index.jsx | 6 +++
3 files changed, 88 insertions(+)
create mode 100644 resources/js/Components/BarcodeScanner.jsx
create mode 100644 resources/js/Components/QRCodeScanner.jsx
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
new file mode 100644
index 0000000..c180690
--- /dev/null
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -0,0 +1,45 @@
+import React, { Component } from "react";
+import Camera, { FACING_MODES } from "react-html5-camera-photo";
+import "react-html5-camera-photo/build/css/index.css";
+
+class BarcodeScanner extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ data: null,
+ error: null,
+ };
+ }
+
+ onTakePhoto(dataUri) {
+ // Here, you can process the barcode dataUri.
+ this.setState({ data: dataUri });
+ }
+
+ onCameraError(error) {
+ this.setState({ error: `Camera error: ${error.message}` });
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default BarcodeScanner;
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
new file mode 100644
index 0000000..ec6b287
--- /dev/null
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -0,0 +1,37 @@
+import React, { useState } from "react";
+
+const QRCodeScanner = () => {
+ const [result, setResult] = useState(null);
+
+ const handleScan = (data) => {
+ if (data) {
+ setResult(data);
+ }
+ };
+
+ const handleError = (error) => {
+ console.error(error);
+ };
+
+ return (
+
+ );
+};
+
+export default QRCodeScanner;
diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
index f22bea5..45501f1 100644
--- a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
@@ -25,6 +25,8 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = ["Product Name", "Product ID", "Status"];
@@ -81,6 +83,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
@@ -90,6 +93,9 @@ export default function Index({ auth, mustVerifyEmail, status }) {
content: (
),
},
From f1a13069d3d3b3192803688986e97c948a5d4b60 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Wed, 6 Sep 2023 14:38:35 +0800
Subject: [PATCH 015/182] populate_data
---
resources/js/Components/BasicPie.jsx | 6 +-
resources/js/Components/StackBar.jsx | 24 +-
resources/js/Pages/Admin/Dashboard/Index.jsx | 86 +++++
.../Pages/Admin/Management/Products/Index.jsx | 45 ++-
.../js/Pages/Admin/Management/User/Index.jsx | 85 ++++-
.../js/Pages/Admin/Qr/GenerateQr/Index.jsx | 7 +-
resources/js/Pages/Admin/Qr/Index.jsx | 311 +++++++++++++++++-
resources/js/Pages/Admin/Storage/Index.jsx | 84 ++++-
8 files changed, 616 insertions(+), 32 deletions(-)
diff --git a/resources/js/Components/BasicPie.jsx b/resources/js/Components/BasicPie.jsx
index 0b59d81..23ffd4c 100644
--- a/resources/js/Components/BasicPie.jsx
+++ b/resources/js/Components/BasicPie.jsx
@@ -3,7 +3,7 @@ import { PieChart } from "@mui/x-charts/PieChart";
export default function BasicPie() {
return (
-
+
);
diff --git a/resources/js/Components/StackBar.jsx b/resources/js/Components/StackBar.jsx
index 3bbcb7b..0458dc0 100644
--- a/resources/js/Components/StackBar.jsx
+++ b/resources/js/Components/StackBar.jsx
@@ -3,18 +3,16 @@ import { BarChart } from "@mui/x-charts/BarChart";
export default function StackBars() {
return (
-
-
-
+
);
}
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index 238385c..d27207d 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -20,8 +20,94 @@ export default function Index({ auth, mustVerifyEmail, status }) {
const data = [
["Jhunriz", "23", "Active"],
["Joshua", "22", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Sophia", "20", "Inactive"],
+ ["Noah", "30", "Active"],
+ ["Olivia", "24", "Inactive"],
+ ["Aiden", "27", "Active"],
+ ["Mia", "29", "Inactive"],
+ ["Ella", "26", "Active"],
+ ["Jackson", "31", "Active"],
+ ["Ava", "19", "Inactive"],
+ ["Logan", "27", "Active"],
+ ["Emma", "22", "Inactive"],
+ ["Landon", "24", "Active"],
+ ["Grace", "28", "Inactive"],
+ ["Carter", "25", "Active"],
+ ["Zoe", "23", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Lily", "21", "Inactive"],
+ ["Mason", "29", "Active"],
+ ["Sophie", "30", "Inactive"],
+ ["Lucas", "23", "Active"],
+ ["Evelyn", "27", "Inactive"],
+ ["Oliver", "25", "Active"],
+ ["Harper", "24", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Abigail", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Henry", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["Elijah", "30", "Active"],
+ ["Amelia", "23", "Inactive"],
+ ["William", "24", "Active"],
+ ["Mila", "27", "Inactive"],
+ ["James", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["Daniel", "22", "Active"],
+ ["Avery", "29", "Inactive"],
+ ["Alexander", "26", "Active"],
+ ["Chloe", "30", "Inactive"],
+ ["Michael", "21", "Active"],
+ ["Madison", "31", "Inactive"],
+ ["Evelyn", "23", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Ella", "28", "Active"],
+ ["Grace", "24", "Inactive"],
+ ["Liam", "27", "Active"],
+ ["Harper", "22", "Inactive"],
+ ["Ethan", "29", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Lucas", "26", "Active"],
+ ["Zoe", "30", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["William", "30", "Active"],
+ ["Charlotte", "21", "Inactive"],
+ ["James", "29", "Active"],
+ ["Amelia", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Chloe", "24", "Inactive"],
+ ["Daniel", "26", "Active"],
+ ["Mila", "23", "Inactive"],
+ ["Michael", "28", "Active"],
+ ["Madison", "25", "Inactive"],
+ ["Evelyn", "30", "Active"],
+ ["Lily", "27", "Inactive"],
+ ["Ella", "24", "Active"],
+ ["Avery", "22", "Inactive"],
+ ["Liam", "29", "Active"],
+ ["Harper", "21", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Aria", "30", "Inactive"],
+ ["Lucas", "25", "Active"],
+ ["Zoe", "28", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "30", "Active"],
+ ["Sofia", "22", "Inactive"],
+ ["William", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["James", "21", "Active"],
+ ["Amelia", "25", "Inactive"],
];
+ // Now, you have a total of 108 rows in the `data` array.
+
const options = {
filterType: "checkBox",
elevation: 0,
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index a94faf3..1209be7 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -25,11 +25,50 @@ import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
export default function Index({ auth, mustVerifyEmail, status }) {
- const columns = ["Product Name", "Product ID", "Status"];
+ const columns = [
+ "Product Name",
+ "Product ID",
+ "Item Name",
+ "Quantity Needed",
+ "Status",
+ ];
const data = [
- ["Lenovo laptop", "ABC1234", "Active"],
- ["Lenovo PC", "ABC4321", "Pending"],
+ ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
+ ["HP Desktop", "DEF5678", "HP", "800", "Active"],
+ ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
+ ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
+ ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
+ // Add more entries here...
+ ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
+ ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
+ ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
+ ["HP Printer", "YZA3456", "HP", "250", "Active"],
+ ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
+ // Add more entries here...
+ ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
+ ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
+ ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
+ ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
+ ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
+ // Add more entries here...
+ ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
+ ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
+ ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
+ ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
+ ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
+ // Add more entries here...
+ ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
+ ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
+ ["Apple Watch", "STU9012", "Apple", "400", "Active"],
+ ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
+ ["HP Scanner", "YZA7890", "HP", "150", "Active"],
+ // Add more entries here...
+ ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
+ ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
+ ["LG TV", "HIJ9012", "LG", "700", "Active"],
+ ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
+ ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
];
const options = {
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index 263dda2..6287577 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -30,8 +30,91 @@ export default function Index({ auth, mustVerifyEmail, status }) {
const data = [
["Jhunriz", "23", "Active"],
["Joshua", "22", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Sophia", "20", "Inactive"],
+ ["Noah", "30", "Active"],
+ ["Olivia", "24", "Inactive"],
+ ["Aiden", "27", "Active"],
+ ["Mia", "29", "Inactive"],
+ ["Ella", "26", "Active"],
+ ["Jackson", "31", "Active"],
+ ["Ava", "19", "Inactive"],
+ ["Logan", "27", "Active"],
+ ["Emma", "22", "Inactive"],
+ ["Landon", "24", "Active"],
+ ["Grace", "28", "Inactive"],
+ ["Carter", "25", "Active"],
+ ["Zoe", "23", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Lily", "21", "Inactive"],
+ ["Mason", "29", "Active"],
+ ["Sophie", "30", "Inactive"],
+ ["Lucas", "23", "Active"],
+ ["Evelyn", "27", "Inactive"],
+ ["Oliver", "25", "Active"],
+ ["Harper", "24", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Abigail", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Henry", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["Elijah", "30", "Active"],
+ ["Amelia", "23", "Inactive"],
+ ["William", "24", "Active"],
+ ["Mila", "27", "Inactive"],
+ ["James", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["Daniel", "22", "Active"],
+ ["Avery", "29", "Inactive"],
+ ["Alexander", "26", "Active"],
+ ["Chloe", "30", "Inactive"],
+ ["Michael", "21", "Active"],
+ ["Madison", "31", "Inactive"],
+ ["Evelyn", "23", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Ella", "28", "Active"],
+ ["Grace", "24", "Inactive"],
+ ["Liam", "27", "Active"],
+ ["Harper", "22", "Inactive"],
+ ["Ethan", "29", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Lucas", "26", "Active"],
+ ["Zoe", "30", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["William", "30", "Active"],
+ ["Charlotte", "21", "Inactive"],
+ ["James", "29", "Active"],
+ ["Amelia", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Chloe", "24", "Inactive"],
+ ["Daniel", "26", "Active"],
+ ["Mila", "23", "Inactive"],
+ ["Michael", "28", "Active"],
+ ["Madison", "25", "Inactive"],
+ ["Evelyn", "30", "Active"],
+ ["Lily", "27", "Inactive"],
+ ["Ella", "24", "Active"],
+ ["Avery", "22", "Inactive"],
+ ["Liam", "29", "Active"],
+ ["Harper", "21", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Aria", "30", "Inactive"],
+ ["Lucas", "25", "Active"],
+ ["Zoe", "28", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "30", "Active"],
+ ["Sofia", "22", "Inactive"],
+ ["William", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["James", "21", "Active"],
+ ["Amelia", "25", "Inactive"],
];
-
const options = {
filterType: "checkBox",
elevation: 0,
diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
index 45501f1..c7a4187 100644
--- a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
@@ -10,6 +10,7 @@ import {
MenuItem,
Select,
TextField,
+ Typography,
} from "@mui/material";
import React from "react";
import MUIDataTable from "mui-datatables";
@@ -78,7 +79,11 @@ export default function Index({ auth, mustVerifyEmail, status }) {
// Define an array of tab objects with label and content properties
const tabs = [
{
- label: "Barcode",
+ label: (
+
+ button text
+
+ ),
content: (
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index b4dff56..0d54f9e 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -25,11 +25,314 @@ import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
export default function Index({ auth, mustVerifyEmail, status }) {
- const columns = ["Product Name", "Product ID", "Status"];
-
+ const columns = [
+ "Product Name",
+ "Product ID",
+ "Item Name",
+ "Quantity Needed",
+ "QR-Code",
+ "Barcode",
+ "Status",
+ ];
const data = [
- ["Lenovo laptop", "ABC1234", "Active"],
- ["Lenovo PC", "ABC4321", "Pending"],
+ [
+ "Lenovo laptop",
+ "ABC1234",
+ "Lenovo",
+ "1000",
+ "qr-code-url-4",
+ "barcode-url-4",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "DEF5678",
+ "Dell",
+ "800",
+ "qr-code-url-5",
+ "barcode-url-5",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "GHI9012",
+ "HP",
+ "1200",
+ "qr-code-url-6",
+ "barcode-url-6",
+ "Active",
+ ],
+ [
+ "Apple MacBook",
+ "JKL3456",
+ "Apple",
+ "2000",
+ "qr-code-url-7",
+ "barcode-url-7",
+ "Active",
+ ],
+ // Add 65 more sample data entries here...
+ [
+ "Acer laptop",
+ "MNO7890",
+ "Acer",
+ "950",
+ "qr-code-url-8",
+ "barcode-url-8",
+ "Inactive",
+ ],
+ [
+ "Asus desktop",
+ "PQR1234",
+ "Asus",
+ "850",
+ "qr-code-url-9",
+ "barcode-url-9",
+ "Active",
+ ],
+ [
+ "Lenovo laptop",
+ "STU5678",
+ "Lenovo",
+ "1100",
+ "qr-code-url-10",
+ "barcode-url-10",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "VWX9012",
+ "Dell",
+ "750",
+ "qr-code-url-11",
+ "barcode-url-11",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "YZA3456",
+ "HP",
+ "1150",
+ "qr-code-url-12",
+ "barcode-url-12",
+ "Active",
+ ],
+ [
+ "Apple MacBook",
+ "BCD6789",
+ "Apple",
+ "1950",
+ "qr-code-url-13",
+ "barcode-url-13",
+ "Active",
+ ],
+ [
+ "Acer laptop",
+ "EFG1234",
+ "Acer",
+ "920",
+ "qr-code-url-14",
+ "barcode-url-14",
+ "Inactive",
+ ],
+ [
+ "Asus desktop",
+ "HIJ5678",
+ "Asus",
+ "830",
+ "qr-code-url-15",
+ "barcode-url-15",
+ "Active",
+ ],
+ [
+ "Lenovo laptop",
+ "KLM9012",
+ "Lenovo",
+ "1050",
+ "qr-code-url-16",
+ "barcode-url-16",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "NOP3456",
+ "Dell",
+ "720",
+ "qr-code-url-17",
+ "barcode-url-17",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "QRS6789",
+ "HP",
+ "1100",
+ "qr-code-url-18",
+ "barcode-url-18",
+ "Active",
+ ],
+ [
+ "Apple MacBook",
+ "TUV1234",
+ "Apple",
+ "1900",
+ "qr-code-url-19",
+ "barcode-url-19",
+ "Active",
+ ],
+ [
+ "Acer laptop",
+ "WXY5678",
+ "Acer",
+ "890",
+ "qr-code-url-20",
+ "barcode-url-20",
+ "Inactive",
+ ],
+ [
+ "Asus desktop",
+ "ZAB9012",
+ "Asus",
+ "810",
+ "qr-code-url-21",
+ "barcode-url-21",
+ "Active",
+ ],
+ [
+ "Lenovo laptop",
+ "BCD3456",
+ "Lenovo",
+ "1030",
+ "qr-code-url-22",
+ "barcode-url-22",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "EFG6789",
+ "Dell",
+ "700",
+ "qr-code-url-23",
+ "barcode-url-23",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "HIJ1234",
+ "HP",
+ "1075",
+ "qr-code-url-24",
+ "barcode-url-24",
+ "Active",
+ ],
+ [
+ "Apple MacBook",
+ "KLM5678",
+ "Apple",
+ "1850",
+ "qr-code-url-25",
+ "barcode-url-25",
+ "Active",
+ ],
+ [
+ "Acer laptop",
+ "NOP9012",
+ "Acer",
+ "870",
+ "qr-code-url-26",
+ "barcode-url-26",
+ "Inactive",
+ ],
+ [
+ "Asus desktop",
+ "QRS3456",
+ "Asus",
+ "790",
+ "qr-code-url-27",
+ "barcode-url-27",
+ "Active",
+ ],
+ [
+ "Lenovo laptop",
+ "TUV6789",
+ "Lenovo",
+ "1005",
+ "qr-code-url-28",
+ "barcode-url-28",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "WXY1234",
+ "Dell",
+ "680",
+ "qr-code-url-29",
+ "barcode-url-29",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "ZAB5678",
+ "HP",
+ "1040",
+ "qr-code-url-30",
+ "barcode-url-30",
+ "Active",
+ ],
+ [
+ "Apple MacBook",
+ "BCD9012",
+ "Apple",
+ "1800",
+ "qr-code-url-31",
+ "barcode-url-31",
+ "Active",
+ ],
+ [
+ "Acer laptop",
+ "EFG3456",
+ "Acer",
+ "850",
+ "qr-code-url-32",
+ "barcode-url-32",
+ "Inactive",
+ ],
+ [
+ "Asus desktop",
+ "HIJ6789",
+ "Asus",
+ "770",
+ "qr-code-url-33",
+ "barcode-url-33",
+ "Active",
+ ],
+ [
+ "Lenovo laptop",
+ "KLM1234",
+ "Lenovo",
+ "980",
+ "qr-code-url-34",
+ "barcode-url-34",
+ "Active",
+ ],
+ [
+ "Dell desktop",
+ "NOP5678",
+ "Dell",
+ "660",
+ "qr-code-url-35",
+ "barcode-url-35",
+ "Inactive",
+ ],
+ [
+ "HP laptop",
+ "QRS9012",
+ "HP",
+ "1020",
+ "qr-code-url-36",
+ "barcode-url-36",
+ "Active",
+ ],
];
const options = {
diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx
index 57a93f4..bf99ecb 100644
--- a/resources/js/Pages/Admin/Storage/Index.jsx
+++ b/resources/js/Pages/Admin/Storage/Index.jsx
@@ -26,18 +26,88 @@ import { Link } from "@inertiajs/react";
import VerticalTabs from "@/Components/TabPanel";
export default function Index({ auth, mustVerifyEmail, status }) {
- const columns = ["Product Name", "Product ID", "Status"];
+ const columns = [
+ "Product Name",
+ "Product ID",
+ "Item Name",
+ "Quantity Needed",
+ "Status",
+ ];
const data = [
- ["Lenovo laptop", "ABC1234", "Active"],
- ["Lenovo PC", "ABC4321", "Pending"],
+ ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
+ ["HP Desktop", "DEF5678", "HP", "800", "Active"],
+ ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
+ ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
+ ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
+ // Add more entries here...
+ ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
+ ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
+ ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
+ ["HP Printer", "YZA3456", "HP", "250", "Active"],
+ ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
+ // Add more entries here...
+ ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
+ ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
+ ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
+ ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
+ ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
+ // Add more entries here...
+ ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
+ ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
+ ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
+ ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
+ ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
+ // Add more entries here...
+ ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
+ ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
+ ["Apple Watch", "STU9012", "Apple", "400", "Active"],
+ ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
+ ["HP Scanner", "YZA7890", "HP", "150", "Active"],
+ // Add more entries here...
+ ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
+ ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
+ ["LG TV", "HIJ9012", "LG", "700", "Active"],
+ ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
+ ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
];
-
const data1 = [
- ["Lenovo laasdfasdfptop", "ABC1234", "Active"],
- ["Lenovo PC", "ABC4321", "Pending"],
+ ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
+ ["HP Desktop", "DEF5678", "HP", "800", "Active"],
+ ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
+ ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
+ ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
+ // Add more entries here...
+ ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
+ ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
+ ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
+ ["HP Printer", "YZA3456", "HP", "250", "Active"],
+ ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
+ // Add more entries here...
+ ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
+ ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
+ ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
+ ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
+ ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
+ // Add more entries here...
+ ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
+ ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
+ ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
+ ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
+ ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
+ // Add more entries here...
+ ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
+ ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
+ ["Apple Watch", "STU9012", "Apple", "400", "Active"],
+ ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
+ ["HP Scanner", "YZA7890", "HP", "150", "Active"],
+ // Add more entries here...
+ ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
+ ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
+ ["LG TV", "HIJ9012", "LG", "700", "Active"],
+ ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
+ ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
];
-
const options = {
filterType: "checkBox",
elevation: 0,
From 5ba6beb9cea904710552585e9013f542cd7af678 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Wed, 6 Sep 2023 16:12:17 +0800
Subject: [PATCH 016/182] arrange-barcode-qr-code
---
resources/js/Components/BarcodeGenerator.jsx | 10 +++--
resources/js/Components/QRCodeScanner.jsx | 2 +-
.../js/Pages/Admin/Qr/GenerateQr/Index.jsx | 37 ++++++++++++++++---
3 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index cd615f1..0969885 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -14,9 +14,11 @@ const BarcodeGenerator = () => {
const value = ProductName;
return (
-
-
-
Barcode Generator
+
+
+
+ Generate Barcode
+
{
-
+
{ProductName && (
)}
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index ec6b287..1db1dbe 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -14,7 +14,7 @@ const QRCodeScanner = () => {
};
return (
-
+
QR Code Scanner
{/*
- button text
+ Barcode
),
content: (
+
+
}
+ title={"Scan"}
+ content={
+
+
+
+ }
+ />
+
-
),
},
{
- label: "QR-Code",
+ label: (
+
+ QR-Code
+
+ ),
content: (
-
-
-
+
+
}
+ title={"Scan QR"}
+ content={
+
+
+
+ }
+ />
+
+
+
),
},
From 7bca20311eaf97f323493e459f9505b2e17a53b3 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Wed, 6 Sep 2023 16:31:25 +0800
Subject: [PATCH 017/182] qr-code-and-barcode-designed
---
resources/js/Components/BarcodeScanner.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
index c180690..2c7bab4 100644
--- a/resources/js/Components/BarcodeScanner.jsx
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -24,7 +24,7 @@ class BarcodeScanner extends Component {
render() {
return (
-
Barcode Scanner
+
Barcode Scanner
{this.state.data && (
Scanned Data:
From ea87492df6d48878292d53daa839b1caab6c5596 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Wed, 6 Sep 2023 16:35:43 +0800
Subject: [PATCH 018/182] sidenav-updated
---
resources/js/Layouts/MainLayout.jsx | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 61e21fb..29426fb 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -428,18 +428,20 @@ export default function MainLayout({ user, children }) {
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 135ea6a70151e3ec3e5258b0f0e78844d2261274 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 08:58:05 +0800
Subject: [PATCH 019/182] update-for-the-inventory-management
---
resources/js/Components/BarcodeGenerator.jsx | 54 +++++++++++++++++++
.../js/Pages/Admin/Qr/GenerateQr/Index.jsx | 3 +-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index 0969885..d7916a9 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -13,6 +13,55 @@ const BarcodeGenerator = () => {
const value = ProductName;
+ 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 (
+
+ Download QR Code
+
+ );
+ };
+
+ const PrintButton = () => {
+ const handlePrint = () => {
+ const printWindow = window.open("", "", "width=600,height=600");
+ printWindow.document.open();
+ printWindow.document.write(
+ "QR Code "
+ );
+ printWindow.document.write(
+ ` `
+ );
+ printWindow.document.write("");
+ printWindow.document.close();
+ printWindow.print();
+ printWindow.close();
+ };
+
+ return (
+
+ Print QR Code
+
+ );
+ };
+
return (
@@ -37,6 +86,7 @@ const BarcodeGenerator = () => {
value={ProductName}
fullWidth
onChange={handleInputChange}
+ type="number"
/>
@@ -47,6 +97,10 @@ const BarcodeGenerator = () => {
)}
+
);
diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
index 589d2dd..6c8ca56 100644
--- a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
@@ -29,6 +29,7 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = ["Product Name", "Product ID", "Status"];
@@ -89,7 +90,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
+ icon={
}
title={"Scan"}
content={
From 838dc04bb116d1cb81831a4a7370935958736d7d Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 15:30:30 +0800
Subject: [PATCH 020/182] barcode-download-and-print-done
---
resources/js/Components/QRCodeGenerator.jsx | 29 ++++-----------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/resources/js/Components/QRCodeGenerator.jsx b/resources/js/Components/QRCodeGenerator.jsx
index b91663b..b3d80a0 100644
--- a/resources/js/Components/QRCodeGenerator.jsx
+++ b/resources/js/Components/QRCodeGenerator.jsx
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import QRCode from "qrcode.react";
-import { Box, TextField } from "@mui/material";
+import { Box, Button, TextField } from "@mui/material";
const QRCodeGenerator = () => {
const [ProductName, setProductName] = useState("");
@@ -36,26 +36,6 @@ const QRCodeGenerator = () => {
"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 (
-
- Download QR Code
-
- );
- };
-
const PrintButton = () => {
const handlePrint = () => {
const printWindow = window.open("", "", "width=600,height=600");
@@ -75,13 +55,14 @@ const QRCodeGenerator = () => {
};
return (
-
Print QR Code
-
+
);
};
From 10cb5c0e82e89eec7dd4a6e3e3023fe8f15e237b Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 15:30:56 +0800
Subject: [PATCH 021/182] download-and-print-done
---
package-lock.json | 142 ++++++++++++-------
package.json | 5 +-
resources/js/Components/BarcodeGenerator.jsx | 115 ++++++++-------
resources/js/Components/QRCodeScanner.jsx | 71 ++++++----
4 files changed, 189 insertions(+), 144 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index dd49eba..29ab57d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,9 +10,12 @@
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"@mui/x-charts": "^6.0.0-alpha.9",
+ "html2canvas": "^1.4.1",
"mui-datatables": "^4.3.0",
"qrcode.react": "^3.1.0",
- "react-barcode": "^1.4.6"
+ "react-barcode": "^1.4.6",
+ "react-html5-camera-photo": "^1.5.11",
+ "react-qr-code": "^2.0.12"
},
"devDependencies": {
"@inertiajs/react": "^1.0.0",
@@ -1343,11 +1346,6 @@
"hoist-non-react-statics": "^3.3.0"
}
},
- "node_modules/@types/offscreencanvas": {
- "version": "2019.7.1",
- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz",
- "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ=="
- },
"node_modules/@types/parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
@@ -1358,11 +1356,6 @@
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
"integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
},
- "node_modules/@types/raf": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz",
- "integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw=="
- },
"node_modules/@types/react": {
"version": "18.2.21",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz",
@@ -1522,6 +1515,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",
@@ -1635,22 +1636,6 @@
}
]
},
- "node_modules/canvg": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/canvg/-/canvg-4.0.1.tgz",
- "integrity": "sha512-5gD/d6SiCCT7baLnVr0hokYe93DfcHW2rSqdKOuOQD84YMlyfttnZ8iQsThTdX6koYam+PROz/FuQTo500zqGw==",
- "dependencies": {
- "@types/offscreencanvas": "^2019.6.4",
- "@types/raf": "^3.4.0",
- "raf": "^3.4.1",
- "rgbcolor": "^1.0.1",
- "stackblur-canvas": "^2.0.0",
- "svg-pathdata": "^6.0.3"
- },
- "engines": {
- "node": ">=12.0.0"
- }
- },
"node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -1789,6 +1774,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",
@@ -2284,10 +2277,17 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
- "node_modules/html-to-image": {
- "version": "1.11.11",
- "resolved": "https://registry.npmjs.org/html-to-image/-/html-to-image-1.11.11.tgz",
- "integrity": "sha512-9gux8QhvjRO/erSnDPv28noDZcPZmYE7e1vFsBLKLlRlKDSqNJYebj6Qz1TGd5lsRV+X+xYyjCKjuZdABinWjA=="
+ "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",
@@ -2472,6 +2472,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",
@@ -3045,6 +3050,11 @@
"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",
@@ -3159,6 +3169,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",
@@ -3169,6 +3191,24 @@
"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-refresh": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz",
@@ -3367,14 +3407,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/rgbcolor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
- "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
- "engines": {
- "node": ">= 0.8.15"
- }
- },
"node_modules/rollup": {
"version": "3.28.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.1.tgz",
@@ -3462,14 +3494,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/stackblur-canvas": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz",
- "integrity": "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg==",
- "engines": {
- "node": ">=0.1.14"
- }
- },
"node_modules/stylis": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",
@@ -3519,14 +3543,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/svg-pathdata": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
- "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
- "engines": {
- "node": ">=12.0.0"
- }
- },
"node_modules/tailwindcss": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
@@ -3564,6 +3580,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",
@@ -3667,6 +3691,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 9fc59bf..d143da6 100644
--- a/package.json
+++ b/package.json
@@ -24,8 +24,11 @@
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"@mui/x-charts": "^6.0.0-alpha.9",
+ "html2canvas": "^1.4.1",
"mui-datatables": "^4.3.0",
"qrcode.react": "^3.1.0",
- "react-barcode": "^1.4.6"
+ "react-barcode": "^1.4.6",
+ "react-html5-camera-photo": "^1.5.11",
+ "react-qr-code": "^2.0.12"
}
}
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index d7916a9..6350595 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -1,65 +1,40 @@
-import React, { useState } from "react";
+import React, { useState, useRef } from "react";
import Barcode from "react-barcode";
-import { Box, TextField } from "@mui/material";
+import { Box, Button, TextField } from "@mui/material";
+import html2canvas from "html2canvas";
const BarcodeGenerator = () => {
- // const [barcodeValue, setBarcodeValue] = useState("");
-
- const [ProductName, setProductName] = useState("");
+ const [productName, setProductName] = useState("");
+ const barcodeRef = useRef(null);
const handleInputChange = (e) => {
setProductName(e.target.value);
};
- const value = ProductName;
-
- 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 (
-
- Download QR Code
-
- );
+ 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 PrintButton = () => {
- const handlePrint = () => {
- const printWindow = window.open("", "", "width=600,height=600");
- printWindow.document.open();
- printWindow.document.write(
- "
QR Code "
- );
- printWindow.document.write(
- `
`
- );
- printWindow.document.write("");
- printWindow.document.close();
- printWindow.print();
- printWindow.close();
- };
-
- return (
-
- Print QR Code
-
+ 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 (
@@ -83,23 +58,45 @@ const BarcodeGenerator = () => {
label="Barcode Value"
variant="outlined"
size="small"
- value={ProductName}
+ value={productName}
fullWidth
onChange={handleInputChange}
- type="number"
+ type="text"
/>
-
-
- {ProductName && (
-
+
+
+ {productName && (
+
)}
-
-
+
+ Download
+
+
+ Print
+
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index 1db1dbe..894f85d 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -1,37 +1,50 @@
-import React, { useState } from "react";
+import React, { Component } from "react";
+import Camera, { FACING_MODES } from "react-html5-camera-photo";
+import "react-html5-camera-photo/build/css/index.css";
-const QRCodeScanner = () => {
- const [result, setResult] = useState(null);
+class QRCodeScanner extends Component {
+ constructor(props) {
+ super(props);
- const handleScan = (data) => {
- if (data) {
- setResult(data);
+ this.state = {
+ data: null,
+ error: null,
+ };
+ }
+
+ // Add a function to handle the QR code scan result
+ handleQRCodeScan(result) {
+ if (result) {
+ this.setState({ data: result });
+ } else {
+ this.setState({ error: "No QR code found" });
}
- };
+ }
- const handleError = (error) => {
- console.error(error);
- };
+ onCameraError(error) {
+ this.setState({ error: `Camera error: ${error.message}` });
+ }
- return (
-
-
QR Code Scanner
-
- {/*
*/}
+ render() {
+ return (
+
+
QR Code Scanner
+ {this.state.data && (
+
+
Scanned QR Code:
+
{this.state.data}
+
+ )}
+ {this.state.error &&
{this.state.error}
}
+
this.handleQRCodeScan(dataUri)} // Pass the dataUri to the scan handler
+ onCameraError={(error) => this.onCameraError(error)}
+ isImageMirror={false} // To prevent mirroring of the camera feed
+ />
- {result && (
-
-
Scanned Result:
-
{result}
-
- )}
-
- );
-};
+ );
+ }
+}
export default QRCodeScanner;
From 5f19590ebdb42e3a3dae9546475d4f64611c61df Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 15:36:02 +0800
Subject: [PATCH 022/182] updated-done-download
---
resources/js/Components/BarcodeGenerator.jsx | 2 +-
resources/js/Components/QRCodeGenerator.jsx | 21 ++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index 6350595..76e84c8 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -84,7 +84,7 @@ const BarcodeGenerator = () => {
diff --git a/resources/js/Components/QRCodeGenerator.jsx b/resources/js/Components/QRCodeGenerator.jsx
index b3d80a0..93cc52c 100644
--- a/resources/js/Components/QRCodeGenerator.jsx
+++ b/resources/js/Components/QRCodeGenerator.jsx
@@ -36,6 +36,27 @@ const QRCodeGenerator = () => {
"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 (
+
+ Download QR Code
+
+ );
+ };
+
const PrintButton = () => {
const handlePrint = () => {
const printWindow = window.open("", "", "width=600,height=600");
From 0e8b07ea8a16e0c1a372c3e4fa73ddb9db072f3b Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 15:46:38 +0800
Subject: [PATCH 023/182] updated-barcode-qrcode
---
resources/js/Components/BarcodeGenerator.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index 76e84c8..edab1a9 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -76,7 +76,7 @@ const BarcodeGenerator = () => {
From 9aa027866b61071383dad41350cb754182e98c6f Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 7 Sep 2023 16:45:31 +0800
Subject: [PATCH 024/182] updated-barcode-download
---
resources/js/Components/BarcodeGenerator.jsx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index edab1a9..fca4795 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -9,6 +9,8 @@ const BarcodeGenerator = () => {
const handleInputChange = (e) => {
setProductName(e.target.value);
+ const inputValue = event.target.value.replace(/\D/g, "").slice(0, 48);
+ setProductName(inputValue);
};
const downloadBarcode = () => {
@@ -39,7 +41,7 @@ const BarcodeGenerator = () => {
return (
-
+
Generate Barcode
@@ -48,8 +50,7 @@ const BarcodeGenerator = () => {
display: "flex",
flexDirection: "row",
alignItems: "center",
- width: 600,
- maxWidth: "100%",
+ width: 900,
}}
>
@@ -57,7 +58,7 @@ const BarcodeGenerator = () => {
id="barcode-value-input"
label="Barcode Value"
variant="outlined"
- size="small"
+ size="large"
value={productName}
fullWidth
onChange={handleInputChange}
@@ -70,7 +71,7 @@ const BarcodeGenerator = () => {
{productName && (
Date: Fri, 8 Sep 2023 13:04:51 +0800
Subject: [PATCH 025/182] update-user-settings
---
resources/js/Components/VerticalTabs.jsx | 85 +++++++++++++++++++
resources/js/Pages/Profile/Edit.jsx | 64 +++++++++-----
.../Pages/Profile/Partials/UpdatePassword.jsx | 1 +
.../Pages/Profile/Partials/UpdateProfile.jsx | 21 +++--
4 files changed, 143 insertions(+), 28 deletions(-)
create mode 100644 resources/js/Components/VerticalTabs.jsx
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 (
+
+ {value === index && (
+
+ {children}
+
+ )}
+
+ );
+}
+
+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/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index f423246..ea72a6e 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -3,7 +3,10 @@ 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 } from "@mui/material";
+import SupervisedUserCircleSharpIcon from "@mui/icons-material/SupervisedUserCircleSharp";
+import ChangeCircleSharpIcon from "@mui/icons-material/ChangeCircleSharp";
+import ManageAccountsSharpIcon from "@mui/icons-material/ManageAccountsSharp";
export default function Edit({ auth }) {
const [value, setValue] = React.useState("personalInformation");
@@ -11,9 +14,10 @@ export default function Edit({ auth }) {
const handleChange = (event, newValue) => {
setValue(newValue);
};
+
return (
-
+
@@ -30,24 +34,44 @@ export default function Edit({ auth }) {
-
-
-
-
-
-
-
-
+
+
+ Account Settings
+
+
+
+
+
+ }
+ iconPosition="start"
+ />
+ }
+ iconPosition="start"
+ />
+ }
+ iconPosition="start"
+ />
+
+
+
{value === "personalInformation" && }
{value === "changePassword" && }
{value === "accountSettings" && }
diff --git a/resources/js/Pages/Profile/Partials/UpdatePassword.jsx b/resources/js/Pages/Profile/Partials/UpdatePassword.jsx
index 3e17db7..b3e8107 100644
--- a/resources/js/Pages/Profile/Partials/UpdatePassword.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdatePassword.jsx
@@ -107,6 +107,7 @@ export default function UpdatePassword() {
color="primary"
type="submit"
disabled={processing}
+ fullWidth
>
Save
diff --git a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
index f24923a..dbd2a00 100644
--- a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
@@ -1,14 +1,18 @@
-import { useForm, usePage } from '@inertiajs/react';
+import { useForm, usePage } from "@inertiajs/react";
import { Button, Typography, TextField } from "@mui/material";
-
-export default function UpdateProfile({ mustVerifyEmail, status, className = '' }) {
+export default function UpdateProfile({
+ mustVerifyEmail,
+ status,
+ className = "",
+}) {
const user = usePage().props.auth.user;
- const { data, setData, patch, errors, processing, recentlySuccessful } = useForm({
- name: user.name,
- email: user.email,
- });
+ const { data, setData, patch, errors, processing, recentlySuccessful } =
+ useForm({
+ name: user.name,
+ email: user.email,
+ });
const handleSubmit = (e) => {
e.preventDefault();
@@ -32,7 +36,7 @@ export default function UpdateProfile({ mustVerifyEmail, status, className = ''
+
Save
diff --git a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
index dbd2a00..9b7f63d 100644
--- a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
@@ -36,7 +36,7 @@ export default function UpdateProfile({
-
+
Save
diff --git a/resources/js/app.jsx b/resources/js/app.jsx
index 208ddbc..be32ddf 100644
--- a/resources/js/app.jsx
+++ b/resources/js/app.jsx
@@ -6,7 +6,9 @@ import { createInertiaApp } from "@inertiajs/react";
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
import { createTheme } from "@mui/material";
import { ThemeProvider } from "@emotion/react";
-import { blue } from "@mui/material/colors";
+import { blue, yellow } from "@mui/material/colors";
+import { dark } from "@mui/material/styles/createPalette";
+import DarkModeToggle from "./Components/Darkmode";
const appName = import.meta.env.VITE_APP_NAME || "Laravel";
diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php
index f23e9ff..72a052a 100644
--- a/resources/views/app.blade.php
+++ b/resources/views/app.blade.php
@@ -1,23 +1,27 @@
-
-
-
-
+
- {{-- {{ config('app.name', 'Laravel') }} --}}
- Inventory Management System
+
+
+
-
-
-
+ {{-- {{ config('app.name', 'Laravel') }} --}}
+ Inventory Management System
+
+
+
+
+
+
+
+ @routes
+ @viteReactRefresh
+ @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"])
+ @inertiaHead
+
+
+
+ @inertia
+
-
- @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 7f4998f..661eea5 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -67,6 +67,9 @@
+
+
+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
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],
},
},
},
From 9a82dc741e6b93c1666e639057452880b6475df6 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 8 Sep 2023 16:19:29 +0800
Subject: [PATCH 027/182] darkmode-updated
---
resources/js/Pages/Profile/Edit.jsx | 5 +-
.../js/Pages/Profile/Partials/DarkMode.jsx | 162 ++++++++++++++++++
routes/web.php | 7 -
3 files changed, 164 insertions(+), 10 deletions(-)
create mode 100644 resources/js/Pages/Profile/Partials/DarkMode.jsx
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 14fda0e..16a7975 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -7,8 +7,7 @@ import { Avatar, IconButton, Typography, Tabs, Tab, Box } 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 { DarkMode } from "@mui/icons-material";
-import Darkmode from "./Partials/Darkmode";
+import DarkMode from "./Partials/DarkMode";
export default function Edit({ auth }) {
const [value, setValue] = React.useState("personalInformation");
@@ -83,7 +82,7 @@ export default function Edit({ auth }) {
{value === "personalInformation" && }
{value === "changePassword" && }
{value === "accountSettings" && }
- {value === "Dark Mode" && }
+ {value === "Dark Mode" && }
diff --git a/resources/js/Pages/Profile/Partials/DarkMode.jsx b/resources/js/Pages/Profile/Partials/DarkMode.jsx
new file mode 100644
index 0000000..a97d68f
--- /dev/null
+++ b/resources/js/Pages/Profile/Partials/DarkMode.jsx
@@ -0,0 +1,162 @@
+import { useRef, useState, useEffect } from "react";
+import { useForm } from "@inertiajs/react";
+import * as React from "react";
+import Button from "@mui/material/Button";
+import TextField from "@mui/material/TextField";
+import Dialog from "@mui/material/Dialog";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+import DialogContentText from "@mui/material/DialogContentText";
+import DialogTitle from "@mui/material/DialogTitle";
+import { Typography } from "@mui/material";
+import NightsStaySharpIcon from "@mui/icons-material/NightsStaySharp";
+import Brightness7SharpIcon from "@mui/icons-material/Brightness7Sharp";
+import DesktopMacSharpIcon from "@mui/icons-material/DesktopMacSharp";
+
+export default function DarkMode({ className = "" }) {
+ const [open, setOpen] = React.useState(false);
+
+ const handleClickOpen = () => {
+ setOpen(true);
+ };
+
+ const handleClose = () => {
+ setOpen(false);
+ };
+
+ const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
+ const passwordInput = useRef();
+
+ const {
+ data,
+ 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();
+ };
+
+ // Start Dark Mode
+
+ const [theme, setTheme] = useState(
+ localStorage.getItem("theme") ? localStorage.getItem("theme") : "system"
+ );
+ const element = document.documentElement;
+ const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
+
+ const options = [
+ {
+ icons: ,
+ text: "light",
+ },
+ {
+ icons: ,
+ text: "dark",
+ },
+ {
+ icons: ,
+ text: "system",
+ },
+ ];
+
+ function onWindowMatch() {
+ if (
+ localStorage.theme === "dark" ||
+ (!("theme" in localStorage) && darkQuery.matches)
+ ) {
+ element.classList.add("dark");
+ } else {
+ element.classList.remove("dark");
+ }
+ }
+
+ onWindowMatch();
+
+ useEffect(() => {
+ switch (theme) {
+ case "dark":
+ element.classList.add("dark");
+ localStorage.setItem("theme", "dark");
+ break;
+
+ case "light":
+ element.classList.remove("dark");
+ localStorage.setItem("theme", "light");
+ break;
+
+ default:
+ localStorage.removeItem("theme");
+ onWindowMatch();
+ break;
+ }
+ }, [theme]);
+
+ // End of the Dark Mode
+
+ return (
+ <>
+
+
+
+ Experience the DarkMode
+
+
+ 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.
+
+
+
+ {/* start of the dark mode */}
+
+ {options?.map((opt) => (
+ setTheme(opt.text)}
+ className={`text-xl dark:text-white leading-9 rounded-full m-1 ${
+ theme === opt.text &&
+ "text-sky-600 dark:text-sky-600"
+ }`}
+ >
+ {opt.icons}
+
+ ))}
+
+ {/* End of the Dark Mode */}
+
+
+ >
+ );
+}
diff --git a/routes/web.php b/routes/web.php
index 661eea5..a0da00f 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -63,13 +63,6 @@
-
-
-
-
-
-
-
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
From 5a09cdce0283f0a201e0114af23b44ef82a930ef Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Mon, 11 Sep 2023 14:01:26 +0800
Subject: [PATCH 028/182] darkMode-added
---
.../js/Components/CustomizedSwitches.jsx | 16 +
resources/js/Layouts/MainLayout.jsx | 569 ++++++++++--------
2 files changed, 330 insertions(+), 255 deletions(-)
create mode 100644 resources/js/Components/CustomizedSwitches.jsx
diff --git a/resources/js/Components/CustomizedSwitches.jsx b/resources/js/Components/CustomizedSwitches.jsx
new file mode 100644
index 0000000..0d6d6be
--- /dev/null
+++ b/resources/js/Components/CustomizedSwitches.jsx
@@ -0,0 +1,16 @@
+import React from "react";
+import Switch from "@mui/material/Switch";
+
+function CustomizedSwitches({ darkMode, toggleDarkMode }) {
+ return (
+
+
+ {/* Add any additional content or styling for your switch here */}
+
+ );
+}
+
+export default CustomizedSwitches;
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 66e2ca4..7fcea06 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -40,6 +40,8 @@ import {
useTheme,
ListSubheader,
Collapse,
+ Switch,
+ Button,
} from "@mui/material";
import { Logout, PersonAdd, Settings } from "@mui/icons-material";
@@ -52,8 +54,8 @@ import CustomSpeedDial from "@/Components/CustomSpeedDial";
import HomeIcon from "@mui/icons-material/Home";
import WhatshotIcon from "@mui/icons-material/Whatshot";
import GrainIcon from "@mui/icons-material/Grain";
-import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs";
-import DarkModeToggle from "@/Components/Darkmode";
+import { ThemeProvider, createTheme } from "@mui/material/styles";
+import CustomizedSwitches from "@/Components/CustomizedSwitches";
const drawerWidth = 240;
@@ -188,275 +190,332 @@ export default function MainLayout({ user, children }) {
text: "Breadcrumb",
},
];
+ // 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",
+ },
+ });
return (
-
-
-
-
-
-
-
-
- Inventory Management System
-
-
-
- {/* account menu start */}
-
-
+
+
+
+
+
+
-
+
-
-
-
+
+
+ {/* breadCrumbs */}
+
+
-
- {user.name}
-
+
+
+ {theme.direction === "ltr" ? (
+
+ ) : (
+
+ )}
+
+
-
-
-
-
- Add another account
-
-
-
-
-
-
- Settings
-
-
-
-
-
-
- Logout
-
-
- {/* account menu end */}
-
-
-
- {/* breadCrumbs */}
-
-
-
-
- {theme.direction === "ltr" ? (
-
- ) : (
-
- )}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* another sidenav list */}
+
+ {/* start */}
+
+
-
+
-
+
+ {expanded ? : }
-
-
-
-
-
- {/* another sidenav list */}
-
- {/* start */}
-
-
-
-
-
-
- {expanded ? : }
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/* end */}
-
-
-
-
-
-
- {Qr ? : }
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+ {/* end */}
+
+
-
+
-
+
+ {Qr ? : }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {children}
-
- }
- />
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {children}
+
+ }
+ />
+
+
+
+
+
+
);
}
From 47db13134d965101b4f089bde2200e30e5f8ae99 Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Mon, 11 Sep 2023 14:32:35 +0800
Subject: [PATCH 029/182] dark-mode/lightmode-done
---
.../js/Components/CustomizedSwitches.jsx | 78 ++++++++++++++++---
resources/js/Layouts/MainLayout.jsx | 36 +++------
2 files changed, 79 insertions(+), 35 deletions(-)
diff --git a/resources/js/Components/CustomizedSwitches.jsx b/resources/js/Components/CustomizedSwitches.jsx
index 0d6d6be..67b23b2 100644
--- a/resources/js/Components/CustomizedSwitches.jsx
+++ b/resources/js/Components/CustomizedSwitches.jsx
@@ -1,16 +1,74 @@
-import React from "react";
+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";
-function CustomizedSwitches({ darkMode, toggleDarkMode }) {
+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}
/>
- {/* Add any additional content or styling for your switch here */}
-
+
);
}
-
-export default CustomizedSwitches;
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 7fcea06..fcea22d 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -55,8 +55,8 @@ import HomeIcon from "@mui/icons-material/Home";
import WhatshotIcon from "@mui/icons-material/Whatshot";
import GrainIcon from "@mui/icons-material/Grain";
import { ThemeProvider, createTheme } from "@mui/material/styles";
+import Brightness7Icon from "@mui/icons-material/Brightness7";
import CustomizedSwitches from "@/Components/CustomizedSwitches";
-
const drawerWidth = 240;
const Main = styled("main", { shouldForwardProp: (prop) => prop !== "open" })(
@@ -306,30 +306,16 @@ export default function MainLayout({ user, children }) {
{user.name}
-
-
Dark Mode
-
-
- {DarkMode
- ? "Switch to Light Mode"
- : "Switch to Dark Mode"}
-
-
+
+ {/* */}
From 16cb09ef9b63bfe5bc5636208eb202b0750816e9 Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Mon, 11 Sep 2023 14:41:58 +0800
Subject: [PATCH 030/182] other-update
---
resources/js/Layouts/MainLayout.jsx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index fcea22d..78dd2fa 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -310,12 +310,15 @@ export default function MainLayout({ user, children }) {
checked={DarkMode}
onChange={toggleDarkMode}
/>
- {/* */}
+
+
+ {DarkMode
+ ? "Switch to Light Mode"
+ : "Switch to Dark Mode"}
+
From bd89ef50ef0c7c5e2f8f31d20fef553fc070def5 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 12 Sep 2023 09:39:32 +0800
Subject: [PATCH 031/182] arrange this user settings
---
.../Controllers/Library/SettingController.php | 15 ++++++
resources/js/Layouts/MainLayout.jsx | 2 +-
.../js/Pages/Admin/Library/Settings/Index.jsx | 54 +++++++++++++++++++
resources/js/Pages/Profile/Edit.jsx | 15 ++----
.../Pages/Profile/Partials/UpdateProfile.jsx | 24 ---------
routes/web.php | 7 +++
6 files changed, 81 insertions(+), 36 deletions(-)
create mode 100644 app/Http/Controllers/Library/SettingController.php
create mode 100644 resources/js/Pages/Admin/Library/Settings/Index.jsx
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 @@
+
-
+
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 (
+
+
+
+ Save
+
+
+
+
+ Settings Page
+
+
+
+ Username
+ Jhunriz
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 16a7975..b5a9db7 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -27,16 +27,16 @@ export default function Edit({ auth }) {
src="/static/images/avatar/2.jpg"
/>
-
+
{auth.user.name}
-
+
{auth.user.email}
-
-
+
+
Account Settings
@@ -70,19 +70,12 @@ export default function Edit({ auth }) {
icon={ }
iconPosition="start"
/>
- }
- iconPosition="start"
- />
{value === "personalInformation" && }
{value === "changePassword" && }
{value === "accountSettings" && }
- {value === "Dark Mode" && }
diff --git a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
index 9b7f63d..0d5f1c2 100644
--- a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
@@ -76,30 +76,6 @@ export default function UpdateProfile({
-
- {/* {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/routes/web.php b/routes/web.php
index a0da00f..a558a2d 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -2,6 +2,7 @@
use App\Http\Controllers\Library\GenderController;
use App\Http\Controllers\Library\LibraryController;
+use App\Http\Controllers\library\SettingController;
use App\Http\Controllers\Management\ProductManagementController;
use App\Http\Controllers\Management\UserManagementController;
use App\Http\Controllers\ProfileController;
@@ -47,6 +48,8 @@
// library
Route::resource('/library', LibraryController::class);
+
+
// Management
Route::resource('/management', UserManagementController::class);
Route::resource('/products', ProductManagementController::class);
@@ -59,6 +62,10 @@
Route::resource('/storage', StorageController::class);
+ // Setting navigationbar
+ Route::resource('/settings', SettingController::class);
+
+
From 078a272d837c22f96429b368515e32332cd33575 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 12 Sep 2023 10:20:16 +0800
Subject: [PATCH 032/182] position&location added
---
resources/js/Layouts/MainLayout.jsx | 2 +-
.../js/Pages/Admin/Library/Company/Index.jsx | 49 ++++++++++++++
resources/js/Pages/Admin/Library/Index.jsx | 10 ++-
.../js/Pages/Admin/Library/Position/Index.jsx | 64 +++++++++++++++++++
4 files changed, 123 insertions(+), 2 deletions(-)
create mode 100644 resources/js/Pages/Admin/Library/Company/Index.jsx
create mode 100644 resources/js/Pages/Admin/Library/Position/Index.jsx
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 2049e1b..78dd2fa 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -477,7 +477,7 @@ export default function MainLayout({ user, children }) {
-
+
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..4626a54
--- /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..93a87f7 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -3,6 +3,8 @@ import { Tab, Tabs, Typography } from "@mui/material";
import React from "react";
import Gender from "./Gender/Index";
import Religion from "./Religion/Index";
+import Company from "./Company/Index";
+import Position from "./Position/Index";
export default function Index({ auth }) {
const [value, setValue] = React.useState("gender");
@@ -10,6 +12,7 @@ export default function Index({ auth }) {
const handleChange = (event, newValue) => {
setValue(newValue);
};
+
return (
@@ -17,7 +20,7 @@ export default function Index({ auth }) {
Settings Page
- Add or update settings or global parameter
+ Add or update settings or global parameters
+
+ {" "}
+ {/* Fix the casing here */}
{value === "gender" &&
}
{value === "religion" &&
}
+ {value === "companies" &&
}
+ {value === "position" &&
}
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..f2e4dd7
--- /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 (
+ <>
+
+ >
+ );
+}
From c677f9c98ab0b130cf3d5bffddb1d37585d3c0e1 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 12 Sep 2023 10:41:41 +0800
Subject: [PATCH 033/182] update positopn& company
---
resources/js/Pages/Admin/Library/Company/Index.jsx | 2 +-
resources/js/Pages/Admin/Library/Position/Index.jsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Company/Index.jsx b/resources/js/Pages/Admin/Library/Company/Index.jsx
index 4626a54..affb4c9 100644
--- a/resources/js/Pages/Admin/Library/Company/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Company/Index.jsx
@@ -39,7 +39,7 @@ export default function Index({ genders }) {
return (
<>
Date: Wed, 13 Sep 2023 10:30:29 +0800
Subject: [PATCH 034/182] qr-code scanner
---
package-lock.json | 92 ++++++++++++++++++-
package.json | 4 +-
resources/css/app.css | 1 +
resources/js/Components/QRCodeScanner.jsx | 103 +++++++++++++---------
4 files changed, 155 insertions(+), 45 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 29ab57d..92fbee5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,11 +11,13 @@
"@mui/material": "^5.14.5",
"@mui/x-charts": "^6.0.0-alpha.9",
"html2canvas": "^1.4.1",
+ "modern-react-qr-reader": "^1.0.12",
"mui-datatables": "^4.3.0",
"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-code": "^2.0.12",
+ "react-qr-reader": "^1.0.0"
},
"devDependencies": {
"@inertiajs/react": "^1.0.0",
@@ -2494,6 +2496,11 @@
"node": ">=6"
}
},
+ "node_modules/jsqr": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-0.2.2.tgz",
+ "integrity": "sha512-dptW6r8NkPynywLcgAGBAaRxy80GmSzf07qL1yHr+t19c2Nj0rAvvWJDFFavX2MRCPg/6FEPG90sdN8jt4KNRg=="
+ },
"node_modules/laravel-vite-plugin": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.8.0.tgz",
@@ -2658,6 +2665,43 @@
"node": "*"
}
},
+ "node_modules/modern-react-qr-reader": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/modern-react-qr-reader/-/modern-react-qr-reader-1.0.12.tgz",
+ "integrity": "sha512-PlKpqPkC1G2mHcdqK/rqCr3lejueHUqwW7NWzAqPVLcwm134P/SngpEf9u87DT7YUFogqznP1CURvovHGBXhkA==",
+ "dependencies": {
+ "jsqr": "^1.2.0",
+ "prop-types": "^15.7.2",
+ "webrtc-adapter": "^7.2.1"
+ },
+ "peerDependencies": {
+ "react": "~16",
+ "react-dom": "~16"
+ }
+ },
+ "node_modules/modern-react-qr-reader/node_modules/jsqr": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz",
+ "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A=="
+ },
+ "node_modules/modern-react-qr-reader/node_modules/sdp": {
+ "version": "2.12.0",
+ "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz",
+ "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw=="
+ },
+ "node_modules/modern-react-qr-reader/node_modules/webrtc-adapter": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.1.tgz",
+ "integrity": "sha512-TbrbBmiQBL9n0/5bvDdORc6ZfRY/Z7JnEj+EYOD1ghseZdpJ+nF2yx14k3LgQKc7JZnG7HAcL+zHnY25So9d7A==",
+ "dependencies": {
+ "rtcpeerconnection-shim": "^1.2.15",
+ "sdp": "^2.12.0"
+ },
+ "engines": {
+ "node": ">=6.0.0",
+ "npm": ">=3.10.0"
+ }
+ },
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -3209,6 +3253,19 @@
}
}
},
+ "node_modules/react-qr-reader": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-1.0.0.tgz",
+ "integrity": "sha512-BZih016uN+76uu2iL0713654fmHuXWFCIYo2Wjl40kQgo/RJmtQD60kRqDBnduGKnN9KO233FlAwNm9ucVFeGw==",
+ "dependencies": {
+ "jsqr": "^0.2.1",
+ "webrtc-adapter": "^2.0.8"
+ },
+ "peerDependencies": {
+ "react": "^15.0.2",
+ "react-dom": "^15.0.2"
+ }
+ },
"node_modules/react-refresh": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz",
@@ -3423,6 +3480,23 @@
"fsevents": "~2.3.2"
}
},
+ "node_modules/rtcpeerconnection-shim": {
+ "version": "1.2.15",
+ "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz",
+ "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==",
+ "dependencies": {
+ "sdp": "^2.6.0"
+ },
+ "engines": {
+ "node": ">=6.0.0",
+ "npm": ">=3.10.0"
+ }
+ },
+ "node_modules/rtcpeerconnection-shim/node_modules/sdp": {
+ "version": "2.12.0",
+ "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz",
+ "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw=="
+ },
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -3454,6 +3528,11 @@
"loose-envify": "^1.1.0"
}
},
+ "node_modules/sdp": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/sdp/-/sdp-1.5.4.tgz",
+ "integrity": "sha512-9x0+fpJHW2bbqtIktmL+H9m+BswgurPVPhWrur4cCZPDWDSsdGYvRBaKhDXlnNCD1b/Xi8cOTG2u703CTQuwgg=="
+ },
"node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -3767,6 +3846,17 @@
"vite": "^2 || ^3 || ^4"
}
},
+ "node_modules/webrtc-adapter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-2.1.0.tgz",
+ "integrity": "sha512-i38RPNdm68QS6jQFWDuYEOLv5HvWE0Hz99eePd7Nk/c3FmhFUR6zNyfhASdPewm2u1tMfHkRTx9cAZyq3prRlA==",
+ "dependencies": {
+ "sdp": "^1.0.0"
+ },
+ "engines": {
+ "npm": "^3.10.0"
+ }
+ },
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
diff --git a/package.json b/package.json
index d143da6..d508354 100644
--- a/package.json
+++ b/package.json
@@ -25,10 +25,12 @@
"@mui/material": "^5.14.5",
"@mui/x-charts": "^6.0.0-alpha.9",
"html2canvas": "^1.4.1",
+ "modern-react-qr-reader": "^1.0.12",
"mui-datatables": "^4.3.0",
"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-code": "^2.0.12",
+ "react-qr-reader": "^1.0.0"
}
}
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/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index 894f85d..2ff343e 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -1,50 +1,67 @@
-import React, { Component } from "react";
-import Camera, { FACING_MODES } from "react-html5-camera-photo";
-import "react-html5-camera-photo/build/css/index.css";
+import React, { useState, useCallback } from "react";
+import { QrReader } from "react-qr-reader";
-class QRCodeScanner extends Component {
- constructor(props) {
- super(props);
+const QRCodeScanner = () => {
+ const [selected, setSelected] = useState("environment");
+ const [startScan, setStartScan] = useState(false);
+ const [loadingScan, setLoadingScan] = useState(false);
+ const [data, setData] = useState("");
- this.state = {
- data: null,
- error: null,
- };
- }
+ const handleScan = useCallback(
+ (scanData) => {
+ setLoadingScan(true);
+ console.log("Scanned Data:", scanData);
+ if (scanData) {
+ setData(scanData);
+ setStartScan(false);
+ setLoadingScan(false);
+ }
+ },
+ [setData, setStartScan, setLoadingScan]
+ );
- // Add a function to handle the QR code scan result
- handleQRCodeScan(result) {
- if (result) {
- this.setState({ data: result });
- } else {
- this.setState({ error: "No QR code found" });
- }
- }
+ const handleError = (err) => {
+ console.error(err);
+ };
- onCameraError(error) {
- this.setState({ error: `Camera error: ${error.message}` });
- }
+ return (
+
+
QR Code Scanner
+
Last Scan: {selected}
- render() {
- return (
-
-
QR Code Scanner
- {this.state.data && (
-
-
Scanned QR Code:
-
{this.state.data}
-
- )}
- {this.state.error &&
{this.state.error}
}
-
this.handleQRCodeScan(dataUri)} // Pass the dataUri to the scan handler
- onCameraError={(error) => this.onCameraError(error)}
- isImageMirror={false} // To prevent mirroring of the camera feed
- />
-
- );
- }
-}
+
{
+ setStartScan(!startScan);
+ }}
+ >
+ {startScan ? "Stop Scan" : "Start Scan"}
+
+ {startScan && (
+ <>
+
{
+ setSelected(e.target.value);
+ }}
+ >
+ Back Camera
+ Front Camera
+
+
+ >
+ )}
+ {loadingScan &&
Loading
}
+ {data !== "" &&
{data}
}
+
+ );
+};
export default QRCodeScanner;
From e33c5332f037d4e70200f82cf29b10a89b0ed374 Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Wed, 13 Sep 2023 14:23:47 +0800
Subject: [PATCH 035/182] qr-code-scanner
---
package-lock.json | 92 +++++++++----
package.json | 2 +-
resources/js/Components/QRCodeScanner.jsx | 161 ++++++++++++++--------
resources/views/app.blade.php | 2 +
4 files changed, 168 insertions(+), 89 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 92fbee5..23707fc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,7 +17,7 @@
"react-barcode": "^1.4.6",
"react-html5-camera-photo": "^1.5.11",
"react-qr-code": "^2.0.12",
- "react-qr-reader": "^1.0.0"
+ "react-qr-reader": "^3.0.0-beta-1"
},
"devDependencies": {
"@inertiajs/react": "^1.0.0",
@@ -1407,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",
@@ -2143,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": [
@@ -2496,11 +2526,6 @@
"node": ">=6"
}
},
- "node_modules/jsqr": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-0.2.2.tgz",
- "integrity": "sha512-dptW6r8NkPynywLcgAGBAaRxy80GmSzf07qL1yHr+t19c2Nj0rAvvWJDFFavX2MRCPg/6FEPG90sdN8jt4KNRg=="
- },
"node_modules/laravel-vite-plugin": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.8.0.tgz",
@@ -3254,16 +3279,31 @@
}
},
"node_modules/react-qr-reader": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-1.0.0.tgz",
- "integrity": "sha512-BZih016uN+76uu2iL0713654fmHuXWFCIYo2Wjl40kQgo/RJmtQD60kRqDBnduGKnN9KO233FlAwNm9ucVFeGw==",
+ "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": {
- "jsqr": "^0.2.1",
- "webrtc-adapter": "^2.0.8"
+ "@zxing/browser": "0.0.7",
+ "@zxing/library": "^0.18.3",
+ "rollup": "^2.67.2"
},
"peerDependencies": {
- "react": "^15.0.2",
- "react-dom": "^15.0.2"
+ "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": {
@@ -3528,11 +3568,6 @@
"loose-envify": "^1.1.0"
}
},
- "node_modules/sdp": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/sdp/-/sdp-1.5.4.tgz",
- "integrity": "sha512-9x0+fpJHW2bbqtIktmL+H9m+BswgurPVPhWrur4cCZPDWDSsdGYvRBaKhDXlnNCD1b/Xi8cOTG2u703CTQuwgg=="
- },
"node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -3708,6 +3743,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",
@@ -3846,17 +3889,6 @@
"vite": "^2 || ^3 || ^4"
}
},
- "node_modules/webrtc-adapter": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-2.1.0.tgz",
- "integrity": "sha512-i38RPNdm68QS6jQFWDuYEOLv5HvWE0Hz99eePd7Nk/c3FmhFUR6zNyfhASdPewm2u1tMfHkRTx9cAZyq3prRlA==",
- "dependencies": {
- "sdp": "^1.0.0"
- },
- "engines": {
- "npm": "^3.10.0"
- }
- },
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
diff --git a/package.json b/package.json
index d508354..1bf80cc 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,6 @@
"react-barcode": "^1.4.6",
"react-html5-camera-photo": "^1.5.11",
"react-qr-code": "^2.0.12",
- "react-qr-reader": "^1.0.0"
+ "react-qr-reader": "^3.0.0-beta-1"
}
}
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index 2ff343e..fe86f2e 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -1,67 +1,112 @@
-import React, { useState, useCallback } from "react";
-import { QrReader } from "react-qr-reader";
-
-const QRCodeScanner = () => {
- const [selected, setSelected] = useState("environment");
- const [startScan, setStartScan] = useState(false);
- const [loadingScan, setLoadingScan] = useState(false);
- const [data, setData] = useState("");
-
- const handleScan = useCallback(
- (scanData) => {
- setLoadingScan(true);
- console.log("Scanned Data:", scanData);
- if (scanData) {
- setData(scanData);
- setStartScan(false);
- setLoadingScan(false);
+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;
}
- },
- [setData, setStartScan, setLoadingScan]
- );
+ };
- const handleError = (err) => {
- console.error(err);
+ 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);
+ }
+ }
+ }, []);
+
+ const style = {
+ backgroundColor: "green",
};
return (
-
-
QR Code Scanner
-
Last Scan: {selected}
-
-
{
- setStartScan(!startScan);
- }}
- >
- {startScan ? "Stop Scan" : "Start Scan"}
-
- {startScan && (
- <>
-
{
- setSelected(e.target.value);
- }}
- >
- Back Camera
- Front Camera
-
-
- >
- )}
- {loadingScan &&
Loading
}
- {data !== "" &&
{data}
}
+
);
-};
+}
export default QRCodeScanner;
diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php
index 72a052a..764e8ed 100644
--- a/resources/views/app.blade.php
+++ b/resources/views/app.blade.php
@@ -11,6 +11,8 @@
+
+
From 3f6ba137492929a6d16e00c1e3e66b85b58bcfde Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Wed, 13 Sep 2023 16:14:16 +0800
Subject: [PATCH 036/182] add-qr-code-scanner
---
resources/js/Components/QRCodeScanner.jsx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index fe86f2e..de83337 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -1,5 +1,6 @@
import { Button, Typography } from "@mui/material";
import React, { useEffect, useRef } from "react"; // Import useRef
+
// import "./styles.css"; // Import your CSS file
function QRCodeScanner() {
@@ -80,10 +81,6 @@ function QRCodeScanner() {
}
}, []);
- const style = {
- backgroundColor: "green",
- };
-
return (
@@ -92,8 +89,15 @@ function QRCodeScanner() {
-
+
Data:
+
+ Copy
+
From ab006bd2c198b336f0f4ed0f6b86d91574745464 Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Wed, 13 Sep 2023 17:03:49 +0800
Subject: [PATCH 037/182] fixing button
---
resources/js/Components/QRCodeScanner.jsx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index de83337..6f76e19 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -81,6 +81,18 @@ function QRCodeScanner() {
}
}, []);
+ function copy() {
+ // Get the text you want to copy
+ // Get the text field
+ var copyText = document.getElementById("outputData");
+
+ // Copy the text inside the text field
+ navigator.clipboard.writeText(copyText.value);
+
+ // Alert the copied text
+ alert("Copied the text: " + copyText.value);
+ }
+
return (
From 3fb4fd06ed136a3ae3d45097bd920cbc5148ce15 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 08:39:55 +0800
Subject: [PATCH 038/182] copybutton-done
---
resources/js/Components/QRCodeScanner.jsx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index 6f76e19..589cda7 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -83,14 +83,16 @@ function QRCodeScanner() {
function copy() {
// Get the text you want to copy
- // Get the text field
var copyText = document.getElementById("outputData");
+ var copied = copyText.textContent; // Remove .value here
// Copy the text inside the text field
- navigator.clipboard.writeText(copyText.value);
+ navigator.clipboard.writeText(copied); // Remove .value here
// Alert the copied text
- alert("Copied the text: " + copyText.value);
+ alert("Copied the text: " + copied);
+
+ console.log(copied);
}
return (
From 93bf4ffe60db3e0ebd9f8e1e35ddf1ab65556e1a Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 10:17:59 +0800
Subject: [PATCH 039/182] barcode-scanner-done
---
resources/js/Components/BarcodeScanner.jsx | 75 ++++++++++------------
1 file changed, 34 insertions(+), 41 deletions(-)
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
index 2c7bab4..3edff38 100644
--- a/resources/js/Components/BarcodeScanner.jsx
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -1,45 +1,38 @@
-import React, { Component } from "react";
-import Camera, { FACING_MODES } from "react-html5-camera-photo";
-import "react-html5-camera-photo/build/css/index.css";
+import React, { useEffect, useState } from "react";
-class BarcodeScanner extends Component {
- constructor(props) {
- super(props);
+export default function BarcodeScanner() {
+ const [decodedResult, setDecodedResult] = useState(null);
- this.state = {
- data: null,
- error: 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) {
+ // console.log(`Code scanned = ${decodedText}`, decodedResult);
+ setDecodedResult(decodedText); // Update the state with the scanned result
+ }
+
+ html5QrcodeScanner.render(onScanSuccess);
};
- }
-
- onTakePhoto(dataUri) {
- // Here, you can process the barcode dataUri.
- this.setState({ data: dataUri });
- }
-
- onCameraError(error) {
- this.setState({ error: `Camera error: ${error.message}` });
- }
-
- render() {
- return (
-
-
Barcode Scanner
- {this.state.data && (
-
-
Scanned Data:
-
{this.state.data}
-
- )}
- {this.state.error &&
{this.state.error}
}
-
this.onTakePhoto(dataUri)}
- onCameraError={(error) => this.onCameraError(error)}
- />
-
- );
- }
-}
-export default BarcodeScanner;
+ document.body.appendChild(quaggaScript);
+
+ return () => {
+ document.body.removeChild(quaggaScript);
+ };
+ }, []);
+
+ return (
+
+
Decoded Result: {decodedResult}
+
+
+ );
+}
From 78259c85379ec1d4dfaa326856522d3a85f04ae3 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 10:23:41 +0800
Subject: [PATCH 040/182] update_barcode
---
resources/js/Components/BarcodeScanner.jsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
index 3edff38..fbfb283 100644
--- a/resources/js/Components/BarcodeScanner.jsx
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -32,7 +32,11 @@ export default function BarcodeScanner() {
return (
Decoded Result: {decodedResult}
-
+
);
}
From 731f82ea26bc5cfe2c03b36d682f2d4a3a8604c9 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 10:40:26 +0800
Subject: [PATCH 041/182] other-update
---
resources/js/Components/BarcodeScanner.jsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
index fbfb283..d2aa27b 100644
--- a/resources/js/Components/BarcodeScanner.jsx
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -15,7 +15,6 @@ export default function BarcodeScanner() {
});
function onScanSuccess(decodedText, decodedResult) {
- // console.log(`Code scanned = ${decodedText}`, decodedResult);
setDecodedResult(decodedText); // Update the state with the scanned result
}
From 9496f78d1f7b657ee69f38e8649255328b4c984c Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:36:32 +0800
Subject: [PATCH 042/182] qr-and-barcode make responsive-done
---
resources/js/Components/BarcodeGenerator.jsx | 16 +++++++++-------
resources/js/Components/QRCodeGenerator.jsx | 18 ++++++++++--------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index fca4795..c76f392 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -40,17 +40,17 @@ const BarcodeGenerator = () => {
};
return (
-
+
-
+
Generate Barcode
@@ -71,23 +71,24 @@ const BarcodeGenerator = () => {
{productName && (
)}
-
+
Download
@@ -95,6 +96,7 @@ const BarcodeGenerator = () => {
color="success"
variant="contained"
onClick={printBarcode}
+ fullWidth // Full width for smaller screens
>
Print
diff --git a/resources/js/Components/QRCodeGenerator.jsx b/resources/js/Components/QRCodeGenerator.jsx
index 93cc52c..7ba91c2 100644
--- a/resources/js/Components/QRCodeGenerator.jsx
+++ b/resources/js/Components/QRCodeGenerator.jsx
@@ -88,15 +88,17 @@ const QRCodeGenerator = () => {
};
return (
-
+
-
QR Code Generator
+
+ QR Code Generator
+
@@ -140,13 +142,13 @@ const QRCodeGenerator = () => {
-
-
+
+
{ProductName && (
)}
-
+
From 11da080072a7aba8dbe4782ebb75e943236529ee Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:41:45 +0800
Subject: [PATCH 043/182] mobile-responsive-done
---
resources/js/Components/BarcodeScanner.jsx | 6 +-----
resources/js/Components/QRCodeScanner.jsx | 8 +-------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/resources/js/Components/BarcodeScanner.jsx b/resources/js/Components/BarcodeScanner.jsx
index d2aa27b..45b5e5b 100644
--- a/resources/js/Components/BarcodeScanner.jsx
+++ b/resources/js/Components/BarcodeScanner.jsx
@@ -31,11 +31,7 @@ export default function BarcodeScanner() {
return (
Decoded Result: {decodedResult}
-
+
);
}
diff --git a/resources/js/Components/QRCodeScanner.jsx b/resources/js/Components/QRCodeScanner.jsx
index 589cda7..31f7ad3 100644
--- a/resources/js/Components/QRCodeScanner.jsx
+++ b/resources/js/Components/QRCodeScanner.jsx
@@ -115,13 +115,7 @@ function QRCodeScanner() {
-
+
);
From e84d6144e7c0125ae409dc34376cf0f4003969c1 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:58:47 +0800
Subject: [PATCH 044/182] update-barcode-qr-code
---
resources/js/Components/BarcodeGenerator.jsx | 2 +-
resources/js/Components/QRCodeGenerator.jsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/resources/js/Components/BarcodeGenerator.jsx b/resources/js/Components/BarcodeGenerator.jsx
index c76f392..93343ba 100644
--- a/resources/js/Components/BarcodeGenerator.jsx
+++ b/resources/js/Components/BarcodeGenerator.jsx
@@ -53,7 +53,7 @@ const BarcodeGenerator = () => {
width: "100%",
}}
>
-
+
{
};
return (
-
+
QR Code Generator
From 132b2f3c153e18492e32785a60a81ac375fb5816 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 14 Sep 2023 16:57:42 +0800
Subject: [PATCH 045/182] setting-user-have error
---
resources/js/Pages/Profile/Edit.jsx | 69 ++++++-------------
.../Pages/Profile/Partials/DeleteAccount.jsx | 1 -
routes/web.php | 6 +-
3 files changed, 25 insertions(+), 51 deletions(-)
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index b5a9db7..144aa1a 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -3,11 +3,7 @@ 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, Box } 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 DarkMode from "./Partials/DarkMode";
+import { Avatar, IconButton, Typography, Tabs, Tab } from "@mui/material";
export default function Edit({ auth }) {
const [value, setValue] = React.useState("personalInformation");
@@ -15,10 +11,9 @@ export default function Edit({ auth }) {
const handleChange = (event, newValue) => {
setValue(newValue);
};
-
return (
-
+
@@ -27,52 +22,32 @@ export default function Edit({ auth }) {
src="/static/images/avatar/2.jpg"
/>
-
+
{auth.user.name}
-
+
{auth.user.email}
-
-
- Account Settings
-
-
-
-
-
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
-
-
-
+
+
+
+
+
+
+
+
{value === "personalInformation" &&
}
{value === "changePassword" &&
}
{value === "accountSettings" &&
}
diff --git a/resources/js/Pages/Profile/Partials/DeleteAccount.jsx b/resources/js/Pages/Profile/Partials/DeleteAccount.jsx
index eed6b72..11dd760 100644
--- a/resources/js/Pages/Profile/Partials/DeleteAccount.jsx
+++ b/resources/js/Pages/Profile/Partials/DeleteAccount.jsx
@@ -10,7 +10,6 @@ import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";
import { Typography } from "@mui/material";
import DeleteSharpIcon from "@mui/icons-material/DeleteSharp";
-import CustomizedSnackbars from "@/Components/CustomizeSnackBar";
export default function DeleteAccount({ className = "" }) {
const [open, setOpen] = React.useState(false);
diff --git a/routes/web.php b/routes/web.php
index a558a2d..849d19d 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -66,13 +66,13 @@
Route::resource('/settings', SettingController::class);
-
+ // Route::resource('/profile', ProfileController::class);
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
- Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
- Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
+ // Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
+ // Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
});
From 2df7b0d683a965aa9c182684061aa234b150fb3e Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 08:56:01 +0800
Subject: [PATCH 046/182] settings-bug-done
---
package.json | 1 -
resources/js/Pages/Profile/Edit.jsx | 69 ++++++++++++++++++++---------
2 files changed, 47 insertions(+), 23 deletions(-)
diff --git a/package.json b/package.json
index 1bf80cc..fc9d268 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,6 @@
"@mui/material": "^5.14.5",
"@mui/x-charts": "^6.0.0-alpha.9",
"html2canvas": "^1.4.1",
- "modern-react-qr-reader": "^1.0.12",
"mui-datatables": "^4.3.0",
"qrcode.react": "^3.1.0",
"react-barcode": "^1.4.6",
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 144aa1a..b5a9db7 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -3,7 +3,11 @@ 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 } 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 DarkMode from "./Partials/DarkMode";
export default function Edit({ auth }) {
const [value, setValue] = React.useState("personalInformation");
@@ -11,9 +15,10 @@ export default function Edit({ auth }) {
const handleChange = (event, newValue) => {
setValue(newValue);
};
+
return (
-
+
@@ -22,32 +27,52 @@ export default function Edit({ auth }) {
src="/static/images/avatar/2.jpg"
/>
-
+
{auth.user.name}
-
+
{auth.user.email}
-
-
-
-
-
-
-
-
+
+
+ Account Settings
+
+
+
+
+
+ }
+ iconPosition="start"
+ />
+ }
+ iconPosition="start"
+ />
+ }
+ iconPosition="start"
+ />
+
+
+
{value === "personalInformation" &&
}
{value === "changePassword" &&
}
{value === "accountSettings" &&
}
From 98cfa81baefa566abe46475159ad72aa2548b38f Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 09:30:53 +0800
Subject: [PATCH 047/182] add-icon-pages
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 4 ++--
resources/js/Pages/Admin/Management/Products/Index.jsx | 3 ++-
resources/js/Pages/Admin/Management/User/Index.jsx | 4 ++--
resources/js/Pages/Admin/Qr/Index.jsx | 3 ++-
resources/js/Pages/Admin/Storage/Index.jsx | 3 ++-
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index d27207d..c71583e 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -10,7 +10,7 @@ import StackBars from "@/Components/StackBar";
import BasicPie from "@/Components/BasicPie";
import CustomBreadcrumbs from "@/Components/CustomBreadcrumbs";
import HomeIcon from "@mui/icons-material/Home";
-import WhatshotIcon from "@mui/icons-material/Whatshot";
+import DashboardIcon from "@mui/icons-material/Dashboard";
import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
@@ -126,7 +126,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
url: "/",
},
{
- icon:
,
+ icon:
,
text: "Administrator",
url: "/material-ui/getting-started/installation/",
},
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index 1209be7..c11656d 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -23,6 +23,7 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = [
@@ -99,7 +100,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
},
{
- icon:
,
+ icon:
,
text: "Product",
url: "/material-ui/getting-started/installation/",
},
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index 6287577..afd8366 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -20,7 +20,7 @@ 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 PersonIcon from "@mui/icons-material/Person";
import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
@@ -143,7 +143,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
},
{
- icon:
,
+ icon:
,
text: "User",
url: "/material-ui/getting-started/installation/",
},
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 0d54f9e..28ea00a 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -23,6 +23,7 @@ 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 QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = [
@@ -363,7 +364,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
},
{
- icon:
,
+ icon:
,
text: "QR",
url: "/material-ui/getting-started/installation/",
},
diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx
index bf99ecb..d1b2051 100644
--- a/resources/js/Pages/Admin/Storage/Index.jsx
+++ b/resources/js/Pages/Admin/Storage/Index.jsx
@@ -24,6 +24,7 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = [
@@ -136,7 +137,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
},
{
- icon:
,
+ icon:
,
text: "Storage",
url: "/material-ui/getting-started/installation/",
},
From 119e479423065d95b1316b3da9afcb7f42d83bd2 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 09:41:38 +0800
Subject: [PATCH 048/182] navbar-active-icon-avatar
---
resources/js/Layouts/MainLayout.jsx | 58 ++++++++++++++++++++++++++++-
1 file changed, 57 insertions(+), 1 deletion(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 78dd2fa..e711707 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -42,6 +42,8 @@ import {
Collapse,
Switch,
Button,
+ Badge,
+ Stack,
} from "@mui/material";
import { Logout, PersonAdd, Settings } from "@mui/icons-material";
@@ -209,6 +211,43 @@ export default function MainLayout({ user, children }) {
},
});
+ // 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}`,
+ }));
+
return (
@@ -303,7 +342,24 @@ export default function MainLayout({ user, children }) {
}}
>
- {user.name}
+
+
+
Date: Fri, 15 Sep 2023 09:51:02 +0800
Subject: [PATCH 049/182] active-icon-user-updatte
---
resources/js/Pages/Profile/Edit.jsx | 70 ++++++++++++++++++++++++++---
1 file changed, 64 insertions(+), 6 deletions(-)
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index b5a9db7..6de0bfe 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -3,11 +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, Box } 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 DarkMode from "./Partials/DarkMode";
+import { styled } from "@mui/material/styles";
export default function Edit({ auth }) {
const [value, setValue] = React.useState("personalInformation");
@@ -16,16 +25,65 @@ export default function Edit({ auth }) {
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}
From 5ee0c39bbec68feb60645d1516f10429686805bb Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 10:40:49 +0800
Subject: [PATCH 050/182] update-custom-speedial
---
resources/js/Components/CustomSpeedDial.jsx | 1 +
resources/js/Layouts/MainLayout.jsx | 37 ++++++++++++---------
2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/resources/js/Components/CustomSpeedDial.jsx b/resources/js/Components/CustomSpeedDial.jsx
index 06b09b7..2136d0e 100644
--- a/resources/js/Components/CustomSpeedDial.jsx
+++ b/resources/js/Components/CustomSpeedDial.jsx
@@ -3,6 +3,7 @@ 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 (
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index e711707..5a9385d 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -28,7 +28,7 @@ import InventorySharpIcon from "@mui/icons-material/InventorySharp";
import QrCodeIcon from "@mui/icons-material/QrCode";
import QrCodeScannerIcon from "@mui/icons-material/QrCodeScanner";
import PostAddIcon from "@mui/icons-material/PostAdd";
-import AddBoxIcon from "@mui/icons-material/AddBox";
+import ExpandMoreSharpIcon from "@mui/icons-material/ExpandMoreSharp";
import WidgetsIcon from "@mui/icons-material/Widgets";
import {
Avatar,
@@ -57,8 +57,9 @@ import HomeIcon from "@mui/icons-material/Home";
import WhatshotIcon from "@mui/icons-material/Whatshot";
import GrainIcon from "@mui/icons-material/Grain";
import { ThemeProvider, createTheme } from "@mui/material/styles";
-import Brightness7Icon from "@mui/icons-material/Brightness7";
+import AbcSharpIcon from "@mui/icons-material/AbcSharp";
import CustomizedSwitches from "@/Components/CustomizedSwitches";
+import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
const drawerWidth = 240;
const Main = styled("main", { shouldForwardProp: (prop) => prop !== "open" })(
@@ -170,10 +171,22 @@ export default function MainLayout({ user, children }) {
// speed dial
const actions = [
- { icon: , name: "Copy" },
- { icon: , name: "Save" },
- { icon: , name: "Print" },
- { icon: , name: "Share" },
+ {
+ icon: (
+
+
+
+ ),
+ name: "QR-CODE",
+ },
+ {
+ icon: (
+
+
+
+ ),
+ name: "BARCODE",
+ },
];
const breadcrumbItems = [
@@ -377,18 +390,12 @@ export default function MainLayout({ user, children }) {
-
-
-
-
- Add another account
-
- Settings
+ Account Settings
@@ -539,7 +546,7 @@ export default function MainLayout({ user, children }) {
-
+
@@ -554,7 +561,7 @@ export default function MainLayout({ user, children }) {
}
+ openIcon={ }
/>
From d3f20f7cd082c04173641b8c5e56402b29cd0f5e Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 11:01:13 +0800
Subject: [PATCH 051/182] update-user-tabs
---
resources/js/Pages/Profile/Edit.jsx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 6de0bfe..3576d5c 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -98,7 +98,7 @@ export default function Edit({ auth }) {
Account Settings
-
+
Date: Fri, 15 Sep 2023 14:08:44 +0800
Subject: [PATCH 052/182] library-setting-done
---
resources/js/Pages/Admin/Library/Index.jsx | 256 +++++++++++++++++++--
1 file changed, 232 insertions(+), 24 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 93a87f7..7e73194 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -1,48 +1,256 @@
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"); // Changed default value
const handleChange = (event, newValue) => {
setValue(newValue);
};
+ const [secondForm, setSecondForm] = useState("personalInformation"); // Changed default value and variable name
+
+ const handleChange1 = (event1, newValue1) => {
+ setSecondForm(newValue1); // Fixed variable name here
+ };
+
+ const columns = ["Name", "Age", "Status"];
+
+ const data = [
+ ["Jhunriz", "23", "Active"],
+ ["Joshua", "22", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Sophia", "20", "Inactive"],
+ ["Noah", "30", "Active"],
+ ["Olivia", "24", "Inactive"],
+ ["Aiden", "27", "Active"],
+ ["Mia", "29", "Inactive"],
+ ["Ella", "26", "Active"],
+ ["Jackson", "31", "Active"],
+ ["Ava", "19", "Inactive"],
+ ["Logan", "27", "Active"],
+ ["Emma", "22", "Inactive"],
+ ["Landon", "24", "Active"],
+ ["Grace", "28", "Inactive"],
+ ["Carter", "25", "Active"],
+ ["Zoe", "23", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Lily", "21", "Inactive"],
+ ["Mason", "29", "Active"],
+ ["Sophie", "30", "Inactive"],
+ ["Lucas", "23", "Active"],
+ ["Evelyn", "27", "Inactive"],
+ ["Oliver", "25", "Active"],
+ ["Harper", "24", "Inactive"],
+ ["Liam", "28", "Active"],
+ ["Abigail", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Henry", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["Elijah", "30", "Active"],
+ ["Amelia", "23", "Inactive"],
+ ["William", "24", "Active"],
+ ["Mila", "27", "Inactive"],
+ ["James", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["Daniel", "22", "Active"],
+ ["Avery", "29", "Inactive"],
+ ["Alexander", "26", "Active"],
+ ["Chloe", "30", "Inactive"],
+ ["Michael", "21", "Active"],
+ ["Madison", "31", "Inactive"],
+ ["Evelyn", "23", "Active"],
+ ["Emily", "25", "Inactive"],
+ ["Ella", "28", "Active"],
+ ["Grace", "24", "Inactive"],
+ ["Liam", "27", "Active"],
+ ["Harper", "22", "Inactive"],
+ ["Ethan", "29", "Active"],
+ ["Aria", "20", "Inactive"],
+ ["Lucas", "26", "Active"],
+ ["Zoe", "30", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "25", "Active"],
+ ["Sofia", "28", "Inactive"],
+ ["William", "30", "Active"],
+ ["Charlotte", "21", "Inactive"],
+ ["James", "29", "Active"],
+ ["Amelia", "22", "Inactive"],
+ ["Benjamin", "31", "Active"],
+ ["Chloe", "24", "Inactive"],
+ ["Daniel", "26", "Active"],
+ ["Mila", "23", "Inactive"],
+ ["Michael", "28", "Active"],
+ ["Madison", "25", "Inactive"],
+ ["Evelyn", "30", "Active"],
+ ["Lily", "27", "Inactive"],
+ ["Ella", "24", "Active"],
+ ["Avery", "22", "Inactive"],
+ ["Liam", "29", "Active"],
+ ["Harper", "21", "Inactive"],
+ ["Ethan", "26", "Active"],
+ ["Aria", "30", "Inactive"],
+ ["Lucas", "25", "Active"],
+ ["Zoe", "28", "Inactive"],
+ ["Oliver", "23", "Active"],
+ ["Ava", "27", "Inactive"],
+ ["Mason", "30", "Active"],
+ ["Sofia", "22", "Inactive"],
+ ["William", "29", "Active"],
+ ["Charlotte", "26", "Inactive"],
+ ["James", "21", "Active"],
+ ["Amelia", "25", "Inactive"],
+ ];
+
+ const options = {
+ filterType: "checkBox",
+ elevation: 0,
+ responsive: "standard",
+ selectableRows: false,
+ };
+
return (
-
+
Settings Page
Add or update settings or global parameters
-
-
-
-
- {" "}
- {/* Fix the casing here */}
-
-
-
- {value === "gender" &&
}
- {value === "religion" &&
}
- {value === "companies" &&
}
- {value === "position" &&
}
-
+
+
+
+
+
+ {value === "settings" && (
+
+
+
+
+
+
+
+
+
+ {secondForm === "personalInformation" && (
+
+
+
+ )}
+ {secondForm === "changePassword" && (
+
+
+
+ )}
+ {secondForm === "accountSettings" && (
+
+ )}
+
+
+ )}
+ {value === "sample" && (
+
+
+
+
+
+
+
+
+
+ {secondForm === "personalInformation" && (
+
+
+
+ )}
+ {secondForm === "changePassword" && (
+
+
+
+ )}
+ {secondForm === "accountSettings" && (
+
+ )}
+
+
+ )}
+ {/* {value === "religion" &&
}
+ {value === "companies" &&
}
+ {value === "position" &&
} */}
+
+
);
From b15c26048c5ab8ee1e25eee5cccce3dc19409fd6 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 14:43:32 +0800
Subject: [PATCH 053/182] update-library
---
resources/js/Pages/Admin/Library/Index.jsx | 115 +++++++++++----------
1 file changed, 63 insertions(+), 52 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 7e73194..84742f6 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -155,35 +155,42 @@ export default function Index({ auth }) {
{value === "settings" && (
-
-
-
-
-
+
+
+
+
+
+
-
+
{secondForm === "personalInformation" && (
-
+
)}
{secondForm === "changePassword" && (
@@ -200,32 +207,39 @@ export default function Index({ auth }) {
)}
{value === "sample" && (
-
+
-
-
-
-
-
+
+
+
+
+
+
{secondForm === "personalInformation" && (
@@ -246,9 +260,6 @@ export default function Index({ auth }) {
)}
- {/* {value === "religion" &&
}
- {value === "companies" &&
}
- {value === "position" &&
} */}
From 8c5f15e99dc102c20fdf3cf259cc7aeaac5c052c Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Fri, 15 Sep 2023 14:57:19 +0800
Subject: [PATCH 054/182] add-notification
---
resources/js/Layouts/MainLayout.jsx | 49 +++++++++++++++++------------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 5a9385d..8374a2c 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -60,6 +60,7 @@ 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 NotificationsActiveIcon from "@mui/icons-material/NotificationsActive";
const drawerWidth = 240;
const Main = styled("main", { shouldForwardProp: (prop) => prop !== "open" })(
@@ -290,27 +291,35 @@ export default function MainLayout({ user, children }) {
textAlign: "center",
}}
>
-
-
-
+
+
-
-
+
+
+
+
+
+
+
Date: Mon, 18 Sep 2023 09:09:16 +0800
Subject: [PATCH 055/182] make-stactbar-responsive
---
resources/js/Components/StackBar.jsx | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/resources/js/Components/StackBar.jsx b/resources/js/Components/StackBar.jsx
index 0458dc0..22e7ca5 100644
--- a/resources/js/Components/StackBar.jsx
+++ b/resources/js/Components/StackBar.jsx
@@ -2,17 +2,22 @@ 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 (
-
+
+
+
);
}
From 4bea7b38c69e4ea270df50ef55478163a9ca6fbb Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Mon, 18 Sep 2023 09:38:20 +0800
Subject: [PATCH 056/182] product-mobile-responsive
---
.../Pages/Admin/Management/Products/Index.jsx | 33 ++++++++++++++-----
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index c11656d..94f071d 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -185,14 +185,31 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
/>
-
-
-
-
+
+
+ {/* Mobile View */}
+
+
+
+
+
+ {/* Desktop View */}
+
+
+
+
);
From 3af673d06594ddd12de93600b9ef1dde5e0151ff Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Mon, 18 Sep 2023 11:02:08 +0800
Subject: [PATCH 057/182] storage is mobile-responsive
---
resources/js/Pages/Admin/Storage/Index.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx
index d1b2051..e9e99da 100644
--- a/resources/js/Pages/Admin/Storage/Index.jsx
+++ b/resources/js/Pages/Admin/Storage/Index.jsx
@@ -148,7 +148,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
{
label: "Desktop",
content: (
-
+
+
Date: Mon, 18 Sep 2023 11:18:16 +0800
Subject: [PATCH 058/182] qr-responsive
---
resources/js/Pages/Admin/Qr/Index.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 28ea00a..6482538 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -449,7 +449,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
/>
-
+
Date: Tue, 19 Sep 2023 14:43:24 +0800
Subject: [PATCH 059/182] change-icon-at-side-notificationnav-and-
---
resources/js/Layouts/MainLayout.jsx | 5 +++--
resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx | 3 ++-
resources/js/Pages/Admin/Qr/Index.jsx | 11 ++++++++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 8374a2c..826c410 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -61,6 +61,7 @@ import AbcSharpIcon from "@mui/icons-material/AbcSharp";
import CustomizedSwitches from "@/Components/CustomizedSwitches";
import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
import NotificationsActiveIcon from "@mui/icons-material/NotificationsActive";
+import EmailIcon from "@mui/icons-material/Email";
const drawerWidth = 240;
const Main = styled("main", { shouldForwardProp: (prop) => prop !== "open" })(
@@ -293,8 +294,8 @@ export default function MainLayout({ user, children }) {
>
-
diff --git a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
index 6c8ca56..5d253f0 100644
--- a/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/GenerateQr/Index.jsx
@@ -30,6 +30,7 @@ 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"];
@@ -72,7 +73,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
),
},
{
- icon: ,
+ icon: ,
text: "QR",
url: "/material-ui/getting-started/installation/",
},
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 28ea00a..78a8464 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -449,7 +449,16 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
/>
-
+
+
+
+
+
+
Date: Tue, 19 Sep 2023 14:53:05 +0800
Subject: [PATCH 060/182] admin-setting-page-edited
---
resources/js/Pages/Admin/Library/Index.jsx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 84742f6..1df94ac 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -123,7 +123,7 @@ export default function Index({ auth }) {
return (
-
+
Settings Page
@@ -136,7 +136,6 @@ export default function Index({ auth }) {
flexGrow: 1,
bgcolor: "background.paper",
display: "flex",
- height: 224,
}}
>
{value === "settings" && (
-
+
-
+
{secondForm === "personalInformation" && (
@@ -212,7 +210,6 @@ export default function Index({ auth }) {
Date: Tue, 19 Sep 2023 15:53:05 +0800
Subject: [PATCH 061/182] add-font-family
---
resources/js/Layouts/MainLayout.jsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 826c410..d652a70 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -224,6 +224,9 @@ export default function MainLayout({ user, children }) {
palette: {
mode: DarkMode ? "dark" : "light",
},
+ typography: {
+ fontFamily: "Roboto, sans-serif",
+ },
});
// active user
@@ -295,14 +298,14 @@ export default function MainLayout({ user, children }) {
Date: Tue, 19 Sep 2023 15:58:43 +0800
Subject: [PATCH 062/182] update-qr-generated-add-data
---
resources/js/Pages/Admin/Qr/Index.jsx | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 78a8464..6482538 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -458,15 +458,6 @@ export default function Index({ auth, mustVerifyEmail, status }) {
/>
-
-
-
-
-
);
}
From 4f57d3ace2bbc572aba2ccb123c8c131529b6516 Mon Sep 17 00:00:00 2001
From: koykoy027
Date: Wed, 20 Sep 2023 08:41:56 +0800
Subject: [PATCH 063/182] update generateqr into generator
---
resources/js/Layouts/MainLayout.jsx | 4 ++--
routes/web.php | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index d652a70..eb606e6 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -175,7 +175,7 @@ export default function MainLayout({ user, children }) {
const actions = [
{
icon: (
-
+
),
@@ -540,7 +540,7 @@ export default function MainLayout({ user, children }) {
-
+
diff --git a/routes/web.php b/routes/web.php
index 849d19d..33ffc1e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -56,7 +56,7 @@
// Qr code
Route::resource('/qr', QrController::class);
- Route::resource('/generateqr', GenerateQrController::class);
+ Route::resource('/generator', GenerateQrController::class);
// storage
@@ -80,4 +80,4 @@
-require __DIR__ . '/auth.php';
+require __DIR__ . '/auth.php';
\ No newline at end of file
From 8d4efdd87fac4fe12b0863098a07b21928765340 Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Wed, 20 Sep 2023 13:46:00 +0800
Subject: [PATCH 064/182] adjustment-design
---
resources/js/Pages/Admin/Library/Index.jsx | 232 +++++-------------
resources/js/Pages/Profile/Edit.jsx | 92 +++----
.../Pages/Profile/Partials/UpdateProfile.jsx | 2 +-
3 files changed, 99 insertions(+), 227 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 1df94ac..56f1d95 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -11,107 +11,19 @@ import ManageAccountsSharpIcon from "@mui/icons-material/ManageAccountsSharp";
import MUIDataTable from "mui-datatables";
export default function Index({ auth }) {
- const [value, setValue] = useState("settings"); // Changed default value
-
+ const [value, setValue] = useState("settings");
const handleChange = (event, newValue) => {
setValue(newValue);
};
- const [secondForm, setSecondForm] = useState("personalInformation"); // Changed default value and variable name
-
+ const [secondForm, setSecondForm] = useState("personalInformation");
const handleChange1 = (event1, newValue1) => {
- setSecondForm(newValue1); // Fixed variable name here
+ setSecondForm(newValue1);
};
const columns = ["Name", "Age", "Status"];
-
const data = [
- ["Jhunriz", "23", "Active"],
- ["Joshua", "22", "Active"],
- ["Emily", "25", "Inactive"],
- ["Liam", "28", "Active"],
- ["Sophia", "20", "Inactive"],
- ["Noah", "30", "Active"],
- ["Olivia", "24", "Inactive"],
- ["Aiden", "27", "Active"],
- ["Mia", "29", "Inactive"],
- ["Ella", "26", "Active"],
- ["Jackson", "31", "Active"],
- ["Ava", "19", "Inactive"],
- ["Logan", "27", "Active"],
- ["Emma", "22", "Inactive"],
- ["Landon", "24", "Active"],
- ["Grace", "28", "Inactive"],
- ["Carter", "25", "Active"],
- ["Zoe", "23", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Lily", "21", "Inactive"],
- ["Mason", "29", "Active"],
- ["Sophie", "30", "Inactive"],
- ["Lucas", "23", "Active"],
- ["Evelyn", "27", "Inactive"],
- ["Oliver", "25", "Active"],
- ["Harper", "24", "Inactive"],
- ["Liam", "28", "Active"],
- ["Abigail", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Aria", "20", "Inactive"],
- ["Henry", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["Elijah", "30", "Active"],
- ["Amelia", "23", "Inactive"],
- ["William", "24", "Active"],
- ["Mila", "27", "Inactive"],
- ["James", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["Daniel", "22", "Active"],
- ["Avery", "29", "Inactive"],
- ["Alexander", "26", "Active"],
- ["Chloe", "30", "Inactive"],
- ["Michael", "21", "Active"],
- ["Madison", "31", "Inactive"],
- ["Evelyn", "23", "Active"],
- ["Emily", "25", "Inactive"],
- ["Ella", "28", "Active"],
- ["Grace", "24", "Inactive"],
- ["Liam", "27", "Active"],
- ["Harper", "22", "Inactive"],
- ["Ethan", "29", "Active"],
- ["Aria", "20", "Inactive"],
- ["Lucas", "26", "Active"],
- ["Zoe", "30", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["William", "30", "Active"],
- ["Charlotte", "21", "Inactive"],
- ["James", "29", "Active"],
- ["Amelia", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Chloe", "24", "Inactive"],
- ["Daniel", "26", "Active"],
- ["Mila", "23", "Inactive"],
- ["Michael", "28", "Active"],
- ["Madison", "25", "Inactive"],
- ["Evelyn", "30", "Active"],
- ["Lily", "27", "Inactive"],
- ["Ella", "24", "Active"],
- ["Avery", "22", "Inactive"],
- ["Liam", "29", "Active"],
- ["Harper", "21", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Aria", "30", "Inactive"],
- ["Lucas", "25", "Active"],
- ["Zoe", "28", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "30", "Active"],
- ["Sofia", "22", "Inactive"],
- ["William", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["James", "21", "Active"],
- ["Amelia", "25", "Inactive"],
+ // Data here...
];
const options = {
@@ -123,7 +35,7 @@ export default function Index({ auth }) {
return (
-
+
Settings Page
@@ -136,6 +48,7 @@ export default function Index({ auth }) {
flexGrow: 1,
bgcolor: "background.paper",
display: "flex",
+ width: "100%",
}}
>
-
+
{value === "settings" && (
-
+
-
-
-
-
-
-
-
+
+
+
+
-
+
{secondForm === "personalInformation" && (
-
+
)}
{secondForm === "changePassword" && (
-
+
)}
{secondForm === "accountSettings" && (
-
+
)}
@@ -205,52 +111,50 @@ export default function Index({ auth }) {
)}
{value === "sample" && (
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
{secondForm === "personalInformation" && (
-
+
)}
{secondForm === "changePassword" && (
-
+
)}
{secondForm === "accountSettings" && (
-
+
)}
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 3576d5c..eb0dce4 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -64,71 +64,39 @@ export default function Edit({ auth }) {
return (
-
-
-
-
-
-
-
-
-
-
-
- {auth.user.name}
-
-
- {auth.user.email}
-
-
-
-
+
+
+
+
+
- Account Settings
+ {auth.user.name}
+
+
+ {auth.user.email}
-
-
-
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
-
-
-
+
+
+
+
+
+
+
+
{value === "personalInformation" && }
{value === "changePassword" && }
{value === "accountSettings" && }
diff --git a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
index 0d5f1c2..40c59ea 100644
--- a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
@@ -36,7 +36,7 @@ export default function UpdateProfile({
-
+
Date: Wed, 20 Sep 2023 17:13:28 +0800
Subject: [PATCH 065/182] add-seeder-and-migration
---
app/Models/Product.php | 11 +++++++
...023_09_20_071116_create_products_table.php | 31 +++++++++++++++++++
database/seeders/ProductsTableSeeder.php | 28 +++++++++++++++++
3 files changed, 70 insertions(+)
create mode 100644 app/Models/Product.php
create mode 100644 database/migrations/2023_09_20_071116_create_products_table.php
create mode 100644 database/seeders/ProductsTableSeeder.php
diff --git a/app/Models/Product.php b/app/Models/Product.php
new file mode 100644
index 0000000..c428a88
--- /dev/null
+++ b/app/Models/Product.php
@@ -0,0 +1,11 @@
+id();
+ $table->string('productName');
+ $table->string('productId');
+ $table->string('ItemName');
+ $table->boolean('Status')->default(true); // Default to active
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('products');
+ }
+};
diff --git a/database/seeders/ProductsTableSeeder.php b/database/seeders/ProductsTableSeeder.php
new file mode 100644
index 0000000..9684acb
--- /dev/null
+++ b/database/seeders/ProductsTableSeeder.php
@@ -0,0 +1,28 @@
+create([
+ 'productName' => 'Product 1',
+ 'productId' => 'PROD001',
+ 'ItemName' => 'Item 1',
+ 'Status' => true,
+ 'created_at' => now(),
+ 'updated_at' => now(),
+ ]);
+ }
+}
From e40b4191313478f074497a0eadc17958f8868a57 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 08:21:42 +0800
Subject: [PATCH 066/182] asdfasfa
---
app/Models/Product.php | 11 +
...023_09_20_071116_create_products_table.php | 31 +++
database/seeders/ProductsTableSeeder.php | 28 +++
resources/js/Layouts/MainLayout.jsx | 4 +-
resources/js/Pages/Admin/Library/Index.jsx | 232 +++++-------------
resources/js/Pages/Admin/Qr/Index.jsx | 9 +
resources/js/Pages/Profile/Edit.jsx | 92 +++----
.../Pages/Profile/Partials/UpdateProfile.jsx | 2 +-
routes/web.php | 4 +-
9 files changed, 182 insertions(+), 231 deletions(-)
create mode 100644 app/Models/Product.php
create mode 100644 database/migrations/2023_09_20_071116_create_products_table.php
create mode 100644 database/seeders/ProductsTableSeeder.php
diff --git a/app/Models/Product.php b/app/Models/Product.php
new file mode 100644
index 0000000..c428a88
--- /dev/null
+++ b/app/Models/Product.php
@@ -0,0 +1,11 @@
+id();
+ $table->string('productName');
+ $table->string('productId');
+ $table->string('ItemName');
+ $table->boolean('Status')->default(true); // Default to active
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('products');
+ }
+};
diff --git a/database/seeders/ProductsTableSeeder.php b/database/seeders/ProductsTableSeeder.php
new file mode 100644
index 0000000..9684acb
--- /dev/null
+++ b/database/seeders/ProductsTableSeeder.php
@@ -0,0 +1,28 @@
+create([
+ 'productName' => 'Product 1',
+ 'productId' => 'PROD001',
+ 'ItemName' => 'Item 1',
+ 'Status' => true,
+ 'created_at' => now(),
+ 'updated_at' => now(),
+ ]);
+ }
+}
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index d652a70..eb606e6 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -175,7 +175,7 @@ export default function MainLayout({ user, children }) {
const actions = [
{
icon: (
-
+
),
@@ -540,7 +540,7 @@ export default function MainLayout({ user, children }) {
-
+
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 1df94ac..56f1d95 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -11,107 +11,19 @@ import ManageAccountsSharpIcon from "@mui/icons-material/ManageAccountsSharp";
import MUIDataTable from "mui-datatables";
export default function Index({ auth }) {
- const [value, setValue] = useState("settings"); // Changed default value
-
+ const [value, setValue] = useState("settings");
const handleChange = (event, newValue) => {
setValue(newValue);
};
- const [secondForm, setSecondForm] = useState("personalInformation"); // Changed default value and variable name
-
+ const [secondForm, setSecondForm] = useState("personalInformation");
const handleChange1 = (event1, newValue1) => {
- setSecondForm(newValue1); // Fixed variable name here
+ setSecondForm(newValue1);
};
const columns = ["Name", "Age", "Status"];
-
const data = [
- ["Jhunriz", "23", "Active"],
- ["Joshua", "22", "Active"],
- ["Emily", "25", "Inactive"],
- ["Liam", "28", "Active"],
- ["Sophia", "20", "Inactive"],
- ["Noah", "30", "Active"],
- ["Olivia", "24", "Inactive"],
- ["Aiden", "27", "Active"],
- ["Mia", "29", "Inactive"],
- ["Ella", "26", "Active"],
- ["Jackson", "31", "Active"],
- ["Ava", "19", "Inactive"],
- ["Logan", "27", "Active"],
- ["Emma", "22", "Inactive"],
- ["Landon", "24", "Active"],
- ["Grace", "28", "Inactive"],
- ["Carter", "25", "Active"],
- ["Zoe", "23", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Lily", "21", "Inactive"],
- ["Mason", "29", "Active"],
- ["Sophie", "30", "Inactive"],
- ["Lucas", "23", "Active"],
- ["Evelyn", "27", "Inactive"],
- ["Oliver", "25", "Active"],
- ["Harper", "24", "Inactive"],
- ["Liam", "28", "Active"],
- ["Abigail", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Aria", "20", "Inactive"],
- ["Henry", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["Elijah", "30", "Active"],
- ["Amelia", "23", "Inactive"],
- ["William", "24", "Active"],
- ["Mila", "27", "Inactive"],
- ["James", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["Daniel", "22", "Active"],
- ["Avery", "29", "Inactive"],
- ["Alexander", "26", "Active"],
- ["Chloe", "30", "Inactive"],
- ["Michael", "21", "Active"],
- ["Madison", "31", "Inactive"],
- ["Evelyn", "23", "Active"],
- ["Emily", "25", "Inactive"],
- ["Ella", "28", "Active"],
- ["Grace", "24", "Inactive"],
- ["Liam", "27", "Active"],
- ["Harper", "22", "Inactive"],
- ["Ethan", "29", "Active"],
- ["Aria", "20", "Inactive"],
- ["Lucas", "26", "Active"],
- ["Zoe", "30", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["William", "30", "Active"],
- ["Charlotte", "21", "Inactive"],
- ["James", "29", "Active"],
- ["Amelia", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Chloe", "24", "Inactive"],
- ["Daniel", "26", "Active"],
- ["Mila", "23", "Inactive"],
- ["Michael", "28", "Active"],
- ["Madison", "25", "Inactive"],
- ["Evelyn", "30", "Active"],
- ["Lily", "27", "Inactive"],
- ["Ella", "24", "Active"],
- ["Avery", "22", "Inactive"],
- ["Liam", "29", "Active"],
- ["Harper", "21", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Aria", "30", "Inactive"],
- ["Lucas", "25", "Active"],
- ["Zoe", "28", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "30", "Active"],
- ["Sofia", "22", "Inactive"],
- ["William", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["James", "21", "Active"],
- ["Amelia", "25", "Inactive"],
+ // Data here...
];
const options = {
@@ -123,7 +35,7 @@ export default function Index({ auth }) {
return (
-
+
Settings Page
@@ -136,6 +48,7 @@ export default function Index({ auth }) {
flexGrow: 1,
bgcolor: "background.paper",
display: "flex",
+ width: "100%",
}}
>
-
+
{value === "settings" && (
-
+
-
-
-
-
-
-
-
+
+
+
+
-
+
{secondForm === "personalInformation" && (
-
+
)}
{secondForm === "changePassword" && (
-
+
)}
{secondForm === "accountSettings" && (
-
+
)}
@@ -205,52 +111,50 @@ export default function Index({ auth }) {
)}
{value === "sample" && (
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
{secondForm === "personalInformation" && (
-
+
)}
{secondForm === "changePassword" && (
-
+
)}
{secondForm === "accountSettings" && (
-
+
)}
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 6482538..78a8464 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -458,6 +458,15 @@ export default function Index({ auth, mustVerifyEmail, status }) {
/>
+
+
+
+
+
);
}
diff --git a/resources/js/Pages/Profile/Edit.jsx b/resources/js/Pages/Profile/Edit.jsx
index 3576d5c..eb0dce4 100644
--- a/resources/js/Pages/Profile/Edit.jsx
+++ b/resources/js/Pages/Profile/Edit.jsx
@@ -64,71 +64,39 @@ export default function Edit({ auth }) {
return (
-
-
-
-
-
-
-
-
-
-
-
- {auth.user.name}
-
-
- {auth.user.email}
-
-
-
-
+
+
+
+
+
- Account Settings
+ {auth.user.name}
+
+
+ {auth.user.email}
-
-
-
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
- }
- iconPosition="start"
- />
-
-
-
+
+
+
+
+
+
+
+
{value === "personalInformation" && }
{value === "changePassword" && }
{value === "accountSettings" && }
diff --git a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
index 0d5f1c2..40c59ea 100644
--- a/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
+++ b/resources/js/Pages/Profile/Partials/UpdateProfile.jsx
@@ -36,7 +36,7 @@ export default function UpdateProfile({
-
+
Date: Thu, 21 Sep 2023 10:12:42 +0800
Subject: [PATCH 067/182] add-form-modal-add-user-in-management
---
resources/js/Components/CustomSelect.jsx | 20 ++
.../js/Pages/Admin/Management/User/Create.jsx | 184 ++++++++++++++++++
.../js/Pages/Admin/Management/User/Index.jsx | 96 +--------
3 files changed, 206 insertions(+), 94 deletions(-)
create mode 100644 resources/js/Components/CustomSelect.jsx
create mode 100644 resources/js/Pages/Admin/Management/User/Create.jsx
diff --git a/resources/js/Components/CustomSelect.jsx b/resources/js/Components/CustomSelect.jsx
new file mode 100644
index 0000000..1241097
--- /dev/null
+++ b/resources/js/Components/CustomSelect.jsx
@@ -0,0 +1,20 @@
+import * as 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";
+
+export default function CustomSelect({ label, value, onChange, options }) {
+ return (
+
+ {label}
+
+ {options.map((option) => (
+
+ {option.label}
+
+ ))}
+
+
+ );
+}
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..a0cc0e5
--- /dev/null
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -0,0 +1,184 @@
+import { Button, TextField } from "@mui/material";
+import React, { useState } 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";
+
+function Create() {
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ });
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+ setFormData({
+ ...formData,
+ [name]: value,
+ });
+ };
+
+ const handleSubmit = (e) => {
+ e.preventDefault();
+ console.log("Form data submitted:", formData);
+ // You can send this data to an API or perform other actions here.
+ };
+
+ const [region, setRegion] = React.useState("");
+
+ const regionChange = (event) => {
+ setRegion(event.target.value);
+ };
+
+ const options = [
+ { label: "None", value: "" },
+ { label: "Ten", value: 10 },
+ { label: "Twenty", value: 20 },
+ { label: "Thirty", value: 30 },
+ ];
+
+ 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 },
+ ];
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Submit
+
+
+
+
+ );
+}
+
+export default Create;
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index afd8366..758545d 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -23,6 +23,7 @@ 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";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = ["Name", "Age", "Status"];
@@ -165,100 +166,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
>
}
- content={
-
-
-
-
-
-
-
-
-
-
-
-
- Status
-
-
-
- None
-
- Single
- Married
- Widow
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
+ content={
}
/>
From 68c16f84c3bccd5f92b44f76ffa136f5c6732539 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 10:55:48 +0800
Subject: [PATCH 068/182] product-modal-form-designed
---
.../Admin/Management/Products/Create.jsx | 112 ++++++++++++++++++
.../Pages/Admin/Management/Products/Index.jsx | 59 +--------
2 files changed, 114 insertions(+), 57 deletions(-)
create mode 100644 resources/js/Pages/Admin/Management/Products/Create.jsx
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..572b129
--- /dev/null
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -0,0 +1,112 @@
+import { Button, TextField, TextareaAutosize } from "@mui/material";
+import React, { useState } 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";
+
+function Create() {
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ });
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+ setFormData({
+ ...formData,
+ [name]: value,
+ });
+ };
+
+ const handleSubmit = (e) => {
+ e.preventDefault();
+ console.log("Form data submitted:", formData);
+ // You can send this data to an API or perform other actions here.
+ };
+
+ const [status, setStatus] = React.useState("");
+
+ const statusChange = (event) => {
+ setStatus(event.target.value);
+ };
+
+ const options = [
+ { label: "None", value: "" },
+ { label: "Active", value: 10 },
+ { label: "Inactive", value: 20 },
+ { label: "Deactivated", value: 30 },
+ ];
+
+ const [department, setDepartment] = React.useState("");
+
+ const departmentChange = (event) => {
+ setDepartment(event.target.value);
+ };
+
+ const departmentoptions = [
+ { label: "None", value: "" },
+ { label: "IT", value: 10 },
+ { label: "Computer Science", value: 20 },
+ { label: "IS", value: 30 },
+ ];
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Submit
+
+
+
+
+ );
+}
+
+export default Create;
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index 94f071d..afb2c15 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -24,6 +24,7 @@ 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 Create from "./Create";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = [
@@ -124,63 +125,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
content={
-
-
-
-
-
-
-
-
- Status
-
-
-
- None
-
- Single
- Married
- Widow
-
-
-
-
-
-
-
+
}
/>
From ea51d629bea991caa3367f32d7340379dcefb937 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 13:17:13 +0800
Subject: [PATCH 069/182] product-user-modal-create.jsx created
---
.../ProductManagementController.php | 4 +++-
...023_09_20_071116_create_products_table.php | 4 ++--
database/seeders/DatabaseSeeder.php | 4 ++++
database/seeders/ProductsTableSeeder.php | 24 ++++++++++++-------
.../Admin/Management/Products/Create.jsx | 2 +-
5 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/app/Http/Controllers/Management/ProductManagementController.php b/app/Http/Controllers/Management/ProductManagementController.php
index 622a68b..dcc51c6 100644
--- a/app/Http/Controllers/Management/ProductManagementController.php
+++ b/app/Http/Controllers/Management/ProductManagementController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
+use App\Models\Product;
use Illuminate\Http\Request;
use Inertia\Inertia;
@@ -10,6 +11,7 @@ class ProductManagementController extends Controller
{
public function index()
{
- return Inertia::render('Admin/Management/Products/Index');
+ $product = Product::all();
+ return Inertia::render('Admin/Management/Products/Index', compact('product'));
}
}
diff --git a/database/migrations/2023_09_20_071116_create_products_table.php b/database/migrations/2023_09_20_071116_create_products_table.php
index b2d96c9..8e6496e 100644
--- a/database/migrations/2023_09_20_071116_create_products_table.php
+++ b/database/migrations/2023_09_20_071116_create_products_table.php
@@ -15,8 +15,8 @@ public function up(): void
$table->id();
$table->string('productName');
$table->string('productId');
- $table->string('ItemName');
- $table->boolean('Status')->default(true); // Default to active
+ $table->string('itemName');
+ $table->boolean('status')->default(true); // Default to active
$table->timestamps();
});
}
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index f5cbf26..313a708 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -19,5 +19,9 @@ public function run(): void
'email' => 'jhunriz14@gmail.com',
'password' => '123456789'
]);
+
+ $this->call([
+ ProductsTableSeeder::class,
+ ]);
}
}
diff --git a/database/seeders/ProductsTableSeeder.php b/database/seeders/ProductsTableSeeder.php
index 9684acb..5f44850 100644
--- a/database/seeders/ProductsTableSeeder.php
+++ b/database/seeders/ProductsTableSeeder.php
@@ -2,10 +2,14 @@
namespace Database\Seeders;
+use App\Models\Product;
+use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
+use Faker\Factory as Faker;
+
class ProductsTableSeeder extends Seeder
{
/**
@@ -14,15 +18,17 @@ class ProductsTableSeeder extends Seeder
public function run()
{
+ for ($i = 0; $i < 10; $i++) {
+ Product::create(['productName' => fake()->word(), 'productId' => fake()->randomNumber(), 'itemName' => fake()->word(), "status" => true]);
+ }
+
+
-
- \App\Models\User::factory()->create([
- 'productName' => 'Product 1',
- 'productId' => 'PROD001',
- 'ItemName' => 'Item 1',
- 'Status' => true,
- 'created_at' => now(),
- 'updated_at' => now(),
- ]);
+ // \App\Models\User::factory()->create([
+ // 'productName' => 'Product 1',
+ // 'productId' => 'PROD001',
+ // 'itemName' => 'Item 1',
+ // 'status' => true,
+ // ]);
}
}
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 572b129..410481c 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -90,7 +90,7 @@ function Create() {
Date: Thu, 21 Sep 2023 13:21:11 +0800
Subject: [PATCH 070/182] add-records-modal-created
---
resources/js/Pages/Admin/Qr/Create.jsx | 112 +++++++++++++++++++++++++
resources/js/Pages/Admin/Qr/Index.jsx | 59 +------------
2 files changed, 114 insertions(+), 57 deletions(-)
create mode 100644 resources/js/Pages/Admin/Qr/Create.jsx
diff --git a/resources/js/Pages/Admin/Qr/Create.jsx b/resources/js/Pages/Admin/Qr/Create.jsx
new file mode 100644
index 0000000..410481c
--- /dev/null
+++ b/resources/js/Pages/Admin/Qr/Create.jsx
@@ -0,0 +1,112 @@
+import { Button, TextField, TextareaAutosize } from "@mui/material";
+import React, { useState } 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";
+
+function Create() {
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ });
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+ setFormData({
+ ...formData,
+ [name]: value,
+ });
+ };
+
+ const handleSubmit = (e) => {
+ e.preventDefault();
+ console.log("Form data submitted:", formData);
+ // You can send this data to an API or perform other actions here.
+ };
+
+ const [status, setStatus] = React.useState("");
+
+ const statusChange = (event) => {
+ setStatus(event.target.value);
+ };
+
+ const options = [
+ { label: "None", value: "" },
+ { label: "Active", value: 10 },
+ { label: "Inactive", value: 20 },
+ { label: "Deactivated", value: 30 },
+ ];
+
+ const [department, setDepartment] = React.useState("");
+
+ const departmentChange = (event) => {
+ setDepartment(event.target.value);
+ };
+
+ const departmentoptions = [
+ { label: "None", value: "" },
+ { label: "IT", value: 10 },
+ { label: "Computer Science", value: 20 },
+ { label: "IS", value: 30 },
+ ];
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Submit
+
+
+
+
+ );
+}
+
+export default Create;
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 28ea00a..04cd026 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -24,6 +24,7 @@ import WhatshotIcon from "@mui/icons-material/Whatshot";
import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
+import Create from "./Create";
export default function Index({ auth, mustVerifyEmail, status }) {
const columns = [
@@ -388,63 +389,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
}
content={
-
-
-
-
-
-
-
-
- Status
-
-
-
- None
-
- Single
- Married
- Widow
-
-
-
-
-
-
-
+
}
/>
From ec96adb00eeb15a0e35ea091d5ab28ccb961dc24 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 13:58:58 +0800
Subject: [PATCH 071/182] update
---
.../js/Pages/Profile/Partials/DarkMode.jsx | 162 ------------------
resources/js/app.jsx | 4 +-
2 files changed, 1 insertion(+), 165 deletions(-)
delete mode 100644 resources/js/Pages/Profile/Partials/DarkMode.jsx
diff --git a/resources/js/Pages/Profile/Partials/DarkMode.jsx b/resources/js/Pages/Profile/Partials/DarkMode.jsx
deleted file mode 100644
index a97d68f..0000000
--- a/resources/js/Pages/Profile/Partials/DarkMode.jsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import { useRef, useState, useEffect } from "react";
-import { useForm } from "@inertiajs/react";
-import * as React from "react";
-import Button from "@mui/material/Button";
-import TextField from "@mui/material/TextField";
-import Dialog from "@mui/material/Dialog";
-import DialogActions from "@mui/material/DialogActions";
-import DialogContent from "@mui/material/DialogContent";
-import DialogContentText from "@mui/material/DialogContentText";
-import DialogTitle from "@mui/material/DialogTitle";
-import { Typography } from "@mui/material";
-import NightsStaySharpIcon from "@mui/icons-material/NightsStaySharp";
-import Brightness7SharpIcon from "@mui/icons-material/Brightness7Sharp";
-import DesktopMacSharpIcon from "@mui/icons-material/DesktopMacSharp";
-
-export default function DarkMode({ className = "" }) {
- const [open, setOpen] = React.useState(false);
-
- const handleClickOpen = () => {
- setOpen(true);
- };
-
- const handleClose = () => {
- setOpen(false);
- };
-
- const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
- const passwordInput = useRef();
-
- const {
- data,
- 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();
- };
-
- // Start Dark Mode
-
- const [theme, setTheme] = useState(
- localStorage.getItem("theme") ? localStorage.getItem("theme") : "system"
- );
- const element = document.documentElement;
- const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
-
- const options = [
- {
- icons: ,
- text: "light",
- },
- {
- icons: ,
- text: "dark",
- },
- {
- icons: ,
- text: "system",
- },
- ];
-
- function onWindowMatch() {
- if (
- localStorage.theme === "dark" ||
- (!("theme" in localStorage) && darkQuery.matches)
- ) {
- element.classList.add("dark");
- } else {
- element.classList.remove("dark");
- }
- }
-
- onWindowMatch();
-
- useEffect(() => {
- switch (theme) {
- case "dark":
- element.classList.add("dark");
- localStorage.setItem("theme", "dark");
- break;
-
- case "light":
- element.classList.remove("dark");
- localStorage.setItem("theme", "light");
- break;
-
- default:
- localStorage.removeItem("theme");
- onWindowMatch();
- break;
- }
- }, [theme]);
-
- // End of the Dark Mode
-
- return (
- <>
-
-
-
- Experience the DarkMode
-
-
- 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.
-
-
-
- {/* start of the dark mode */}
-
- {options?.map((opt) => (
- setTheme(opt.text)}
- className={`text-xl dark:text-white leading-9 rounded-full m-1 ${
- theme === opt.text &&
- "text-sky-600 dark:text-sky-600"
- }`}
- >
- {opt.icons}
-
- ))}
-
- {/* End of the Dark Mode */}
-
-
- >
- );
-}
diff --git a/resources/js/app.jsx b/resources/js/app.jsx
index be32ddf..208ddbc 100644
--- a/resources/js/app.jsx
+++ b/resources/js/app.jsx
@@ -6,9 +6,7 @@ import { createInertiaApp } from "@inertiajs/react";
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
import { createTheme } from "@mui/material";
import { ThemeProvider } from "@emotion/react";
-import { blue, yellow } from "@mui/material/colors";
-import { dark } from "@mui/material/styles/createPalette";
-import DarkModeToggle from "./Components/Darkmode";
+import { blue } from "@mui/material/colors";
const appName = import.meta.env.VITE_APP_NAME || "Laravel";
From 1aa368641618b1775a0a912b3744b3039fb57d3e Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 16:17:15 +0800
Subject: [PATCH 072/182] gender-settings-done
---
resources/js/Pages/Admin/Library/Index.jsx | 166 ++++++---------------
1 file changed, 47 insertions(+), 119 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 56f1d95..2519146 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -42,127 +42,55 @@ export default function Index({ auth }) {
Add or update settings or global parameters
-
-
-
-
-
-
-
- {value === "settings" && (
-
-
-
-
-
-
-
-
-
- {secondForm === "personalInformation" && (
-
-
-
- )}
- {secondForm === "changePassword" && (
-
-
-
- )}
- {secondForm === "accountSettings" && (
-
- )}
-
-
- )}
- {value === "sample" && (
-
-
+ {value === "settings" && (
+
+
+
-
-
-
-
-
-
-
- {secondForm === "personalInformation" && (
-
-
-
- )}
- {secondForm === "changePassword" && (
-
-
-
- )}
- {secondForm === "accountSettings" && (
-
- )}
-
+
+
+
+
+
+
+ {secondForm === "personalInformation" && (
+
+
+
+ )}
+ {secondForm === "changePassword" && (
+
+
+
+ )}
+ {secondForm === "accountSettings" && (
+
+ )}
- )}
-
-
+
+ )}
+
);
From d8172e386077ac80c937a61378c99cfe6df39c4f Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 16:44:14 +0800
Subject: [PATCH 073/182] proper naming at library setting
---
resources/js/Pages/Admin/Library/Index.jsx | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/resources/js/Pages/Admin/Library/Index.jsx b/resources/js/Pages/Admin/Library/Index.jsx
index 2519146..ea6c4f5 100644
--- a/resources/js/Pages/Admin/Library/Index.jsx
+++ b/resources/js/Pages/Admin/Library/Index.jsx
@@ -16,7 +16,7 @@ export default function Index({ auth }) {
setValue(newValue);
};
- const [secondForm, setSecondForm] = useState("personalInformation");
+ const [secondForm, setSecondForm] = useState("gender");
const handleChange1 = (event1, newValue1) => {
setSecondForm(newValue1);
};
@@ -55,34 +55,34 @@ export default function Index({ auth }) {
scrollButtons="auto"
>
- {secondForm === "personalInformation" && (
+ {secondForm === "gender" && (
)}
- {secondForm === "changePassword" && (
+ {secondForm === "company List" && (
)}
- {secondForm === "accountSettings" && (
+ {secondForm === "position List" && (
From 1c41fa9f31fc28f1ca099b975e9f262bae07ae4f Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Thu, 21 Sep 2023 16:49:04 +0800
Subject: [PATCH 074/182] asdfafadsf
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 68 --------------------
1 file changed, 68 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index c71583e..34aad37 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -36,74 +36,6 @@ export default function Index({ auth, mustVerifyEmail, status }) {
["Grace", "28", "Inactive"],
["Carter", "25", "Active"],
["Zoe", "23", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Lily", "21", "Inactive"],
- ["Mason", "29", "Active"],
- ["Sophie", "30", "Inactive"],
- ["Lucas", "23", "Active"],
- ["Evelyn", "27", "Inactive"],
- ["Oliver", "25", "Active"],
- ["Harper", "24", "Inactive"],
- ["Liam", "28", "Active"],
- ["Abigail", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Aria", "20", "Inactive"],
- ["Henry", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["Elijah", "30", "Active"],
- ["Amelia", "23", "Inactive"],
- ["William", "24", "Active"],
- ["Mila", "27", "Inactive"],
- ["James", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["Daniel", "22", "Active"],
- ["Avery", "29", "Inactive"],
- ["Alexander", "26", "Active"],
- ["Chloe", "30", "Inactive"],
- ["Michael", "21", "Active"],
- ["Madison", "31", "Inactive"],
- ["Evelyn", "23", "Active"],
- ["Emily", "25", "Inactive"],
- ["Ella", "28", "Active"],
- ["Grace", "24", "Inactive"],
- ["Liam", "27", "Active"],
- ["Harper", "22", "Inactive"],
- ["Ethan", "29", "Active"],
- ["Aria", "20", "Inactive"],
- ["Lucas", "26", "Active"],
- ["Zoe", "30", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["William", "30", "Active"],
- ["Charlotte", "21", "Inactive"],
- ["James", "29", "Active"],
- ["Amelia", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Chloe", "24", "Inactive"],
- ["Daniel", "26", "Active"],
- ["Mila", "23", "Inactive"],
- ["Michael", "28", "Active"],
- ["Madison", "25", "Inactive"],
- ["Evelyn", "30", "Active"],
- ["Lily", "27", "Inactive"],
- ["Ella", "24", "Active"],
- ["Avery", "22", "Inactive"],
- ["Liam", "29", "Active"],
- ["Harper", "21", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Aria", "30", "Inactive"],
- ["Lucas", "25", "Active"],
- ["Zoe", "28", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "30", "Active"],
- ["Sofia", "22", "Inactive"],
- ["William", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["James", "21", "Active"],
- ["Amelia", "25", "Inactive"],
];
// Now, you have a total of 108 rows in the `data` array.
From a0c0d44c635b8f7b0a82a66d05d69abd456701cd Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Sat, 23 Sep 2023 20:28:45 +0800
Subject: [PATCH 075/182] adjustment of the mobile view
---
database/seeders/ProductsTableSeeder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/database/seeders/ProductsTableSeeder.php b/database/seeders/ProductsTableSeeder.php
index 5f44850..52abfbe 100644
--- a/database/seeders/ProductsTableSeeder.php
+++ b/database/seeders/ProductsTableSeeder.php
@@ -18,7 +18,7 @@ class ProductsTableSeeder extends Seeder
public function run()
{
- for ($i = 0; $i < 10; $i++) {
+ for ($i = 0; $i < 100; $i++) {
Product::create(['productName' => fake()->word(), 'productId' => fake()->randomNumber(), 'itemName' => fake()->word(), "status" => true]);
}
From a5aa84648a0a5253a445847951c2a9880a87a54d Mon Sep 17 00:00:00 2001
From: Jhunriz
Date: Sat, 23 Sep 2023 21:01:34 +0800
Subject: [PATCH 076/182] create-migration-seeder-model
---
app/Models/Storage.php | 11 +++++++
...023_09_23_125944_create_storages_table.php | 31 +++++++++++++++++++
database/seeders/DatabaseSeeder.php | 4 +++
database/seeders/StorageTableSeeder.php | 25 +++++++++++++++
4 files changed, 71 insertions(+)
create mode 100644 app/Models/Storage.php
create mode 100644 database/migrations/2023_09_23_125944_create_storages_table.php
create mode 100644 database/seeders/StorageTableSeeder.php
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->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/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index 313a708..d0c46a7 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -23,5 +23,9 @@ public function run(): void
$this->call([
ProductsTableSeeder::class,
]);
+
+ $this->call([
+ StorageTableSeeder::class,
+ ]);
}
}
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,
+ ]);
+ }
+ }
+}
From fb1b2767a3c4c8e6148c606827a57ac4d336acde Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 09:04:09 +0800
Subject: [PATCH 077/182] show-data-in-table-in-user-management
---
.../Management/UserManagementController.php | 7 +-
.../js/Pages/Admin/Management/User/Index.jsx | 101 +-----------------
2 files changed, 11 insertions(+), 97 deletions(-)
diff --git a/app/Http/Controllers/Management/UserManagementController.php b/app/Http/Controllers/Management/UserManagementController.php
index 34a6750..6c7bfcd 100644
--- a/app/Http/Controllers/Management/UserManagementController.php
+++ b/app/Http/Controllers/Management/UserManagementController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Management;
use App\Http\Controllers\Controller;
+use App\Models\User;
use Illuminate\Http\Request;
use Inertia\Inertia;
@@ -10,6 +11,10 @@ class UserManagementController extends Controller
{
public function index()
{
- return Inertia::render('Admin/Management/User/Index');
+ $users = User::all();
+
+ return Inertia::render('Admin/Management/User/Index', [
+ 'users' => $users,
+ ]);
}
}
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index 758545d..bbcfb08 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -25,97 +25,12 @@ import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
import Create from "./Create";
-export default function Index({ auth, mustVerifyEmail, status }) {
- const columns = ["Name", "Age", "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.email]);
+
+ const columns = ["ID", "Email"];
- const data = [
- ["Jhunriz", "23", "Active"],
- ["Joshua", "22", "Active"],
- ["Emily", "25", "Inactive"],
- ["Liam", "28", "Active"],
- ["Sophia", "20", "Inactive"],
- ["Noah", "30", "Active"],
- ["Olivia", "24", "Inactive"],
- ["Aiden", "27", "Active"],
- ["Mia", "29", "Inactive"],
- ["Ella", "26", "Active"],
- ["Jackson", "31", "Active"],
- ["Ava", "19", "Inactive"],
- ["Logan", "27", "Active"],
- ["Emma", "22", "Inactive"],
- ["Landon", "24", "Active"],
- ["Grace", "28", "Inactive"],
- ["Carter", "25", "Active"],
- ["Zoe", "23", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Lily", "21", "Inactive"],
- ["Mason", "29", "Active"],
- ["Sophie", "30", "Inactive"],
- ["Lucas", "23", "Active"],
- ["Evelyn", "27", "Inactive"],
- ["Oliver", "25", "Active"],
- ["Harper", "24", "Inactive"],
- ["Liam", "28", "Active"],
- ["Abigail", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Aria", "20", "Inactive"],
- ["Henry", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["Elijah", "30", "Active"],
- ["Amelia", "23", "Inactive"],
- ["William", "24", "Active"],
- ["Mila", "27", "Inactive"],
- ["James", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["Daniel", "22", "Active"],
- ["Avery", "29", "Inactive"],
- ["Alexander", "26", "Active"],
- ["Chloe", "30", "Inactive"],
- ["Michael", "21", "Active"],
- ["Madison", "31", "Inactive"],
- ["Evelyn", "23", "Active"],
- ["Emily", "25", "Inactive"],
- ["Ella", "28", "Active"],
- ["Grace", "24", "Inactive"],
- ["Liam", "27", "Active"],
- ["Harper", "22", "Inactive"],
- ["Ethan", "29", "Active"],
- ["Aria", "20", "Inactive"],
- ["Lucas", "26", "Active"],
- ["Zoe", "30", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "25", "Active"],
- ["Sofia", "28", "Inactive"],
- ["William", "30", "Active"],
- ["Charlotte", "21", "Inactive"],
- ["James", "29", "Active"],
- ["Amelia", "22", "Inactive"],
- ["Benjamin", "31", "Active"],
- ["Chloe", "24", "Inactive"],
- ["Daniel", "26", "Active"],
- ["Mila", "23", "Inactive"],
- ["Michael", "28", "Active"],
- ["Madison", "25", "Inactive"],
- ["Evelyn", "30", "Active"],
- ["Lily", "27", "Inactive"],
- ["Ella", "24", "Active"],
- ["Avery", "22", "Inactive"],
- ["Liam", "29", "Active"],
- ["Harper", "21", "Inactive"],
- ["Ethan", "26", "Active"],
- ["Aria", "30", "Inactive"],
- ["Lucas", "25", "Active"],
- ["Zoe", "28", "Inactive"],
- ["Oliver", "23", "Active"],
- ["Ava", "27", "Inactive"],
- ["Mason", "30", "Active"],
- ["Sofia", "22", "Inactive"],
- ["William", "29", "Active"],
- ["Charlotte", "26", "Inactive"],
- ["James", "21", "Active"],
- ["Amelia", "25", "Inactive"],
- ];
const options = {
filterType: "checkBox",
elevation: 0,
@@ -123,12 +38,6 @@ export default function Index({ auth, mustVerifyEmail, status }) {
selectableRows: false,
};
- const [age, setAge] = React.useState("");
-
- const handleChange = (event) => {
- setAge(event.target.value);
- };
-
const breadcrumbItems = [
{
icon: (
From 68bbbb9423641e7f42b0485512f6179faa350fda Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 10:19:14 +0800
Subject: [PATCH 078/182] show the data table in product
---
.../ProductManagementController.php | 8 +++-
...023_09_20_071116_create_products_table.php | 2 +-
.../Pages/Admin/Management/Products/Index.jsx | 48 ++++---------------
3 files changed, 17 insertions(+), 41 deletions(-)
diff --git a/app/Http/Controllers/Management/ProductManagementController.php b/app/Http/Controllers/Management/ProductManagementController.php
index dcc51c6..e0a75a0 100644
--- a/app/Http/Controllers/Management/ProductManagementController.php
+++ b/app/Http/Controllers/Management/ProductManagementController.php
@@ -11,7 +11,13 @@ class ProductManagementController extends Controller
{
public function index()
{
+ // $product = Product::all();
+ // return Inertia::render('Admin/Management/Products/Index', compact('product'));
+
$product = Product::all();
- return Inertia::render('Admin/Management/Products/Index', compact('product'));
+
+ return Inertia::render('Admin/Management/Products/Index', [
+ 'products' => $product,
+ ]);
}
}
diff --git a/database/migrations/2023_09_20_071116_create_products_table.php b/database/migrations/2023_09_20_071116_create_products_table.php
index 8e6496e..f6e12df 100644
--- a/database/migrations/2023_09_20_071116_create_products_table.php
+++ b/database/migrations/2023_09_20_071116_create_products_table.php
@@ -16,7 +16,7 @@ public function up(): void
$table->string('productName');
$table->string('productId');
$table->string('itemName');
- $table->boolean('status')->default(true); // Default to active
+ $table->string('status')->default(true); // Default to true
$table->timestamps();
});
}
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index afb2c15..0e764a5 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -26,7 +26,15 @@ import { Link } from "@inertiajs/react";
import InventorySharpIcon from "@mui/icons-material/InventorySharp";
import Create from "./Create";
-export default function Index({ auth, mustVerifyEmail, status }) {
+export default function Index({ auth, mustVerifyEmail, status, products }) {
+ const data = products.map((product) => [
+ product.id,
+ product.productName,
+ product.productId,
+ product.itemName,
+ product.status,
+ ]);
+
const columns = [
"Product Name",
"Product ID",
@@ -35,44 +43,6 @@ export default function Index({ auth, mustVerifyEmail, status }) {
"Status",
];
- const data = [
- ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
- ["HP Desktop", "DEF5678", "HP", "800", "Active"],
- ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
- ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
- ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
- // Add more entries here...
- ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
- ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
- ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
- ["HP Printer", "YZA3456", "HP", "250", "Active"],
- ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
- // Add more entries here...
- ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
- ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
- ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
- ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
- ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
- // Add more entries here...
- ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
- ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
- ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
- ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
- ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
- // Add more entries here...
- ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
- ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
- ["Apple Watch", "STU9012", "Apple", "400", "Active"],
- ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
- ["HP Scanner", "YZA7890", "HP", "150", "Active"],
- // Add more entries here...
- ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
- ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
- ["LG TV", "HIJ9012", "LG", "700", "Active"],
- ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
- ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
- ];
-
const options = {
filterType: "checkBox",
elevation: 0,
From 36e726d1637a5909d412633ce8b77686834babd8 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 11:30:26 +0800
Subject: [PATCH 079/182] data-show-in-table-
---
app/Http/Controllers/Qr/QrController.php | 9 +-
.../Controllers/Storage/StorageController.php | 10 +-
app/Models/Qrcode.php | 11 +
...2023_09_25_024820_create_qrcodes_table.php | 34 ++
database/seeders/DatabaseSeeder.php | 4 +
database/seeders/QrcodeTableSeeder.php | 32 ++
resources/js/Pages/Admin/Qr/Index.jsx | 312 +-----------------
resources/js/Pages/Admin/Storage/Index.jsx | 87 +----
8 files changed, 119 insertions(+), 380 deletions(-)
create mode 100644 app/Models/Qrcode.php
create mode 100644 database/migrations/2023_09_25_024820_create_qrcodes_table.php
create mode 100644 database/seeders/QrcodeTableSeeder.php
diff --git a/app/Http/Controllers/Qr/QrController.php b/app/Http/Controllers/Qr/QrController.php
index 6baa7d9..fe98698 100644
--- a/app/Http/Controllers/Qr/QrController.php
+++ b/app/Http/Controllers/Qr/QrController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Qr;
use App\Http\Controllers\Controller;
+use App\Models\Qrcode;
use Illuminate\Http\Request;
use Inertia\Inertia;
@@ -10,6 +11,12 @@ class QrController extends Controller
{
public function index()
{
- return Inertia::render('Admin/Qr/Index');
+ // return Inertia::render('Admin/Qr/Index');
+
+ $qrcodes = Qrcode::all();
+
+ return Inertia::render('Admin/Qr/Index', [
+ 'qrcodes' => $qrcodes,
+ ]);
}
}
diff --git a/app/Http/Controllers/Storage/StorageController.php b/app/Http/Controllers/Storage/StorageController.php
index d342a8a..90ef740 100644
--- a/app/Http/Controllers/Storage/StorageController.php
+++ b/app/Http/Controllers/Storage/StorageController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Storage;
use App\Http\Controllers\Controller;
+use App\Models\Storage;
use Illuminate\Http\Request;
use Inertia\Inertia;
@@ -10,6 +11,13 @@ class StorageController extends Controller
{
public function index()
{
- return Inertia::render('Admin/Storage/Index');
+ // return Inertia::render('Admin/Storage/Index');
+
+
+ $storage = Storage::all();
+
+ return Inertia::render('Admin/Storage/Index', [
+ 'storages' => $storage,
+ ]);
}
}
diff --git a/app/Models/Qrcode.php b/app/Models/Qrcode.php
new file mode 100644
index 0000000..dc7695b
--- /dev/null
+++ b/app/Models/Qrcode.php
@@ -0,0 +1,11 @@
+id();
+ $table->string('productName');
+ $table->integer('productId');
+ $table->string('itemName');
+ $table->integer('quantity_need');
+ $table->string('qrcode');
+ $table->string('barcode');
+ $table->integer('status');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('qrcodes');
+ }
+};
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index d0c46a7..33a4cfe 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -27,5 +27,9 @@ public function run(): void
$this->call([
StorageTableSeeder::class,
]);
+
+ $this->call([
+ QrcodeTableSeeder::class,
+ ]);
}
}
diff --git a/database/seeders/QrcodeTableSeeder.php b/database/seeders/QrcodeTableSeeder.php
new file mode 100644
index 0000000..fd09c2a
--- /dev/null
+++ b/database/seeders/QrcodeTableSeeder.php
@@ -0,0 +1,32 @@
+insert([
+ 'productName' => $faker->word(),
+ 'productId' => $faker->randomNumber(),
+ 'itemName' => $faker->word(),
+ 'quantity_need' => $faker->randomNumber(),
+ 'qrcode' => $faker->word(),
+ 'barcode' => $faker->word(),
+ 'status' => true,
+ ]);
+ }
+ }
+}
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 04cd026..a00d76b 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -26,7 +26,17 @@ import { Link } from "@inertiajs/react";
import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
import Create from "./Create";
-export default function Index({ auth, mustVerifyEmail, status }) {
+export default function Index({ auth, mustVerifyEmail, qrcodes }) {
+ const data = qrcodes.map((qrcode) => [
+ qrcode.productName,
+ qrcode.productId,
+ qrcode.itemName,
+ qrcode.quantity_need,
+ qrcode.qrcode,
+ qrcode.barcode,
+ qrcode.status,
+ ]);
+
const columns = [
"Product Name",
"Product ID",
@@ -36,306 +46,6 @@ export default function Index({ auth, mustVerifyEmail, status }) {
"Barcode",
"Status",
];
- const data = [
- [
- "Lenovo laptop",
- "ABC1234",
- "Lenovo",
- "1000",
- "qr-code-url-4",
- "barcode-url-4",
- "Active",
- ],
- [
- "Dell desktop",
- "DEF5678",
- "Dell",
- "800",
- "qr-code-url-5",
- "barcode-url-5",
- "Inactive",
- ],
- [
- "HP laptop",
- "GHI9012",
- "HP",
- "1200",
- "qr-code-url-6",
- "barcode-url-6",
- "Active",
- ],
- [
- "Apple MacBook",
- "JKL3456",
- "Apple",
- "2000",
- "qr-code-url-7",
- "barcode-url-7",
- "Active",
- ],
- // Add 65 more sample data entries here...
- [
- "Acer laptop",
- "MNO7890",
- "Acer",
- "950",
- "qr-code-url-8",
- "barcode-url-8",
- "Inactive",
- ],
- [
- "Asus desktop",
- "PQR1234",
- "Asus",
- "850",
- "qr-code-url-9",
- "barcode-url-9",
- "Active",
- ],
- [
- "Lenovo laptop",
- "STU5678",
- "Lenovo",
- "1100",
- "qr-code-url-10",
- "barcode-url-10",
- "Active",
- ],
- [
- "Dell desktop",
- "VWX9012",
- "Dell",
- "750",
- "qr-code-url-11",
- "barcode-url-11",
- "Inactive",
- ],
- [
- "HP laptop",
- "YZA3456",
- "HP",
- "1150",
- "qr-code-url-12",
- "barcode-url-12",
- "Active",
- ],
- [
- "Apple MacBook",
- "BCD6789",
- "Apple",
- "1950",
- "qr-code-url-13",
- "barcode-url-13",
- "Active",
- ],
- [
- "Acer laptop",
- "EFG1234",
- "Acer",
- "920",
- "qr-code-url-14",
- "barcode-url-14",
- "Inactive",
- ],
- [
- "Asus desktop",
- "HIJ5678",
- "Asus",
- "830",
- "qr-code-url-15",
- "barcode-url-15",
- "Active",
- ],
- [
- "Lenovo laptop",
- "KLM9012",
- "Lenovo",
- "1050",
- "qr-code-url-16",
- "barcode-url-16",
- "Active",
- ],
- [
- "Dell desktop",
- "NOP3456",
- "Dell",
- "720",
- "qr-code-url-17",
- "barcode-url-17",
- "Inactive",
- ],
- [
- "HP laptop",
- "QRS6789",
- "HP",
- "1100",
- "qr-code-url-18",
- "barcode-url-18",
- "Active",
- ],
- [
- "Apple MacBook",
- "TUV1234",
- "Apple",
- "1900",
- "qr-code-url-19",
- "barcode-url-19",
- "Active",
- ],
- [
- "Acer laptop",
- "WXY5678",
- "Acer",
- "890",
- "qr-code-url-20",
- "barcode-url-20",
- "Inactive",
- ],
- [
- "Asus desktop",
- "ZAB9012",
- "Asus",
- "810",
- "qr-code-url-21",
- "barcode-url-21",
- "Active",
- ],
- [
- "Lenovo laptop",
- "BCD3456",
- "Lenovo",
- "1030",
- "qr-code-url-22",
- "barcode-url-22",
- "Active",
- ],
- [
- "Dell desktop",
- "EFG6789",
- "Dell",
- "700",
- "qr-code-url-23",
- "barcode-url-23",
- "Inactive",
- ],
- [
- "HP laptop",
- "HIJ1234",
- "HP",
- "1075",
- "qr-code-url-24",
- "barcode-url-24",
- "Active",
- ],
- [
- "Apple MacBook",
- "KLM5678",
- "Apple",
- "1850",
- "qr-code-url-25",
- "barcode-url-25",
- "Active",
- ],
- [
- "Acer laptop",
- "NOP9012",
- "Acer",
- "870",
- "qr-code-url-26",
- "barcode-url-26",
- "Inactive",
- ],
- [
- "Asus desktop",
- "QRS3456",
- "Asus",
- "790",
- "qr-code-url-27",
- "barcode-url-27",
- "Active",
- ],
- [
- "Lenovo laptop",
- "TUV6789",
- "Lenovo",
- "1005",
- "qr-code-url-28",
- "barcode-url-28",
- "Active",
- ],
- [
- "Dell desktop",
- "WXY1234",
- "Dell",
- "680",
- "qr-code-url-29",
- "barcode-url-29",
- "Inactive",
- ],
- [
- "HP laptop",
- "ZAB5678",
- "HP",
- "1040",
- "qr-code-url-30",
- "barcode-url-30",
- "Active",
- ],
- [
- "Apple MacBook",
- "BCD9012",
- "Apple",
- "1800",
- "qr-code-url-31",
- "barcode-url-31",
- "Active",
- ],
- [
- "Acer laptop",
- "EFG3456",
- "Acer",
- "850",
- "qr-code-url-32",
- "barcode-url-32",
- "Inactive",
- ],
- [
- "Asus desktop",
- "HIJ6789",
- "Asus",
- "770",
- "qr-code-url-33",
- "barcode-url-33",
- "Active",
- ],
- [
- "Lenovo laptop",
- "KLM1234",
- "Lenovo",
- "980",
- "qr-code-url-34",
- "barcode-url-34",
- "Active",
- ],
- [
- "Dell desktop",
- "NOP5678",
- "Dell",
- "660",
- "qr-code-url-35",
- "barcode-url-35",
- "Inactive",
- ],
- [
- "HP laptop",
- "QRS9012",
- "HP",
- "1020",
- "qr-code-url-36",
- "barcode-url-36",
- "Active",
- ],
- ];
const options = {
filterType: "checkBox",
diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx
index e9e99da..3cdadd0 100644
--- a/resources/js/Pages/Admin/Storage/Index.jsx
+++ b/resources/js/Pages/Admin/Storage/Index.jsx
@@ -26,89 +26,22 @@ import { Link } from "@inertiajs/react";
import VerticalTabs from "@/Components/TabPanel";
import WidgetsIcon from "@mui/icons-material/Widgets";
-export default function Index({ auth, mustVerifyEmail, status }) {
+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",
+ // "Item Name",
"Quantity Needed",
"Status",
];
- const data = [
- ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
- ["HP Desktop", "DEF5678", "HP", "800", "Active"],
- ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
- ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
- ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
- // Add more entries here...
- ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
- ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
- ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
- ["HP Printer", "YZA3456", "HP", "250", "Active"],
- ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
- // Add more entries here...
- ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
- ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
- ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
- ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
- ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
- // Add more entries here...
- ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
- ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
- ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
- ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
- ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
- // Add more entries here...
- ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
- ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
- ["Apple Watch", "STU9012", "Apple", "400", "Active"],
- ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
- ["HP Scanner", "YZA7890", "HP", "150", "Active"],
- // Add more entries here...
- ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
- ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
- ["LG TV", "HIJ9012", "LG", "700", "Active"],
- ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
- ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
- ];
- const data1 = [
- ["Lenovo laptop", "ABC1234", "Lenovo", "1000", "Active"],
- ["HP Desktop", "DEF5678", "HP", "800", "Active"],
- ["Dell Monitor", "GHI9012", "Dell", "300", "Active"],
- ["Apple MacBook", "JKL3456", "Apple", "1500", "Active"],
- ["Acer Chromebook", "MNO7890", "Acer", "400", "Active"],
- // Add more entries here...
- ["Samsung Tablet", "PQR1234", "Samsung", "600", "Active"],
- ["Microsoft Surface", "STU5678", "Microsoft", "1200", "Active"],
- ["Asus Gaming Laptop", "VWX9012", "Asus", "1600", "Active"],
- ["HP Printer", "YZA3456", "HP", "250", "Active"],
- ["Dell Keyboard", "BCD7890", "Dell", "50", "Active"],
- // Add more entries here...
- ["Lenovo ThinkPad", "EFG1234", "Lenovo", "1200", "Active"],
- ["Apple iPad", "HIJ5678", "Apple", "700", "Active"],
- ["Acer Monitor", "KLM9012", "Acer", "350", "Active"],
- ["Sony VAIO Laptop", "NOP3456", "Sony", "900", "Active"],
- ["Toshiba External Hard Drive", "QRS7890", "Toshiba", "200", "Active"],
- // Add more entries here...
- ["Google Chromebook", "XYZ1234", "Google", "600", "Active"],
- ["HP Laptop", "ABC5678", "HP", "1100", "Active"],
- ["Dell Desktop", "DEF9012", "Dell", "850", "Active"],
- ["Microsoft Mouse", "GHI3456", "Microsoft", "30", "Active"],
- ["Samsung Smartphone", "JKL7890", "Samsung", "700", "Active"],
- // Add more entries here...
- ["Lenovo Yoga Laptop", "MNO1234", "Lenovo", "1300", "Active"],
- ["Acer Aspire", "PQR5678", "Acer", "550", "Active"],
- ["Apple Watch", "STU9012", "Apple", "400", "Active"],
- ["Asus Monitor", "VWX3456", "Asus", "300", "Active"],
- ["HP Scanner", "YZA7890", "HP", "150", "Active"],
- // Add more entries here...
- ["Dell Inspiron", "BCD1234", "Dell", "950", "Active"],
- ["Sony PlayStation", "EFG5678", "Sony", "300", "Active"],
- ["LG TV", "HIJ9012", "LG", "700", "Active"],
- ["Toshiba Laptop", "KLM3456", "Toshiba", "800", "Active"],
- ["Amazon Kindle", "NOP7890", "Amazon", "120", "Active"],
- ];
const options = {
filterType: "checkBox",
elevation: 0,
@@ -165,7 +98,7 @@ export default function Index({ auth, mustVerifyEmail, status }) {
From 0f74cfdb0a485cd54d6ae0e78747bcb24e2ee823 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 13:13:12 +0800
Subject: [PATCH 080/182] add-data-from-database
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 26 +++----------------
.../Pages/Admin/Management/Products/Index.jsx | 3 +--
routes/web.php | 12 +++++++--
3 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index 34aad37..e893bd0 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -14,29 +14,11 @@ import DashboardIcon from "@mui/icons-material/Dashboard";
import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
-export default function Index({ auth, mustVerifyEmail, status }) {
- const columns = ["Name", "Age", "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.email]);
- const data = [
- ["Jhunriz", "23", "Active"],
- ["Joshua", "22", "Active"],
- ["Emily", "25", "Inactive"],
- ["Liam", "28", "Active"],
- ["Sophia", "20", "Inactive"],
- ["Noah", "30", "Active"],
- ["Olivia", "24", "Inactive"],
- ["Aiden", "27", "Active"],
- ["Mia", "29", "Inactive"],
- ["Ella", "26", "Active"],
- ["Jackson", "31", "Active"],
- ["Ava", "19", "Inactive"],
- ["Logan", "27", "Active"],
- ["Emma", "22", "Inactive"],
- ["Landon", "24", "Active"],
- ["Grace", "28", "Inactive"],
- ["Carter", "25", "Active"],
- ["Zoe", "23", "Inactive"],
- ];
+ const columns = ["ID", "Email"];
// Now, you have a total of 108 rows in the `data` array.
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index 0e764a5..e75f67d 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -28,7 +28,6 @@ import Create from "./Create";
export default function Index({ auth, mustVerifyEmail, status, products }) {
const data = products.map((product) => [
- product.id,
product.productName,
product.productId,
product.itemName,
@@ -39,7 +38,7 @@ export default function Index({ auth, mustVerifyEmail, status, products }) {
"Product Name",
"Product ID",
"Item Name",
- "Quantity Needed",
+ // "Quantity Needed",
"Status",
];
diff --git a/routes/web.php b/routes/web.php
index 33ffc1e..6865307 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,5 +1,6 @@
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
@@ -80,4 +88,4 @@
-require __DIR__ . '/auth.php';
\ No newline at end of file
+require __DIR__ . '/auth.php';
From e1c370d15cadf007dbe329fc23bccab614d13d0b Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 13:15:23 +0800
Subject: [PATCH 081/182] responsive in add-qr-done
---
resources/js/Pages/Admin/Qr/Index.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index a00d76b..4b65207 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -104,7 +104,7 @@ export default function Index({ auth, mustVerifyEmail, qrcodes }) {
}
/>
-
+
Date: Mon, 25 Sep 2023 14:44:31 +0800
Subject: [PATCH 082/182] update-add-user
---
.../js/Pages/Admin/Management/User/Create.jsx | 344 +++++++++++-------
.../js/Pages/Admin/Management/User/Index.jsx | 97 ++++-
2 files changed, 303 insertions(+), 138 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx
index a0cc0e5..2b324a4 100644
--- a/resources/js/Pages/Admin/Management/User/Create.jsx
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -1,10 +1,20 @@
-import { Button, TextField } from "@mui/material";
-import React, { useState } from "react";
+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 } from "react";
+import { useForm } from "@inertiajs/react";
+import AddSharpIcon from "@mui/icons-material/AddSharp";
function Create() {
const [formData, setFormData] = useState({
@@ -26,19 +36,75 @@ function Create() {
// You can send this data to an API or perform other actions here.
};
+ // test sample
+
const [region, setRegion] = React.useState("");
const regionChange = (event) => {
setRegion(event.target.value);
};
- const options = [
+ 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) => {
@@ -54,129 +120,155 @@ function Create() {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Submit
-
-
-
+
+
}
+ >
+ Add User
+
+
+
+
+
+ Are you sure want to add your account?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Delete Account
+
+
+
+
+
);
}
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index bbcfb08..92381b1 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -24,6 +24,8 @@ 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";
export default function Index({ auth, mustVerifyEmail, status, users }) {
// this variable data with the code .map is help determine the backend
@@ -59,24 +61,95 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
},
];
+ // 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 },
+ ];
+
return (
-
}
- title={"Add User"}
- header={
-
- }
- content={
}
- />
+
From ddcccec55982d92f50eaa7de4dd99d34d5b5f846 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 14:46:26 +0800
Subject: [PATCH 083/182] change-typography-value-into-add-account
---
resources/js/Pages/Admin/Management/User/Create.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx
index 2b324a4..d1a4142 100644
--- a/resources/js/Pages/Admin/Management/User/Create.jsx
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -263,7 +263,7 @@ function Create() {
color="success"
type="submit"
>
- Delete Account
+ Add Account
From 73dd1929d6155d70dc6f0cca2c89b3691af48c97 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 15:35:03 +0800
Subject: [PATCH 084/182] add-user.name in the add user
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index e893bd0..5d2b9df 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -16,9 +16,9 @@ import { Link } from "@inertiajs/react";
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.email]);
+ const data = users.map((user) => [user.id, user.name, user.email]);
- const columns = ["ID", "Email"];
+ const columns = ["ID", "Name", "Email"];
// Now, you have a total of 108 rows in the `data` array.
From 604468612e778f0ea59b12945619c77fced83788 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 15:48:23 +0800
Subject: [PATCH 085/182] add-dialog-at-products
---
.../Admin/Management/Products/Create.jsx | 225 +++++++++++++-----
.../Pages/Admin/Management/Products/Index.jsx | 17 +-
2 files changed, 166 insertions(+), 76 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 410481c..1e9a3bc 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -1,10 +1,20 @@
-import { Button, TextField, TextareaAutosize } from "@mui/material";
-import React, { useState } from "react";
+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 } from "react";
+import { useForm } from "@inertiajs/react";
+import AddSharpIcon from "@mui/icons-material/AddSharp";
function Create() {
const [formData, setFormData] = useState({
@@ -26,19 +36,75 @@ function Create() {
// You can send this data to an API or perform other actions here.
};
- const [status, setStatus] = React.useState("");
+ // test sample
- const statusChange = (event) => {
- setStatus(event.target.value);
+ const [region, setRegion] = React.useState("");
+
+ const regionChange = (event) => {
+ setRegion(event.target.value);
};
- const options = [
+ const regions = [
{ label: "None", value: "" },
- { label: "Active", value: 10 },
- { label: "Inactive", value: 20 },
- { label: "Deactivated", value: 30 },
+ { 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) => {
@@ -52,59 +118,98 @@ function Create() {
{ label: "IS", value: 30 },
];
+ const [status, setStatus] = React.useState("");
+
+ const statusChange = (event) => {
+ setStatus(event.target.value);
+ };
+
+ const options = [
+ { label: "None", value: "" },
+ { label: "Active", value: 10 },
+ { label: "Inactive", value: 20 },
+ { label: "Deactivated", value: 30 },
+ ];
+
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Submit
-
-
-
+
+
}
+ >
+ Add User
+
+
+
+
+
+ Are you sure want to add your account?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Add Product
+
+
+
+
+
);
}
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index e75f67d..63cbfb3 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -82,22 +82,7 @@ export default function Index({ auth, mustVerifyEmail, status, products }) {
-
}
- title={"Add Product"}
- header={
-
- }
- content={
-
-
-
- }
- />
+
From 573b0ff3445e853afbc404a599afaa3f9e73e45a Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 15:55:42 +0800
Subject: [PATCH 086/182] add-dialog-in-qr-items
---
.../Admin/Management/Products/Create.jsx | 2 +-
resources/js/Pages/Admin/Qr/Create.jsx | 225 +++++++++++++-----
resources/js/Pages/Admin/Qr/Index.jsx | 17 +-
3 files changed, 167 insertions(+), 77 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 1e9a3bc..579fcb7 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -140,7 +140,7 @@ function Create() {
onClick={handleClickOpen}
startIcon={
}
>
- Add User
+ Add Product
diff --git a/resources/js/Pages/Admin/Qr/Create.jsx b/resources/js/Pages/Admin/Qr/Create.jsx
index 410481c..b0413ee 100644
--- a/resources/js/Pages/Admin/Qr/Create.jsx
+++ b/resources/js/Pages/Admin/Qr/Create.jsx
@@ -1,10 +1,20 @@
-import { Button, TextField, TextareaAutosize } from "@mui/material";
-import React, { useState } from "react";
+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 } from "react";
+import { useForm } from "@inertiajs/react";
+import AddSharpIcon from "@mui/icons-material/AddSharp";
function Create() {
const [formData, setFormData] = useState({
@@ -26,19 +36,75 @@ function Create() {
// You can send this data to an API or perform other actions here.
};
- const [status, setStatus] = React.useState("");
+ // test sample
- const statusChange = (event) => {
- setStatus(event.target.value);
+ const [region, setRegion] = React.useState("");
+
+ const regionChange = (event) => {
+ setRegion(event.target.value);
};
- const options = [
+ const regions = [
{ label: "None", value: "" },
- { label: "Active", value: 10 },
- { label: "Inactive", value: 20 },
- { label: "Deactivated", value: 30 },
+ { 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) => {
@@ -52,59 +118,98 @@ function Create() {
{ label: "IS", value: 30 },
];
+ const [status, setStatus] = React.useState("");
+
+ const statusChange = (event) => {
+ setStatus(event.target.value);
+ };
+
+ const options = [
+ { label: "None", value: "" },
+ { label: "Active", value: 10 },
+ { label: "Inactive", value: 20 },
+ { label: "Deactivated", value: 30 },
+ ];
+
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Submit
-
-
-
+
+
}
+ >
+ Add Item QR
+
+
+
+
+
+ Are you sure want to add your account?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Add Product
+
+
+
+
+
);
}
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 4b65207..5ab4c8f 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -87,22 +87,7 @@ export default function Index({ auth, mustVerifyEmail, qrcodes }) {
-
}
- title={"Add Record"}
- header={
-
- }
- content={
-
-
-
- }
- />
+
From e9e0cf2a82deff51598ee8c2d563b4b47eb8cb6d Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 16:14:00 +0800
Subject: [PATCH 087/182] product-dialog-responsive
---
resources/js/Pages/Admin/Management/Products/Create.jsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 579fcb7..861f24e 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -140,7 +140,7 @@ function Create() {
onClick={handleClickOpen}
startIcon={ }
>
- Add Product
+ Add User
@@ -149,7 +149,7 @@ function Create() {
Are you sure want to add your account?
-
+
Date: Mon, 25 Sep 2023 16:15:45 +0800
Subject: [PATCH 088/182] add-qr-code-dialog-responsive
---
resources/js/Pages/Admin/Qr/Create.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Pages/Admin/Qr/Create.jsx b/resources/js/Pages/Admin/Qr/Create.jsx
index b0413ee..4778104 100644
--- a/resources/js/Pages/Admin/Qr/Create.jsx
+++ b/resources/js/Pages/Admin/Qr/Create.jsx
@@ -185,7 +185,7 @@ function Create() {
Date: Mon, 25 Sep 2023 16:47:41 +0800
Subject: [PATCH 089/182] responsive-revise
---
resources/js/Pages/Admin/Management/Products/Create.jsx | 1 +
resources/js/Pages/Admin/Management/User/Create.jsx | 1 +
resources/js/Pages/Admin/Qr/Create.jsx | 1 +
3 files changed, 3 insertions(+)
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 861f24e..7d986f7 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -139,6 +139,7 @@ function Create() {
color="primary"
onClick={handleClickOpen}
startIcon={ }
+ className="w-full lg:w-36"
>
Add User
diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx
index d1a4142..0557b81 100644
--- a/resources/js/Pages/Admin/Management/User/Create.jsx
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -126,6 +126,7 @@ function Create() {
color="primary"
onClick={handleClickOpen}
startIcon={ }
+ className="w-full lg:w-36"
>
Add User
diff --git a/resources/js/Pages/Admin/Qr/Create.jsx b/resources/js/Pages/Admin/Qr/Create.jsx
index 4778104..90c1cac 100644
--- a/resources/js/Pages/Admin/Qr/Create.jsx
+++ b/resources/js/Pages/Admin/Qr/Create.jsx
@@ -139,6 +139,7 @@ function Create() {
color="primary"
onClick={handleClickOpen}
startIcon={ }
+ className="w-full lg:w-40"
>
Add Item QR
From d6c00b37d2f81cc2bbdef6c494306f53ede43332 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Mon, 25 Sep 2023 17:07:15 +0800
Subject: [PATCH 090/182] not-finish-storing-data
---
.../Management/UserManagementController.php | 10 ++++++++++
resources/js/Pages/Admin/Management/User/Create.jsx | 5 ++++-
routes/web.php | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/Http/Controllers/Management/UserManagementController.php b/app/Http/Controllers/Management/UserManagementController.php
index 6c7bfcd..c06205b 100644
--- a/app/Http/Controllers/Management/UserManagementController.php
+++ b/app/Http/Controllers/Management/UserManagementController.php
@@ -17,4 +17,14 @@ public function index()
'users' => $users,
]);
}
+
+ // public function store(Request $request)
+ // {
+ // $users = User::create([
+ // 'name' => $request->LastName,
+ // 'email' => $request->email,
+ // ]);
+
+ // return 'success';
+ // }
}
diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx
index 0557b81..e443d46 100644
--- a/resources/js/Pages/Admin/Management/User/Create.jsx
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -132,7 +132,8 @@ function Create() {
-
+
+ {/* */}
Are you sure want to add your account?
@@ -144,6 +145,7 @@ function Create() {
label="Last Name"
variant="outlined"
fullWidth
+ name="lastName"
size="small"
required
/>
@@ -168,6 +170,7 @@ function Create() {
id="outlined-basic"
label="Email Address"
variant="outlined"
+ name="email"
fullWidth
size="small"
required
diff --git a/routes/web.php b/routes/web.php
index 6865307..7a58303 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -60,6 +60,7 @@
// Management
Route::resource('/management', UserManagementController::class);
+ // Route::post('store', [UserManagementController::class, 'store'])->name('save');
Route::resource('/products', ProductManagementController::class);
// Qr code
From 3126c96738ecf20f810860cc3a055ca7c2d06c4b Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 09:49:19 +0800
Subject: [PATCH 091/182] update-design-and-inserting-not-finish
---
.../Management/UserManagementController.php | 16 +--
.../js/Pages/Admin/Management/User/Create.jsx | 118 +++++++++++-------
.../js/Pages/Admin/Management/User/Index.jsx | 9 +-
routes/web.php | 6 +-
4 files changed, 89 insertions(+), 60 deletions(-)
diff --git a/app/Http/Controllers/Management/UserManagementController.php b/app/Http/Controllers/Management/UserManagementController.php
index c06205b..0c8b780 100644
--- a/app/Http/Controllers/Management/UserManagementController.php
+++ b/app/Http/Controllers/Management/UserManagementController.php
@@ -18,13 +18,13 @@ public function index()
]);
}
- // public function store(Request $request)
- // {
- // $users = User::create([
- // 'name' => $request->LastName,
- // 'email' => $request->email,
- // ]);
+ public function store(Request $request)
+ {
+ $users = User::create([
+ 'name' => $request->LastName,
+ 'email' => $request->email,
+ ]);
- // return 'success';
- // }
+ return 'success';
+ }
}
diff --git a/resources/js/Pages/Admin/Management/User/Create.jsx b/resources/js/Pages/Admin/Management/User/Create.jsx
index e443d46..fef122e 100644
--- a/resources/js/Pages/Admin/Management/User/Create.jsx
+++ b/resources/js/Pages/Admin/Management/User/Create.jsx
@@ -17,24 +17,24 @@ import { useForm } from "@inertiajs/react";
import AddSharpIcon from "@mui/icons-material/AddSharp";
function Create() {
- const [formData, setFormData] = useState({
- name: "",
- email: "",
- });
+ // const [formData, setFormData] = useState({
+ // name: "",
+ // email: "",
+ // });
- const handleChange = (e) => {
- const { name, value } = e.target;
- setFormData({
- ...formData,
- [name]: value,
- });
- };
+ // const handleChange = (e) => {
+ // const { name, value } = e.target;
+ // setFormData({
+ // ...formData,
+ // [name]: value,
+ // });
+ // };
- const handleSubmit = (e) => {
- e.preventDefault();
- console.log("Form data submitted:", formData);
- // You can send this data to an API or perform other actions here.
- };
+ // const handleSubmit = (e) => {
+ // e.preventDefault();
+ // console.log("Form data submitted:", formData);
+ // // You can send this data to an API or perform other actions here.
+ // };
// test sample
@@ -63,39 +63,39 @@ function Create() {
setOpen(false);
};
- const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
- const passwordInput = useRef();
-
- const {
- data1,
- setData,
- delete: destroy,
- processing,
- reset,
- errors,
- } = useForm({
- password: "",
- });
+ // const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
+ // const passwordInput = useRef();
- const confirmUserDeletion = () => {
- setConfirmingUserDeletion(true);
- };
+ // const {
+ // data1,
+ // setData,
+ // delete: destroy,
+ // processing,
+ // reset,
+ // errors,
+ // } = useForm({
+ // password: "",
+ // });
- const deleteUser = (e) => {
- e.preventDefault();
+ // const confirmUserDeletion = () => {
+ // setConfirmingUserDeletion(true);
+ // };
- 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 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);
@@ -118,6 +118,30 @@ function Create() {
{ label: "IS", value: 30 },
];
+ // submmit to store
+
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ });
+
+ const handleChange = (e) => {
+ setFormData({ ...formData, [e.target.name]: e.target.value });
+ };
+
+ const handleSubmit = async (e) => {
+ e.preventDefault();
+
+ try {
+ const response = await axios.post("/api/users", formData);
+ console.log(response.data);
+ // Handle success, e.g., show a success message or redirect
+ } catch (error) {
+ console.error(error.response.data);
+ // Handle errors, e.g., display validation errors
+ }
+ };
+
return (
@@ -132,7 +156,7 @@ function Create() {
-
+
{/* */}
Are you sure want to add your account?
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index 92381b1..c980dd7 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -26,12 +26,17 @@ 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";
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.email]);
+ const data = users.map((user) => [
+ user.id,
+ user.email,
+ , // Replace 'insert_icon_name_here' with the actual icon name
+ ]);
- const columns = ["ID", "Email"];
+ const columns = ["ID", "Email", ""];
const options = {
filterType: "checkBox",
diff --git a/routes/web.php b/routes/web.php
index 7a58303..940fd70 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -60,7 +60,7 @@
// Management
Route::resource('/management', UserManagementController::class);
- // Route::post('store', [UserManagementController::class, 'store'])->name('save');
+ Route::post('store', [UserManagementController::class, 'store'])->name('save');
Route::resource('/products', ProductManagementController::class);
// Qr code
@@ -80,8 +80,8 @@
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
- // Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
- // Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
+ Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
+ Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
});
From 4edb0b1aa10a06cb8a99eb7fad8f5d4438cd1015 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 09:55:21 +0800
Subject: [PATCH 092/182] arrow in table fix
---
resources/js/Pages/Admin/Management/Products/Index.jsx | 3 +++
resources/js/Pages/Admin/Qr/Index.jsx | 3 +++
resources/js/Pages/Admin/Storage/Index.jsx | 3 +++
3 files changed, 9 insertions(+)
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index 63cbfb3..fcf361c 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -24,6 +24,7 @@ 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";
import Create from "./Create";
export default function Index({ auth, mustVerifyEmail, status, products }) {
@@ -32,6 +33,7 @@ export default function Index({ auth, mustVerifyEmail, status, products }) {
product.productId,
product.itemName,
product.status,
+ ,
]);
const columns = [
@@ -40,6 +42,7 @@ export default function Index({ auth, mustVerifyEmail, status, products }) {
"Item Name",
// "Quantity Needed",
"Status",
+ "",
];
const options = {
diff --git a/resources/js/Pages/Admin/Qr/Index.jsx b/resources/js/Pages/Admin/Qr/Index.jsx
index 5ab4c8f..1c521f5 100644
--- a/resources/js/Pages/Admin/Qr/Index.jsx
+++ b/resources/js/Pages/Admin/Qr/Index.jsx
@@ -25,6 +25,7 @@ import GrainIcon from "@mui/icons-material/Grain";
import { Link } from "@inertiajs/react";
import QrCode2SharpIcon from "@mui/icons-material/QrCode2Sharp";
import Create from "./Create";
+import EastIcon from "@mui/icons-material/East";
export default function Index({ auth, mustVerifyEmail, qrcodes }) {
const data = qrcodes.map((qrcode) => [
@@ -35,6 +36,7 @@ export default function Index({ auth, mustVerifyEmail, qrcodes }) {
qrcode.qrcode,
qrcode.barcode,
qrcode.status,
+ ,
]);
const columns = [
@@ -45,6 +47,7 @@ export default function Index({ auth, mustVerifyEmail, qrcodes }) {
"QR-Code",
"Barcode",
"Status",
+ "",
];
const options = {
diff --git a/resources/js/Pages/Admin/Storage/Index.jsx b/resources/js/Pages/Admin/Storage/Index.jsx
index 3cdadd0..1afdd59 100644
--- a/resources/js/Pages/Admin/Storage/Index.jsx
+++ b/resources/js/Pages/Admin/Storage/Index.jsx
@@ -25,6 +25,7 @@ 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) => [
@@ -33,6 +34,7 @@ export default function Index({ auth, mustVerifyEmail, storages }) {
storage.productId,
storage.itemName,
storage.status,
+ ,
]);
const columns = [
"Product Name",
@@ -40,6 +42,7 @@ export default function Index({ auth, mustVerifyEmail, storages }) {
// "Item Name",
"Quantity Needed",
"Status",
+ "",
];
const options = {
From 5d8cfba491060bb75a56cfe0f640109d75c14331 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 10:22:40 +0800
Subject: [PATCH 093/182] asdfsdf
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index 5d2b9df..f856f60 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -11,15 +11,18 @@ 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 GrainIcon from "@mui/icons-material/Grain";
+
import { Link } from "@inertiajs/react";
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]);
-
- const columns = ["ID", "Name", "Email"];
+ const data = users.map(
+ (user) => [user.id, user.name, user.email],
+
+ );
+ const columns = ["ID", "Name", "Email", " "];
+ z``;
// Now, you have a total of 108 rows in the `data` array.
const options = {
From 644e4a6fa0a1ba78f178bc1d01308ffab064488d Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 10:32:07 +0800
Subject: [PATCH 094/182] rename the department into branch
---
.../js/Pages/Admin/Management/Products/Create.jsx | 14 ++++++--------
resources/js/Pages/Admin/Qr/Create.jsx | 8 ++++----
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Create.jsx b/resources/js/Pages/Admin/Management/Products/Create.jsx
index 7d986f7..4e3a616 100644
--- a/resources/js/Pages/Admin/Management/Products/Create.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Create.jsx
@@ -113,9 +113,9 @@ function Create() {
const departmentoptions = [
{ label: "None", value: "" },
- { label: "IT", value: 10 },
- { label: "Computer Science", value: 20 },
- { label: "IS", value: 30 },
+ { label: "EasyPC", value: 10 },
+ { label: "Greenhills", value: 20 },
+ { label: "Gilmore", value: 30 },
];
const [status, setStatus] = React.useState("");
@@ -146,11 +146,9 @@ function Create() {
-
- Are you sure want to add your account?
-
+ Add your products!
-
+
Date: Tue, 26 Sep 2023 10:45:16 +0800
Subject: [PATCH 095/182] edit-error-done
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index f856f60..fe735e7 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -11,6 +11,7 @@ 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 { Link } from "@inertiajs/react";
@@ -22,7 +23,6 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
);
const columns = ["ID", "Name", "Email", " "];
- z``;
// Now, you have a total of 108 rows in the `data` array.
const options = {
From 5691eb0d60da6c61530bce1a4de7d9648995de06 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 11:34:59 +0800
Subject: [PATCH 096/182] change the typo-errors
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 12 +++++++-----
resources/js/Pages/Admin/Management/User/Index.jsx | 3 ++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index fe735e7..c29009c 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -17,12 +17,14 @@ import { Link } from "@inertiajs/react";
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],
-
- );
+ 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", " "];
+ const columns = ["ID", "Name", "Email", ""];
// Now, you have a total of 108 rows in the `data` array.
const options = {
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index c980dd7..ccf03e9 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -32,11 +32,12 @@ 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", "Email", ""];
+ const columns = ["ID", "Name", "Email", ""];
const options = {
filterType: "checkBox",
From 11561aca072d48868565ddc73a2d0c439a95d210 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 11:44:05 +0800
Subject: [PATCH 097/182] add-message-dropdownNotification
---
.../js/Components/MessageNotification.jsx | 95 +++++++++++++++++++
resources/js/Layouts/MainLayout.jsx | 66 ++++++++++---
resources/js/Pages/Admin/Dashboard/Index.jsx | 8 +-
3 files changed, 154 insertions(+), 15 deletions(-)
create mode 100644 resources/js/Components/MessageNotification.jsx
diff --git a/resources/js/Components/MessageNotification.jsx b/resources/js/Components/MessageNotification.jsx
new file mode 100644
index 0000000..32bcbd0
--- /dev/null
+++ b/resources/js/Components/MessageNotification.jsx
@@ -0,0 +1,95 @@
+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";
+
+export default function MessageNotification() {
+ 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/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index eb606e6..1fe0591 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -47,11 +47,6 @@ import {
} from "@mui/material";
import { Logout, PersonAdd, Settings } from "@mui/icons-material";
-import FileCopyIcon from "@mui/icons-material/FileCopyOutlined";
-import SaveIcon from "@mui/icons-material/Save";
-import PrintIcon from "@mui/icons-material/Print";
-import ShareIcon from "@mui/icons-material/Share";
-import EditIcon from "@mui/icons-material/Edit";
import CustomSpeedDial from "@/Components/CustomSpeedDial";
import HomeIcon from "@mui/icons-material/Home";
import WhatshotIcon from "@mui/icons-material/Whatshot";
@@ -60,8 +55,8 @@ 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 NotificationsActiveIcon from "@mui/icons-material/NotificationsActive";
import EmailIcon from "@mui/icons-material/Email";
+import MessageNotification from "@/Components/MessageNotification";
const drawerWidth = 240;
const Main = styled("main", { shouldForwardProp: (prop) => prop !== "open" })(
@@ -266,6 +261,20 @@ export default function MainLayout({ user, children }) {
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 (
@@ -296,12 +305,45 @@ export default function MainLayout({ user, children }) {
}}
>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -84,8 +85,9 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
-
-
+
+
+
Date: Tue, 26 Sep 2023 12:08:10 +0800
Subject: [PATCH 098/182] add message dropdown notification
---
resources/js/Pages/Admin/Dashboard/Index.jsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/resources/js/Pages/Admin/Dashboard/Index.jsx b/resources/js/Pages/Admin/Dashboard/Index.jsx
index de0d674..65d79c6 100644
--- a/resources/js/Pages/Admin/Dashboard/Index.jsx
+++ b/resources/js/Pages/Admin/Dashboard/Index.jsx
@@ -53,7 +53,7 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
return (
-
+
}
title="To Be Order"
@@ -73,7 +73,7 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
/>
-
+
@@ -86,7 +86,7 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
-
+
Date: Tue, 26 Sep 2023 12:12:50 +0800
Subject: [PATCH 099/182] responsive was done
---
resources/js/Pages/Admin/Management/Products/Index.jsx | 2 +-
resources/js/Pages/Admin/Management/User/Index.jsx | 2 +-
resources/js/Pages/Admin/Qr/Index.jsx | 2 +-
resources/js/Pages/Admin/Storage/Index.jsx | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/resources/js/Pages/Admin/Management/Products/Index.jsx b/resources/js/Pages/Admin/Management/Products/Index.jsx
index fcf361c..16b71ec 100644
--- a/resources/js/Pages/Admin/Management/Products/Index.jsx
+++ b/resources/js/Pages/Admin/Management/Products/Index.jsx
@@ -87,7 +87,7 @@ export default function Index({ auth, mustVerifyEmail, status, products }) {
-
+
{/* Mobile View */}
diff --git a/resources/js/Pages/Admin/Management/User/Index.jsx b/resources/js/Pages/Admin/Management/User/Index.jsx
index ccf03e9..8574083 100644
--- a/resources/js/Pages/Admin/Management/User/Index.jsx
+++ b/resources/js/Pages/Admin/Management/User/Index.jsx
@@ -157,7 +157,7 @@ export default function Index({ auth, mustVerifyEmail, status, users }) {
-
+
-
+
+
+
Date: Tue, 26 Sep 2023 13:38:33 +0800
Subject: [PATCH 100/182] update the message design
---
resources/js/Layouts/MainLayout.jsx | 36 +++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 1fe0591..6689ebe 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -339,6 +339,42 @@ export default function MainLayout({ user, children }) {
anchorEl={messageEl}
open={Boolean(messageEl)}
onClose={MessagehandleClose}
+ PaperProps={{
+ elevation: 0,
+ sx: {
+ overflow: "visible",
+ filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
+ mt: 1.5,
+ "& .MuiAvatar-root": {
+ width: 32,
+ height: 32,
+ ml: -0.5,
+ mr: 1,
+ },
+ "&:before": {
+ content: '""',
+ display: "block",
+ position: "absolute",
+ top: 0,
+ right: 14,
+ width: 10,
+ height: 10,
+ bgcolor:
+ "background.paper",
+ transform:
+ "translateY(-50%) rotate(45deg)",
+ zIndex: 0,
+ },
+ },
+ }}
+ transformOrigin={{
+ horizontal: "right",
+ vertical: "top",
+ }}
+ anchorOrigin={{
+ horizontal: "right",
+ vertical: "bottom",
+ }}
>
From 07af4151ca4782d18658daf398d73519ffd43152 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 13:47:46 +0800
Subject: [PATCH 101/182] make the badge the color to warning color
---
resources/js/Layouts/MainLayout.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 6689ebe..9ae42ed 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -325,7 +325,7 @@ export default function MainLayout({ user, children }) {
>
Date: Tue, 26 Sep 2023 13:57:55 +0800
Subject: [PATCH 102/182] dropdown redesign
---
resources/js/Layouts/MainLayout.jsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/resources/js/Layouts/MainLayout.jsx b/resources/js/Layouts/MainLayout.jsx
index 9ae42ed..619d6dd 100644
--- a/resources/js/Layouts/MainLayout.jsx
+++ b/resources/js/Layouts/MainLayout.jsx
@@ -343,13 +343,13 @@ export default function MainLayout({ user, children }) {
elevation: 0,
sx: {
overflow: "visible",
- filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
+ filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.202))",
mt: 1.5,
"& .MuiAvatar-root": {
width: 32,
height: 32,
- ml: -0.5,
- mr: 1,
+ ml: -0.0,
+ mr: 2,
},
"&:before": {
content: '""',
@@ -414,7 +414,7 @@ export default function MainLayout({ user, children }) {
sx: {
overflow: "visible",
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
- mt: 1.5,
+ mt: 0.5,
"& .MuiAvatar-root": {
width: 32,
height: 32,
@@ -426,7 +426,7 @@ export default function MainLayout({ user, children }) {
display: "block",
position: "absolute",
top: 0,
- right: 14,
+ right: 23,
width: 10,
height: 10,
bgcolor: "background.paper",
From b9318ebab63c1b0a518d8e1aaaa6262e96dd74c8 Mon Sep 17 00:00:00 2001
From: Jhunriz <93062821+Jhunriz@users.noreply.github.com>
Date: Tue, 26 Sep 2023 14:43:46 +0800
Subject: [PATCH 103/182] design the messagenotification
---
resources/js/Components/MessageNotification.jsx | 15 +++++++++------
resources/js/Pages/Admin/Dashboard/Index.jsx | 6 +++---
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/resources/js/Components/MessageNotification.jsx b/resources/js/Components/MessageNotification.jsx
index 32bcbd0..22f89cd 100644
--- a/resources/js/Components/MessageNotification.jsx
+++ b/resources/js/Components/MessageNotification.jsx
@@ -6,18 +6,16 @@ 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() {
+export default function MessageNotification({ user }) {
return (