diff --git a/src/frontend/src/features/addNote/model/addNoteSlice.ts b/src/frontend/src/features/addNote/model/addNoteSlice.ts index f8a8e1c56..501e3c4ac 100644 --- a/src/frontend/src/features/addNote/model/addNoteSlice.ts +++ b/src/frontend/src/features/addNote/model/addNoteSlice.ts @@ -59,8 +59,6 @@ export const addNoteSlice = createSlice({ } }, - // TODO: productEdited - productSaved: (state, { payload }: PayloadAction) => { if (state.draft) { state.draft.product = { diff --git a/src/frontend/src/features/addNote/ui/QuantityForm.tsx b/src/frontend/src/features/addNote/ui/NoteForm.tsx similarity index 94% rename from src/frontend/src/features/addNote/ui/QuantityForm.tsx rename to src/frontend/src/features/addNote/ui/NoteForm.tsx index e4ee169ad..4264fb084 100644 --- a/src/frontend/src/features/addNote/ui/QuantityForm.tsx +++ b/src/frontend/src/features/addNote/ui/NoteForm.tsx @@ -1,5 +1,5 @@ import { zodResolver } from '@hookform/resolvers/zod'; -import BackspaceIcon from '@mui/icons-material/Backspace'; +import CancelIcon from '@mui/icons-material/Cancel'; import { IconButton, InputAdornment, TextField } from '@mui/material'; import { type FC } from 'react'; import { Controller, useForm } from 'react-hook-form'; @@ -15,7 +15,7 @@ const schema = z.object({ type FormValues = z.infer; -export const QuantityForm: FC = () => { +export const NoteForm: FC = () => { const { control, formState, handleSubmit } = useForm({ mode: 'onChange', resolver: zodResolver(schema), @@ -52,10 +52,9 @@ export const QuantityForm: FC = () => { slotProps={{ input: { readOnly: true, - // TODO: drop endAdornment: ( dispatch(actions.productDiscarded())}> - + ), }, diff --git a/src/frontend/src/features/addNote/ui/NoteInputFlow.tsx b/src/frontend/src/features/addNote/ui/NoteInputFlow.tsx index 8701f2968..9bc2325fd 100644 --- a/src/frontend/src/features/addNote/ui/NoteInputFlow.tsx +++ b/src/frontend/src/features/addNote/ui/NoteInputFlow.tsx @@ -5,8 +5,8 @@ import { type productModel } from '@/entities/product'; import { type SelectOption } from '@/shared/types'; import { actions } from '../model'; import { type ProductFormValues } from '../model/productForm'; +import { NoteForm } from './NoteForm'; import { ProductForm } from './ProductForm'; -import { QuantityForm } from './QuantityForm'; import { SearchProducts } from './SearchProducts'; const toProductFormValues = ( @@ -39,5 +39,5 @@ export const NoteInputFlow: FC = () => { ); } - return ; + return ; };