mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-12 22:11:54 +00:00
updated add and edit items to use TextInput
This commit is contained in:
@@ -86,7 +86,7 @@ function AddItem() {
|
|||||||
wrap="wrap">
|
wrap="wrap">
|
||||||
|
|
||||||
<Title order={1}>Add Item</Title>
|
<Title order={1}>Add Item</Title>
|
||||||
<NumberInput withAsterisk size="md" key={newItemForm.key('barcode')} label="Barcode"
|
<TextInput withAsterisk size="md" key={newItemForm.key('barcode')} label="Barcode"
|
||||||
placeholder="Barcode" {...newItemForm.getInputProps('barcode')}/>
|
placeholder="Barcode" {...newItemForm.getInputProps('barcode')}/>
|
||||||
<TextInput withAsterisk key={newItemForm.key('brand')} size="md" label="Brand"
|
<TextInput withAsterisk key={newItemForm.key('brand')} size="md" label="Brand"
|
||||||
placeholder="Brand" {...newItemForm.getInputProps('brand')}/>
|
placeholder="Brand" {...newItemForm.getInputProps('brand')}/>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function EditItem() {
|
|||||||
const editItemForm = useForm<EditableInventoryItem>({
|
const editItemForm = useForm<EditableInventoryItem>({
|
||||||
mode: 'uncontrolled',
|
mode: 'uncontrolled',
|
||||||
initialValues: {
|
initialValues: {
|
||||||
barcode: 0,
|
barcode: "",
|
||||||
name: "",
|
name: "",
|
||||||
brand: "",
|
brand: "",
|
||||||
statusId: "",
|
statusId: "",
|
||||||
@@ -113,7 +113,7 @@ function EditItem() {
|
|||||||
|
|
||||||
<div>{isFetching ? 'Updating...' : ''}</div>
|
<div>{isFetching ? 'Updating...' : ''}</div>
|
||||||
<Title order={1}>Edit Item</Title>
|
<Title order={1}>Edit Item</Title>
|
||||||
<NumberInput withAsterisk size="md" key={editItemForm.key('barcode')} label="Barcode"
|
<TextInput withAsterisk size="md" key={editItemForm.key('barcode')} label="Barcode"
|
||||||
placeholder="Barcode" {...editItemForm.getInputProps('barcode')}/>
|
placeholder="Barcode" {...editItemForm.getInputProps('barcode')}/>
|
||||||
<TextInput withAsterisk key={editItemForm.key('brand')} size="md" label="Brand"
|
<TextInput withAsterisk key={editItemForm.key('brand')} size="md" label="Brand"
|
||||||
placeholder="Brand" {...editItemForm.getInputProps('brand')}/>
|
placeholder="Brand" {...editItemForm.getInputProps('brand')}/>
|
||||||
|
|||||||
Reference in New Issue
Block a user