mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix : correct rename variable in sale & purchase floating Actions.
This commit is contained in:
@@ -23,9 +23,7 @@ export default function EstimateFloatingActions({
|
||||
isSubmitting,
|
||||
onSubmitClick,
|
||||
onCancelClick,
|
||||
onClearClick,
|
||||
estimateId,
|
||||
isDelivered,
|
||||
estimate,
|
||||
}) {
|
||||
const { resetForm, submitForm } = useFormikContext();
|
||||
|
||||
@@ -82,14 +80,13 @@ export default function EstimateFloatingActions({
|
||||
};
|
||||
|
||||
const handleClearBtnClick = (event) => {
|
||||
// saveInvoke(onClearClick, event);
|
||||
resetForm();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={classNames(CLASSES.PAGE_FORM_FLOATING_ACTIONS)}>
|
||||
{/* ----------- Save And Deliver ----------- */}
|
||||
<If condition={!estimateId || !isDelivered}>
|
||||
<If condition={!estimate || !estimate?.is_delivered}>
|
||||
<ButtonGroup>
|
||||
<Button
|
||||
disabled={isSubmitting}
|
||||
@@ -156,7 +153,7 @@ export default function EstimateFloatingActions({
|
||||
</ButtonGroup>
|
||||
</If>
|
||||
{/* ----------- Save and New ----------- */}
|
||||
<If condition={estimateId && isDelivered}>
|
||||
<If condition={estimate && estimate?.is_delivered}>
|
||||
<ButtonGroup>
|
||||
<Button
|
||||
disabled={isSubmitting}
|
||||
@@ -192,7 +189,7 @@ export default function EstimateFloatingActions({
|
||||
className={'ml1'}
|
||||
disabled={isSubmitting}
|
||||
onClick={handleClearBtnClick}
|
||||
text={estimateId ? <T id={'reset'} /> : <T id={'clear'} />}
|
||||
text={estimate ? <T id={'reset'} /> : <T id={'clear'} />}
|
||||
/>
|
||||
{/* ----------- Cancel ----------- */}
|
||||
<Button
|
||||
|
||||
@@ -264,7 +264,7 @@ const EstimateForm = ({
|
||||
initialValues={initialValues}
|
||||
onSubmit={handleFormSubmit}
|
||||
>
|
||||
{({ isSubmitting, values }) => (
|
||||
{({ isSubmitting}) => (
|
||||
<Form>
|
||||
<EstimateFormHeader
|
||||
onEstimateNumberChanged={handleEstimateNumberChange}
|
||||
@@ -274,10 +274,9 @@ const EstimateForm = ({
|
||||
<EstimateFormFooter />
|
||||
<EstimateFloatingActions
|
||||
isSubmitting={isSubmitting}
|
||||
estimateId={estimateId}
|
||||
estimate={estimate}
|
||||
onSubmitClick={handleSubmitClick}
|
||||
onCancelClick={handleCancelClick}
|
||||
isDelivered={values.delivered}
|
||||
/>
|
||||
</Form>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user