From 72a451a710c482d78c65611dae89e5fc442c90fc Mon Sep 17 00:00:00 2001 From: Igor Barcik Date: Thu, 26 Oct 2023 11:54:28 +0200 Subject: [PATCH] Add Chropowatosc --- src/configure.tsx | 2 +- src/features/Home/HomePage.tsx | 82 ++++++++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 15 deletions(-) diff --git a/src/configure.tsx b/src/configure.tsx index 9089494..e199cb1 100644 --- a/src/configure.tsx +++ b/src/configure.tsx @@ -85,7 +85,7 @@ export interface CustomRouteObject extends Omit { //Main configuration, static data, mostly used here export const main = { program_name: viteEnv.VITE_APP_NAME, - program_version: "1.1.0", + program_version: "1.2.0", }; //About page configuration export const about = { diff --git a/src/features/Home/HomePage.tsx b/src/features/Home/HomePage.tsx index 9505a90..53ca2a9 100644 --- a/src/features/Home/HomePage.tsx +++ b/src/features/Home/HomePage.tsx @@ -5,6 +5,11 @@ const lists = { rodzajObrobki: ["Zgrubna", "Wykończeniowa"], material: ["Stal węglowa", "Stal nierdzewna", "Żeliwo"], }; +const listsLabels = { + rodzajFrezowania: "Rodzaj Frezowania", + rodzajObrobki: "Rodzaj Obróbki", + material: "Material", +}; import { ChangeEvent } from "react"; interface SelectProps { @@ -15,18 +20,15 @@ interface SelectProps { disabledLabel: string; } -const Select = ({ value, onChange, options, label, disabledLabel }: SelectProps) => ( -
- - -
+const Select = ({ value, onChange, options, disabledLabel }: SelectProps) => ( + ); const HomePage = () => { @@ -37,6 +39,7 @@ const HomePage = () => { glebokoscSkrawania: Math.floor(Math.random() * 50 + 1), szerokoscSkrawania: Math.floor(Math.random() * 30 + 1), tolerancja: parseFloat((0.1 + Math.random() * (5 - 0.1)).toFixed(2)), + chropowatosc: parseFloat((0.1 + Math.random() * (5 - 0.1)).toFixed(2)), }); const handleChange = (key: keyof typeof state) => (e: React.ChangeEvent) => { @@ -50,7 +53,19 @@ const HomePage = () => {

Wybór parametrów

{Object.keys(lists).map((key) => ( - +
))} @@ -134,12 +149,48 @@ const HomePage = () => { mm + +
+ { + setState((prev) => ({ ...prev, chropowatosc: Number(e.target.value) })); + }} + step={0.01} + /> +
+ { + setState((prev) => ({ ...prev, chropowatosc: Number(e.target.value) })); + }} + className="input input-secondary w-20" + type="number" + min={0.1} + max={5} + step={0.01} + /> + mm +
+