fix: Update filament edit page to use temperature ranges
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Edit, useForm, useSelect } from "@refinedev/antd";
|
||||
import { HttpError, IResourceComponentsProps, useTranslate } from "@refinedev/core";
|
||||
import { Alert, ColorPicker, DatePicker, Form, Input, InputNumber, message, Radio, Select, Typography } from "antd";
|
||||
import { Alert, ColorPicker, DatePicker, Form, Input, InputNumber, message, Radio, Select, Space, Typography } from "antd";
|
||||
import TextArea from "antd/es/input/TextArea";
|
||||
import dayjs from "dayjs";
|
||||
import React, { useEffect, useState } from "react";
|
||||
@@ -288,31 +288,43 @@ export const FilamentEdit: React.FC<IResourceComponentsProps> = () => {
|
||||
>
|
||||
<InputNumber addonAfter="g" precision={1} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("filament.fields.settings_extruder_temp")}
|
||||
name={["settings_extruder_temp"]}
|
||||
rules={[
|
||||
{
|
||||
required: false,
|
||||
type: "number",
|
||||
min: 0,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber addonAfter="°C" precision={0} />
|
||||
<Form.Item label={t("filament.fields.settings_extruder_temp")}>
|
||||
<Space.Compact>
|
||||
<Form.Item
|
||||
name={["settings_extruder_temp_min"]}
|
||||
noStyle
|
||||
rules={[{ type: "number", min: 0 }]}
|
||||
>
|
||||
<InputNumber placeholder={t("filament.fields.temp_min")} addonAfter="°C" precision={0} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
<span style={{ padding: "4px 8px", background: "#fafafa", border: "1px solid #d9d9d9", borderLeft: 0, borderRight: 0 }}>-</span>
|
||||
<Form.Item
|
||||
name={["settings_extruder_temp_max"]}
|
||||
noStyle
|
||||
rules={[{ type: "number", min: 0 }]}
|
||||
>
|
||||
<InputNumber placeholder={t("filament.fields.temp_max")} addonAfter="°C" precision={0} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
</Space.Compact>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("filament.fields.settings_bed_temp")}
|
||||
name={["settings_bed_temp"]}
|
||||
rules={[
|
||||
{
|
||||
required: false,
|
||||
type: "number",
|
||||
min: 0,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber addonAfter="°C" precision={0} />
|
||||
<Form.Item label={t("filament.fields.settings_bed_temp")}>
|
||||
<Space.Compact>
|
||||
<Form.Item
|
||||
name={["settings_bed_temp_min"]}
|
||||
noStyle
|
||||
rules={[{ type: "number", min: 0 }]}
|
||||
>
|
||||
<InputNumber placeholder={t("filament.fields.temp_min")} addonAfter="°C" precision={0} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
<span style={{ padding: "4px 8px", background: "#fafafa", border: "1px solid #d9d9d9", borderLeft: 0, borderRight: 0 }}>-</span>
|
||||
<Form.Item
|
||||
name={["settings_bed_temp_max"]}
|
||||
noStyle
|
||||
rules={[{ type: "number", min: 0 }]}
|
||||
>
|
||||
<InputNumber placeholder={t("filament.fields.temp_max")} addonAfter="°C" precision={0} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
</Space.Compact>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("filament.fields.article_number")}
|
||||
|
||||
Reference in New Issue
Block a user