Ignore:
Timestamp:
12/13/22 22:38:11 (19 months ago)
Author:
Nace Gjorgjievski <nace.gorgievski123@…>
Branches:
master
Parents:
113029b
Message:

Final Version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/screens/AdminAddProductScreen.js

    r113029b ra2e5735  
    2020  const [dimension, setDimension] = useState("");
    2121  const [scheme, setScheme] = useState("");
     22  const [H, setH] = useState("");
     23  const [W, setW] = useState("");
     24  const [L, setL] = useState("");
    2225  const [message, setMessage] = useState("");
    2326
     
    5659    formData.append("dimension", dimension);
    5760    formData.append("scheme", scheme);
    58 
     61    formData.append("H", H);
     62    formData.append("W", W);
     63    formData.append("L", L);
    5964    try {
    6065      const result = await axios.post("/api/products/add", formData);
     
    7681            Додади нов производ
    7782          </div>
     83        </Link>
     84        <Link
     85          to={"/admin/addCategory"}
     86          style={{ textDecoration: "none", width: "100%" }}
     87        >
     88          <div className="dashboard-btn">Додади категорија</div>
    7889        </Link>
    7990        <Link
     
    351362              </div>
    352363              <div>
     364                <Form.Group
     365                  style={{ display: "flex", justifyContent: "space-around" }}
     366                >
     367                  <div
     368                    style={{
     369                      display: "flex",
     370                      flexDirection: "row",
     371                      alignItems: "center",
     372                    }}
     373                  >
     374                    <Form.Label>H:</Form.Label>
     375                    <Form.Control
     376                      type="text"
     377                      name="dimension"
     378                      style={{ width: "60px" }}
     379                      value={H}
     380                      onChange={(e) => setH(e.target.value)}
     381                      required
     382                    ></Form.Control>
     383                  </div>
     384                  <div
     385                    style={{
     386                      display: "flex",
     387                      flexDirection: "row",
     388                      alignItems: "center",
     389                    }}
     390                  >
     391                    <Form.Label>W:</Form.Label>
     392                    <Form.Control
     393                      type="text"
     394                      name="dimension"
     395                      value={W}
     396                      onChange={(e) => setW(e.target.value)}
     397                      style={{ width: "60px" }}
     398                      required
     399                    ></Form.Control>
     400                  </div>
     401                  <div
     402                    style={{
     403                      display: "flex",
     404                      flexDirection: "row",
     405                      alignItems: "center",
     406                    }}
     407                  >
     408                    <Form.Label>L:</Form.Label>
     409                    <Form.Control
     410                      type="text"
     411                      name="dimension"
     412                      style={{ width: "60px" }}
     413                      value={L}
     414                      onChange={(e) => setL(e.target.value)}
     415                      required
     416                    ></Form.Control>
     417                  </div>
     418                </Form.Group>
    353419                <Form.Group>
    354420                  <Form.Label>Слика со димензии</Form.Label>
Note: See TracChangeset for help on using the changeset viewer.