Skip to content

Commit

Permalink
feat: allow to add a fee to an invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature.
joroshiba Jordan Oroshiba
1 parent cbbedf1 commit ea0d6f2
Showing 16 changed files with 4,140 additions and 307 deletions.
4 changes: 2 additions & 2 deletions src/components/form/ComboBox/types.ts
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ interface BasicComboboxProps extends Omit<ComboBoxInputProps, 'params' | 'search
loading?: boolean
disabled?: boolean
value?: string
data: BasicComboBoxData[]
data?: BasicComboBoxData[]
sortValues?: boolean
allowAddValue?: boolean
emptyText?: string
@@ -60,7 +60,7 @@ interface BasicComboboxProps extends Omit<ComboBoxInputProps, 'params' | 'search
}

interface GroupedComboboxProps extends Omit<BasicComboboxProps, 'data' | 'renderGroupHeader'> {
data: ComboboxDataGrouped[]
data?: ComboboxDataGrouped[]
renderGroupHeader?: Record<string, ReactNode>
}

8 changes: 7 additions & 1 deletion src/components/invoices/details/DeleteAdjustedFeeDialog.tsx
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import { forwardRef, useImperativeHandle, useRef, useState } from 'react'

import { Typography } from '~/components/designSystem'
import { WarningDialog, WarningDialogRef } from '~/components/WarningDialog'
import { addToast } from '~/core/apolloClient'
import { TExtendedRemainingFee } from '~/core/formats/formatInvoiceItemsMap'
import { useDestroyAdjustedFeeMutation } from '~/generated/graphql'
import { useInternationalization } from '~/hooks/core/useInternationalization'
@@ -37,6 +38,11 @@ export const DeleteAdjustedFeeDialog = forwardRef<DeleteAdjustedFeeDialogRef>((_
onCompleted({ destroyAdjustedFee }) {
if (destroyAdjustedFee?.id) {
dialogRef.current?.closeDialog()

addToast({
message: translate('text_1738084927595tzdnuy6oxyu'),
severity: 'success',
})
}
},
refetchQueries: ['getInvoiceDetails'],
@@ -64,7 +70,7 @@ export const DeleteAdjustedFeeDialog = forwardRef<DeleteAdjustedFeeDialogRef>((_
},
})
}}
continueText={translate('text_65a6b4e2cb38d9b70ec53c67')}
continueText={translate('text_65a6b4e2cb38d9b70ec54035')}
/>
)
})
Loading

0 comments on commit ea0d6f2

Please sign in to comment.