From a18702813b0a768317916fbefa9c672d90814cc2 Mon Sep 17 00:00:00 2001 From: sparakala21 Date: Tue, 3 Oct 2023 20:20:52 +0000 Subject: [PATCH 01/30] added a delete button --- .../app/components/unit/EditUnitModalComponent.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client/app/components/unit/EditUnitModalComponent.tsx b/src/client/app/components/unit/EditUnitModalComponent.tsx index b6c2ff08d..b758cdc5b 100644 --- a/src/client/app/components/unit/EditUnitModalComponent.tsx +++ b/src/client/app/components/unit/EditUnitModalComponent.tsx @@ -14,6 +14,7 @@ import TooltipHelpContainer from '../../containers/TooltipHelpContainer'; import '../../styles/modal.css'; import { removeUnsavedChanges } from '../../actions/unsavedWarning'; import { submitEditedUnit } from '../../actions/units'; +import { State } from '../types/redux/state'; import { UnitData, DisplayableType, UnitRepresentType, UnitType } from '../../types/redux/units'; import { TrueFalseType } from '../../types/items'; import { notifyUser } from '../../utils/input' @@ -65,6 +66,12 @@ export default function EditUnitModalComponent(props: EditUnitModalComponentProp setState({ ...state, [e.target.name]: Number(e.target.value) }); } + const handleDeleteUnit = () => { + // Closes the warning modal + // Do not call the handler function because we do not want to open the parent modal + // Delete the conversion using the state object, it should only require the source and destination ids set + } + /* Edit Unit Validation: Name cannot be blank Sec in Rate must be greater than zero @@ -315,6 +322,9 @@ export default function EditUnitModalComponent(props: EditUnitModalComponentProp + {/* Hides the modal */} {/* Hides the modal */} {/* Hides the modal */}