Skip to content

Commit

Permalink
add external id to filament and vendor edit pages
Browse files Browse the repository at this point in the history
  • Loading branch information
TomW1605 committed Oct 26, 2024
1 parent b74b7e0 commit 761a497
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion client/src/pages/filaments/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HttpError, IResourceComponentsProps, useTranslate } from "@refinedev/co
import { Alert, ColorPicker, DatePicker, Form, Input, InputNumber, message, Radio, Select, Typography } from "antd";
import TextArea from "antd/es/input/TextArea";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import React, { useEffect, useState } from "react";
import { ExtraFieldFormItem, ParsedExtras, StringifiedExtras } from "../../components/extraFields";
import { MultiColorPicker } from "../../components/multiColorPicker";
import { numberFormatter, numberParser } from "../../utils/parsing";
Expand Down Expand Up @@ -324,6 +324,17 @@ export const FilamentEdit: React.FC<IResourceComponentsProps> = () => {
>
<Input maxLength={64} />
</Form.Item>
<Form.Item
label={t("filament.fields.external_id")}
name={["external_id"]}
rules={[
{
required: false,
},
]}
>
<Input maxLength={64} />
</Form.Item>
<Form.Item
label={t("filament.fields.comment")}
name={["comment"]}
Expand Down
11 changes: 11 additions & 0 deletions client/src/pages/vendors/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ export const VendorEdit: React.FC<IResourceComponentsProps> = () => {
>
<InputNumber addonAfter="g" precision={1} />
</Form.Item>
<Form.Item
label={t("vendor.fields.external_id")}
name={["external_id"]}
rules={[
{
required: false,
},
]}
>
<Input maxLength={64} />
</Form.Item>
<Typography.Title level={5}>{t("settings.extra_fields.tab")}</Typography.Title>
{extraFields.data?.map((field, index) => (
<ExtraFieldFormItem key={index} field={field} />
Expand Down

0 comments on commit 761a497

Please sign in to comment.